Constants
wagmi exposes some helpful Constants to help standardize frequently used values and objects.
Networks/Chains
Chain
Object containing chains by name. Useful for creating lists of specific chains, like defaultL2Chains
.
import { chain } from 'wagmi'
chain.mainnetchain.rinkebychain.polygonMainnet// ...
Chains conform to the following type:
export type Chain = { id: number name: string nativeCurrency?: { decimals: 18 name: string symbol: string } rpcUrls: string[] blockExplorers?: { name: string; url: string }[] testnet?: boolean}
Default Groups
wagmi has a few built-in chain groups for convenience:
import { defaultChains, // mainnet, rinkeby, etc. defaultL2Chains, // optimism, polygon, etc. developmentChains, // localhost} from 'wagmi'
ABIs
ERC-1155
import { erc1155ABI } from 'wagmi'
ERC-20
import { erc20ABI } from 'wagmi'
ERC-721
import { erc721ABI } from 'wagmi'