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'Available Chains
Chain definitions as of viem@2.21.28. For viem@latest, visit the Viem repo.
266 Chains
Ethereum
mainnet1 - ETH
Goerli
goerli5 - ETH
OP Mainnet
optimism10 - ETH
Flare Mainnet
flare14 - FLR
Coston
songbirdTestnet16 - CFLR
Songbird Mainnet
songbird19 - SGB
Cronos Mainnet
cronos25 - CRO
Rootstock Mainnet
rootstock30 - RBTC
Rootstock Testnet
rootstockTestnet31 - tRBTC
Telos
telos40 - TLOS
Telos
telosTestnet41 - TLOS
LUKSO
lukso42 - LYX
Darwinia Network
darwinia46 - RING
XinFin Network
xdc50 - XDC
Apothem Network
xdcTestnet51 - TXDC
BNB Smart Chain
bsc56 - BNB
Syscoin Mainnet
syscoin57 - SYS
Ethereum Classic
classic61 - ETC
OKC
okc66 - OKT
Conflux eSpace Testnet
confluxESpaceTestnet71 - CFX
Meter
meter82 - MTR
Meter Testnet
meterTestnet83 - MTR
Binance Smart Chain Testnet
bscTestnet97 - tBNB
Gnosis
gnosis100 - xDAI
Shibarium
shibarium109 - BONE
Coston2
flareTestnet114 - C2FLR
Fuse
fuse122 - FUSE
Fuse Sparknet
fuseSparknet123 - SPARK
Polygon
polygon137 - MATIC
Shimmer
shimmer148 - SMR
Manta Pacific Mainnet
manta169 - ETH
X1 Testnet
x1Testnet195 - OKB
X1 Testnet
xLayerTestnet195 - OKB
X Layer Mainnet
xLayer196 - OKB
BitTorrent
bitTorrent199 - BTT
Edgeless Testnet
edgelessTestnet202 - EwETH
opBNB
opBNB204 - BNB
Nexilix Smart Chain
nexilix240 - NEXILIX
Plinga
plinga242 - PLINGA
Oasys
oasys248 - OAS
Fantom
fantom250 - FTM
Fraxtal
fraxtal252 - frxETH
Kroma
kroma255 - ETH
zkSync InMemory Node
zkSyncInMemoryNode260 - ETH
zkSync CLI Local Node
zkSyncLocalNode270 - ETH
zkSync Era Testnet
zkSyncTestnet280 - ETH
Boba Network
boba288 - ETH
Hedera Mainnet
hedera295 - HBAR
Hedera Testnet
hederaTestnet296 - HBAR
Hedera Previewnet
hederaPreviewnet297 - HBAR
zkSync Sepolia Testnet
zkSyncSepoliaTestnet300 - ETH
Filecoin Mainnet
filecoin314 - FIL
KCC Mainnet
kcc321 - KCS
zkSync Era
zkSync324 - ETH
Cronos Testnet
cronosTestnet338 - tCRO
PulseChain
pulsechain369 - PLS
Optimism Goerli
optimismGoerli420 - ETH
PGN
pgn424 - ETH
Areon Network Testnet
areonNetworkTestnet462 - TAREA
Areon Network
areonNetwork463 - AREA
FlowEVM Testnet
flowTestnet545 - FLOW
Rollux Mainnet
rollux570 - SYS
MetaChain Mainnet
metachain571 - MTC
Astar
astar592 - ASTR
Mandala TC9
mandala595 - mACA
Metis Goerli
metisGoerli599 - METIS
FlowEVM Previewnet
flowPreviewnet646 - FLOW
Karura
karura686 - KAR
FlowEVM Mainnet
flowMainnet747 - FLOW
Acala
acala787 - ACA
Taraxa Mainnet
taraxa841 - TARA
Taraxa Testnet
taraxaTestnet842 - TARA
Wanchain
wanchain888 - WAN
Mode Testnet
modeTestnet919 - ETH
PulseChain V4
pulsechainV4943 - v4PLS
5ireChain Thunder Testnet
thunderTestnet997 - 5IRE
Wanchain Testnet
wanchainTestnet999 - WANt
Zora Goerli Testnet
zoraTestnet999 - ETH
Klaytn Baobab Testnet
klaytnBaobab1001 - KLAY
Ekta Testnet
ektaTestnet1004 - EKTA
BNB Greenfield Chain
bscGreenfield1017 - BNB
BitTorrent Chain Testnet
bitTorrentTestnet1028 - BTT
Conflux eSpace
confluxESpace1030 - CFX
Bronos Testnet
bronosTestnet1038 - tBRO
Bronos
bronos1039 - BRO
Shimmer Testnet
shimmerTestnet1073 - SMR
Metis
metis1088 - METIS
Polygon zkEVM
polygonZkEvm1101 - ETH
WEMIX
wemix1111 - WEMIX
WEMIX Testnet
wemixTestnet1112 - tWEMIX
Core Dao
coreDao1116 - CORE
DeFiChain EVM Mainnet
defichainEvm1130 - DFI
DeFiChain EVM Testnet
defichainEvmTestnet1131 - DFI
Moonbeam Development Node
moonbeamDev1281 - DEV
Moonbeam
moonbeam1284 - GLMR
Moonriver
moonriver1285 - MOVR
Moonbase Alpha
moonbaseAlpha1287 - DEV
Localhost
localhost1337 - ETH
Polygon zkEVM Testnet
polygonZkEvmTestnet1442 - ETH
MetaChain Istanbul
metachainIstanbul1453 - MTC
Tenet
tenet1559 - TENET
Horizen Gobi Testnet
gobi1663 - tZEN
Mint Sepolia Testnet
mintSepoliaTestnet1686 - ETH
Reya Network
reyaNetwork1729 - ETH
LightLink Phoenix Mainnet
lightlinkPhoenix1890 - ETH
LightLink Pegasus Testnet
lightlinkPegasus1891 - ETH
Ekta
ekta1994 - EKTA
Dogechain
dogechain2000 - DC
Telcoin Adiri Testnet
telcoinTestnet2017 - TEL
Ronin
ronin2020 - RON
Edgeware EdgeEVM Mainnet
edgeware2021 - EDG
Saigon Testnet
saigon2021 - RON
Beresheet BereEVM Testnet
edgewareTestnet2022 - tEDG
Edgeless Network
edgeless2026 - EwETH
Kava EVM Testnet
kavaTestnet2221 - KAVA
Kava EVM
kava2222 - KAVA
RSS3 VSL Sepolia Testnet
rss3Sepolia2331 - RSS3
Kroma Sepolia
kromaSepolia2358 - ETH
Polygon zkEVM Cardona
polygonZkEvmCardona2442 - ETH
Fraxtal Testnet
fraxtalTestnet2522 - frxETH
inEVM Mainnet
inEVM2525 - INJ
Morph Sepolia
morphSepolia2710 - ETH
Filecoin Hyperspace
filecoinHyperspace3141 - tFIL
Crossbell
crossbell3737 - CSB
Astar zkEVM
astarZkEVM3776 - ETH
APEX Testnet
apexTestnet3993 - ETH
Fantom Testnet
fantomTestnet4002 - FTM
Oasis Testnet
oasisTestnet4090 - FTN
Merlin
merlin4200 - BTC
LUKSO Testnet
luksoTestnet4201 - LYXt
Lisk Sepolia
liskSepolia4202 - ETH
Nexi
nexi4242 - NEXI
Beam
beam4337 - BEAM
IoTeX
iotex4689 - IOTX
IoTeX Testnet
iotexTestnet4690 - IOTX
MEVerse Chain Testnet
mevTestnet4759 - MEV
BlackFort Exchange Network Testnet
bxnTestnet4777 - TBXN
BlackFort Exchange Network
bxn4999 - BXN
Mantle
mantle5000 - MNT
Mantle Testnet
mantleTestnet5001 - MNT
Mantle Sepolia Testnet
mantleSepoliaTestnet5003 - MNT
Bahamut
bahamut5165 - FTN
opBNB Testnet
opBNBTestnet5611 - tBNB
Syscoin Tanenbaum Testnet
syscoinTestnet5700 - SYS
ZetaChain
zetachain7000 - ZETA
ZetaChain Athens Testnet
zetachainAthensTestnet7001 - aZETA
Horizen EON
eon7332 - ZEN
MEVerse Chain Mainnet
mev7518 - MEV
Cyber
cyber7560 - ETH
Canto
canto7700 - CANTO
Shardeum Sphinx
shardeumSphinx8082 - SHM
Klaytn
klaytn8217 - KLAY
Base
base8453 - ETH
JIBCHAIN L1
jbc8899 - JBC
Evmos Testnet
evmosTestnet9000 - EVMOS
Evmos
evmos9001 - EVMOS
OORT MainnetDev
oortMainnetDev9700 - OORT
Gnosis Chiado
gnosisChiado10200 - xDAI
HAQQ Mainnet
haqqMainnet11235 - ISLM
BEVM Mainnet
bevmMainnet11501 - BTC
Fibo Chain
fibo12306 - FIBO
RSS3 VSL Mainnet
rss312553 - RSS3
Beam Testnet
beamTestnet13337 - BEAM
Immutable zkEVM
immutableZkEvm13371 - IMX
Phoenix Blockchain
phoenix13381 - PHX
Immutable zkEVM Testnet
immutableZkEvmTestnet13473 - IMX
EOS EVM Testnet
eosTestnet15557 - EOS
Holesky
holesky17000 - ETH
EOS EVM
eos17777 - EOS
Oasis Sapphire
sapphire23294 - ROSE
Oasis Sapphire Testnet
sapphireTestnet23295 - TEST
DreyerX Mainnet
dreyerxMainnet23451 - DRX
Anvil
anvil31337 - ETH
Foundry
foundry31337 - ETH
Hardhat
hardhat31337 - ETH
Zilliqa
zilliqa32769 - ZIL
Zilliqa Testnet
zilliqaTestnet33101 - ZIL
Mode Mainnet
mode34443 - ETH
Q Mainnet
qMainnet35441 - Q
Q Testnet
qTestnet35443 - Q
Arbitrum One
arbitrum42161 - ETH
Arbitrum Nova
arbitrumNova42170 - ETH
Celo
celo42220 - CELO
ZKFair Mainnet
zkFair42766 - USDC
Avalanche Fuji
avalancheFuji43113 - AVAX
Avalanche
avalanche43114 - AVAX
ZKFair Testnet
zkFairTestnet43851 - USDC
Alfajores
celoAlfajores44787 - A-CELO
Yooldo Verse
yooldoVerse50005 - OAS
Yooldo Verse Testnet
yooldoVerseTestnet50006 - OAS
DODOchain Testnet
dodochainTestnet53457 - DODO
DFK Chain
dfk53935 - JEWEL
HAQQ Testedge 2
haqqTestedge254211 - ISLMT
Rollux Testnet
rolluxTestnet57000 - SYS
PGN
pgnTestnet58008 - ETH
Linea Goerli Testnet
lineaGoerli59140 - ETH
Linea Goerli Testnet
lineaTestnet59140 - ETH
Linea Sepolia Testnet
lineaSepolia59141 - ETH
Linea Mainnet
linea59144 - ETH
Fantom Sonic Open Testnet
fantomSonicTestnet64240 - FTM
Polygon Mumbai
polygonMumbai80001 - MATIC
Polygon Amoy
polygonAmoy80002 - MATIC
Berachain Artio
berachainTestnet80085 - BERA
Blast
blast81457 - ETH
Base Goerli
baseGoerli84531 - ETH
Base Sepolia
baseSepolia84532 - ETH
Chiliz Spicy Testnet
spicy88882 - CHZ
Chiliz Chain
chiliz88888 - CHZ
Jibchain Testnet
jbcTestnet88991 - tJBC
Vechain
vechain100009 - VET
Stratis Mainnet
stratis105105 - STRAX
Etherlink Testnet
etherlinkTestnet128123 - XTZ
Taiko (Alpha-3 Testnet)
taikoTestnetSepolia167005 - ETH
Taiko Jolnir (Alpha-5 Testnet)
taikoJolnir167007 - ETH
Taiko Katla (Alpha-6 Testnet)
taikoKatla167008 - ETH
Taiko Hekla L2
taikoHekla167009 - ETH
Bitlayer Testnet
btrTestnet200810 - ETH
Bitlayer
btr200901 - ETH
Auroria Testnet
auroria205205 - tSTRAX
Filecoin Calibration
filecoinCalibration314159 - tFIL
Arbitrum Goerli
arbitrumGoerli421613 - ETH
Arbitrum Sepolia
arbitrumSepolia421614 - ETH
Scroll Sepolia
scrollSepolia534351 - ETH
Scroll
scroll534352 - ETH
Scroll Testnet
scrollTestnet534353 - ETH
Bear Network Chain Mainnet
bearNetworkChainMainnet641230 - BRNKC
Sei Devnet
seiDevnet713715 - SEI
Bear Network Chain Testnet
bearNetworkChainTestnet751230 - tBRNKC
Zhejiang
zhejiang1337803 - ZhejETH
PlayFi Albireo Testnet
playfiAlbireo1612127 - ETH
Manta Pacific Testnet
mantaTestnet3441005 - ETH
Manta Pacific Sepolia Testnet
mantaSepoliaTestnet3441006 - ETH
Astar zkEVM Testnet zKyoto
astarZkyoto6038361 - ETH
Zora
zora7777777 - ETH
Sepolia
sepolia11155111 - ETH
OP Sepolia
optimismSepolia11155420 - ETH
Ancient8 Testnet
ancient8Sepolia28122024 - ETH
SKALE Nebula Testnet
skaleNebulaTestnet37084624 - sFUEL
Otim Devnet
otimDevnet41144114 - ETH
Cyber Testnet
cyberTestnet111557560 - ETH
Plume Testnet
plumeTestnet161221135 - ETH
Blast Sepolia
blastSepolia168587773 - ETH
Neon EVM DevNet
neonDevnet245022926 - NEON
Neon EVM MainNet
neonMainnet245022934 - NEON
SKALE | Razor Network
skaleRazor278611351 - sFUEL
SKALE | Block Brawlers
skaleBlockBrawlers391845894 - BRAWL
Degen
degen666666666 - DEGEN
Ancient8
ancient8888888888 - ETH
SKALE Calypso Testnet
skaleCalypsoTestnet974399131 - sFUEL
Zora Sepolia
zoraSepolia999999999 - ETH
SKALE Titan Hub
skaleTitanTestnet1020352220 - sFUEL
SKALE | CryptoBlades
skaleCryptoBlades1026062157 - sFUEL
SKALE | Crypto Colosseum
skaleCryptoColosseum1032942172 - sFUEL
SKALE | Human Protocol
skaleHumanProtocol1273227453 - sFUEL
Aurora
aurora1313161554 - ETH
Aurora Testnet
auroraTestnet1313161555 - ETH
SKALE | Titan Community Hub
skaleTitan1350216234 - sFUEL
SKALE Europa Testnet
skaleEuropaTestnet1444673419 - sFUEL
SKALE | Nebula Gaming Hub
skaleNebula1482601649 - sFUEL
SKALE | Calypso NFT Hub
skaleCalypso1564830818 - sFUEL
Harmony One
harmonyOne1666600000 - ONE
SKALE | Europa Liquidity Hub
skaleEuropa2046399126 - sFUEL
SKALE | Exorde
skaleExorde2139927552 - sFUEL
Palm Testnet
palmTestnet11297108099 - PALM
Palm
palm11297108109 - PALM
Kakarot Sepolia
kakarotSepolia107107114116 - ETH
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
import { type Chain } from 'viem'
export const mainnet = {} as const satisfies Chaints
import { defineChain } from 'viem'
export const mainnet = defineChain({})Now, add the missing required properties to the object until the error goes away.
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 Chaints
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 of1.name: Human-readable name for the chain. Example: "Ethereum Mainnet"nativeCurrency: The native currency of the chain. Found fromethereum-lists/chains.rpcUrls: At least one public, credible RPC URL. Found fromethereum-lists/chains.blockExplorers: A set of block explorers for the chain. Found fromethereum-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.multicall3is optional, but it's address is most likely0xca11bde05977b3631167028862be2a173976ca11– you can find the deployed block number on the block explorer. Check outmds1/multicallfor more info.ensRegistryis optional – not all Chains have a ENS Registry. See ENS Deployments for more info.ensUniversalResolveris 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.