@defillama/sdk 5.0.244 → 5.0.245
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/build/chains/starknet.js +2 -1
- package/build/providers.json +1 -1
- package/build/util/callStats.d.ts +62 -13
- package/build/util/callStats.js +179 -79
- package/build/util/index.js +2 -0
- package/build/util/indexer.js +20 -1
- package/package.json +1 -1
package/build/chains/starknet.js
CHANGED
|
@@ -738,7 +738,7 @@ async function getLogs({ target, fromBlock, toBlock, topics, keys, chunkSize = e
|
|
|
738
738
|
const keyFilter = (keys !== null && keys !== void 0 ? keys : []).map((k) => (Array.isArray(k) ? k : [k]).map((i) => toHex(i)));
|
|
739
739
|
const address = String(target).toLowerCase();
|
|
740
740
|
return limiter()(async () => {
|
|
741
|
-
var _a;
|
|
741
|
+
var _a, _b, _c;
|
|
742
742
|
const end = toBlock !== null && toBlock !== void 0 ? toBlock : await getBlockNumber();
|
|
743
743
|
if (fromBlock > end)
|
|
744
744
|
return [];
|
|
@@ -767,6 +767,7 @@ async function getLogs({ target, fromBlock, toBlock, topics, keys, chunkSize = e
|
|
|
767
767
|
throw e;
|
|
768
768
|
}
|
|
769
769
|
logs.push(...((_a = page === null || page === void 0 ? void 0 : page.events) !== null && _a !== void 0 ? _a : []));
|
|
770
|
+
(0, callStats_1.recordLogs)('rpc', 'starknet', (_c = (_b = page === null || page === void 0 ? void 0 : page.events) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0);
|
|
770
771
|
pages++;
|
|
771
772
|
if (!(page === null || page === void 0 ? void 0 : page.continuation_token))
|
|
772
773
|
break;
|