Get Supported Tokens

In this tutorial, you will learn how to retrieve the list of supported tokens that can be transferred between chains using Chainlink CCIP, with CCIP Tools. You'll use the getSupportedTokens command of ccip-tools to query the list of supported tokens that can be transferred from a specific source chain to a specific destination chain.

Before you begin

Complete the prerequisite steps of the Transfer Tokens between EOAs tutorial.

Tutorial

This tutorial shows you how to retrieve the list of supported tokens that can be transferred between chains using Chainlink CCIP. By supplying the getSupportedTokens command of ccip-tools with a source chain, source router address, and a destination chain, you can get the list of supported tokens that can be transferred from the source chain to the destination chain.

Execute the script in your command line:

./src/index.ts getSupportedTokens <source> <router> <dest>

The script requires the following parameters:

  • source: Chain ID or network name.

    For example, 43113 for Avalanche Fuji or 11155111 for Ethereum Sepolia. You can also use the network name, such as avalanche-testnet-fuji or ethereum-testnet-sepolia.

    You can find the supported network names and chain IDs that can be used for source in the selectors.ts file of the ccip-tools repository.

  • router: Router contract address on the source network.

    You can find the router contract address in the CCIP Directory by searching for the relevant network.

  • dest: Chain ID or network name.

    For example, 43113 for Avalanche Fuji or 11155111 for Ethereum Sepolia. You can also use the network name, such as avalanche-testnet-fuji or ethereum-testnet-sepolia.

    You can find the supported network names and chain IDs that can be used for dest in the selectors.ts file of the ccip-tools repository.

Example Usage:

If you would like to retrieve the list of supported tokens that can be transferred from Avalanche Fuji to Ethereum Sepolia, you can run the following command:

$ ./src/index.ts getSupportedTokens 43113 0xF694E193200268f9a4868e4Aa017A0118C9a8177 11155111

[INFO] Starting token discovery for cross-chain transfers
[INFO] Using TokenAdminRegistry 1.5.0 at 0xA92053a4a3922084d992fD2835bdBa4caC6877e6 from router 0xF694E193200268f9a4868e4Aa017A0118C9a8177
┌────────────────────────────────────┬──────────────────────────────────────────────┐
│ (index)                            │ Values                                       │
├────────────────────────────────────┼──────────────────────────────────────────────┤
│ address                            │ '0xD21341536c5cF5EB1bcb58f6723cE26e8D8E90e4' │
│ symbol                             │ 'CCIP-BnM'                                   │
│ name                               │ 'CCIP-BnM'                                   │
│ decimals                           │ 18                                           │
│ pool                               │ '0x10e3A37ff21c20CD802fdAF0204e2Ff04e5485ee' │
│ pool.typeAndVersion                │ 'BurnMintTokenPool 1.5.1'                    │
│ remoteToken                        │ '0xFd57b4ddBf88a4e07fF4e34C487b99af2Fe82a05' │
│ remotePools                        │ '0x4CcbDd6CF18800360161E4D2A519A2047176bDF0' │
│ rateLimiters.outbound.tokens       │ '100000.0'                                   │
│ rateLimiters.outbound.capacity     │ '100000.0'                                   │
│ rateLimiters.outbound.rate         │ '167.0'                                      │
│ rateLimiters.outbound.timeToRefill │ '9m58s'                                      │
│ rateLimiters.inbound.tokens        │ '100000.0'                                   │
│ rateLimiters.inbound.capacity      │ '100000.0'                                   │
│ rateLimiters.inbound.rate          │ '167.0'                                      │
│ rateLimiters.inbound.timeToRefill  │ '9m58s'                                      │
└────────────────────────────────────┴──────────────────────────────────────────────┘
┌────────────────────────────────────┬──────────────────────────────────────────────┐
│ (index)                            │ Values                                       │
├────────────────────────────────────┼──────────────────────────────────────────────┤
│ address                            │ '0x70F5c5C40b873EA597776DA2C21929A8282A3b35' │
│ symbol                             │ 'clCCIP-LnM'                                 │
│ name                               │ 'clCCIP-LnM'                                 │
│ decimals                           │ 18                                           │
│ pool                               │ '0x8e35eB0dfb39Ec5F84254C3f863986a913171E0B' │
│ pool.typeAndVersion                │ 'BurnMintTokenPoolAndProxy 1.5.0'            │
│ remoteToken                        │ '0x466D489b6d36E7E3b824ef491C225F5830E81cC1' │
│ remotePools                        │ '0x658FdaC59a197D5166151640b7a673F7dF1Ba324' │
│ rateLimiters.outbound.tokens       │ '100000.0'                                   │
│ rateLimiters.outbound.capacity     │ '100000.0'                                   │
│ rateLimiters.outbound.rate         │ '167.0'                                      │
│ rateLimiters.outbound.timeToRefill │ '9m58s'                                      │
│ rateLimiters.inbound.tokens        │ '100000.0'                                   │
│ rateLimiters.inbound.capacity      │ '100000.0'                                   │
│ rateLimiters.inbound.rate          │ '167.0'                                      │
│ rateLimiters.inbound.timeToRefill  │ '9m58s'                                      │
└────────────────────────────────────┴──────────────────────────────────────────────┘
┌────────────────────────────────────┬──────────────────────────────────────────────┐
│ (index)                            │ Values                                       │
├────────────────────────────────────┼──────────────────────────────────────────────┤
│ address                            │ '0x5425890298aed601595a70AB815c96711a31Bc65' │
│ symbol                             │ 'USDC'                                       │
│ name                               │ 'USD Coin'                                   │
│ decimals                           │ 6                                            │
│ pool                               │ '0x5931822f394baBC2AACF4588E98FC77a9f5aa8C9' │
│ pool.typeAndVersion                │ 'USDCTokenPool 1.5.1'                        │
│ remoteToken                        │ '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238' │
│ remotePools[0]                     │ '0xb48EacF882dC4899Ae750AF4a6E2892E11866d8D' │
│ remotePools[1]                     │ '0xAff3fE524ea94118EF09DaDBE3c77ba6AA0005EC' │
│ rateLimiters.outbound.tokens       │ '100000.0'                                   │
│ rateLimiters.outbound.capacity     │ '100000.0'                                   │
│ rateLimiters.outbound.rate         │ '167.0'                                      │
│ rateLimiters.outbound.timeToRefill │ '9m58s'                                      │
│ rateLimiters.inbound.tokens        │ '100000.0'                                   │
│ rateLimiters.inbound.capacity      │ '100000.0'                                   │
│ rateLimiters.inbound.rate          │ '167.0'                                      │
│ rateLimiters.inbound.timeToRefill  │ '9m58s'                                      │
└────────────────────────────────────┴──────────────────────────────────────────────┘
......
......
......
┌───────────────────────┬──────────────────────────────────────────────┐
│ (index)               │ Values                                       │
├───────────────────────┼──────────────────────────────────────────────┤
│ address               │ '0x838AB8F15867440A41C4149bcbba6ae402EfAd38' │
│ symbol                │ 'USDf'                                       │
│ name                  │ 'Falcon USD'                                 │
│ decimals              │ 18                                           │
│ pool                  │ '0x8210c0634AB8f273806e4b7866E9Db353773c44B' │
│ pool.typeAndVersion   │ 'BurnMintTokenPool 1.5.1'                    │
│ remoteToken           │ '0x3E34bFC2872534C331b6db2E4b3593FA7eaEddFd' │
│ remotePools           │ '0x21017CEC5f89fEb2c4B0F6C114E55Fa8EFDB00f2' │
│ rateLimiters.outbound │ 'disabled'                                   │
│ rateLimiters.inbound  │ 'disabled'                                   │
└───────────────────────┴──────────────────────────────────────────────┘
┌───────────────────────┬──────────────────────────────────────────────┐
│ (index)               │ Values                                       │
├───────────────────────┼──────────────────────────────────────────────┤
│ address               │ '0xDA89A6C2c9f6E8d94E4a65d8AEe482908e9D709A' │
│ symbol                │ 'CCTWT'                                      │
│ name                  │ 'CCT Wizard Token'                           │
│ decimals              │ 18                                           │
│ pool                  │ '0x3cD3CFAFb82a1Fd711753bb1a51F06a284bbd972' │
│ pool.typeAndVersion   │ 'BurnMintTokenPool 1.5.1'                    │
│ remoteToken           │ '0x74Ef0b124f192e0990B5451Ad12A4EC20FCf2B44' │
│ remotePools           │ '0x4dC3aA202138B40CC15867f2ab59153cF6FF83c4' │
│ rateLimiters.outbound │ 'disabled'                                   │
│ rateLimiters.inbound  │ 'disabled'                                   │
└───────────────────────┴──────────────────────────────────────────────┘
┌───────────────────────┬──────────────────────────────────────────────┐
│ (index)               │ Values                                       │
├───────────────────────┼──────────────────────────────────────────────┤
│ address               │ '0x9BDdEBA9B0c051Ad5C1819D2F2671Af8B4D360B3' │
│ symbol                │ 'TT1'                                        │
│ name                  │ 'Test Token 1'                               │
│ decimals              │ 18                                           │
│ pool                  │ '0x4Fc3534dEB27Bb61AfFFC5c02222594aF3024A61' │
│ pool.typeAndVersion   │ 'BurnMintTokenPool 1.5.1'                    │
│ remoteToken           │ '0x0325d145398Eeb977a55B39CC7847C48b84D93f5' │
│ remotePools           │ '0x0020267Ef0F96666A8CA236DB592547b14106807' │
│ rateLimiters.outbound │ 'disabled'                                   │
│ rateLimiters.inbound  │ 'disabled'                                   │
└───────────────────────┴──────────────────────────────────────────────┘
Summary: totalTokens = 1070 , supportedTokens = 196

Get the latest Chainlink content straight to your inbox.