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.04k stars 71 forks source link

Some contracts return [0x00000001, 0x00000002] selectors #83

Closed 0x366 closed 8 months ago

0x366 commented 8 months ago

Ie this one 0xD5D1FB5835651C80Ead387A75bD04611e8B3aD52

const { whatsabi } = require("@shazow/whatsabi");

const selectors = whatsabi.selectorsFromBytecode("0x....");
console.log(JSON.stringify(selectors))

Prints ["0x00000001","0x00000002"]

0x366 commented 8 months ago

my bad, all works, need to put deployed bytecode instead of creation bytecode