Skip to main content

New answers tagged

0 votes
Accepted

Issue with tx.origin and msg.sender in Foundry test

In your test (i.e, testTelephoneDoesNotChangeOwner), since you've called the changeOwner() function using the pranked address (i.e., user ). Therefore, the msg.sender would be the pranked user address,...
SYED ASAD KAZMI's user avatar
0 votes

Mining a new block in Foundry `forge test`

There are primarily 2 ways to update the blocks using functions provided by Foundry itself: Use vm.wrap to set to a specific timestamp: vm.warp(1641070800); Use vm.roll() to set a specific block ...
varun-doshi's user avatar

Top 50 recent answers are included