• Core
  • Chains

Chains

@wagmi/core exports the Mainnet (mainnet) & Sepolia (sepolia) chains out-of-the-box.

import { mainnet, sepolia } from '@wagmi/core'

If you wish to extend to other EVM-compatible chains (like Polygon, Optimism, BSC, Avalanche, etc), you can either import the chain directly from the @wagmi/core/chains entrypoint, or build it yourself.

@wagmi/core/chains

The @wagmi/core/chains entrypoint proxies the viem/chains entrypoint,which contains references to popular EVM-compatible chains such as: Polygon, Optimism, Avalanche, and more.

Usage

Import your chains from the entrypoint and use them in your wagmi app:

import { configureChains } from '@wagmi/core'
import { avalanche, bsc, mainnet } from '@wagmi/core/chains'
 
const { chains, publicClient } = configureChains(
  [mainnet, avalanche, bsc],
  ...
)

Read more on configuring chains

Supported chains

  • mainnet
  • goerli
  • arbitrum
  • arbitrumGoerli
  • arbitrumNova
  • aurora
  • auroraTestnet
  • avalanche
  • avalancheFuji
  • base
  • baseGoerli
  • boba
  • bronos
  • bronosTestnet
  • bsc
  • bscTestnet
  • bxn
  • bxnTestnet
  • canto
  • celo
  • celoAlfajores
  • classic
  • confluxESpace
  • confluxESpaceTestnet
  • chronos
  • chronosTestnet
  • crossbell
  • dfk
  • dogechain
  • edgeware
  • edgewareTestnet
  • eos
  • eosTestnet
  • ekta
  • ektaTestnet
  • evmos
  • evmosTestnet
  • fantom
  • fantomTestnet
  • fibo
  • filecoin
  • filecoinCalibration
  • filecoinHyperspace
  • flare
  • flareTestnet
  • fuse
  • fuseSparknet
  • gobi
  • gnosis
  • gnosisChiado
  • haqqMainnet
  • haqqTestedge2
  • harmonyOne
  • iotex
  • iotexTestnet
  • klaytn
  • linea
  • lineaTestnet
  • mantle
  • mantleTestnet
  • metis
  • metisGoerli
  • mev
  • mevTestnet
  • modeTestnet
  • moonbaseAlpha
  • moonbeam
  • moonriver
  • neonDevnet
  • neonMainnet
  • nexilix
  • nexi
  • oasys
  • okc
  • optimism
  • optimismGoerli
  • polygon
  • polygonMumbai
  • polygonZkEvm
  • polygonZkEvmTestnet
  • pulsechain
  • pulsechainV4
  • qMainnet
  • qTestnet
  • rollux
  • rolluxTestnet
  • ronin
  • saigon
  • scrollSepolia
  • scrollTestnet
  • sepolia
  • shardeumSphinx
  • skaleCalypso
  • skaleCalypsoTestnet
  • skaleChaosTestnet
  • skaleCryptoBlades
  • skaleCryptoColosseum
  • skaleEuropa
  • skaleEuropaTestnet
  • skaleExorde
  • skaleHumanProtocol
  • skaleNebula
  • skaleNebulaTestnet
  • skaleRazor
  • skaleTitan
  • skaleTitanTestnet
  • syscoin
  • syscoinTestnet
  • songbird
  • songbirdTestnet
  • taikoTestnetSepolia
  • taraxa
  • taraxaTestnet
  • telos
  • telosTestnet
  • thunderTestnet
  • titan
  • titanTestnet
  • wanchain
  • wanchainTestnet
  • xdc
  • xdcTestnet
  • zetachainAthensTestnet
  • zkSync
  • zkSyncTestnet
  • zora
  • zoraTestnet
  • foundry
  • hardhat
  • localhost

Want to add a chain that's not listed here? Head to the Viem and read the Contributing Guide before opening a pull request.

Build your own

You can also extend wagmi to support other EVM-compatible chains by building your own chain object that inherits the Chain type.

import { Chain } from '@wagmi/core'
 
export const avalanche = {
  id: 43_114,
  name: 'Avalanche',
  network: 'avalanche',
  nativeCurrency: {
    decimals: 18,
    name: 'Avalanche',
    symbol: 'AVAX',
  },
  rpcUrls: {
    public: { http: ['https://api.avax.network/ext/bc/C/rpc'] },
    default: { http: ['https://api.avax.network/ext/bc/C/rpc'] },
  },
  blockExplorers: {
    etherscan: { name: 'SnowTrace', url: 'https://snowtrace.io' },
    default: { name: 'SnowTrace', url: 'https://snowtrace.io' },
  },
  contracts: {
    multicall3: {
      address: '0xca11bde05977b3631167028862be2a173976ca11',
      blockCreated: 11_907_934,
    },
  },
} as const satisfies Chain