@tevm/common
Chain-specific configuration. Combines viem chain definitions with a ZEVM-backed Common instance the VM uses for hardfork, EIP, consensus, and gas-parameter lookups. Includes custom crypto hooks such as KZG for blob transaction testing.
Full API: packages/common/docs.
Installation
npm install @tevm/common@1.0.0-rc.151 viemAPI Reference
Enumerations
Interfaces
Type Aliases
Functions
Supported Networks
Layer 1: mainnet, sepolia, goerli, holesky.
Layer 2: arbitrum, optimism, base, zksync, polygon, polygonZkEvm.
Alternative: bsc, avalanche, fantom, gnosis.
Dev: hardhat, foundry, anvil, localhost.
Usage Examples
import { createCommon, createMockKzg, mainnet, optimism, arbitrum } from '@tevm/common'
const common = createCommon({ ...mainnet, hardfork: 'shanghai' })
const custom = createCommon({
name: 'Custom Chain',
id: 1337,
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: { default: { http: ['http://localhost:8545'] } },
hardfork: 'shanghai',
})
const withKzg = createCommon({
...mainnet,
customCrypto: { kzg: createMockKzg() },
})
const optimismCommon = createCommon({ ...optimism })
const arbitrumCommon = createCommon({ ...arbitrum })The returned Common is a viem chain object plus:
ethjsCommon- ZEVM-backed Common instance used internally by the VM.copy()- isolated copy for a new VM or client.

