@defillama/sdk 3.0.46 → 3.0.48
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/ChainApi.d.ts +1 -0
- package/build/ChainApi.js +4 -4
- package/build/providers.json +1 -742
- package/package.json +1 -1
- package/LICENSE +0 -661
package/build/ChainApi.d.ts
CHANGED
package/build/ChainApi.js
CHANGED
|
@@ -59,12 +59,14 @@ var debugLog_1 = require("./util/debugLog");
|
|
|
59
59
|
var generalUtil_1 = require("./generalUtil");
|
|
60
60
|
var ChainApi = /** @class */ (function () {
|
|
61
61
|
function ChainApi(params) {
|
|
62
|
-
var _a;
|
|
62
|
+
var _a, _b;
|
|
63
63
|
this.block = params.block;
|
|
64
64
|
this.chain = (_a = params.chain) !== null && _a !== void 0 ? _a : 'ethereum';
|
|
65
65
|
this.timestamp = params.timestamp;
|
|
66
66
|
this.provider = (0, general_1.getProvider)(this.chain);
|
|
67
67
|
this._balances = {};
|
|
68
|
+
// @ts-ignore
|
|
69
|
+
this.chainId = (_b = providers_json_1.default[this.chain]) === null || _b === void 0 ? void 0 : _b.chainId;
|
|
68
70
|
}
|
|
69
71
|
ChainApi.prototype.call = function (params) {
|
|
70
72
|
return (0, abi2_1.call)(__assign(__assign({}, params), { block: this.block, chain: this.chain }));
|
|
@@ -133,9 +135,7 @@ var ChainApi = /** @class */ (function () {
|
|
|
133
135
|
return this._balances;
|
|
134
136
|
};
|
|
135
137
|
ChainApi.prototype.getChainId = function () {
|
|
136
|
-
|
|
137
|
-
// @ts-ignore
|
|
138
|
-
return (_a = providers_json_1.default[this.chain]) === null || _a === void 0 ? void 0 : _a.chainId;
|
|
138
|
+
return this.chainId;
|
|
139
139
|
};
|
|
140
140
|
return ChainApi;
|
|
141
141
|
}());
|