@defillama/sdk 4.0.21 → 4.0.23

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.
@@ -221,9 +221,9 @@ function multiCall(params) {
221
221
  // check if target adddress is missing for one of the calls
222
222
  if (params.calls.some(function (i) {
223
223
  if (typeof i === 'string' && i.startsWith('0x'))
224
- return !isValidTarget(i);
224
+ return !isValidTarget(i, params.chain);
225
225
  if (typeof i === 'object')
226
- return !isValidTarget(i.target);
226
+ return !isValidTarget(i.target, params.chain);
227
227
  return true;
228
228
  })) {
229
229
  (0, debugLog_1.debugLog)('Multicall is missing target', JSON.stringify(params, null, 2));
package/build/abi/tron.js CHANGED
@@ -101,12 +101,12 @@ function call(options) {
101
101
  decodedResult = __spreadArray([], decodedResult, true);
102
102
  decodedResult.forEach(function (v, i) {
103
103
  if (outputTypes[i] === 'address' && v.startsWith('0x')) {
104
- var newValue = (0, tron_format_address_1.fromHex)(v);
105
- decodedResult[i] = newValue;
106
- var outputName = abi.outputs[i].name;
107
- if (outputName && outputName.length)
108
- decodedResult[outputName] = newValue;
104
+ v = (0, tron_format_address_1.fromHex)(v);
105
+ decodedResult[i] = v;
109
106
  }
107
+ var outputName = abi.outputs[i].name;
108
+ if (outputName && outputName.length)
109
+ decodedResult[outputName] = v;
110
110
  });
111
111
  return [2 /*return*/, {
112
112
  output: (0, convertResults_1.default)(decodedResult),
@@ -203,12 +203,12 @@ function executeCalls(functionABI, calls) {
203
203
  var output = __spreadArray([], decodedResult, true);
204
204
  output.forEach(function (v, i) {
205
205
  if (outputTypes[i] === 'address' && v.startsWith('0x')) {
206
- var newValue = (0, tron_format_address_1.fromHex)(v);
207
- output[i] = newValue;
208
- var outputName = functionABI.outputs[i].name;
209
- if (outputName && outputName.length)
210
- output[outputName] = newValue;
206
+ v = (0, tron_format_address_1.fromHex)(v);
207
+ output[i] = v;
211
208
  }
209
+ var outputName = functionABI.outputs[i].name;
210
+ if (outputName && outputName.length)
211
+ output[outputName] = v;
212
212
  });
213
213
  if (output.length === 1)
214
214
  output = output[0];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defillama/sdk",
3
- "version": "4.0.21",
3
+ "version": "4.0.23",
4
4
  "description": "SDK for calculating TVL",
5
5
  "main": "build/index.js",
6
6
  "scripts": {