Skip to content

Latest commit

 

History

History
121 lines (80 loc) · 3.21 KB

File metadata and controls

121 lines (80 loc) · 3.21 KB

@ethereumjs/common

@ethereumjs/common

Table of contents

Enumerations

Classes

Interfaces

Type Aliases

Functions

Type Aliases

CasperConfig

Ƭ CasperConfig: Object

Defined in

packages/common/src/types.ts:17


CliqueConfig

Ƭ CliqueConfig: Object

Type declaration

Name Type
epoch number
period number

Defined in

packages/common/src/types.ts:10


EthashConfig

Ƭ EthashConfig: Object

Defined in

packages/common/src/types.ts:15

Functions

parseGethGenesis

parseGethGenesis(json, name?, mergeForkIdPostMerge?): Object

Parses a genesis.json exported from Geth into parameters for Common instance

Parameters

Name Type Description
json any representing the Geth genesis file
name? string optional chain name
mergeForkIdPostMerge? boolean -

Returns

Object

parsed params

Name Type
bootstrapNodes never[]
chainId number
consensus { algorithm: string = 'clique'; clique: { epoch: any ; period: any } ; ethash: undefined = {}; type: string = 'poa' } | { algorithm: string = 'ethash'; clique: undefined ; ethash: {} = {}; type: string = 'pow' }
genesis { baseFeePerGas: string ; coinbase: string ; difficulty: number ; extraData: string ; gasLimit: number ; mixHash: string ; nonce: string ; timestamp: string }
genesis.baseFeePerGas string
genesis.coinbase string
genesis.difficulty number
genesis.extraData string
genesis.gasLimit number
genesis.mixHash string
genesis.nonce string
genesis.timestamp string
hardfork undefined | string
hardforks ConfigHardfork[]
name string
networkId number

Defined in

packages/common/src/utils.ts:207