Skip to content

Releases: shazow/whatsabi

v0.22.2

21 May 17:32
Compare
Choose a tag to compare

This is a re-release of v0.22.1, whose npm package included the wrong build. (#183)

Full Changelog: v0.22.1...v0.22.2

v0.22.1

14 May 16:06
Compare
Choose a tag to compare

Summary

Previous release improved detection of DiamondStorage, but actual resolving was still broken. This release fixes resolving for our known test cases too.

What's Changed

  • proxies: DiamondProxy should override off-by-one DIAMOND_STORAGE slot too by @shazow in #182

Full Changelog: v0.22.0...v0.22.1

v0.22.0

12 May 16:16
Compare
Choose a tag to compare

What's Changed

  • proxies: Detect more off-by-one slot proxies by @shazow in #180
    • Generally improves detection of various proxies in practice. Seems that compilers sometimes introduce an off by 1 or 2 slot constants and rely on runtime math to adjust.
  • pnpm update

Full Changelog: v0.21.1...v0.22.0

v0.21.1

05 May 17:43
Compare
Choose a tag to compare

What's Changed

  • proxies: Detect EIP1967 that does -1 at runtime by @shazow in #179
  • pnpm update

Full Changelog: v0.21.0...v0.21.1

v0.21.0

18 Mar 17:10
Compare
Choose a tag to compare

What's Changed

  • proxies: Skip followProxies if contract is complex enough to be a destination itself by @shazow in #174

Full Changelog: v0.20.0...v0.21.0

v0.20.0

27 Feb 15:24
Compare
Choose a tag to compare

Summary

  • 🎉🙏🥰 New Sponsor: Herd Labs
    • If your company is able to sponsor some WhatsABI development, please get in touch!
  • New feature: Detect known interfaces, like ERC-20, ERC-721, ISafe, etc.
    Give it a try: const detectedInterfaces = whatsabi.interfaces.abiToInterfaces(abi)
    • Made possible thanks to the sponsorship from Herd Labs. :)
  • Improved detection of a flattened/immutable EIP1967Proxy when creation bytecode is available.

What's Changed

  • README.md: Add herd labs sponsor by @shazow in #167
  • Detect interfaces by @shazow in #54
  • src/disasm.ts: Inherit init code proxies if deploy code did not find proxies by @shazow in #172
  • Bumped dependencies.

Full Changelog: v0.19.0...v0.20.0

v0.19.0

09 Jan 01:39
Compare
Choose a tag to compare

What's Changed

  • autoload: Add hasCode property to AutoloadResult type by @yohamta in #166

Full Changelog: v0.18.0...v0.19.0

v0.18.0

13 Dec 00:39
Compare
Choose a tag to compare

Summary

  • Minor breaking change: Backwards-compatible signature change of loaders.ContractResult, making more fields optional: evmVersion, compilerVersion, runs. This makes it so that we can express a simple loadABIresult as agetContract` result with missing fields.
  • Added EtherscanV2 and AnyABI loaders (not used by default yet).

What's Changed

Full Changelog: v0.17.0...v0.18.0

v0.17.0

21 Nov 17:09
Compare
Choose a tag to compare

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

v0.16.0

04 Nov 17:48
Compare
Choose a tag to compare

Summary

  • Improved whatsabi's disassembly so that it's more precise about where the runnable code section is. This helps reduce false positives, and improves finding proxy slots pulled in from the data section using CODECOPY.
  • Added AutoloadResult.isFactory when a CREATE or CREATE2 opcode is detected. This means that some of the results could be attributed to bytecode that is deployed by the factory, rather than the factory itself. That said, false positives like this should be further mitigated by the previous improvement!
  • Deduplicated experimental event results.

What's Changed

  • autoload: Add AutoloadResult.isFactory by @shazow in #144
  • disasm: Detect code boundary and look for slots in aux data by @shazow in #129
  • src/disasm.ts: Use Set for eventCandidates to avoid dupes by @shazow in #147

Full Changelog: v0.15.4...v0.16.0