Skip to content

Fixed expectRevert being applied to calls to cheatcodes#1012

Merged
automergerpr-permission-manager[bot] merged 13 commits intomasterfrom
lis-fix-expectRevert
Nov 26, 2025
Merged

Fixed expectRevert being applied to calls to cheatcodes#1012
automergerpr-permission-manager[bot] merged 13 commits intomasterfrom
lis-fix-expectRevert

Conversation

@lisandrasilva
Copy link
Contributor

This PR fixes the expectRevert cheatcode implementation. According to the Foundry documentation:

After calling expectRevert, calls to other cheatcodes before the reverting call are ignored.
This means, for example, we can call prank immediately before the reverting call.

In the previous implementation, the call to the cheatcode was being ignored in the sense that was not being executed. This PR still executes cheatcode calls but does not check if these calls revert or not.

Fixes #993.

@lisandrasilva lisandrasilva self-assigned this Apr 10, 2025
@lisandrasilva lisandrasilva added the bug Something isn't working label Apr 10, 2025
Copy link
Contributor

@palinatolmach palinatolmach left a comment

Choose a reason for hiding this comment

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

Looks good, and I think it's reasonable leave the delegatecall investigation to a follow-up PR.

@automergerpr-permission-manager automergerpr-permission-manager bot merged commit 47234bb into master Nov 26, 2025
9 checks passed
@automergerpr-permission-manager automergerpr-permission-manager bot deleted the lis-fix-expectRevert branch November 26, 2025 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Align expectRevert and prank behavior with Foundry

4 participants

Comments