Get supported tokens and chains

Squid SDK provides all the information you need around the supported tokens and chains consuming them directly from our API

Once you have the SDK inited, you will be able to access the data in the following way:

const tokens = squid.tokens as TokenData[]
const chains = squid.chains as ChainData[]

You can see the response types here:#tokendata #chains-data

Note: Testnet or Mainnet lists will be returned depending on the API endpoint you set in config when initing the SDK.

Example: find tokens by chainId and symbol in the TokenData object

// set fromToken to USDC on ethereum
const fromToken = squid.tokens.find(
    t =>
      t.symbol === "USDC" &&
      t.chainId === squid.chains.find(c => c.chainName === "Ethereum")?.chainId
  );

The property chains.chainName corresponds to Axelar's docs, detailed here.

A list of Axelar testnet tokens can be found here https://docs.axelar.dev/dev/build/contract-addresses/testnet

Last updated