Skip to content

Commit 418b2d1

Browse files
fix: test failures
1 parent 9255509 commit 418b2d1

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

packages/contracts-bedrock/scripts/checks/opcm-upgrade-checks/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func main() {
3636
// Process.
3737
if _, err := common.ProcessFilesGlob(
3838
[]string{"forge-artifacts/**/*.json"},
39-
[]string{"forge-artifacts/OPContractsManager.sol/*.json"},
39+
[]string{"forge-artifacts/OPContractsManager.sol/*.json", "forge-artifacts/OPContractsManagerV2.sol/*.json"},
4040
processFile,
4141
); err != nil {
4242
fmt.Printf("error: %v\n", err)

packages/contracts-bedrock/test/L1/OPContractsManager.t.sol

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2760,9 +2760,13 @@ contract OPContractsManager_Deploy_Test is DeployOPChain_TestBase, DisputeGames
27602760

27612761
// Try to keep the gas usage below 12m gas, under the EIP-7825 gas target of 2**24. We can
27622762
// technically go higher but this is a conservative bound, good signal that the gas usage
2763-
// is increasing.
2764-
if (!LibString.eq(Config.foundryProfile(), "lite")) {
2765-
VmSafe.Gas memory gas = vm.lastCallGas();
2763+
// is increasing. Only check this for the V2 OPCM since the V1 already exceeds this limit.
2764+
// Don't check for coverage or lite profile since they mess with gas usage.
2765+
VmSafe.Gas memory gas = vm.lastCallGas();
2766+
if (
2767+
!isDevFeatureEnabled(DevFeatures.OPCM_V2) && !LibString.eq(Config.foundryProfile(), "lite")
2768+
&& !vm.isContext(VmSafe.ForgeContext.Coverage)
2769+
) {
27662770
assertLt(gas.gasTotalUsed, 12000000, "Deploy gas usage exceeds 12m gas");
27672771
}
27682772
}

0 commit comments

Comments
 (0)