Skip to content

fix(StdCheats): exclude OP Stack predeploys on Base in assumeNotPrecompile - #951

Open
HereForTheTechNFT wants to merge 2 commits into
foundry-rs:masterfrom
HereForTheTechNFT:fix/assume-not-precompile-base
Open

HereForTheTechNFT wants to merge 2 commits into
foundry-rs:masterfrom
HereForTheTechNFT:fix/assume-not-precompile-base

Conversation

@HereForTheTechNFT

Copy link
Copy Markdown

assumeNotPrecompile(addr, chainId) excludes the OP Stack predeploy range (0x4200…0000 to 0x4200…0800) only for OP Mainnet (10), OP Goerli (420) and OP Sepolia (11155420). Base (8453) and Base Sepolia (84532) run the same OP Stack predeploys (WETH at 0x4200…0006, L2ToL1MessagePasser, GasPriceOracle…), so fuzz inputs on those chains could still land on them.

This adds 8453 and 84532 to the OP Stack branch, following #750, which did the same for OP Sepolia.

Test
test_AssumeNotPrecompileOpStackPredeploys checks that the WETH predeploy is rejected on optimism, optimism_sepolia, base and base_sepolia. It fails before the change ("next call did not revert as expected") and passes after. All 47 StdCheatsTest tests pass, and forge fmt --check is clean on the changed files.

🤖 Generated with Claude Code

https://claude.ai/code/session_014cRzwuyJe8BGwXowsQ3kpw

HereForTheTechNFT and others added 2 commits November 20, 2026 13:23
…mpile

Base (8453) and Base Sepolia (84532) are OP Stack chains with the same
0x4200... predeploys as OP Mainnet and OP Sepolia, but assumeNotPrecompile
did not exclude them there.

Co-authored-by: Claude <[email protected]>
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.

1 participant