@woof-software/contracts-tools-sdk-ethers 0.0.2 → 0.0.4

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.
package/lib/config.js CHANGED
@@ -1,4 +1,4 @@
1
- import { DEFAULT_LOGS_BLOCKS_STEP, DEFAULT_LOGS_DELAY_MS, DEFAULT_MULTICALL_ALLOW_FAILURE, DEFAULT_MULTICALL_BATCH_DELAY_MS, DEFAULT_MULTICALL_MUTABLE_CALLS_BATCH_LIMIT, DEFAULT_MULTICALL_STATIC_CALLS_BATCH_LIMIT, DEFAULT_MULTICALL_WAIT_FOR_TXS, DEFAULT_MUTABLE_CALLS_TIMEOUT_MS, DEFAULT_PRIORITY_CALL_MULTIPLIER, DEFAULT_STATIC_CALLS_TIMEOUT_MS, DEFAULT_WAIT_CALLS_TIMEOUT_MS, MULTICALL_ADDRESS, } from "./constant";
1
+ import { DEFAULT_LOGS_BLOCKS_STEP, DEFAULT_LOGS_DELAY_MS, DEFAULT_MULTICALL_ALLOW_FAILURE, DEFAULT_MULTICALL_BATCH_DELAY_MS, DEFAULT_MULTICALL_MUTABLE_CALLS_BATCH_LIMIT, DEFAULT_MULTICALL_STATIC_CALLS_BATCH_LIMIT, DEFAULT_MULTICALL_WAIT_FOR_TXS, DEFAULT_MUTABLE_CALLS_TIMEOUT_MS, DEFAULT_PRIORITY_CALL_MULTIPLIER, DEFAULT_STATIC_CALLS_TIMEOUT_MS, DEFAULT_WAIT_CALLS_TIMEOUT_MS, MULTICALL_ADDRESS, } from "./constant.js";
2
2
  export const config = {
3
3
  multicallUnit: {
4
4
  address: MULTICALL_ADDRESS,
@@ -4,7 +4,7 @@ import { CONTRACTS_ERRORS } from "../errors";
4
4
  import { isSigner, isStaticMethod } from "../helpers";
5
5
  import { CallMutability, } from "../types";
6
6
  import { checkSignals, createTimeoutSignal, priorityCall, raceWithSignals, waitWithSignals, } from "../utils";
7
- import { contractCreateCallName } from "./contract-create-call-name";
7
+ import { contractCreateCallName } from "./contract-create-call-name.js";
8
8
  export class BaseContract {
9
9
  static createAutoClass(abi, address, driver, options) {
10
10
  return class extends this {
@@ -1 +1 @@
1
- export * from "./base-contract";
1
+ export * from "./base-contract.js";
@@ -1,2 +1,2 @@
1
- export * from "./multicall-errors";
2
- export * from "./contracts-errors";
1
+ export * from "./multicall-errors.js";
2
+ export * from "./contracts-errors.js";
@@ -1,6 +1,6 @@
1
- export * from "./is-static-array";
2
- export * from "./is-static-method";
3
- export * from "./wait-for-address-txs";
4
- export * from "./is-signer";
5
- export * from "./is-parsable";
6
- export * from "./priority-call";
1
+ export * from "./is-static-array.js";
2
+ export * from "./is-static-method.js";
3
+ export * from "./wait-for-address-txs.js";
4
+ export * from "./is-signer.js";
5
+ export * from "./is-parsable.js";
6
+ export * from "./priority-call.js";
@@ -1,2 +1,2 @@
1
- import { isStaticMethod } from "./is-static-method";
1
+ import { isStaticMethod } from "./is-static-method.js";
2
2
  export const isStaticArray = (calls) => !calls.some((call) => !isStaticMethod(call.stateMutability));
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
- export * from "./contract";
2
- export * from "./multicall";
3
- export * from "./config";
4
- export * from "./helpers";
5
- export * from "./types";
1
+ export * from "./contract/index.js";
2
+ export * from "./multicall/index.js";
3
+ export * from "./config.js";
4
+ export * from "./helpers/index.js";
5
+ export * from "./types/index.js";
@@ -1,5 +1,5 @@
1
- export * from "./multicall-normalize-tags";
2
- export * from "./multicall-split-calls";
3
- export * from "./multicall-unit";
4
- export * from "./multicall-normalize-tags";
5
- export * from "./multicall-split-calls";
1
+ export * from "./multicall-normalize-tags.js";
2
+ export * from "./multicall-split-calls.js";
3
+ export * from "./multicall-unit.js";
4
+ export * from "./multicall-normalize-tags.js";
5
+ export * from "./multicall-split-calls.js";
@@ -7,10 +7,10 @@ import { MULTICALL_ERRORS } from "../errors";
7
7
  import { isParsable, isStaticArray } from "../helpers";
8
8
  import { CallMutability, } from "../types";
9
9
  import { checkSignals, createTimeoutSignal, raceWithSignals, waitWithSignals, } from "../utils";
10
- import { multicallErrorEventName } from "./multicall-error-event-name";
11
- import { multicallNormalizeTags } from "./multicall-normalize-tags";
12
- import { multicallResultEventName } from "./multicall-result-event-name";
13
- import { multicallSplitCalls } from "./multicall-split-calls";
10
+ import { multicallErrorEventName } from "./multicall-error-event-name.js";
11
+ import { multicallNormalizeTags } from "./multicall-normalize-tags.js";
12
+ import { multicallResultEventName } from "./multicall-result-event-name.js";
13
+ import { multicallSplitCalls } from "./multicall-split-calls.js";
14
14
  const aggregate3 = "aggregate3";
15
15
  export class MulticallUnit extends BaseContract {
16
16
  constructor(driver, options = {}, multicallAddress = MULTICALL_ADDRESS) {
@@ -1,6 +1,6 @@
1
- export * from "./contract-call";
2
- export * from "./contract-call-options";
3
- export * from "./contract-get-logs-options";
4
- export * from "./contract-options";
5
- export * from "./dynamic-contract";
6
- export * from "./dynamic-contract-constructor";
1
+ export * from "./contract-call.js";
2
+ export * from "./contract-call-options.js";
3
+ export * from "./contract-get-logs-options.js";
4
+ export * from "./contract-options.js";
5
+ export * from "./dynamic-contract.js";
6
+ export * from "./dynamic-contract-constructor.js";
@@ -1,6 +1,6 @@
1
- export * from "./contract";
2
- export * from "./multicall";
3
- export * from "./split-calls";
4
- export * from "./state-mutabiity";
5
- export * from "./call-mutability";
6
- export * from "./priority-call-options";
1
+ export * from "./contract/index.js";
2
+ export * from "./multicall/index.js";
3
+ export * from "./split-calls.js";
4
+ export * from "./state-mutabiity.js";
5
+ export * from "./call-mutability.js";
6
+ export * from "./priority-call-options.js";
@@ -1,5 +1,5 @@
1
- export * from "./multicall-tags";
2
- export * from "./multicall-response";
3
- export * from "./multicall-options";
4
- export * from "./multicall-decodable-data";
5
- export * from "./multicall-wait-options";
1
+ export * from "./multicall-tags.js";
2
+ export * from "./multicall-response.js";
3
+ export * from "./multicall-options.js";
4
+ export * from "./multicall-decodable-data.js";
5
+ export * from "./multicall-wait-options.js";
@@ -1,6 +1,6 @@
1
- export * from "./create-timeout-signal";
2
- export * from "./race-with-signals";
3
- export * from "./create-signals-promise";
1
+ export * from "./create-timeout-signal.js";
2
+ export * from "./race-with-signals.js";
3
+ export * from "./create-signals-promise.js";
4
4
  export * from "../helpers/priority-call";
5
- export * from "./check-signals";
6
- export * from "./wait-with-signals";
5
+ export * from "./check-signals.js";
6
+ export * from "./wait-with-signals.js";
@@ -1,4 +1,4 @@
1
- import { createSignalsPromise } from "./create-signals-promise";
1
+ import { createSignalsPromise } from "./create-signals-promise.js";
2
2
  export async function raceWithSignals(racer, signals = []) {
3
3
  for (const signal of signals) {
4
4
  if (signal.aborted) {
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.2",
4
+ "version": "0.0.4",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/woof-compound/sandbox-sdks.git"
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "scripts": {
35
35
  "prepublish": "$npm_execpath build",
36
- "build": "tsc --build tsconfig.build.json",
36
+ "build": "tsc --build tsconfig.build.json --force && node ../../scripts/compile/post-compile.js",
37
37
  "test": "vitest run --coverage --config test/vitest-config/vitest.config.unit.ts",
38
38
  "test:unit": "vitest run --coverage --config test/vitest-config/vitest.config.unit.ts",
39
39
  "test:e2e": "vitest run --coverage --config test/vitest-config/vitest.config.e2e.ts",