Skip to content

Conversation

@smartcontracts
Copy link
Contributor

Description
This PR adds tests for AddGameType and UpdatePrestate behaviors in OPCMv2. It also adds tests for OPContractsManagerContainer (the new version).

@smartcontracts smartcontracts requested a review from a team as a code owner November 26, 2025 20:09
@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.24%. Comparing base (170c621) to head (7560cd3).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #18389      +/-   ##
===========================================
+ Coverage    75.31%   80.24%   +4.93%     
===========================================
  Files          187      132      -55     
  Lines        11199     7168    -4031     
===========================================
- Hits          8434     5752    -2682     
+ Misses        2621     1416    -1205     
+ Partials       144        0     -144     
Flag Coverage Δ
cannon-go-tests-64 ?
contracts-bedrock-tests 80.24% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 57 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.


/// @notice Tests that the constructor succeeds on mainnet when the test env flag is set.
/// @param _devFeatureBitmap The dev feature bitmap to use.
function testFuzz_constructor_devBitmapOnMainnetButTestEnv_succeeds(bytes32 _devFeatureBitmap) public {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should we have this test for non-mainnet chains?


/// @title OPContractsManagerContainer_IsDevFeatureEnabled_Test
/// @notice Tests the isDevFeatureEnabled() function.
contract OPContractsManagerContainer_IsDevFeatureEnabled_Test is OPContractsManagerContainer_TestInit {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a sanity check, this should always hold:

assertFalse(container.isDevFeatureEnabled(bytes32(0)));


assertFalse(container.isDevFeatureEnabled(_feature));
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe test for when multiple bits are set?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants