Chains
The following Viem chains are implemented on the OP Stack:
import {
base,
baseGoerli,
baseSepolia,
fraxtal,
fraxtalTestnet,
ink,
inkSepolia,
optimism,
optimismGoerli,
optimismSepolia,
soneiumMinato,
zircuit,
zircuitTestnet,
zora,
zoraSepolia,
zoraTestnet,
} from 'viem/chains'
Configuration
Viem exports OP Stack's chain formatters & serializers via chainConfig
. This is useful if you need to define another chain which is implemented on the OP Stack.
import { defineChain } from 'viem'
import { chainConfig } from 'viem/op-stack'
export const opStackExample = defineChain({
...chainConfig,
name: 'OP Stack Example',
// ...
})