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

auto: Add CrossChainLoad support for verified contracts #113

Closed shazow closed 2 weeks ago

shazow commented 2 weeks ago

Example:

 // USDT, available on both PulseChain and Mainnet (but only verified on mainnet)
const address = "0xdAC17F958D2ee523a2206206994597C13D831ec7";
const result = await autoload(address, {
  provider: pulseChainProvider,
  crossChainLoad: {
    mainnnetProvider,
    ...whatsabi.loaders.defaultsWithEnv(env),
  }
});
console.log(result); // {isVerified: true, abi: [...], ...}