Commit 17962ca9 authored by Mark Tyneway's avatar Mark Tyneway

core-utils: update geth genesis type

Can specify the private key in the json file which
is nice for testing
parent 26a47f72
---
'@eth-optimism/core-utils': patch
---
Update geth genesis type
...@@ -7,36 +7,52 @@ export interface State { ...@@ -7,36 +7,52 @@ export interface State {
[address: string]: { [address: string]: {
nonce: number nonce: number
balance: string balance: string
codeHash: string codeHash?: string
root: string root?: string
code?: string code?: string
storage?: { storage?: {
[key: string]: string [key: string]: string
} }
secretKey?: string
} }
} }
/**
* Represents Geth's ChainConfig
*/
export interface ChainConfig {
chainId: number
homesteadBlock: number
eip150Block: number
eip155Block: number
eip158Block: number
byzantiumBlock: number
constantinopleBlock: number
petersburgBlock: number
istanbulBlock: number
muirGlacierBlock: number
berlinBlock: number
londonBlock?: number
arrowGlacierBlock?: number
mergeForkBlock?: number
terminalTotalDifficulty?: number
clique?: {
period: number
epoch: number
}
ethash?: {}
}
/** /**
* Represents Geth's genesis file format. * Represents Geth's genesis file format.
*/ */
export interface Genesis { export interface Genesis {
config: { config: ChainConfig
chainId: number nonce?: number
homesteadBlock: number timestamp?: number
eip150Block: number
eip155Block: number
eip158Block: number
byzantiumBlock: number
constantinopleBlock: number
petersburgBlock: number
istanbulBlock: number
muirGlacierBlock: number
clique: {
period: number
epoch: number
}
}
difficulty: string difficulty: string
mixHash?: string
coinbase?: string
gasLimit: string gasLimit: string
extraData: string extraData: string
alloc: State alloc: State
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment