Skip to content

Latest commit

 

History

History
113 lines (65 loc) · 2.81 KB

File metadata and controls

113 lines (65 loc) · 2.81 KB

@ethereumjs/common / CommonOpts

Interface: CommonOpts

Options for instantiating a Common instance.

Hierarchy

  • BaseOpts

    CommonOpts

Table of contents

Properties

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 customChains.

Defined in

types.ts:124


customChains

Optional 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 chain option):

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

Defined in

types.ts:136


customCrypto

Optional customCrypto: CustomCrypto

This option can be used to replace the most common crypto primitives (keccak256 hashing e.g.) within the EthereumJS ecosystem libraries with alternative implementations (e.g. more performant WASM libraries).

Note: please be aware that this is adding new dependencies for your system setup to be used for sensitive/core parts of the functionality and a choice on the libraries to add should be handled with care and be made with eventual security implications considered.

Inherited from

BaseOpts.customCrypto

Defined in

types.ts:112


eips

Optional eips: number[]

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

Inherited from

BaseOpts.eips

Defined in

types.ts:101


hardfork

Optional hardfork: string

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

Default: Hardfork.London

Inherited from

BaseOpts.hardfork

Defined in

types.ts:96