Skip to content
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

double hevm prank does not work #317

Closed
xnie0204 opened this issue Jul 20, 2023 · 1 comment
Closed

double hevm prank does not work #317

xnie0204 opened this issue Jul 20, 2023 · 1 comment

Comments

@xnie0204
Copy link

Hi I found if I wrote two cheat code prank in one function test, the first one was successful,but the second one could not and gave me a fake positive.

so my code is in one test:

iHevm.prank(address1)
function1 (use address1 as msg.sender, set works well)
assert(check if function1 works, works nice)

iHevm.prank(address2)
function2 (use address2 as msg.sender, )
assert(check if function2 works, it always gives me fake positive)

prank one is good for me. But in my code, I have to prank twice because function2 depends on function1. They can not separate...Any idea or solution for this? Thank you!

@xnie0204
Copy link
Author

Solved, because my second function was wrong... Thank you

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

No branches or pull requests

1 participant