Skip to content

Error: find hangs when dealing tokens  #409

@lelerukjaymoh

Description

@lelerukjaymoh

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions