Releases: shazow/whatsabi
Releases · shazow/whatsabi
v0.22.2
v0.22.1
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
Full Changelog: v0.22.0...v0.22.1
v0.22.0
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
v0.21.0
v0.20.0
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
v0.18.0
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
- Adding AnyABI loader by @k-thornton in #156
- Adding EtherscanV2 by @k-thornton in #158
- The error status is inside err.cause by @k-thornton in #160
- (includes 3 above PRs) loaders: add AnyABI, Etherscan v2; change ContractResult by @shazow in #163
- tests: Improve loader tests, add no-result checks by @shazow in #161
Full Changelog: v0.17.0...v0.18.0
v0.17.0
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
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 aCREATE
orCREATE2
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