shazow / whatsabi

Extract the ABI (and resolve proxies, and get other metadata) from Ethereum bytecode, even without source code.
https://shazow.github.io/whatsabi/
MIT License
1.06k stars 74 forks source link

proxies: EIP1967Proxy is not being detected for Compound USDCv3 #126

Closed shazow closed 2 weeks ago

shazow commented 1 month ago

https://etherscan.io/address/0xc3d688b66703497daa19211eedff47f25384cdc3

It's supposed to be a ERC1967Proxy but for some reason the constant slots we used to identify it are missing from the bytecode (got compiled out? optimized?).

Need to figure out why.

Worst case could also fall back to checking for an implementation() selector (0x5c60da1b?).

Via #125

shazow commented 1 month ago

Looks like the constant we're looking for is stored at the end and loaded via CODECOPY, and whatsabi is failing to detect the end of the program so it's treating it as instructions.