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!
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!