cBridge Aptos Transfer (xAsset Only)

Prerequisites

Before implementing transfer functionality between EVM chains and Non-EVM chains, you should know how to transfer between EVM chains​

Implementation

The principle and methodology of transfer between EVM chains and Non-EVM chains are the same as transfer between EVM chains and EVM chains. To support Aptos transfer, there are several things to do.
  • Submit transfer transaction through TransferAgent contract on EVM chains
  • Submit transfer transaction to Aptos Modules(Vault for deposit, PegBridge for burn) deployed by cBridge.
To avoid chain id conflict, Celer SGN reserves 12360001 as Aptos Mainnet Chain Id, 12360002 as Aptos Testnet Chain Id and 12360003 as Aptos Devnet Chain Id.

Submit transfer through TransferAgent contract on EVM

Unlike EVM wallet address, Aptos wallet uses 32 bytes hex string as address. Then you cannot submit transfer transaction using Aptos wallet address as destination receiver through cBridge OriginalTokenVault / PeggedBridge contract. Hence, cBridge deploys a TransferAgent contract which can use any length string as destination receiver.

Submit transfer on Aptos Chain

You can refer this to submit transaction on Aptos