Skip to content

Chains

Viem Chain objects. More info at the Viem docs.

Import

Import via the 'wagmi/chains' entrypoint (proxies all chains from 'viem/chains').

ts
import { mainnet } from 'wagmi/chains'
import { mainnet } from 'wagmi/chains'

Available Chains

187 Chains
Ethereum
mainnet
1 - ETH
Goerli
goerli
5 - ETH
OP Mainnet
optimism
10 - ETH
Flare Mainnet
flare
14 - FLR
Coston
songbirdTestnet
16 - CFLR
Songbird Mainnet
songbird
19 - SGB
Cronos Mainnet
cronos
25 - CRO
Rootstock Mainnet
rootstock
30 - RBTC
Telos
telos
40 - TLOS
Telos
telosTestnet
41 - TLOS
LUKSO
lukso
42 - LYX
XinFin Network
xdc
50 - XDC
Apothem Network
xdcTestnet
51 - TXDC
BNB Smart Chain
bsc
56 - BNB
Syscoin Mainnet
syscoin
57 - SYS
Ethereum Classic
classic
61 - ETC
OKC
okc
66 - OKT
Conflux eSpace Testnet
confluxESpaceTestnet
71 - CFX
Meter
meter
82 - MTR
Meter Testnet
meterTestnet
83 - MTR
Binance Smart Chain Testnet
bscTestnet
97 - tBNB
Gnosis
gnosis
100 - xDAI
Shibarium
shibarium
109 - BONE
Coston2
flareTestnet
114 - C2FLR
Fuse
fuse
122 - FUSE
Fuse Sparknet
fuseSparknet
123 - SPARK
Polygon
polygon
137 - MATIC
Shimmer
shimmer
148 - SMR
Manta Pacific Mainnet
manta
169 - ETH
BitTorrent
bitTorrent
199 - BTT
opBNB
opBNB
204 - BNB
Nexilix Smart Chain
nexilix
240 - NEXILIX
Plinga
plinga
242 - PLINGA
Oasys
oasys
248 - OAS
Fantom
fantom
250 - FTM
Kroma
kroma
255 - ETH
zkSync Era Testnet
zkSyncTestnet
280 - ETH
Boba Network
boba
288 - BOBA
zkSync Sepolia Testnet
zkSyncSepoliaTestnet
300 - ETH
Filecoin Mainnet
filecoin
314 - FIL
zkSync Era
zkSync
324 - ETH
Cronos Testnet
cronosTestnet
338 - tCRO
PulseChain
pulsechain
369 - PLS
Optimism Goerli
optimismGoerli
420 - ETH
PGN
pgn
424 - ETH
Rollux Mainnet
rollux
570 - SYS
Astar
astar
592 - ASTR
Mandala TC9
mandala
595 - mACA
Metis Goerli
metisGoerli
599 - METIS
Karura
karura
686 - KAR
Acala
acala
787 - ACA
Taraxa Mainnet
taraxa
841 - TARA
Taraxa Testnet
taraxaTestnet
842 - TARA
Wanchain
wanchain
888 - WAN
Mode Testnet
modeTestnet
919 - ETH
PulseChain V4
pulsechainV4
943 - v4PLS
5ireChain Thunder Testnet
thunderTestnet
997 - 5IRE
Wanchain Testnet
wanchainTestnet
999 - WANt
Zora Goerli Testnet
zoraTestnet
999 - ETH
Klaytn Baobab Testnet
klaytnBaobab
1001 - KLAY
Ekta Testnet
ektaTestnet
1004 - EKTA
BitTorrent Chain Testnet
bitTorrentTestnet
1028 - BTT
Conflux eSpace
confluxESpace
1030 - CFX
Bronos Testnet
bronosTestnet
1038 - tBRO
Bronos
bronos
1039 - BRO
Shimmer Testnet
shimmerTestnet
1073 - SMR
Metis
metis
1088 - METIS
Polygon zkEVM
polygonZkEvm
1101 - ETH
WEMIX
wemix
1111 - WEMIX
WEMIX Testnet
wemixTestnet
1112 - tWEMIX
Core Dao
coreDao
1116 - CORE
DeFiChain EVM Mainnet
defichainEvm
1130 - DFI
DeFiChain EVM Testnet
defichainEvmTestnet
1131 - DFI
Moonbeam Development Node
moonbeamDev
1281 - DEV
Moonbeam
moonbeam
1284 - GLMR
Moonriver
moonriver
1285 - MOVR
Moonbase Alpha
moonbaseAlpha
1287 - DEV
Localhost
localhost
1337 - ETH
Polygon zkEVM Testnet
polygonZkEvmTestnet
1442 - ETH
Tenet
tenet
1559 - TENET
Horizen Gobi Testnet
gobi
1663 - tZEN
Ekta
ekta
1994 - EKTA
Dogechain
dogechain
2000 - DC
Ronin
ronin
2020 - RON
Edgeware EdgeEVM Mainnet
edgeware
2021 - EDG
Saigon Testnet
saigon
2021 - RON
Beresheet BereEVM Testnet
edgewareTestnet
2022 - tEDG
Kava EVM Testnet
kavaTestnet
2221 - KAVA
Kava EVM
kava
2222 - KAVA
Kroma Sepolia
kromaSepolia
2358 - ETH
Filecoin Hyperspace
filecoinHyperspace
3141 - tFIL
Crossbell
crossbell
3737 - CSB
Fantom Testnet
fantomTestnet
4002 - FTM
Oasis Testnet
oasisTestnet
4090 - FTN
Nexi
nexi
4242 - NEXI
IoTeX
iotex
4689 - IOTX
IoTeX Testnet
iotexTestnet
4690 - IOTX
MEVerse Chain Testnet
mevTestnet
4759 - MEV
BlackFort Exchange Network Testnet
bxnTestnet
4777 - TBXN
BlackFort Exchange Network
bxn
4999 - BXN
Mantle
mantle
5000 - MNT
Mantle Testnet
mantleTestnet
5001 - MNT
Bahamut
bahamut
5165 - FTN
opBNB Testnet
opBNBTestnet
5611 - tBNB
Syscoin Tanenbaum Testnet
syscoinTestnet
5700 - SYS
ZetaChain Athens Testnet
zetachainAthensTestnet
7001 - aZETA
MEVerse Chain Mainnet
mev
7518 - MEV
Canto
canto
7700 - CANTO
Shardeum Sphinx
shardeumSphinx
8082 - SHM
Klaytn
klaytn
8217 - KLAY
Base
base
8453 - ETH
JIBCHAIN L1
jbc
8899 - JBC
Evmos Testnet
evmosTestnet
9000 - EVMOS
Evmos
evmos
9001 - EVMOS
Gnosis Chiado
gnosisChiado
10200 - xDAI
HAQQ Mainnet
haqqMainnet
11235 - ISLM
Fibo Chain
fibo
12306 - FIBO
EOS EVM Testnet
eosTestnet
15557 - EOS
Holesky
holesky
17000 - ETH
Cannoli
celoCannoli
17323 - C-CELO
EOS EVM
eos
17777 - EOS
Oasis Sapphire
sapphire
23294 - ROSE
Oasis Sapphire Testnet
sapphireTestnet
23295 - TEST
Foundry
foundry
31337 - ETH
Hardhat
hardhat
31337 - ETH
Zilliqa
zilliqa
32769 - ZIL
Zilliqa Testnet
zilliqaTestnet
33101 - ZIL
Q Mainnet
qMainnet
35441 - Q
Q Testnet
qTestnet
35443 - Q
Arbitrum One
arbitrum
42161 - ETH
Arbitrum Nova
arbitrumNova
42170 - ETH
Celo
celo
42220 - CELO
ZKFair Mainnet
zkFair
42766 - USDC
Avalanche Fuji
avalancheFuji
43113 - AVAX
Avalanche
avalanche
43114 - AVAX
ZKFair Testnet
zkFairTestnet
43851 - USDC
Alfajores
celoAlfajores
44787 - A-CELO
DFK Chain
dfk
53935 - JEWEL
HAQQ Testedge 2
haqqTestedge2
54211 - ISLMT
Rollux Testnet
rolluxTestnet
57000 - SYS
PGN
pgnTestnet
58008 - ETH
Linea Goerli Testnet
lineaTestnet
59140 - ETH
Linea Mainnet
linea
59144 - ETH
Fantom Sonic Open Testnet
fantomSonicTestnet
64240 - FTM
Polygon Mumbai
polygonMumbai
80001 - MATIC
Base Goerli
baseGoerli
84531 - ETH
Base Sepolia
baseSepolia
84532 - ETH
Chiliz Spicy Testnet
spicy
88882 - CHZ
Chiliz Chain
chiliz
88888 - CHZ
Vechain
vechain
100009 - VET
Taiko (Alpha-3 Testnet)
taikoTestnetSepolia
167005 - ETH
Taiko Jolnir (Alpha-5 Testnet)
taikoJolnir
167007 - ETH
Filecoin Calibration
filecoinCalibration
314159 - tFIL
Arbitrum Goerli
arbitrumGoerli
421613 - ETH
Arbitrum Sepolia
arbitrumSepolia
421614 - ETH
Scroll Sepolia
scrollSepolia
534351 - ETH
Scroll
scroll
534352 - ETH
Scroll Testnet
scrollTestnet
534353 - ETH
Bear Network Chain Mainnet
bearNetworkChainMainnet
641230 - BRNKC
Bear Network Chain Testnet
bearNetworkChainTestnet
751230 - tBRNKC
Astar zkEVM Testnet zKatana
astarZkatana
1261120 - ETH
Zhejiang
zhejiang
1337803 - ZhejETH
Manta Pacific Testnet
mantaTestnet
3441005 - ETH
Zora
zora
7777777 - ETH
Sepolia
sepolia
11155111 - SEP
Optimism Sepolia
optimismSepolia
11155420 - ETH
Neon EVM DevNet
neonDevnet
245022926 - NEON
Neon EVM MainNet
neonMainnet
245022934 - NEON
SKALE | Razor Network
skaleRazor
278611351 - sFUEL
SKALE | Calypso NFT Hub Testnet
skaleCalypsoTestnet
344106930 - sFUEL
SKALE | Block Brawlers
skaleBlockBrawlers
391845894 - BRAWL
SKALE | Europa Liquidity Hub Testnet
skaleEuropaTestnet
476158412 - sFUEL
SKALE | Nebula Gaming Hub Testnet
skaleNebulaTestnet
503129905 - sFUEL
Zora Sepolia
zoraSepolia
999999999 - ETH
SKALE | CryptoBlades
skaleCryptoBlades
1026062157 - sFUEL
SKALE | Human Protocol
skaleHumanProtocol
1273227453 - sFUEL
Aurora
aurora
1313161554 - ETH
Aurora Testnet
auroraTestnet
1313161555 - ETH
SKALE | Titan Community Hub
skaleTitan
1350216234 - sFUEL
SKALE | Chaos Testnet
skaleChaosTestnet
1351057110 - sFUEL
SKALE | Nebula Gaming Hub
skaleNebula
1482601649 - sFUEL
SKALE | Titan Community Hub Testnet
skaleTitanTestnet
1517929550 - sFUEL
SKALE | Calypso NFT Hub
skaleCalypso
1564830818 - sFUEL
Harmony One
harmonyOne
1666600000 - ONE
SKALE | Crypto Colosseum
skaleCryptoColosseum
2046399126 - sFUEL
SKALE | Europa Liquidity Hub
skaleEuropa
2046399126 - sFUEL
SKALE | Exorde
skaleExorde
2139927552 - sFUEL

Create Chain

Import the Chain type from Viem and create a new object that is asserted as const and satisfies the type. You can also use the defineChain function from Viem.

ts
ts
import { type Chain } from 'viem'
 
export const mainnet = {} as const satisfies Chain
Type '{}' does not satisfy the expected type 'Chain'. Type '{}' is missing the following properties from type 'Chain': id, name, nativeCurrency, rpcUrls1360Type '{}' does not satisfy the expected type 'Chain'. Type '{}' is missing the following properties from type 'Chain': id, name, nativeCurrency, rpcUrls
ts
import { type Chain } from 'viem'
 
export const mainnet = {} as const satisfies Chain
Type '{}' does not satisfy the expected type 'Chain'. Type '{}' is missing the following properties from type 'Chain': id, name, nativeCurrency, rpcUrls1360Type '{}' does not satisfy the expected type 'Chain'. Type '{}' is missing the following properties from type 'Chain': id, name, nativeCurrency, rpcUrls
ts
ts
import { defineChain } from 'viem'
 
export const mainnet = defineChain({})
Argument of type '{}' is not assignable to parameter of type 'Chain<ChainFormatters>'. Type '{}' is missing the following properties from type 'Chain<ChainFormatters>': id, name, nativeCurrency, rpcUrls2345Argument of type '{}' is not assignable to parameter of type 'Chain<ChainFormatters>'. Type '{}' is missing the following properties from type 'Chain<ChainFormatters>': id, name, nativeCurrency, rpcUrls
ts
import { defineChain } from 'viem'
 
export const mainnet = defineChain({})
Argument of type '{}' is not assignable to parameter of type 'Chain<ChainFormatters>'. Type '{}' is missing the following properties from type 'Chain<ChainFormatters>': id, name, nativeCurrency, rpcUrls2345Argument of type '{}' is not assignable to parameter of type 'Chain<ChainFormatters>'. Type '{}' is missing the following properties from type 'Chain<ChainFormatters>': id, name, nativeCurrency, rpcUrls

Now, add the missing required properties to the object until the error goes away.

ts
ts
import { type Chain } from 'viem'
 
export const mainnet = {
id: 1,
name: 'Ethereum',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: {
default: { http: ['https://cloudflare-eth.com'] },
},
blockExplorers: {
default: { name: 'Etherscan', url: 'https://etherscan.io' },
},
contracts: {
ensRegistry: {
address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
},
ensUniversalResolver: {
address: '0xE4Acdd618deED4e6d2f03b9bf62dc6118FC9A4da',
blockCreated: 16773775,
},
multicall3: {
address: '0xca11bde05977b3631167028862be2a173976ca11',
blockCreated: 14353601,
},
},
} as const satisfies Chain
ts
import { type Chain } from 'viem'
 
export const mainnet = {
id: 1,
name: 'Ethereum',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: {
default: { http: ['https://cloudflare-eth.com'] },
},
blockExplorers: {
default: { name: 'Etherscan', url: 'https://etherscan.io' },
},
contracts: {
ensRegistry: {
address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
},
ensUniversalResolver: {
address: '0xE4Acdd618deED4e6d2f03b9bf62dc6118FC9A4da',
blockCreated: 16773775,
},
multicall3: {
address: '0xca11bde05977b3631167028862be2a173976ca11',
blockCreated: 14353601,
},
},
} as const satisfies Chain
ts
ts
import { defineChain } from 'viem'
 
export const mainnet = defineChain({
id: 1,
name: 'Ethereum',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: {
default: { http: ['https://cloudflare-eth.com'] },
},
blockExplorers: {
default: { name: 'Etherscan', url: 'https://etherscan.io' },
},
contracts: {
ensRegistry: {
address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
},
ensUniversalResolver: {
address: '0xE4Acdd618deED4e6d2f03b9bf62dc6118FC9A4da',
blockCreated: 16773775,
},
multicall3: {
address: '0xca11bde05977b3631167028862be2a173976ca11',
blockCreated: 14353601,
},
},
})
ts
import { defineChain } from 'viem'
 
export const mainnet = defineChain({
id: 1,
name: 'Ethereum',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: {
default: { http: ['https://cloudflare-eth.com'] },
},
blockExplorers: {
default: { name: 'Etherscan', url: 'https://etherscan.io' },
},
contracts: {
ensRegistry: {
address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
},
ensUniversalResolver: {
address: '0xE4Acdd618deED4e6d2f03b9bf62dc6118FC9A4da',
blockCreated: 16773775,
},
multicall3: {
address: '0xca11bde05977b3631167028862be2a173976ca11',
blockCreated: 14353601,
},
},
})

The more properties you add, the better the chain will be to use with Wagmi. Most of these attributes exist within the ethereum-lists/chains repository.

  • id: The chain ID for the network. This can be found by typing the network name into ChainList. Example: "Ethereum Mainnet" has a Chain ID of 1.
  • name: Human-readable name for the chain. Example: "Ethereum Mainnet"
  • nativeCurrency: The native currency of the chain. Found from ethereum-lists/chains.
  • rpcUrls: At least one public, credible RPC URL. Found from ethereum-lists/chains.
  • blockExplorers: A set of block explorers for the chain. Found from ethereum-lists/chains.
  • contracts: A set of deployed contracts for the chain. If you are deploying one of the following contracts yourself, make sure it is verified.
    • multicall3 is optional, but it's address is most likely 0xca11bde05977b3631167028862be2a173976ca11 – you can find the deployed block number on the block explorer. Check out mds1/multicall for more info.
    • ensRegistry is optional – not all Chains have a ENS Registry. See ENS Deployments for more info.
    • ensUniversalResolver is optional – not all Chains have a ENS Universal Resolver.
  • sourceId: Source Chain ID (e.g. the L1 chain).
  • testnet: Whether or not the chain is a testnet.

Released under the MIT License.