@defillama/sdk 3.0.18 → 3.0.19
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 +10 -0
- package/build/generalUtil.d.ts +1 -1
- package/build/generalUtil.js +2 -2
- package/package.json +1 -1
package/build/abi/index.js
CHANGED
|
@@ -46,6 +46,15 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46
46
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
50
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
51
|
+
if (ar || !(i in from)) {
|
|
52
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
53
|
+
ar[i] = from[i];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
57
|
+
};
|
|
49
58
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
50
59
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
51
60
|
};
|
|
@@ -64,6 +73,7 @@ var knownTypes = [
|
|
|
64
73
|
'int', 'int8', 'int16', 'int32', 'int64', 'int128', 'int256',
|
|
65
74
|
'uint', 'uint8', 'uint16', 'uint32', 'uint64', 'uint128', 'uint256',
|
|
66
75
|
];
|
|
76
|
+
(__spreadArray([], knownTypes, true)).forEach(function (i) { return knownTypes.push(i + '[]'); }); // support array type for all known types
|
|
67
77
|
var defaultChunkSize = !!process.env.SDK_MULTICALL_CHUNK_SIZE ? +process.env.SDK_MULTICALL_CHUNK_SIZE : 500;
|
|
68
78
|
function resolveABI(providedAbi) {
|
|
69
79
|
var abi = providedAbi;
|
package/build/generalUtil.d.ts
CHANGED
|
@@ -18,5 +18,5 @@ export declare function mergeBalances(balances: Balances, balancesToMerge: Balan
|
|
|
18
18
|
type ChainBlocks = {
|
|
19
19
|
[chain: string]: number;
|
|
20
20
|
};
|
|
21
|
-
export declare function sumChainTvls(chainTvls: Array<(timestamp: number, ethBlock: number, chainBlocks: ChainBlocks) => Promise<Balances>>): (timestamp: number, ethBlock: number, chainBlocks: ChainBlocks) => Promise<{}>;
|
|
21
|
+
export declare function sumChainTvls(chainTvls: Array<(timestamp: number, ethBlock: number, chainBlocks: ChainBlocks, params: any) => Promise<Balances>>): (timestamp: number, ethBlock: number, chainBlocks: ChainBlocks, params: any) => Promise<{}>;
|
|
22
22
|
export { blocks, humanizeNumber, };
|
package/build/generalUtil.js
CHANGED
|
@@ -128,7 +128,7 @@ function mergeBalances(balances, balancesToMerge) {
|
|
|
128
128
|
exports.mergeBalances = mergeBalances;
|
|
129
129
|
function sumChainTvls(chainTvls) {
|
|
130
130
|
var _this = this;
|
|
131
|
-
return function (timestamp, ethBlock, chainBlocks) { return __awaiter(_this, void 0, void 0, function () {
|
|
131
|
+
return function (timestamp, ethBlock, chainBlocks, params) { return __awaiter(_this, void 0, void 0, function () {
|
|
132
132
|
var balances;
|
|
133
133
|
var _this = this;
|
|
134
134
|
return __generator(this, function (_a) {
|
|
@@ -139,7 +139,7 @@ function sumChainTvls(chainTvls) {
|
|
|
139
139
|
var chainBalances;
|
|
140
140
|
return __generator(this, function (_a) {
|
|
141
141
|
switch (_a.label) {
|
|
142
|
-
case 0: return [4 /*yield*/, chainTvl(timestamp, ethBlock, chainBlocks)];
|
|
142
|
+
case 0: return [4 /*yield*/, chainTvl(timestamp, ethBlock, chainBlocks, params)];
|
|
143
143
|
case 1:
|
|
144
144
|
chainBalances = _a.sent();
|
|
145
145
|
mergeBalances(balances, chainBalances);
|