Chains
The following ZKsync chains are supported in Viem:
import {
zksync,
zksyncSepoliaTestnet,
} from 'viem/chains'
Configuration
Viem exports ZKsync's chain formatters & serializers via chainConfig
. This is useful if you need to define another chain which is implemented on ZKsync.
import { defineChain } from 'viem'
import { chainConfig } from 'viem/zksync'
export const opStackExample = defineChain({
...chainConfig,
name: 'ZKsync Example',
// ...
})