Skip to content

Latest commit

 

History

History
46 lines (25 loc) · 1.23 KB

File metadata and controls

46 lines (25 loc) · 1.23 KB

@ethereumjs/common


@ethereumjs/common / createCustomCommon

Function: createCustomCommon()

createCustomCommon(partialConfig, baseChain, opts): Common

Defined in: common/src/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:

import { createCustomCommon, Mainnet } from '@ethereumjs/common'

createCustomCommon({chainId: 123}, Mainnet)

Parameters

partialConfig

Partial<ChainConfig>

Custom parameter dict

baseChain

ChainConfig

ChainConfig chain configuration taken as a base chain, e.g. Mainnet (exported at root level)

opts

BaseOpts = {}

Custom chain options to set various BaseOpts

Returns

Common