@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.
@@ -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;