@woof-software/contracts-tools-sdk-ethers 0.0.13 → 0.0.15

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, WebSocketProvider, } from "ethers";
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";
@@ -54,7 +54,9 @@ export class BaseContract {
54
54
  get provider() {
55
55
  if (!this.driver)
56
56
  return null;
57
- return this.driver.provider;
57
+ if (isSigner(this.driver))
58
+ return this.driver.provider;
59
+ return this.driver;
58
60
  }
59
61
  get signer() {
60
62
  if (isSigner(this.driver))
@@ -162,8 +164,7 @@ export class BaseContract {
162
164
  async listenEvent(eventName, listener) {
163
165
  if (!this.isCallable)
164
166
  throw CONTRACTS_ERRORS.NON_CALLABLE_CONTRACT_INVOCATION;
165
- if (!(this.provider instanceof WebSocketProvider))
166
- throw CONTRACTS_ERRORS.MISSING_WEBSOCKET_PROVIDER;
167
+ // Removed WS check
167
168
  return this.contract.on(eventName, listener);
168
169
  }
169
170
  async getLogs(fromBlock, eventsNames = [], toBlock = 0, options = {}) {
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.13",
4
+ "version": "0.0.15",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/woof-compound/sandbox-sdks.git"