Skip to content

Common

Common: Prettify<ViemChain & object>

Common is the main representation of chain specific configuration for tevm clients.

Tevm specific chain configuration wrapping viem chain and ethereumjs commmon Common contains the common configuration set between all chains such as fee information, hardfork information, eip information, predeployed contracts, default block explorers and more. extends ethereumjs Common class with the Viem Chain type

Example

import { optimism, Common } from 'tevm/common'
import { createMemoryClient } from 'tevm'}
const createClient = (common: Common) => {
const client = createMemoryClient({
common,
})
return client
}
const client = createClient(optimism)

See

Defined in

packages/common/src/Common.ts:27