Skip to main content

CommonOpts

Options for instantiating a Common instance.

Hierarchy

  • BaseOpts
    • CommonOpts

Index

Properties

chain

chain: string | number | bigint | object

Chain name ('mainnet'), id (1), or Chain enum, either from a chain directly supported or a custom chain passed in via CommonOpts.customChains.

optionalcustomChains

customChains?: ChainConfig[]

Initialize (in addition to the supported chains) with the selected custom chains. Custom genesis state should be passed to the Blockchain class if used.

Usage (directly with the respective chain initialization via the CommonOpts.chain option):

import myCustomChain1 from '[PATH_TO_MY_CHAINS]/myCustomChain1.json'
const common = new Common({ chain: 'myCustomChain1', customChains: [ myCustomChain1 ]})

optionaleips

eips?: number[]

Selected EIPs which can be activated, please use an array for instantiation (e.g. eips: [ 2537, ])

Currently supported:

optionalhardfork

hardfork?: string

String identifier ('byzantium') for hardfork or Hardfork enum.

Default: Hardfork.London