Skip to content

v0.17.0

Latest
Compare
Choose a tag to compare
@shazow shazow released this 21 Nov 17:09
· 13 commits to main since this release

Summary

  • Switched from ethers.js to Ox as our utility library (mainly for things like encoding/decoding ABIs).
    • Reduced the bundle size from 15.34kb ➡ 13.87kb (before new features below).
    • Big thanks to @jxom for the hands-on support.
  • Added Blockscout ABI loader.
    • Big thanks to @yohamta for doing this work!
// Make a MultiABILoader that includes BlockscoutABILoader
const abiLoader = new whatsabi.loaders.MultiABILoader([
  new whatsabi.loaders.SourcifyABILoader(),
  new whatsabi.loaders.EtherscanABILoader({
    apiKey: "...", // Replace the value with your Etherscan API key
  }),
  new whatsabi.loaders.BlockscoutABILoader({
    apiKey: "...", // Replace the value with your Blockscout API key
  }),
]);

{
  // Can use it separately
  const result = await loader.getContract("0x7a250d5630b4cf539739df2c5dacb4c659f2488d");
}

{
  // Or let autoload use it for us
  const result = whatsabi.autoload(address, { provider, abiLoader });
}

What's Changed

Full Changelog: v0.16.0...v0.17.0