Interchain Token Service Executable
You can use the Axelar Interchain Token Service (ITS) to create a new Interchain Token or upgrade existing ERC-20 tokens to an Interchain Token. ITS also allows you to send messages along with Interchain Tokens across different blockchain networks.
The Interchain Token Service is deployed to 0xB5FB4BE02232B1bBA4dC8f81dc24C26980dE9e3C
while the Interchain Token Factory is deployed to 0x83a93500d23Fbc3e82B410aD07A6a9F7A0670D66
.
Deploy a new Interchain Token
To deploy a new Interchain Token on Chain A, use the deployInterchainToken() method in the Interchain Token Factory contract.
Remotely deploy an Interchain Token
Deploy an Interchain Token remotely from chain A to chain B using the deployRemoteInterchainToken()
function in the Interchain Token Factory contract.
Send a message with a token
Send a message alongside a token using the callContractWithInterchainToken()
function from the Interchain Token Service. You should provide the tokenId
, destinationChain
, destinationAddress
, amount
, message
, and gasValue
as parameters.
The destinationAddress
should be an address encoded as bytes. Use the toBytes()
method to quickly accomplish this on-chain.
Execute with Interchain Token
The InterchainTokenExecutable
contains an _executeWithInterchainToken()
function that is triggered on the destination chain after the callContractWithInterchainToken()
function is executed on the source chain. The purpose of this function is to validate the contract call and then invoke your _executeWithInterchainToken()
method. You can write any custom logic inside this method.
What’s next
To find more examples of how to utilize the Interchain Token Service and test the Interchain Token Service Executable, please refer to the axelar-examples
repository on GitHub.