Releases: delvtech/drift
Releases · delvtech/drift
@delvtech/[email protected]
@delvtech/[email protected]
Patch Changes
- 2a418f1: Improved package.json configs.
@delvtech/[email protected]
Patch Changes
- 2a418f1: Improved package.json configs.
@delvtech/[email protected]
Patch Changes
- 2a418f1: Improved package.json configs.
@delvtech/[email protected]
Patch Changes
- 2a418f1: Improved package.json configs.
@delvtech/[email protected]
Minor Changes
- f65f915: Renamed
abiFn
toabiEntry
in the following return objects for consistency:prepareDeployData
prepareFunctionData
prepareFunctionReturn
- 5462088: Changed
chainId
frombigint
tonumber
inTransactionOptions
to be consistent with all otherchainId
param and option types.
Patch Changes
- 367ff3c: Added automatic call batching via
Multicall3
. This can be controlled with newbatch
andmaxBatchSize
options when creating new clients, e.g.,createDrift({ batch: false })
, orcreateDrift({ maxBatchSize: 10 })
. - d426510: Added
NoInfer
to the return type ofmulticall
to avoid widening the inferred args type when the return value is destructured. - ca01657: Added a
getMulticallAddress
util for known Multicall3 deployments and integrated intoClient.multicall
and the standalonemulticall
adapter method that's used by all adapters viaBaseAdapter.multicall
. - 1fe3b74: Added an
onMinedTimeout
option toWriteOptions
to modify the default timeout for the awaited transaction receipt. If the timeout is reached, the receipt with beundefined
. - 47c5bc4: Removed block overriding in
Contract.read
when provided a block earlier than the contract'sepochBlock
. If the contract was constructed with anepochBlock
, it used to overwrite theblock
option passed toread
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 inmulticall
andWeb3Adapter
.
@delvtech/[email protected]
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()
, andsendCalls()
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 configurableprefix
option to control0x
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 whenaddress
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
) tov24
🔄 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.
- Added complete EIP-5792 (Wallet Call API) implementation to all adapters with
@delvtech/[email protected]
Minor Changes
- 319c2aa: Renamed
NotImplementedError
for missing stubs on mock clients toMissingStubError
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
, andprepareFunctionReturn
to exports. - 0364ef3: Made the
data
property onEventLog
required.
@delvtech/[email protected]
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 withpublicActions
. - 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]