Introduction EVM Relayer Solidity UtilitiesSandbox
InterchainTokenServiceInterchainTokenFactoryTokenManagerAxelarGateway AxelarGasServiceAxelarExecutableAxelarJS SDK
Onboard Your IBC chainBug Bounty
Crosschain Message FlowaxlUSDCSecurity OverviewInterchain Transaction DurationEVM Contract Governance

Programmatic

The Token Whitelisting for Squid Router form is now live! Download the axelar-configs repo, install dependencies, and npm run wizard on the command line to access the interactive form through the wizard.

Interchain Token

Interchain Tokens are tokens deployed via ITS itself. These are relatively simple ERC20s with a built in integration to ITS so that they are bridgeable to other blockchains they are wired up to as soon as the token is deployed.

🚨

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

Deploy new interchain token with ITS

If you are starting fresh and want to deploy a brand new token that will have bridging from day one, then ITS offers you the ability to deploy a token directly through its own contract.

  1. Install the Axelar ITS dependency

    npm i @axelar-network/interchain-token-service
    
  2. Deploy an interchain token

    bytes32 tokenId = its.deployInterchainToken(
        0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefab, //salt
        'My Interchain Token', //name
        'ITS', //symbol
        18, //decimals
        1000000, //initialSupply
        msg.sender //address receiving initially minted tokens
    )
    

    deploy an interchain token on the same chain. This token will be connected to ITS upon deployment.

  3. Deploy a remote interchain token

    bytes32 tokenId = its.deployRemoteInterchainToken{value: msg.value}(
        'Ethereum', //originalChainName
        0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefab, //salt
        msg.sender, //address to distribute token on dest chain
        "Avalanche", //destinationChain
        msg.value //gas sent for deployment
    )
    

    deploy a remote interchain token as a cross-chain transaction. This token will be connected to ITS upon deployment.

Integrate existing interchain token with ITS

If you own an ERC-20 token on a single chain and want a wrapped, bridgeable version on other chains, register it as a Canonical Interchain Token using the Interchain Token Factory contract. Each token can only be registered a single time as a canonical chain on its “home chain”. This can be done via the ITS Portal no-code solution, but it can also be done directly via the contract.

  1. Install the Axelar ITS dependency

    npm i @axelar-network/interchain-token-service
    
  2. Register your token as a canonical token using Interchain Token Factory

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

    The registerCanonicalInterchainToken will deploy a Lock/Unlock - Token Manager on the source chain

  3. Deploy a remote canonical interchain token

    bytes32 tokenId = its.deployRemoteCanonicalInterchainToken{value: msg.value}(
        'Ethereum', //originalChain
        myTokenAddress, //originalTokenAddress
        'Avalanche', //destinationChain
        msg.value //gas sent for deployment
    )
    

    The deploy remote canonical interchain token will deploy a token that will be connected to your token that you registered on the home chain. Tokens being bridged out of the home chain will be locked there and tokens on the remote blockchains can be traced back to a locked token on the home chain.

Custom Token

Custom tokens are tokens that are deployed on their own as opposed to tokens deployed via ITS itself. These tokens are then integrated with ITS across different chains by deploying a token manager for those tokens. Once a custom token has a token manager deployed for a given chain it becomes bridgeable between different blockchains also have a token connected to a token manager and shares the same interchainTokenId.

Integrate an existing custom token with ITS

  1. Install the Axelar ITS dependency

    npm i @axelar-network/interchain-token-service
    
  2. Build your ERC-20 token and deploy it on multiple chains. You can use a tool such as the Create3 Deployer to give it the same address everywhere.

    import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
    import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
    
    
    contract MyInterchainToken is ERC20, ERC20Burnable {
        constructor(address initialOwner)
            ERC20("My Interchain Token", "ITS")
        {}
    
        function mint(address to, uint256 amount) public onlyMinter {
            _mint(to, amount);
        }
    }
    

    This token is a very simple implementation of an ERC20 but it contains all the critical functionality that would be needed to integrate with ITS. Namely, the ability to mint() and burn() tokens as ITS will interact with those functions while bridging the tokens between chains.

    You also have the option to inherit from the the InterchainTokenStandard so that your token has cross-chain functionality built into the token itself such as the interchainTransfer() function.

  3. Integrate the token with ITS by calling deployTokenManager().

    bytes32 interchainTokenId = its.deployTokenManager(
        0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefab, //salt
        '', //destChain
        ITokenManagerType.TokenManagerType.MINT_BURN, //tokenManager type
        abi.encode(msg.sender.toBytes(), newTokenProxy), //params
        0 //gasValue
    );
    

    When the Token Manager is created it will facilitate connections for your token with ITS. There are several different types of Token Managers that are available to you. More info on Token Manager’s an integrating with them can be found in the Token Manager section

  4. Add the minter role to your token’s Token Manager.

    itsToken.transferMintership(newMinter);
    

    The transferMintership() on your token can be called to transfer the minter role to the Token Manager. The reason for this is when your token is bridged into a destination chain, the msg.sender of the mint() call will be the Token Manager.

  5. Send an interchain transfer

    its.interchainTransfer{value: msg.value}(
        interchainTokenId, //tokenId
        'Ethereum',  //destinationChain
        address(1), //receiver address
        123, //amount
        0x, //metadata
        msg.value //gasValue
    )
    

    The interchainTransfer() sends a cross-chain transfer between chains via the Interchain Token Service.

🚨

The key used to deploy custom tokens (deployTokenManager) is critical for security. If that key is compromised, then that token can be compromised across multiple chains. * Interchain native tokens can only be deployed to more chains via the same deployer key, so that needs to be retained. * Tokens registered on ITS should be careful about giving mint/burn permissions to other contracts. For example, shared mint permission with the Polygon native bridge is not supported (the Polygon native bridge only looks for burns, which ITS uses, meaning it can allow duplicate sends).

Tutorial

For detailed steps on creating a custom Interchain Token, check out the Link Custom Tokens Deployed Across Multiple Chains into Interchain Tokens tutorial.

What’s next

For further examples utilizing the Interchain Token Service, check out the following in the axelar-examples repo on GitHub:

  • its-custom-token — Demonstrates how to use the ITS with a custom token implementation.
  • its-interchain-token — Demonstrates how to deploy Interchain Tokens that are connected across EVM chains and how to send some tokens across.
  • its-canonical-token - Demonstrates how to deploy canonical Interchain Token and send cross-chain transfer for these tokens.
  • its-lock-unlock-fee Demonstrates how to deploy deploy interchain token with lock/unlock_fee token manager type.
  • its-executable Demonstrates how to deploy interchain token and send a cross-chain transfer along with a message.
  • its-mint-burn-from Demonstrates how to deploy interchain token with uses burnFrom() on token being bridged rather than burn().
Edit this page