Skip to content

Commit

Permalink
Merge pull request #12548 from ethereum-optimism/bm/singleton-checks-…
Browse files Browse the repository at this point in the history
…added

fix: extra check for singleton contracts in op-deployer tests.
  • Loading branch information
mslipper authored Oct 21, 2024
2 parents b16fc17 + e5fe6a2 commit 35c3414
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions op-deployer/pkg/deployer/integration_test/apply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,7 @@ func validateSuperchainDeployment(t *testing.T, st *state.State, cg codeGetter)

func validateOPChainDeployment(t *testing.T, cg codeGetter, st *state.State, intent *state.Intent) {
// Validate that the implementation addresses are always set, even in subsequent deployments
// that pull from an existing OPCM deployment. Some singleton contracts (e.g. MIPS, etc.) are
// excluded for now.
// that pull from an existing OPCM deployment.
implAddrs := []struct {
name string
addr common.Address
Expand All @@ -327,6 +326,8 @@ func validateOPChainDeployment(t *testing.T, cg codeGetter, st *state.State, int
{"L1StandardBridgeImplAddress", st.ImplementationsDeployment.L1StandardBridgeImplAddress},
{"OptimismMintableERC20FactoryImplAddress", st.ImplementationsDeployment.OptimismMintableERC20FactoryImplAddress},
{"DisputeGameFactoryImplAddress", st.ImplementationsDeployment.DisputeGameFactoryImplAddress},
{"MipsSingletonAddress", st.ImplementationsDeployment.MipsSingletonAddress},
{"PreimageOracleSingletonAddress", st.ImplementationsDeployment.PreimageOracleSingletonAddress},
}
for _, addr := range implAddrs {
require.NotEmpty(t, addr.addr, "%s should be set", addr.name)
Expand Down Expand Up @@ -363,8 +364,6 @@ func validateOPChainDeployment(t *testing.T, cg codeGetter, st *state.State, int
require.NotEmpty(t, code, "contract %s at %s for chain %s has no code", addr.name, addr.addr, chainState.ID)
}

// TODO: Need to check that 'mipsSingletonAddress' and 'preimageOracleSingletonAddress' are set

alloc := chainState.Allocs.Data.Accounts

firstChainIntent := intent.Chains[0]
Expand Down

0 comments on commit 35c3414

Please sign in to comment.