Commit 52d6e4b3 authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

op-chain-ops: cleanup genesis check (#10799)

* op-chain-ops: cleanup genesis check

Ensures that the check for contracts are correct based on the
config flags instead of always skipping the fault proof contracts
in the check.

* config: fix
parent 492b6773
...@@ -690,9 +690,9 @@ func NewDeployConfigWithNetwork(network, path string) (*DeployConfig, error) { ...@@ -690,9 +690,9 @@ func NewDeployConfigWithNetwork(network, path string) (*DeployConfig, error) {
} }
// L1Deployments represents a set of L1 contracts that are deployed. // L1Deployments represents a set of L1 contracts that are deployed.
// This should be consolidated with https://github.com/ethereum-optimism/superchain-registry/blob/f9702a89214244c8dde39e45f5c2955f26d857d0/superchain/superchain.go#L227
type L1Deployments struct { type L1Deployments struct {
AddressManager common.Address `json:"AddressManager"` AddressManager common.Address `json:"AddressManager"`
BlockOracle common.Address `json:"BlockOracle"`
DisputeGameFactory common.Address `json:"DisputeGameFactory"` DisputeGameFactory common.Address `json:"DisputeGameFactory"`
DisputeGameFactoryProxy common.Address `json:"DisputeGameFactoryProxy"` DisputeGameFactoryProxy common.Address `json:"DisputeGameFactoryProxy"`
L1CrossDomainMessenger common.Address `json:"L1CrossDomainMessenger"` L1CrossDomainMessenger common.Address `json:"L1CrossDomainMessenger"`
...@@ -738,10 +738,9 @@ func (d *L1Deployments) Check(deployConfig *DeployConfig) error { ...@@ -738,10 +738,9 @@ func (d *L1Deployments) Check(deployConfig *DeployConfig) error {
} }
for i := 0; i < val.NumField(); i++ { for i := 0; i < val.NumField(); i++ {
name := val.Type().Field(i).Name name := val.Type().Field(i).Name
// Skip the non production ready contracts if !deployConfig.UseFaultProofs &&
if name == "DisputeGameFactory" || (name == "DisputeGameFactory" ||
name == "DisputeGameFactoryProxy" || name == "DisputeGameFactoryProxy") {
name == "BlockOracle" {
continue continue
} }
if !deployConfig.UsePlasma && if !deployConfig.UsePlasma &&
......
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