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
- autoload: Add
abiFillEmptyNames
helper by @yohamta in #150 - ethers.js -> ox by @shazow in #153
- chore: prepare = false by @jxom in #154
- loaders: Add Blockscout ABI support by @yohamta in #152
Full Changelog: v0.16.0...v0.17.0