-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested startPrank() doesn't work #420
Comments
if i remember correctly, foundry previously didn't allow nested pranks, but it seems the behavior has changed. i'm curious whether allowing nested pranks are intentional. it seems potentially confusing and prone to making mistakes. could you please provide a pointer to other use cases of nested pranks or the rationale behind them? |
@daejunpark |
in a test function, this fails with the expected error message: function test_nestedPrank() external {
vm.startPrank(address(0));
vm.startPrank(address(0));
} (sort of)
But in
|
I think we'd be happy if an external contributor added support for nested pranks (would need to change our Prank object to be a stack instead of a single value), but for now we'll focus on prioritizing core features. I'll close this for now after fixing the error message in #428 |
Describe the bug
In foundry testing, we can use nested startPrank():
But in Halmos it leads to crash:
To Reproduce
Environment:
The text was updated successfully, but these errors were encountered: