Function Signature
Parameters
Set to
true to get testnet chains, or false to get mainnet chainsReturns
Array of Chain structs containing blockchain configurations. Each Chain includes:
Name(string) - Chain nameChainID(*big.Int) - EVM chain IDDomain(uint32) - CCTP domain identifierRPC(string) - Default RPC endpoint URLTokenMessengerV2(string) - TokenMessenger V2 contract addressMessageTransmitterV2(string) - MessageTransmitter V2 contract addressUSDC(string) - USDC token contract addressExplorer(string) - Block explorer URLIsTestnet(bool) - Whether this is a testnet chainInstantFinality(bool) - Whether the chain has instant finality
Usage Example
Chain Name Constants
The SDK provides constants for all supported chain names. Use these constants for type-safe chain references:Mainnet Chains
Testnet Chains
Mainnet currently supports 16 chains across domains 0-22, while testnet supports 17 chains. The function internally calls either
GetMainnetChains() or GetTestnetChains() based on the testnet parameter.Related Functions
- GetChainByDomain - Find a specific chain by its domain ID
- GetChainByName - Find a specific chain by its name
- ApplyRPCOverrides - Override default RPC endpoints