Commit d9316206 authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

op-chain-ops: default `L2Addresses` (#3644)

For building a developer genesis, if the `L2Addresses` struct
is `nil`, it will now use the default values. This simplifies
config and reduces code duplication as `nil` can now be passed.
Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent ec8fa36b
package genesis
import (
"github.com/ethereum-optimism/optimism/op-bindings/predeploys"
"github.com/ethereum-optimism/optimism/op-chain-ops/state"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
......@@ -29,6 +30,14 @@ func BuildL2DeveloperGenesis(config *DeployConfig, l1StartBlock *types.Block, l2
}
SetPrecompileBalances(db)
if l2Addrs == nil {
l2Addrs = &L2Addresses{
ProxyAdmin: predeploys.DevProxyAdminAddr,
L1StandardBridgeProxy: predeploys.DevL1StandardBridgeAddr,
L1CrossDomainMessengerProxy: predeploys.DevL1CrossDomainMessengerAddr,
}
}
return BuildL2Genesis(db, config, l1StartBlock, l2Addrs)
}
......
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