foundry
foundry copied to clipboard
"deal" does not works with Circle USDC
Component
Forge
Have you ensured that all of these are up to date?
- [X] Foundry
- [X] 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)
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.
cc @klkvr
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 😅 .
Fixed in forge-std 1.8.0
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
You may need update forge-std
by running forge update lib/forge-std
.