@defillama/sdk 5.0.85 → 5.0.89

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.
@@ -52,7 +52,7 @@ const indexerChainIdChainMapping = {
52
52
  34443: 'mode',
53
53
  42170: 'arbitrum_nova',
54
54
  42161: 'arbitrum',
55
- 43114: 'avalanche',
55
+ 43114: 'avax',
56
56
  59144: 'linea',
57
57
  81457: 'blast',
58
58
  534352: 'scroll',
@@ -126,8 +126,12 @@ async function getLogs({ chain = 'ethereum', topic, topics, fromBlock, toBlock,
126
126
  throw new Error('Chain not supported');
127
127
  if (!debugMode)
128
128
  debugMode = debugLog_1.DEBUG_LEVEL2;
129
- if ((topics === null || topics === void 0 ? void 0 : topics.length) || (extraTopics === null || extraTopics === void 0 ? void 0 : extraTopics.length))
129
+ if (((topics === null || topics === void 0 ? void 0 : topics.length) && topics.length > 1) || (extraTopics === null || extraTopics === void 0 ? void 0 : extraTopics.length))
130
130
  throw new Error('TODO: topics and extraTopics part are not yet imeplemented');
131
+ if (topics === null || topics === void 0 ? void 0 : topics.length)
132
+ topic = topics[0];
133
+ if (!eventAbi)
134
+ entireLog = true;
131
135
  // if (!target && !targets?.length) throw new Error('target|targets is required')
132
136
  if (!fromBlock && !fromTimestamp)
133
137
  throw new Error('fromBlock or fromTimestamp is required');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defillama/sdk",
3
- "version": "5.0.85",
3
+ "version": "5.0.89",
4
4
  "description": "SDK for calculating TVL",
5
5
  "main": "build/index.js",
6
6
  "scripts": {