Skip to content

availableNetworkNames

An array of all supported network names.

Usage

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

Returns

string[]

Array of network name strings.

Examples

import { availableNetworkNames } from '@ethereum-tag-service/contracts'
 
// Check if network name is supported
const isSupported = availableNetworkNames.includes('basesepolia');
 
// Iterate over network names
availableNetworkNames.forEach(name => {
  console.log(name)
})
// @log: Output: "basesepolia"
 
// @log: Output: "basesepolia"
 
// @log: Output: "hardhat"
## 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] 38 - Cannot find module '@ethereum-tag-service/contracts' or its corresponding type declarations. [7006] 239 - Parameter 'name' implicitly has an 'any' type.