Skip to content

Releases: shazow/whatsabi

v0.11.0

22 Jan 19:10
Compare
Choose a tag to compare

Summary

Our ABI loaders learned about contract metadata with ABILoader.getContract(address): Promise<ContractResult>, thanks to @SonOfMosiah!

const loader = new whatsabi.loaders.SourcifyABILoader();
// Previously: const abi = await loader.loadABI(address);
const { abi, name, evmVersion, compilerVersion, runs, ok } = await loader.getContract(address);
if (!ok) throw new Error("contract not found");
...

What's Changed

Full Changelog: v0.10.1...v0.11.0

v0.10.1

04 Jan 18:38
Compare
Choose a tag to compare

Summary

  • loaders.defaultsWithApiKeys is now loaders.defaultsWithEnv, supporting more overrides: SOURCIFY_CHAIN_ID, ETHERSCAN_BASE_URL, ETHERSCAN_API_KEY (thanks @SonOfMosiah).

Example:

const result = await whatsabi.autoload(address, {
  provider: provider,
  ... whatsabi.loaders.defaultsWithEnv({
    SOURCIFY_CHAIN_ID: 42161,
    ETHERSCAN_BASE_URL: "https://api.arbiscan.io/api",
    ETHERSCAN_API_KEY: "MYSECRETAPIKEY",
  }),
});

What's Changed

New Contributors

Full Changelog: v0.10.0...v0.10.1

v0.10.0

02 Jan 19:40
Compare
Choose a tag to compare

Summary

  • loaders.defaultsWithAPIKeys(env) [Update: Use loaders.defaultsWithEnv in v0.10.1]: New helper for initializing default loaders with your own API keys (and more):
    const env = { ETHERSCAN_API_KEY: "<YOUR KEY>" }; // or process.env
    const r = await whatsabi.autoload(address, {
      provider,
      ...whatsabi.loaders.defaultsWithEnv(env),
    });
  • proxies.DiamondProxy now knows how to load all registered facets with proxy.facets(provider, address) or proxy.selectors(provider, address). Shoutout to @banteg for helping figure this out.
  • selectorsFromBytecode will now return as soon as the jump table is processed, for faster performance when just extracting selectors.
  • Shoutout to @cdump for making and sharing a benchmarking suite (#66), this prompted several improvements to whatsabi (false positives should be fixed, and performance improved). Also check out evmole, the bytecode-based parameter type guessing is very impressive!

What's Changed

  • Fix syntax issues in the code in the 'usage' section of README by @Autosaida in #64
  • DiamondProxy: Load internal facets and selectors by @shazow in #65
  • disasm: Fix false positive selectors when looking for ISZERO selectors by @shazow in #68
  • examples/benchmark-selectors.ts: Add benchmark example, improve selector loading performance when bypassing full parsing by @shazow in #71

New Contributors

Full Changelog: v0.9.1...v0.10.0

v0.9.1

23 Oct 20:59
Compare
Choose a tag to compare

What's Changed

  • loaders: Fix SourcifyABILoader failure in browsers, add MultiABILoader test by @shazow in #63

Full Changelog: v0.9.0...v0.9.1

v0.9.0

13 Oct 14:00
Compare
Choose a tag to compare

What's Changed

  • loaders: add chainId to sourcify loader by @jxom in #60
  • autoload: Fix EOA handling for viem #61
  • disasm: Include empty "name" fields in inputs/outputs of ABI results, to be more spec compliant #61

New Contributors

  • @jxom made their first contribution in #60

Full Changelog: v0.8.6...v0.9.0

v0.8.6

06 Oct 21:21
Compare
Choose a tag to compare

What's Changed

  • src/loaders.ts: Fix sourcify fallback to partial match e019585
  • packaging: tsconfig, package.json, use pnpm, use vitest by @shazow in #58

Full Changelog: v0.8.5...v0.8.6

v0.8.5

19 Sep 01:31
Compare
Choose a tag to compare

What's Changed

  • Mainly packaging changes. Trying to get the ESM and CJS builds to work in more environments. Sorry for the release spam.

Full Changelog: v0.8.2...v0.8.5

v0.8.2

11 Sep 23:41
Compare
Choose a tag to compare

What's Changed

  • autoload: Include empty name keys when name is unknown (as per spec). 😑
  • Updated examples/*.ts code to latest WhatsABI and Ethers v6

Full Changelog: v0.8.0...v0.8.2

v0.8.1

11 Sep 23:15
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.8.0...v0.8.1

v0.8.0

23 Aug 15:49
Compare
Choose a tag to compare

What's Changed

  • 🤗 More provider-agnostic, tested with Ethers.js (v5 and v6) and Viem. (#48)
  • 🤏 Reduced bundle size to 12 KB ❗ (#48)
  • ⚒️ Changed build process to include esm+commonjs+types in the package, please open an issue if there are environments where WhatsABI is not importing properly.

Full Changelog: v0.7.0...v0.8.0