@woof-software/contracts-tools-sdk-ethers 0.0.17 → 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import type { Contract, Provider, Signer } from "ethers";
1
+ import type { Contract, Provider, Signer, TransactionResponse } from "ethers";
2
2
  import type { PriorityCallOptions } from "../types";
3
- export declare function priorityCall(provider: Provider, signer: Signer, contract: Contract, method: string, args?: any[], options?: PriorityCallOptions): Promise<any>;
3
+ export declare function priorityCall(provider: Provider, signer: Signer, contract: Contract, method: string, args?: any[], options?: PriorityCallOptions): Promise<TransactionResponse>;
4
4
  export declare function priorityCallEstimate(provider: Provider, signer: Signer, contract: Contract, method: string, args?: any[], options?: PriorityCallOptions): Promise<bigint>;
@@ -8,10 +8,10 @@ import { isParsable, isStaticArray } from "../helpers/index.js";
8
8
  import { CallMutability, } from "../types/index.js";
9
9
  import { checkSignals, createTimeoutSignal, raceWithSignals, waitWithSignals, } from "../utils/index.js";
10
10
  import { multicallErrorEventName } from "./multicall-error-event-name.js";
11
+ import { multicallGenerateTag } from "./multicall-generate-tag.js";
11
12
  import { multicallNormalizeTags } from "./multicall-normalize-tags.js";
12
13
  import { multicallResultEventName } from "./multicall-result-event-name.js";
13
14
  import { multicallSplitCalls } from "./multicall-split-calls.js";
14
- import { multicallGenerateTag } from "./multicall-generate-tag.js";
15
15
  const aggregate3 = "aggregate3";
16
16
  export class MulticallUnit extends BaseContract {
17
17
  constructor(driver, options = {}, multicallAddress = MULTICALL_ADDRESS) {
@@ -161,15 +161,14 @@ export class MulticallUnit extends BaseContract {
161
161
  const tags = this.tags;
162
162
  const calls = this.calls;
163
163
  checkSignals(runOptions.signals);
164
- const { mutableCalls, mutableTags } = this.splitCalls(calls, tags, options.forceMutability);
164
+ const { mutableCalls } = this.splitCalls(calls, tags, options.forceMutability);
165
165
  const estimates = [];
166
166
  // Process mutable
167
167
  for (let i = 0; i < mutableCalls.length; i += runOptions.maxMutableCallsStack) {
168
168
  checkSignals(runOptions.signals);
169
169
  const border = Math.min(i + runOptions.maxMutableCallsStack, mutableCalls.length);
170
170
  const iterationCalls = mutableCalls.slice(i, border); // half-opened interval
171
- const iterationTags = mutableTags.slice(i, border);
172
- const estimation = await this.estimateMutableCallsBatch(iterationCalls, iterationTags, runOptions);
171
+ const estimation = await this.estimateMutableCallsBatch(iterationCalls, runOptions);
173
172
  estimates.push(estimation);
174
173
  }
175
174
  return estimates;
@@ -249,7 +248,7 @@ export class MulticallUnit extends BaseContract {
249
248
  }
250
249
  return result;
251
250
  }
252
- async estimateMutableCallsBatch(iterationCalls, iterationTags, runOptions) {
251
+ async estimateMutableCallsBatch(iterationCalls, runOptions) {
253
252
  return this.estimate(aggregate3, [iterationCalls], {
254
253
  forceMutability: CallMutability.Mutable,
255
254
  highPriorityTx: runOptions.highPriorityTxs,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@woof-software/contracts-tools-sdk-ethers",
3
3
  "description": "Module simplify smart contract interactions and multicall3 aggregation on the Ethereum blockchain and other EVM-compatible networks.",
4
- "version": "0.0.17",
4
+ "version": "0.0.19",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/woof-compound/sandbox-sdks.git"