Sending Teleports

Overview

Teleport transactions in Rayls move digital assets securely between the Rayls Sovereign ledgers of institutions within a Rayls Private Network. Before a token can be teleported, it must be registered in the Rayls Private Network. This guide covers the registration and teleport processes, and points to the handler documentation required for each token standard.

Pre-Requisites

Before initiating a teleport transaction, ensure the following:

  • Token Deployment: The token must be deployed and minted in your Rayls Sovereign ledger.
  • Token Registration: The token must be registered in the token registry of the Rayls Private Network.
  • Token Approval: The token must be approved by the Private Network Operator so that it is active for cross-chain messaging in the Rayls Private Network.
  • Smart Contracts Deployed: The appropriate Rayls handler (ERC-20, ERC-721, or ERC-1155) must be deployed and configured.
  • Connected Components: Check the logs of both the Sovereign ledger and the Relayer to confirm they are connected and operational.

Step-by-Step

1. Sending a Teleport Transaction

Use the Appropriate Handler:

Depending on your token standard (ERC-20, ERC-721, or ERC-1155), initiate the teleport transaction using the respective handler's smart contract functions.

Refer to the Handler Documentation:

For detailed instructions on initiating the teleport transaction using a specific handler, refer to:

2. Teleport Execution

Once the teleport function is called:

Relayer Activation:

The Relayer in the sender's Rayls Sovereign ledger detects the teleport transaction and securely relays it to the Private Network Hub.

Private Network Hub Validation:

The Private Network Hub validates the transaction and confirms that it complies with the network rules, before finalising the teleport to the destination institution.

3. Receiving the Teleport Transaction

At the receiving institution:

Relayer Listening to the Private Network Hub:

The destination Relayer picks up the transaction from the Private Network Hub, processes it, and finalises the teleport.

Token Release:

Tokens are minted in the destination institution's Rayls Sovereign ledger and held locked, so they exist but cannot yet be transferred or spent. The Private Network Hub then marks the message as executed, the unlock payload runs, and the tokens pass to the recipient, which completes the teleport.

4. Revert Transaction Flow (Error Handling)

The automatic revert described here is a property of the Teleport Atomic protocol, which is the route this guide covers. Where a token is moved with a plain, non-atomic teleport there is no rollback, because the asset is burned on the origin ledger before the destination is known to have accepted it. Use the atomic route for anything of value.

Under Teleport Atomic, if a transaction fails at any stage, whether through a Private Network Hub issue, a Relayer malfunction or an error in the destination ledger, the teleport automatically enters the revert flow. A teleport that has not completed within the protocol's 240-second lock window also expires into the same flow.

Transaction Validation Failure:

If the Private Network Hub fails to validate the teleport, the Relayer triggers a revert transaction in the sender's Rayls Sovereign ledger. The tokens are re-credited (re-minted) to the sender's account as a regular onchain transaction, with the revert reason added as metadata for monitoring and auditability.

Destination Failure:

If the problem occurs during finalisation in the receiving institution's ledger, for example because the destination ledger fails to mint the tokens, the sender's Relayer detects the issue via the Private Network Hub and issues a revert transaction with the revert reason added as metadata, returning the tokens to the original ledger.

5. Monitoring your transaction

All transactions inside a Rayls Sovereign ledger and across a Rayls Private Network can be monitored via the block explorer.

For more information see the Monitoring cross-chain transactions page.

Teleport transactions move assets securely and privately between institutions in the Rayls ecosystem. Following this guide and using the appropriate handlers lets you manage cross-chain transfers while staying compliant with each network's rules.


Did this page help you?