[NO-3155] Fix usage of pranks in functions to make suite work with foundry@nightly #677
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.
These changes fixes our integration with the latest versions of foundry. It seems something changed within the foundry stack that broke some of our test suites. The problematic test suites were all starting pranks in
setUp
functions without also callingstopPrank
before thesetUp
function ended. It's unclear exactly why this broke (i suspect it's related to the changes in the revm dependency that was recently updated, but that's just a guess). Nonetheless it's a lot cleaner and easier to debug if we are using prank in more limited contexts (otherwise it can be hard to figure out what address is the currently active address, and this is especially true given that setup and test functions are initiated from two separate contexts IIRC).The primary fix is outlined in this comment
I created a new issue in the foundry repo here