Skip to content

Commit

Permalink
Use op-contracts/v1.3.0 ABI for pre fault proofs validation (#537)
Browse files Browse the repository at this point in the history
* improve test failure output for testSuperchainConfig

* use lowercase getters for nonFaultProofs standard roles

this is the API for MCP release (1.3.0)

* Update validation/superchain-config_test.go

* just lint-all
  • Loading branch information
geoknee authored Aug 30, 2024
1 parent 852e765 commit fb63973
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion validation/security-configs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var checkResolutions = func(t *testing.T, r standard.Resolutions, chainID uint64
got, err := getAddress(method, contractAddress, client)
require.NoErrorf(t, err, "problem calling %s.%s (%s)", contract, method, contractAddress)

// Use assert.True here for a concise output of failures, since failure info is sent to a slack channel
// Use t.Errorf here for a concise output of failures, since failure info is sent to a slack channel
if want != got {
t.Errorf("%s.%s = %s, expected %s (%s)", contract, method, got, want, output)
}
Expand Down
4 changes: 2 additions & 2 deletions validation/standard/standard-config-roles-mainnet.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[l1.nonFaultProofs]
OptimismPortalProxy."GUARDIAN()" = "0x09f7150D8c019BeF34450d6920f6B3608ceFdAf2"
L2OutputOracleProxy."CHALLENGER()" = "0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A"
OptimismPortalProxy."guardian()" = "0x09f7150D8c019BeF34450d6920f6B3608ceFdAf2"
L2OutputOracleProxy."challenger()" = "0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A"

[l1.FaultProofs]
OptimismPortalProxy."guardian()" = "0x09f7150D8c019BeF34450d6920f6B3608ceFdAf2"
Expand Down
4 changes: 2 additions & 2 deletions validation/standard/standard-config-roles-sepolia.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[l1.nonFaultProofs]
OptimismPortalProxy."GUARDIAN()" = "0x7a50f00e8D05b95F98fE38d8BeE366a7324dCf7E"
L2OutputOracleProxy."CHALLENGER()" = "0xfd1D2e729aE8eEe2E146c033bf4400fE75284301"
OptimismPortalProxy."guardian()" = "0x7a50f00e8D05b95F98fE38d8BeE366a7324dCf7E"
L2OutputOracleProxy."challenger()" = "0xfd1D2e729aE8eEe2E146c033bf4400fE75284301"

[l1.FaultProofs]
OptimismPortalProxy."guardian()" = "0x7a50f00e8D05b95F98fE38d8BeE366a7324dCf7E"
Expand Down
10 changes: 5 additions & 5 deletions validation/standard/standard-config-roles-universal.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ SystemConfigProxy."batcherHash()" = "BatchSubmitter"


[l1.nonFaultProofs]
OptimismPortalProxy."GUARDIAN()" = "Guardian"
OptimismPortalProxy."SYSTEM_CONFIG()" = "SystemConfigProxy"
OptimismPortalProxy."L2_ORACLE()" = "L2OutputOracleProxy"
OptimismPortalProxy."guardian()" = "Guardian"
OptimismPortalProxy."systemConfig()" = "SystemConfigProxy"
OptimismPortalProxy."l2Oracle()" = "L2OutputOracleProxy"
L2OutputOracleProxy."admin()" = "ProxyAdmin"
L2OutputOracleProxy."CHALLENGER()" = "Challenger"
L2OutputOracleProxy."PROPOSER()" = "Proposer"
L2OutputOracleProxy."challenger()" = "Challenger"
L2OutputOracleProxy."proposer()" = "Proposer"

[l1.FaultProofs]
DisputeGameFactoryProxy."admin()" = "ProxyAdmin"
Expand Down
4 changes: 3 additions & 1 deletion validation/superchain-config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@ func testSuperchainConfig(t *testing.T, chain *ChainConfig) {
got, err := getAddress("superchainConfig()", opp, client)
require.NoError(t, err)

require.Equal(t, *expected, got)
if *expected != got {
t.Errorf("incorrect OptimismPortal.superchainConfig() address: got %s, wanted %s", got, *expected)
}
}

0 comments on commit fb63973

Please sign in to comment.