Register Existing Token

If you own an ERC-20 token on a single chain and want a wrapped, bridgeable version on other chains, you can register it as a Canonical Interchain Token using the Interchain Token Factory contract. Each token can only be registered once as a canonical token on its “home chain”.

You can register your existing token directly via the contract or use the ITS Portal no-code solution. Take a look at the diagram below to understand the process of registering an existing token as a Canonical Interchain Token.

💡

This diagram is interactive click on the function names!

Your browser does not support SVG

Install the Axelar Interchain Token Service (ITS) package using npm or any other node package manager:

Terminal window
npm i @axelar-network/interchain-token-service

Use the registerCanonicalInterchainToken function to register your token:

bytes32 tokenId = its.registerCanonicalInterchainToken(
myTokenAddress // address of your canonical token
);

The registerCanonicalInterchainToken function deploys a Lock/Unlock Token Manager on the source chain, connects it to ITS upon deployment, and returns a unique token ID. When you trigger the registerCanonicalInterchainToken() function, that will initiate the process of registering your custom token with a Lock/Unlock token manager type to your token’s home chain. Now that you have registered your token on the home chain, you can call the deployRemoteCanonicalInterchainToken(). This will deploy an Interchain Token on a different blockchain that will be connected to your canonical token on the home chain you registered when you called the previous function.

Note: This is just one of many different flows you can choose to follow when interacting with ITS.

Use the deployRemoteCanonicalInterchainToken function to deploy the token on a remote chain as a cross-chain transaction:

bytes32 tokenId = its.deployRemoteCanonicalInterchainToken{value: msg.value}(
'Ethereum', // original chain name
myTokenAddress, // original token address
'Avalanche', // destination chain name
msg.value // gas sent for token deployment
);

The deployRemoteCanonicalInterchainToken function deploys a token connected to your registered token on the home chain, making it bridgeable to the destination chain, and returns a token ID.

🚨

NOTE: The security of your token is limited to the security of the chains it integrates with. When making a token interchain, ensure that all the chains it will be deployed to are trustworthy.

For further examples utilizing the Interchain Token Service, check out the axelar-examples repository on GitHub. There, you can find an example implementation titled its-canonical-token, which demonstrates how to deploy canonical Interchain Tokens and send cross-chain transfers.

For a step-by-step guide on registering an existing token, check out the Programmatically Create a Canonical Interchain Token Using the Interchain Token Service tutorial.

Edit on GitHub