Skip to content

Commit

Permalink
Set the L1 scalars to 0 on genesis (#37)
Browse files Browse the repository at this point in the history
* Set the L1 scalars to 0 on genesis

* Fix genesis generation contract location
  • Loading branch information
mdehoog authored Dec 17, 2024
1 parent 1051a2a commit 016f4bb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions testnet/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ func Main(cliCtx *cli.Context) error {
config.L2OutputOracleChallenger = common.Address{1}
config.SuperchainConfigGuardian = common.Address{1}
config.L2OutputOracleSubmissionInterval = 1
config.GasPriceOracleBaseFeeScalar = 0
config.GasPriceOracleBlobBaseFeeScalar = 0

// set up deployed contract addresses
config.L1StandardBridgeProxy = l1Addresses.L1StandardBridge
Expand Down Expand Up @@ -339,16 +341,16 @@ func Main(cliCtx *cli.Context) error {

log.Info("Building Optimism contracts")
cmd := exec.Command("forge", "build")
cmd.Dir = "./lib/optimism/packages/contracts-bedrock"
cmd.Dir = "./contracts/lib/optimism/packages/contracts-bedrock"
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
err = cmd.Run()
if err != nil {
return fmt.Errorf("failed to build contracts: %w", err)
}

foundryArtifacts := foundry.OpenArtifactsDir("./lib/optimism/packages/contracts-bedrock/forge-artifacts")
sourceMap := foundry.NewSourceMapFS(os.DirFS("./lib/optimism/packages/contracts-bedrock"))
foundryArtifacts := foundry.OpenArtifactsDir("./contracts/lib/optimism/packages/contracts-bedrock/forge-artifacts")
sourceMap := foundry.NewSourceMapFS(os.DirFS("./contracts/lib/optimism/packages/contracts-bedrock"))
l2Host := createL2(log.Root(), foundryArtifacts, sourceMap, &config, l2Genesis.Timestamp)
if err := l2Host.EnableCheats(); err != nil {
return fmt.Errorf("failed to enable cheats: %w", err)
Expand Down

0 comments on commit 016f4bb

Please sign in to comment.