Commit 707810c2 authored by Joshua Gutow's avatar Joshua Gutow Committed by GitHub

Fix Optimism Config in L2 Genesis builder (#3075)

* Fix Optimism Config in L2 Genesis builder

This places the Optimism chain config in the correct place as
well as deleting the spurious Clique config in the L2 genesis.

* packages/core-utils: bedrock config type fix

* packages/contracts-bedrock: update genesis l2 task import

* packages/core-utils: bedrock - remove old todo comment
Co-authored-by: default avatarJoshua Gutow <jgutow@optimism.io>
Co-authored-by: default avatarprotolambda <proto@protolambda.com>
Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 483e27c7
...@@ -290,9 +290,9 @@ task('genesis-l2', 'create a genesis config') ...@@ -290,9 +290,9 @@ task('genesis-l2', 'create a genesis config')
londonBlock: 0, londonBlock: 0,
mergeNetsplitBlock: 0, mergeNetsplitBlock: 0,
terminalTotalDifficulty: 0, terminalTotalDifficulty: 0,
clique: { optimism: {
period: 0, baseFeeRecipient: deployConfig.optimismBaseFeeRecipient,
epoch: 30000, l1FeeRecipient: deployConfig.optimismL1FeeRecipient,
}, },
}, },
nonce: '0x1234', nonce: '0x1234',
...@@ -300,11 +300,6 @@ task('genesis-l2', 'create a genesis config') ...@@ -300,11 +300,6 @@ task('genesis-l2', 'create a genesis config')
timestamp: ethers.BigNumber.from(l1StartingBlock.timestamp).toHexString(), timestamp: ethers.BigNumber.from(l1StartingBlock.timestamp).toHexString(),
gasLimit: deployConfig.genesisBlockGasLimit, gasLimit: deployConfig.genesisBlockGasLimit,
extraData: deployConfig.genesisBlockExtradata, extraData: deployConfig.genesisBlockExtradata,
optimism: {
enabled: true,
baseFeeRecipient: deployConfig.optimismBaseFeeRecipient,
l1FeeRecipient: deployConfig.optimismL1FeeRecipient,
},
alloc, alloc,
} }
......
...@@ -66,15 +66,16 @@ export interface Genesis { ...@@ -66,15 +66,16 @@ export interface Genesis {
/** /**
* Represents the chain config for an Optimism chain * Represents the chain config for an Optimism chain
*/ */
export interface OptimismChainConfig { export interface OptimismChainConfig extends ChainConfig {
enabled: boolean optimism: {
baseFeeRecipient: string baseFeeRecipient: string
l1FeeRecipient: string l1FeeRecipient: string
}
} }
/** /**
* Represents the Genesis file format for an Optimism chain * Represents the Genesis file format for an Optimism chain
*/ */
export interface OptimismGenesis extends Genesis { export interface OptimismGenesis extends Genesis {
optimism: OptimismChainConfig config: OptimismChainConfig
} }
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