How to check if a route is supported?

To determine if a route is supported (also referred to as whether a token is supported for bridging), use the Chains API to check for an available route between a given token pair.

curl -X GET "https://api.relay.link/chains"

The response will return a list of chains, each containing supported token pairs. To verify if a route is supported, follow these steps:

  1. Look for the tokenSupport field in the response for a given chain:

    • If tokenSupport is All, then all routes involving this chain as either the origin or destination are supported for all tokens.
    • If tokenSupport is Limited, proceed to step 2.
  2. If tokenSupport is Limited, check the erc20Currencies field in the response. This field contains an array of token objects with metadata indicating whether a token supports bridging.

  3. Locate the supportsBridging field in the token object:

    • If supportsBridging is true, the token is supported for bridging.
    • If supportsBridging is false or if the token pair is not listed in erc20Currencies, then the route is not supported.

Examples of Supported and Limited Token Routes

Example: All Tokens Supported

{
  "chains": [
        {
            "id": 10,
            "name": "optimism",
            "displayName": "Optimism",
            "tokenSupport": "All",
            "currency": {
                "id": "eth",
                "symbol": "ETH",
                "name": "Ether",
                "address": "0x0000000000000000000000000000000000000000",
                "decimals": 18,
                "supportsBridging": true
            },
            "erc20Currencies": [
                {
                    "id": "wbtc",
                    "symbol": "WBTC",
                    "name": "Wrapped BTC",
                    "address": "0x68f180fcce6836688e9084f035309e29bf0a2095",
                    "decimals": 8,
                    "supportsBridging": false,
                    "withdrawalFee": 0,
                    "depositFee": 0,
                    "surgeEnabled": false
                },
                {
                    "id": "usdt",
                    "symbol": "USDT",
                    "name": "Tether USD",
                    "address": "0x94b008aa00579c1307b0ef2c499ad98a8ce58e58",
                    "decimals": 6,
                    "supportsBridging": true,
                    "withdrawalFee": 0,
                    "depositFee": 0,
                    "surgeEnabled": false
                },
                {
                    "id": "dai",
                    "symbol": "DAI",
                    "name": "Dai Stablecoin",
                    "address": "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1",
                    "decimals": 18,
                    "supportsBridging": false,
                    "withdrawalFee": 0,
                    "depositFee": 0,
                    "surgeEnabled": false
                },
                {
                    "id": "usdc",
                    "symbol": "USDC",
                    "name": "USD Coin",
                    "address": "0x0b2c639c533813f4aa9d7837caf62653d097ff85",
                    "decimals": 6,
                    "supportsBridging": true,
                    "supportsPermit": true,
                    "withdrawalFee": 0,
                    "depositFee": 0,
                    "surgeEnabled": false
                }
            ],
        }
  ]
}

Since the tokenSupport field is All, every token on this chain is supported for all routes.

Example: Limited Token Support


        {
            "id": 7777777,
            "name": "zora",
            "displayName": "Zora",
            "tokenSupport": "Limited",
            "currency": {
                "id": "eth",
                "symbol": "ETH",
                "name": "Ether",
                "address": "0x0000000000000000000000000000000000000000",
                "decimals": 18,
                "supportsBridging": true
            },
            "erc20Currencies": [
                {
                    "id": "usdc",
                    "symbol": "USDzC",
                    "name": "USD Coin (Bridged from Ethereum)",
                    "address": "0xcccccccc7021b32ebb4e8c08314bd62f7c653ec4",
                    "decimals": 6,
                    "supportsBridging": true,
                    "withdrawalFee": 0,
                    "depositFee": 0,
                    "surgeEnabled": false
                }
            ],
        }

Here, tokenSupport is Limited, meaning only specific tokens can be bridged. In this case, usdc is listed under erc20Currencies with supportsBridging: true, so routes involving usdc as an origin or destination token on Zora are supported.