forge-std
forge-std copied to clipboard
Error: `find` hangs when `deal`ing tokens
On some contracts like this where the balanceOf
function has some extra functionality not just returning the mapping value, find(StdStorage storage self)
hangs (the tests can't proceed and remain frozen). This issue is on specific contracts that overrides balanceOf and have extra implementation apart from just returning the balance value
The cause of this seems to be the staticcall
to fetch the balanceOf
at https://github.com/foundry-rs/forge-std/blob/5086c7a438a949012c5c6aa353e8f24c47d63237/src/StdStorage.sol#L76C43-L76C43.
Although not sure why the previous staticcall
on line https://github.com/foundry-rs/forge-std/blob/5086c7a438a949012c5c6aa353e8f24c47d63237/src/StdStorage.sol#L46C41-L46C41 doesn't face the same issue