ethereumjs-monorepo

@ethereumjs/common


@ethereumjs/common / createCustomCommon

Function: createCustomCommon()

createCustomCommon(partialConfig, baseChain, opts): Common

Defined in: constructors.ts:22

Creates a Common object for a custom chain, based on a standard one.

It uses all the Chain parameters from the baseChain option except the ones overridden in a provided chainParamsOrName dictionary. Some usage example:

```javascript import { createCustomCommon, Mainnet } from ‘@ethereumjs/common’

createCustomCommon({chainId: 123}, Mainnet) ``

@param partialConfig Custom parameter dict @param baseChain ChainConfig chain configuration taken as a base chain, e.g. Mainnet (exported at root level) @param opts Custom chain options to set various {@link BaseOpts}

Parameters

partialConfig

Partial<ChainConfig>

baseChain

ChainConfig

opts

BaseOpts = {}

Returns

Common