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.07k stars 76 forks source link

Implementation address prefixed with 0s #139

Closed manuelwedler closed 1 month ago

manuelwedler commented 1 month ago

I was running the proxy detection on the whole Sourcify database and found some anomalies.

One thing is that I saw some FixedProxies for which the implementation address is prefixed with 0s.

See this contract on Sepolia as an example: https://sepolia.etherscan.io/address/0x2f4eeccbe817e2b9f66e8123387aa81bae08dfec

I got this proxy resolver for it:

  FixedProxyResolver {
    name: 'FixedProxy',
    resolvedAddress: '0x0000000000000000000000000000000000f7a60f1c88f317f369e3d8679c6689'
  }

The actual address should be 0x0000000000f7a60f1c88f317f369e3d8679c6689.

Might open more issues while I check the data :)

shazow commented 1 month ago

Good find, thank you!

I ran into something similar while working on #129, I'll see if I can fix it in the process too. Ran into some regressions unfortunately so haven't had a chance to merge that PR yet.

shazow commented 1 month ago

Just did a quick release of v0.15.3 that includes this fix, let me know if you run into anything else. :) https://github.com/shazow/whatsabi/releases