Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: extra check for singleton contracts in op-deployer tests. #12548

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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