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

bin/dot.ts: Remove selector assumption #25

Open shazow opened 1 year ago

shazow commented 1 year ago

Right now we start traversing the decompiled program with the assumption that the selector jump tables are the "entry points" into the call graph.

If it's a non-standard program without selectors, we should still be able to render some kind of interesting call graph.

Example: 0x4870525eae23fceb31df613d179ef6275e1b93a9

Bonus points for rendering all potential call graphs, even those that are disjoint from the entry points (the disjointedness will improve once we handle dynamic jumps better).