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

Detect interfaces and common contract mixins #21

Open shazow opened 1 year ago

shazow commented 1 year ago

A convenient way to describe what a contract could be doing (especially if it's unverified) is by summarizing which interfaces it complies with.

We can do this either by using ERC-165 and looking for hardcoded interface IDs, or by comparing against known hashes of selectors in interfaces (https://github.com/shazow/eip-sighashes could be helpful for this).

Some common interfaces/functionality we want to look for: