addChain โ
Adds an EVM chain to the wallet.
Usage โ
ts
import { avalanche } from 'viem/chains'
import { walletClient } from './client'
 
await walletClient.addChain({ chain: avalanche }) ts
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
export const walletClient = createWalletClient({
  chain: mainnet,
  transport: custom(window.ethereum)
})Parameters โ
chain โ
- Type: 
Chain 
The chain to add to the wallet.