Skip to content

Releases: delvtech/drift

@delvtech/[email protected]

02 Aug 02:27
1bffc23
Compare
Choose a tag to compare

Patch Changes

  • c93d76c: Patched a bug in prepareArgs that was affecting it's ability to identify simplified (derefed) deeply nested tuple values.
  • 0a248f2: Bumped deps.
  • 2a418f1: Improved package.json configs.

@delvtech/[email protected]

02 Aug 02:27
1bffc23
Compare
Choose a tag to compare

Patch Changes

  • 2a418f1: Improved package.json configs.

@delvtech/[email protected]

02 Aug 02:27
1bffc23
Compare
Choose a tag to compare

Patch Changes

  • 2a418f1: Improved package.json configs.

@delvtech/[email protected]

02 Aug 02:27
1bffc23
Compare
Choose a tag to compare

Patch Changes

  • 2a418f1: Improved package.json configs.

@delvtech/[email protected]

02 Aug 02:27
1bffc23
Compare
Choose a tag to compare

Patch Changes

  • 2a418f1: Improved package.json configs.

@delvtech/[email protected]

09 Jul 00:50
2754002
Compare
Choose a tag to compare

Minor Changes

  • f65f915: Renamed abiFn to abiEntry in the following return objects for consistency:
    • prepareDeployData
    • prepareFunctionData
    • prepareFunctionReturn
  • 5462088: Changed chainId from bigint to number in TransactionOptions to be consistent with all other chainId param and option types.

Patch Changes

  • 367ff3c: Added automatic call batching via Multicall3. This can be controlled with new batch and maxBatchSize options when creating new clients, e.g., createDrift({ batch: false }), or createDrift({ maxBatchSize: 10 }).
  • d426510: Added NoInfer to the return type of multicall to avoid widening the inferred args type when the return value is destructured.
  • ca01657: Added a getMulticallAddress util for known Multicall3 deployments and integrated into Client.multicall and the standalone multicall adapter method that's used by all adapters via BaseAdapter.multicall.
  • 1fe3b74: Added an onMinedTimeout option to WriteOptions to modify the default timeout for the awaited transaction receipt. If the timeout is reached, the receipt with be undefined.
  • 47c5bc4: Removed block overriding in Contract.read when provided a block earlier than the contract's epochBlock. If the contract was constructed with an epochBlock, it used to overwrite the block option passed to read to ensure it didn't read from a block where there was no data, but this can be misleading by implying that there was data where there wasn't. So, epochBlock now only affects the behavior of event queries.
  • f2ec661: Added hexToString util
  • f2ec661: Removed use of Buffer node util in multicall and Web3Adapter.

@delvtech/[email protected]

25 Jun 20:37
ccf4899
Compare
Choose a tag to compare

Patch Changes

  • b9fc425: EIP-5792 Wallet Call API Implementation

    🚀 Features

    EIP-5792 Wallet Call API Support

    • Added complete EIP-5792 (Wallet Call API) implementation to all adapters with getWalletCapabilities(), getCallsStatus(), showCallsStatus(), and sendCalls() methods + comprehensive type definitions.
    • Supports calls in a variety of formats including ABI function calls, ABI deploy calls, raw calldata, and raw bytecode (deployless) calls.
    • Added methods for EIP-5792 functionality to MockAdapter:
      • onGetWalletCapabilities()
      • onGetCallsStatus()
      • onShowCallsStatus()
      • onSendCalls()
    • Added getWalletCallsStatusLabel() util function for generating user-friendly labels for wallet call statuses.

    New Web Example Application

    • Added a React + TypeScript + Vite example application.
    • Includes integration examples for all adapter types (default, ethers, viem, web3).
    • Demonstrates EIP-5792 wallet call functionality.

    🔧 Improvements

    Enhanced Testing Utilities

    • Added randomSelection utility for selecting random items from arrays.
    • Added createStubWalletCallsStatus for testing EIP-5792 functionality.
    • Improved MockAdapter with better type definitions and expanded functionality.
    • Added method parameter types to exports:
      • OnReadParams
      • OnSimulateWriteParams
      • OnMulticallParams
      • OnDeployParams
      • OnWriteParams
      • OnSendCallsParams
      • StubMulticallCallParams
      • StubWalletCallParams.

    Call Preparation and Processing

    • Added prepareCall utility function for unified call preparation across different call types (function calls, deploy calls, encoded calls, bytecode calls).
    • Enhanced multicall functionality to support mixed call types including encoded calls alongside ABI function calls.
    • Improved call processing in all adapters by centralizing call preparation logic.

    Type System Enhancements

    • Added BytecodeCallParams type for bytecode-based calls without contract addresses.
    • Improved type inference for multicall operations with mixed call types.
    • Added PartialByOptional utility type for better optional property handling.

    Adapter Improvements

    • Better fallback handling for individual wallet call stub matching in MockAdapter.
    • Refactored Web3 adapter to use injected provider for getSignerAddress and EIP-5792 calls.
    • Improved internal adapter utilities and type safety.
    • Added NotImplementedError as a generalized replacement for stub-specific errors.

    Client and Caching Enhancements

    • Enhanced multicall caching to support both function calls and encoded calls.
    • Improved cache key generation for mixed call types.

    Utility Functions

    • Added toHexString utility for flexible hex string conversion
    • Enhanced isHexString with configurable prefix option to control 0x prefix enforcement.
    • Improved DriftError to automatically use constructor name for subclasses.

    🐛 Bug Fixes

    Package Configuration

    • Fixed @delvtech/drift-web3 package.json fields to point to correct dist files.
    • Updated gitignore files across all packages.

    Type Safety

    • Enhanced FunctionCallParams to infer function names even when address is missing.
    • Improved adapter type definitions and method signatures.
    • Better error handling and type checking throughout the codebase.
    • Enhanced multicall type inference to support mixed call types (function calls, encoded calls, etc.).
    • Improved readonly array handling for better immutability support.

    📦 Dependencies

    • Upgraded all dependencies to their latest versions.
    • Updated Node.js version requirement (.nvmrc) to v24

    🔄 Internal Changes

    • Restructured examples directory with dedicated Node.js and web folders.
    • Updated biome configuration (renamed from .jsonc to .json).
    • Improved internal type utilities for better developer experience.

    Breaking Changes: None

    Migration Guide: This release is fully backward compatible. The new EIP-5792 functionality is opt-in and doesn't affect existing adapter usage patterns.

@delvtech/[email protected]

18 Jun 17:06
ff83e20
Compare
Choose a tag to compare

Minor Changes

  • 319c2aa: Renamed NotImplementedError for missing stubs on mock clients to MissingStubError for clarity and to avoid confusion with more general use cases that may not be related to stubs.

Patch Changes

  • 1feff53: Added DynamicProperty property type to exports.
  • 9f63615: Added erc4626 artifact to exports (abi + method identifiers).
  • b99ea80: Added the following types to exports:
    • FunctionCallParams
    • AfterMethodHook
    • BeforeMethodHook
    • HookMap
    • HookPayload
    • RequiredValueKey
  • fcab0a8: Patched a bug in the ViemReadWriteAdapter related to private method access when trying to use write methods.
  • e669f49: Added encodeDeployData, prepareDeployData, and prepareFunctionReturn to exports.
  • 0364ef3: Made the data property on EventLog required.

@delvtech/[email protected]

18 Jun 17:06
ff83e20
Compare
Choose a tag to compare

Patch Changes

  • cf8eaf1: Added support for accepting any viem client type as the publicClient. If the client is missing the minimum required actions, it will be extended with publicActions.
  • fcab0a8: Patched a bug in the ViemReadWriteAdapter related to private method access when trying to use write methods.
  • Updated dependencies [1feff53]
  • Updated dependencies [319c2aa]
  • Updated dependencies [9f63615]
  • Updated dependencies [b99ea80]
  • Updated dependencies [fcab0a8]
  • Updated dependencies [e669f49]
  • Updated dependencies [0364ef3]

@delvtech/[email protected]

09 Jun 15:44
0fcd02b
Compare
Choose a tag to compare

Patch Changes

  • 31952dc: Patched multicall to ensure results are returned in the correct order.
  • 8a331cc: Patched multicall to return the correct format when the cache is hit and allowFailure is changed.