@mento-protocol/mento-sdk 3.1.0-beta.7 → 3.1.0
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.
|
@@ -33,10 +33,15 @@ export async function multicall(publicClient, contracts, options = {}) {
|
|
|
33
33
|
}
|
|
34
34
|
}));
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
const raw = await client.multicall({
|
|
37
37
|
allowFailure,
|
|
38
38
|
batchSize,
|
|
39
39
|
contracts: contracts,
|
|
40
40
|
multicallAddress: MULTICALL3_ADDRESS,
|
|
41
41
|
});
|
|
42
|
+
const results = raw;
|
|
43
|
+
if (!allowFailure) {
|
|
44
|
+
return results.map((result) => ({ status: 'success', result }));
|
|
45
|
+
}
|
|
46
|
+
return results;
|
|
42
47
|
}
|
package/dist/utils/multicall.js
CHANGED
|
@@ -37,11 +37,16 @@ async function multicall(publicClient, contracts, options = {}) {
|
|
|
37
37
|
}
|
|
38
38
|
}));
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
const raw = await client.multicall({
|
|
41
41
|
allowFailure,
|
|
42
42
|
batchSize,
|
|
43
43
|
contracts: contracts,
|
|
44
44
|
multicallAddress: exports.MULTICALL3_ADDRESS,
|
|
45
45
|
});
|
|
46
|
+
const results = raw;
|
|
47
|
+
if (!allowFailure) {
|
|
48
|
+
return results.map((result) => ({ status: 'success', result }));
|
|
49
|
+
}
|
|
50
|
+
return results;
|
|
46
51
|
}
|
|
47
52
|
//# sourceMappingURL=multicall.js.map
|