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

loaders: Add getSources() to ContractResult #112

Closed shazow closed 3 months ago

shazow commented 3 months ago

Usage:

const result = await loader.getContract(address);
const sources = await result.getSources();

for (const s of sources) {
  console.log(s.path, " -> ", s.content.slice(25) + "...");
}
shazow commented 3 months ago

Alright I think this is ready for merge and then probably new release time!