Powered by

A design system from Family

Custom Chains

By default, we only surface Ethereum Mainnet. If you'd like, you can include more networks like Optimism, Polygon, and others.


ConnectKit uses wagmi internally, meaning all the various chains from wagmi are available. All you need to do is provide a custom wagmi client.

First, make sure to import your preferred chains from wagmi:

1import { mainnet, polygon, optimism, arbitrum } from "wagmi/chains";

Then simply replace the default client provided to wagmi with a custom one. Make sure to include your own Infura or Alchemy IDs for the various connectors you want to support.

Below is an example of an app supporting multiple chains/networks using ConnectKit:

1import { WagmiConfig, createClient, chain } from "wagmi";
2import { ConnectKitProvider, getDefaultClient } from "connectkit";
4const alchemyId = process.env.ALCHEMY_ID;
6// Choose which chains you'd like to show
7const chains = [mainnet, polygon, optimism, arbitrum];
9const client = createClient(
10 getDefaultClient({
11 appName: "Your App Name",
12 alchemyId,
13 chains,
14 }),
17const App = () => {
18 return (
19 <WagmiConfig client={client}>
20 <ConnectKitProvider>
21 {/* Your App */}
22 <ConnectKitButton />
23 </ConnectKitProvider>
24 </WagmiConfig>
25 );

And that's it—users can now choose to connect to any of the networks listed in the chains array.

Chains & Networks

In the example above, we used four different chains. In the table below you'll find a more extensive list of chains you can add to ConnectKit (which wagmi supports out of the box):

ChainDescriptionChain ID
chain.mainnetEthereum Mainnet1
chain.rinkeby Rinkeby Testnet4
chain.ropsten Ropsten Testnet3
chain.goerliGörli Testnet5
chain.kovanKovan Testnet42
chain.localhostLocalhost Testnet1337
chain.hardhatHardhat Default Network31337
chain.arbitrumArbitrum Network42161
chain.arbitrumRinkebyArbitrum Rinkeby Network421611
chain.optimismOptimism Network10
chain.optimismKovanOptimism Kovan Testnet69
chain.polygonPolygon Network137
chain.polygonMumbaiPolygon Mumbai Testnet80001