@woof-software/contracts-tools-sdk-ethers 0.0.14 → 0.0.16
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 { Contract as EthersContract,
|
|
1
|
+
import { Contract as EthersContract, } from "ethers";
|
|
2
2
|
import { config } from "../config.js";
|
|
3
3
|
import { CONTRACTS_ERRORS } from "../errors/index.js";
|
|
4
4
|
import { isSigner, isStaticMethod, priorityCall, priorityCallEstimate, } from "../helpers/index.js";
|
|
@@ -164,8 +164,7 @@ export class BaseContract {
|
|
|
164
164
|
async listenEvent(eventName, listener) {
|
|
165
165
|
if (!this.isCallable)
|
|
166
166
|
throw CONTRACTS_ERRORS.NON_CALLABLE_CONTRACT_INVOCATION;
|
|
167
|
-
|
|
168
|
-
throw CONTRACTS_ERRORS.MISSING_WEBSOCKET_PROVIDER;
|
|
167
|
+
// Removed WS check
|
|
169
168
|
return this.contract.on(eventName, listener);
|
|
170
169
|
}
|
|
171
170
|
async getLogs(fromBlock, eventsNames = [], toBlock = 0, options = {}) {
|
|
@@ -16,7 +16,7 @@ export declare class MulticallUnit extends BaseContract {
|
|
|
16
16
|
protected _txReceipts: Map<any, any>;
|
|
17
17
|
constructor(driver: Signer | Provider, options?: MulticallOptions, multicallAddress?: string);
|
|
18
18
|
clear(): void;
|
|
19
|
-
add(contractCall: ContractCall, tags
|
|
19
|
+
add(contractCall: ContractCall, tags?: MulticallTags): MulticallTags;
|
|
20
20
|
get tags(): Tagable[];
|
|
21
21
|
get calls(): ContractCall[];
|
|
22
22
|
get response(): Response[];
|
|
@@ -11,6 +11,7 @@ import { multicallErrorEventName } from "./multicall-error-event-name.js";
|
|
|
11
11
|
import { multicallNormalizeTags } from "./multicall-normalize-tags.js";
|
|
12
12
|
import { multicallResultEventName } from "./multicall-result-event-name.js";
|
|
13
13
|
import { multicallSplitCalls } from "./multicall-split-calls.js";
|
|
14
|
+
import { multicallGenerateTag } from "./multicall-generate-tag.js";
|
|
14
15
|
const aggregate3 = "aggregate3";
|
|
15
16
|
export class MulticallUnit extends BaseContract {
|
|
16
17
|
constructor(driver, options = {}, multicallAddress = MULTICALL_ADDRESS) {
|
|
@@ -48,7 +49,7 @@ export class MulticallUnit extends BaseContract {
|
|
|
48
49
|
this._callsSuccess = new Map();
|
|
49
50
|
this._lastSuccess = undefined;
|
|
50
51
|
}
|
|
51
|
-
add(contractCall, tags) {
|
|
52
|
+
add(contractCall, tags = multicallGenerateTag()) {
|
|
52
53
|
this._units.set(multicallNormalizeTags(tags), contractCall);
|
|
53
54
|
return tags;
|
|
54
55
|
}
|
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.
|
|
4
|
+
"version": "0.0.16",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/woof-compound/sandbox-sdks.git"
|