Skip to content

chains

The chains object is a type-safe mapping of supported chain IDs to their corresponding Viem Chain configuration objects.

Usage

import { chains } from '@ethereum-tag-service/contracts'
 
const baseSepoliaChain = chains['84532']
// @log: Output: Returns the Viem Chain object for Base Sepolia
## Errors were thrown in the sample, but not included in an error tag These errors were not marked as being expected: 2307. Expected: // @errors: 2307 Compiler Errors: index.ts [2307] 23 - Cannot find module '@ethereum-tag-service/contracts' or its corresponding type declarations.

Returns

MultiChainConfig

An object containing chain configurations indexed by chain ID.

Properties

Chain IDs

  • Type: "84532" | "31337"
  • Description: Supported network chain IDs

Available chains:

  • 84532 (baseSepolia)
  • 31337 (hardhat)

Examples

import { chains } from '@ethereum-tag-service/contracts'
 
// Access Base Sepolia chain config
const baseChain = chains['84532']
 
// Access local Hardhat chain config
const localChain = chains['31337']
## Errors were thrown in the sample, but not included in an error tag These errors were not marked as being expected: 2307. Expected: // @errors: 2307 Compiler Errors: index.ts [2307] 23 - Cannot find module '@ethereum-tag-service/contracts' or its corresponding type declarations.