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

"deal" does not works with Circle USDC #7137

Closed
2 tasks done
maguroid opened this issue Feb 15, 2024 · 5 comments
Closed
2 tasks done

"deal" does not works with Circle USDC #7137

maguroid opened this issue Feb 15, 2024 · 5 comments
Labels
T-bug Type: bug

Comments

@maguroid
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 (3cdee82 2024-02-15T00:19:38.655803000Z)

What command(s) is the bug in?

ARB_RPC_URL=<your_rpc_url> forge test -vvv

Operating System

macOS (Apple Silicon)

Describe the bug

When using 'deal' with Circle USDC, it will fail with the following error:

[FAIL. Reason: revert: stdStorage find(StdStorage): Slot(s) not found.] test_dealUsdc() (gas: 150179)

minimul repro

I believe the reason is the implementation of 'balanceOf' in Circle USDC. It has a little trick to handle the blacklist, where the last bit is used as a flag.

Circle USDC implementation

@maguroid maguroid added the T-bug Type: bug label Feb 15, 2024
@mattsse
Copy link
Member

mattsse commented Feb 15, 2024

cc @klkvr

@sakulstra
Copy link
Contributor

circle usd packs blacklist and balance, like aave token does with delegation.
We maintain a list of aave-listed assets that don't currently work with deal here if that is of any help.

Not sure if relevant, but the people behind evm.storage open sourced their rust based storage layout extractor: https://github.com/smlxl/storage-layout-extractor which seems to work quite well with structs - which i think will not help in case of USDC, but perhaps in others 😅 .

@klkvr
Copy link
Member

klkvr commented Mar 14, 2024

Fixed in forge-std 1.8.0

@lelerukjaymoh
Copy link

lelerukjaymoh commented Apr 11, 2024

deal still doesn't work for USDC. I get this error when trying to deal USDC
[FAIL. Reason: revert: stdStorage find(StdStorage): Slot(s) not found.]

Tried dealing USDT and it works perfectly but USDC fails
This is on the latest version of foundry

@maguroid
Copy link
Author

You may need update forge-std by running forge update lib/forge-std.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug
Projects
Status: Completed
Development

No branches or pull requests

5 participants