Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (6130af7 2022-04-06T00:03:48.094239707+00:00)
What command(s) is the bug in?
forge test
Operating System
Linux
Describe the bug
Minimal code and steps to replicate:
https://gist.github.com/strawberry-fury/ade15e042494d9fa6a1bfac7bfbce660
After running forge init in an empty directory, put the above code in a .sol file in src/, then run forge test.
The test will fail because the assertEq on line 43 fails, but in reality it shouldn't.
If Line 31 (transfer() on the dummy ERC20) is commented out, the test passes.
This leads me to believe that it's due to the behavior that after any message call finishes, the tx.origin prank is over.
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (6130af7 2022-04-06T00:03:48.094239707+00:00)
What command(s) is the bug in?
forge test
Operating System
Linux
Describe the bug
Minimal code and steps to replicate:
https://gist.github.com/strawberry-fury/ade15e042494d9fa6a1bfac7bfbce660
After running
forge initin an empty directory, put the above code in a .sol file in src/, then runforge test.The test will fail because the
assertEqon line 43 fails, but in reality it shouldn't.If Line 31 (transfer() on the dummy ERC20) is commented out, the test passes.
This leads me to believe that it's due to the behavior that after any message call finishes, the tx.origin prank is over.