Skip to content

Releases: shazow/whatsabi

v0.13.2

15 Jul 15:52
6cadc63
Compare
Choose a tag to compare

What's Changed

  • src/types.ts: Add support for ethers.FallbackProvider by @shazow in #96

Full Changelog: v0.13.1...v0.13.2

v0.13.1

10 Jul 20:36
Compare
Choose a tag to compare

Summary

Improved provider support by relying on lower-level RPC methods whenever possible.

Fixed support for viem 2.x and web3.js

What's Changed

  • switch viem and ethersv5 provider order by @Plopmenz in #94
  • Improve provider abstraction: Use low level RPC whenever possible by @shazow in #95
  • Added web3js to the test matrix

New Contributors

Full Changelog: v0.12.0...v0.13.1

v0.12.0

15 Jun 14:44
Compare
Choose a tag to compare

Summary

Added optional addressResolver override for autoload:

const result = await whatsabi.autoload(address, {
  provider: provider,
  // ...
  // Example: Use viem to resolve ENS addresses
  addressResolver: async (name) => {
    return await publicClient.getEnsAddress({ name })
  },
}

Otherwise minor improvement to disassembling and the test suite.

What's Changed

  • disasm: Detect inverted selector jump condition (with fallback) by @shazow in #85
  • auto: Add addressResolver config by @shazow in #91
  • src/tests/env.ts: Use public RPC by @shazow in #92

Full Changelog: v0.11.0...v0.12.0

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