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

refactor: Add more types and make peer library agnostic #46

Closed shazow closed 1 month ago

shazow commented 1 year ago

We could benefit from an Address type, Selector type, and maybe a Bytecode type.

Would also love to make ethers.js dependency optional (related: #36), but this means using import { keccak_256 } from "@noble/hashes/sha3" directly for hashing, and would need write our own hexlify and such. Not a huge amount of work, probably worth it to reduce barrier to adoption.

Should do this before v1.0.

shazow commented 1 year ago

Reduced with-dependencies bundle size fom 144.73kb to 26kb, still more to do!

shazow commented 1 year ago

15.48 kb with ethers 6

shazow commented 1 year ago

12.29 kB with noble as peerDependencies from ethers 6.