Skip to content

availableChainIds

An array of supported chain IDs.

Usage

import { availableChainIds } from '@ethereum-tag-service/contracts'
 
console.log(availableChainIds)
// @log: Output: ["84532", "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] 34 - Cannot find module '@ethereum-tag-service/contracts' or its corresponding type declarations.

Returns

SupportedChainId[]

Array of supported chain ID strings.

Examples

import { availableChainIds } from '@ethereum-tag-service/contracts'
 
// Check if chain is supported
const isSupported = availableChainIds.includes('84532')
// @log: > true
 
// Iterate over supported chains
availableChainIds.forEach(chainId => {
  console.log(chainId)
})
// @log: Output: ["84532", "31337"]
## Errors were thrown in the sample, but not included in an error tag These errors were not marked as being expected: 2307 7006. Expected: // @errors: 2307 7006 Compiler Errors: index.ts [2307] 34 - Cannot find module '@ethereum-tag-service/contracts' or its corresponding type declarations. [7006] 232 - Parameter 'chainId' implicitly has an 'any' type.