@clonegod/ttd-bsc-common 3.0.7 → 3.0.9

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.
@@ -84,12 +84,17 @@ const MULTICALL3_ABI = [
84
84
  ];
85
85
  class MulticallTickLensLoader {
86
86
  constructor(params) {
87
+ var _a;
87
88
  this.ethersLib = params.ethersLib;
88
89
  this.provider = params.provider;
89
90
  this.tickLensAddress = params.tickLensAddress;
90
91
  this.tickLensAbi = params.version === 'V4' ? V4_TICK_LENS_ABI : V3_TICK_LENS_ABI;
91
92
  this.multicallAddress = params.multicallAddress || exports.MULTICALL3_ADDRESS;
92
- this.tickLensIface = new params.ethersLib.Interface(this.tickLensAbi);
93
+ const InterfaceClass = params.ethersLib.Interface || ((_a = params.ethersLib.utils) === null || _a === void 0 ? void 0 : _a.Interface);
94
+ if (!InterfaceClass) {
95
+ throw new Error('ethersLib.Interface not found, ensure ethers v5 or v6 is passed');
96
+ }
97
+ this.tickLensIface = new InterfaceClass(this.tickLensAbi);
93
98
  this.multicallContract = new params.ethersLib.Contract(this.multicallAddress, MULTICALL3_ABI, this.provider);
94
99
  }
95
100
  loadBitmapWords(poolAddress, bitmapIndexes) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-bsc-common",
3
- "version": "3.0.7",
3
+ "version": "3.0.9",
4
4
  "description": "BSC common library",
5
5
  "license": "UNLICENSED",
6
6
  "main": "dist/index.js",
@@ -14,7 +14,7 @@
14
14
  "push": "npm run build && npm publish"
15
15
  },
16
16
  "dependencies": {
17
- "@clonegod/ttd-core": "3.0.4",
17
+ "@clonegod/ttd-core": "3.0.5",
18
18
  "@clonegod/ttd-bsc-send-tx": "1.0.0",
19
19
  "axios": "^1.12.0",
20
20
  "dotenv": "^16.4.7",