Chain Info

Within our platform, this file offers comprehensive data for each supported blockchain. This includes essential attributes such as the chain ID, native currency, and RPC URL, to provide context and functionality for each chain.

The Info interface describes the shape of an object that contains detailed information about a specific blockchain network (also known as a chain). Each property of the Info interface represents essential data about the network:

chainInfo.ts
interface Info {
  chainId: string;
  chainName: string;
  label: string;
  nativeCurrency: {
    name: string;
    symbol: string;
    decimals: number;
  };
  rpcUrl: string;
  blockExplorerUrl: string;
  WRAPPED_NATIVE_ADDRESS: Address;
}
  • chainId: The chain id.

  • chainName: The name of the chain.

  • label: The chain label.

  • nativeCurrency: An object detailing the native currency of the chain, including its name, symbol, and the number of decimals it uses.

  • rpcUrl: The URL of the RPC endpoint used to interact with the chain.

  • blockExplorerUrl: The URL of the block explorer associated with the chain.

  • WRAPPED_NATIVE_ADDRESS: The address of the wrapped version of the chain's native currency.

The SupportedChainId enumeration defines a set of constants representing supported blockchain networks by their chain IDs. Each enum member is assigned a numeric value that uniquely identifies a blockchain network.

export enum SupportedChainId {
  NOT_SET = 0,
  MAINNET = 1,
  ROPSTEN = 3,
  RINKEBY = 4,
  BSC = 56,
  BASE = 8453,
  BSC_TESTNET = 97,
  POLYGON = 137,
  FANTOM = 250,
  ARBITRUM = 42161,
}

The ChainInfo map associates each SupportedChainId with an Info object containing detailed configuration for the corresponding chain.

Last updated