@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.
- package/build/abi/index.js +2 -2
- package/build/abi/tron.js +10 -10
- package/package.json +1 -1
package/build/abi/index.js
CHANGED
|
@@ -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
|
-
|
|
105
|
-
decodedResult[i] =
|
|
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
|
-
|
|
207
|
-
output[i] =
|
|
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];
|