Axelar Interchain Transfer
Feature Overview
Axelar's Interchain Token Service (ITS) connects tokens across multiple blockchains, enabling token transfers between blockchains. ITS is designed to be a flexible, permisionless process, meaning that the way tokens are connected between chains can vary for different use cases. For further reading on the design, see: Interchain Tokens and Interchain Token Service.
How It Works
Interchain transfers are executed through Axelar Interchain Token Service (ITS). ITS is a set of smart contracts deployed on the XRPL EVM Sidechain that are responsible for the interchain token transfer functionality.
The following diagram shows the process of transferring a token from the XRPL to the XRPL EVM Sidechain.
- Payment transaction: A payment transaction is submitted on XRPL Ledger. It contains the amount to be transferred, the destination address on the XRPL EVM Sidechain. The payment transaction is submitted to the Axelar Multisig account.
- Send Interchain Message through amplifier: Once the payment transaction is submitted to the Axelar Multisig account, the amplifier will send a message to the XRPL EVM Sidechain Axelar Amplifier Gateway.
- Execute ITS contract on XRPL EVM Sidechain: In the meantime, the relayer will call the ITS contract on the XRPL EVM Sidechain to start the token transfer process on the XRPL EVM Sidechain.
- Confirm token transfer message: Once the relayer calls the ITS contract on the XRPL EVM Sidechain, the ITS contract will ask to the AxelarAmplifierGateway on the XRPL EVM Sidechain to confirm the token transfer message.
- Confirm response: The AxelarAmplifierGateway on the XRPL EVM Sidechain will confirm the token transfer message.
- Transfer token: If the AxelarAmplifierGateway confirms the token transfer message, the token will be transferred to the destination address on the XRPL EVM Sidechain.
Key Components
- Axelar Multisig Account: The Axelar Multisig account is the account that is responsible for submitting the message to the Axelar network (from XRPL Ledger).
- Axelar Amplifier Gateway: The Axelar Amplifier Gateway is the smart contract which communicates with the Axelar network, enabling the message passing functionality.
- ITS contracts: The ITS contracts are the smart contracts which are responsible for the interchain token transfer functionality. You can find the ITS contracts on the Axelar Developer Hub.
- XRPL EVM Sidechain: The XRPL EVM Sidechain is the destination for the message.
- XRPL Ledger: The XRPL Ledger is the source of the message.
Sending assets from XRP Ledger to XRPL EVM
Sending assets from the XRP Ledger to the XRPL EVM or other chains is straightforward. The process involves executing a standard payment transaction, specifying the following key parameters:
Amount
: Specifies the quantity of the asset to be transferred. The format and value depend on the type of asset being sent (e.g., XRP or IOUs).Destination
: The address of the Gateway on the XRP Ledger.Memos
: Hex-encoded data required for the transfer, including:- The type of call to initiate.
- The destination chain on the Axelar network.
- The recipient's address on the destination chain.
- The gas fee.
See Axelar's documentation for a guide on interchain token transfers.
Sending assets from XRPL EVM to XRP Ledger
To send assets from the XRPL EVM back to the XRPL, you’ll call the interchainTransfer
method of the ITS contract on the XRPL EVM. You must provide:
tokenId
: The token’s Axelar ID.destinationChain
: The Axelar chain ID of the target chain (e.g.,"xrpl"
or"xrpl-dev"
).destinationAddress
: The address on the XRPL where the assets will be received (an R-address).amount
: The amount to transfer, as an integer without decimals.