Sending Teleports
Overview
Teleport transactions in Rayls enable secure cross-chain transfers of digital assets between Privacy Ledgers within Private Subnets. Before a token can be teleported, it must be registered in the subnet. This guide provides a comprehensive overview of the registration and teleportation processes, including references to the specific handler documentation required for different token standards.
Pre-Requisites
Before initiating a teleport transaction, ensure the following:
- Token Deployment: The token must be deployed and minted on your Privacy Ledger.
- Token Registration: The token must be registered in the Token registry of the Private Subnet.
- Token Approval: The token must be approved by the Private Subnet Operator in order to be
active
for cross-chain message in the subnet. - 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 the Privacy Ledger and Relayer to make sure 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 how to initiate the teleport transaction using the specific handler, refer to:
2. Teleport Execution
Once the teleport function is called:
Relayer Activation:
The Relayer component on the sender's Privacy Ledger detects the teleport transaction and securely relays it to the Commit Chain.
Commit Chain Validation:
The Commit Chain validates the transaction, ensuring it complies with the network rules before finalizing the teleport to the destination Privacy Ledger.
3. Receiving the Teleport Transaction
At the receiver’s Privacy Ledger:
Relayer Listening to the Commit Chain:
The destination Privacy Ledger’s Relayer picks up the transaction from the Commit Chain, processes it, and finalizes the teleport.
Token Release:
Tokens are minted on the destination Privacy Ledger, marking the completion of the teleport process.
4. Revert Transaction Flow (Error Handling)
In the event that a teleport transaction fails at any stage (e.g., due to commit chain issues, relayer malfunctions, or destination ledger errors), the teleport will automatically go into the revert flow:
Transaction Validation Failure:
If the Commit Chain fails to validate the teleport, the Relayer will trigger a revert transaction to the sender’s Privacy Ledger. The tokens will be re-credited (re-minted) to the sender's account, this is a regular on-chain transaction and the revert reason is added as a metadata in the transaction for monitoring and auditability purposes.
Relayer or Destination Ledger Failure:
If the issue occurs during the finalization on the receiver's Privacy Ledger (e.g., the destination ledger fails to mint the tokens), the sender Relayer’s will detect the issue via the Commit Chain and revert transaction with the revert reason added as a metadata, returning the tokens to the original ledger.
5. Monitoring your transaction
All transactions inside of a Privacy Ledger and Private Subnet can be monitored via the Privacy Ledger block explorer.
For more information check out the Monitoring Privacy Ledger Transactions page.
Teleport transactions offer a powerful way to move assets securely and privately between Privacy Ledgers within the Rayls ecosystem. By following this guide and utilizing the appropriate handlers, you can efficiently manage cross-chain transfers while maintaining full compliance with each network rules
Updated about 1 month ago