Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using deal for OUSD token #4595

Closed
2 tasks done
amatureApe opened this issue Mar 19, 2023 · 1 comment
Closed
2 tasks done

Using deal for OUSD token #4595

amatureApe opened this issue Mar 19, 2023 · 1 comment
Labels
T-bug Type: bug

Comments

@amatureApe
Copy link

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (06f7c9c 2023-03-18T00:16:11.192812Z)

What command(s) is the bug in?

No response

Operating System

macOS (Apple Silicon)

Describe the bug

Calling deal when trying to mint OUSD (0x2A8e1E676Ec238d8A992307B495b45B3fEAa5e86 - mainnet) returns the following error below.

[FAIL. Reason: stdStorage find(StdStorage): Slot(s) not found. Counterexample: calldata=0x202da9aa0000000000000000000000000000000000000000000000000000000000000000, args=[0]]
Screenshot 2023-03-18 at 4 59 11 PM

@amatureApe amatureApe added the T-bug Type: bug label Mar 19, 2023
@mds1
Copy link
Collaborator

mds1 commented Mar 22, 2023

The OUSD contract's balanceOf method dynamically computes the balance to return (like a rebase token), whereas the deal cheat only supports tokens that return balanceOf by reading a value directly form a storage slot, because deal works by changing the value in the balanceOf storage slot. As a result this token is not currently supported by forge-std, similar to foundry-rs/forge-std#140

As a workaround you can find an OUSD whale from etherscan, prank as that user, and transfer tokens to any address you need

(For future reference, deal for tokens is a forge-std cheat, not a native forge cheat, so this issue should be in the forge-std repo)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug
Projects
No open projects
Archived in project
Development

No branches or pull requests

2 participants