fix(contracts): improve DelayedWETH loading for fork tests#19206
Merged
fix(contracts): improve DelayedWETH loading for fork tests#19206
Conversation
… artifacts Upgrade tests were failing because ForkLive assumed v1 structure (DelayedWETH on game impl) but after OPCM v2 upgrades it's stored in gameArgs. This caused artifact loading to fail when tests ran past upgrades without useUpgradedFork. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fixes semgrep rule sol-style-return-arg-fmt which requires named return arguments to have an underscore suffix. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #19206 +/- ##
===========================================
+ Coverage 66.4% 81.5% +15.1%
===========================================
Files 55 134 +79
Lines 4030 6930 +2900
===========================================
+ Hits 2677 5651 +2974
- Misses 1209 1279 +70
+ Partials 144 0 -144
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Simplify the fallback logic so that: - If gameArgs returns data (length > 0), it must decode successfully - Only fall back to v1 (game impl .weth()) if gameArgs doesn't exist or returns empty bytes This ensures proper error propagation when gameArgs data is invalid. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
0987651 to
9650f98
Compare
9650f98 to
fcc6528
Compare
stevennevins
approved these changes
Feb 17, 2026
JosepBove
approved these changes
Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes several issues with how DelayedWETH addresses are loaded during fork-based upgrade tests.
Changes
Load pre-upgrade state from on-chain queries
DisputeGames.getGameImplDelayedWeth()instead of relying on artifactsFix v1/v2 OPCM structure handling
ForkLive._readSuperchainRegistry()to properly handle both v1 and v2 OPCM structures:gameImpl.weth()gameArgs().wethFix copy-paste bug in ForkLive
GameTypes.PERMISSIONED_CANNONinstead ofGameTypes.CANNONImprove test error messages
Testing
CUSTOM_GAS_TOKEN