@defillama/sdk 2.3.88 → 2.3.91
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 +4 -3
- package/build/abi/multicall.js +4 -0
- package/build/general.d.ts +1 -1
- package/build/general.js +3 -1
- package/package.json +1 -1
package/build/abi/index.js
CHANGED
|
@@ -108,7 +108,7 @@ function call(params) {
|
|
|
108
108
|
exports.call = call;
|
|
109
109
|
function multiCall(params) {
|
|
110
110
|
return __awaiter(this, void 0, void 0, function () {
|
|
111
|
-
var abi, contractCalls, chunkSize, contractChunks, i, _a, results, errors, flatResults, failed, newResults_1;
|
|
111
|
+
var abi, contractCalls, chunkSize, contractChunks, i, _a, results, errors, flatResults, failedQueries, failed, newResults_1;
|
|
112
112
|
var _this = this;
|
|
113
113
|
return __generator(this, function (_b) {
|
|
114
114
|
switch (_b.label) {
|
|
@@ -148,8 +148,9 @@ function multiCall(params) {
|
|
|
148
148
|
var c = _a[0], i = _a[1];
|
|
149
149
|
return c;
|
|
150
150
|
}));
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
failedQueries = flatResults.filter(function (r) { return !r.success; });
|
|
152
|
+
if (failedQueries.length && (process.env.SDK_DEBUG === "true" || process.env.LLAMA_DEBUG_MODE)) {
|
|
153
|
+
console.log("Failed multicalls:", failedQueries.map(function (r) { return r.input; }));
|
|
153
154
|
}
|
|
154
155
|
if (!(params.requery === true && flatResults.some(function (r) { return !r.success; }))) return [3 /*break*/, 3];
|
|
155
156
|
failed = flatResults.map(function (r, i) { return [r, i]; }).filter(function (r) { return !r[0].success; });
|
package/build/abi/multicall.js
CHANGED
|
@@ -276,6 +276,8 @@ function multicallAddress(chainId) {
|
|
|
276
276
|
case 19: // songbird
|
|
277
277
|
case 1030: // conflux
|
|
278
278
|
case 333999: // polis
|
|
279
|
+
case 7700: // canto
|
|
280
|
+
case 62621: // multivac
|
|
279
281
|
return "0x18fA376d92511Dd04090566AB6144847c03557d8";
|
|
280
282
|
case 2222:
|
|
281
283
|
return "0x30A62aA52Fa099C4B227869EB6aeaDEda054d121"; // kava
|
|
@@ -286,6 +288,8 @@ function multicallAddress(chainId) {
|
|
|
286
288
|
case 820: // callisto
|
|
287
289
|
case 199: // bittorrent
|
|
288
290
|
return "0xB2fB6dA40DF36CcFFDc3B0F99df4871C7b86FCe7";
|
|
291
|
+
case 2000: // dogechain
|
|
292
|
+
return "0x8856C24Ba82F737CFb99Ec4785CEe4d48A842F33";
|
|
289
293
|
default:
|
|
290
294
|
return null;
|
|
291
295
|
}
|
package/build/general.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ethers, BigNumber } from "ethers";
|
|
|
2
2
|
export declare const providers: {
|
|
3
3
|
[chain: string]: ethers.providers.BaseProvider;
|
|
4
4
|
};
|
|
5
|
-
export declare type Chain = "ethereum" | "bsc" | "polygon" | "heco" | "fantom" | "rsk" | "tomochain" | "xdai" | "avax" | "wan" | "iotex" | "harmony" | "thundercore" | "okexchain" | "optimism" | "arbitrum" | "kcc" | "celo" | "moonriver" | "shiden" | "palm" | "energyweb" | "energi" | "songbird" | "hpb" | "gochain" | "ethereumclassic" | "xdaiarb" | "kardia" | "fuse" | "smartbch" | "elastos" | "hoo" | "fusion" | "aurora" | "ronin" | "boba" | "cronos" | "polis" | "zyx" | "telos" | "metis" | "ubiq" | "velas" | "callisto" | "csc" | "nahmii" | "liquidchain" | "meter" | "theta" | "oasis" | "syscoin" | "moonbeam" | "curio" | "astar" | "godwoken" | "evmos" | "conflux" | "milkomeda" | "dfk" | "bittorrent" | "findora" | "candle" | "lachain" | "reichain" | "rei" | "clv" | "echelon" | "multivac" | "sx" | "karura_evm" | "nova" | "ontology_evm" | "jfin";
|
|
5
|
+
export declare type Chain = "ethereum" | "bsc" | "polygon" | "heco" | "fantom" | "rsk" | "tomochain" | "xdai" | "avax" | "wan" | "iotex" | "harmony" | "thundercore" | "okexchain" | "optimism" | "arbitrum" | "kcc" | "celo" | "moonriver" | "shiden" | "palm" | "energyweb" | "energi" | "songbird" | "hpb" | "gochain" | "ethereumclassic" | "xdaiarb" | "kardia" | "fuse" | "smartbch" | "elastos" | "hoo" | "fusion" | "aurora" | "ronin" | "boba" | "cronos" | "polis" | "zyx" | "telos" | "metis" | "ubiq" | "velas" | "callisto" | "csc" | "nahmii" | "liquidchain" | "meter" | "theta" | "oasis" | "syscoin" | "moonbeam" | "curio" | "astar" | "godwoken" | "evmos" | "conflux" | "milkomeda" | "dfk" | "bittorrent" | "findora" | "candle" | "lachain" | "reichain" | "rei" | "clv" | "echelon" | "multivac" | "sx" | "karura_evm" | "nova" | "ontology_evm" | "jfin" | "canto" | "dogechain";
|
|
6
6
|
export declare function getProvider(chain?: Chain): ethers.providers.BaseProvider;
|
|
7
7
|
export declare const TEN: ethers.BigNumber;
|
|
8
8
|
export declare function handleDecimals(num: BigNumber, decimals?: number): string;
|
package/build/general.js
CHANGED
|
@@ -8,7 +8,7 @@ function createProvider(name, defaultRpc, chainId) {
|
|
|
8
8
|
if (chainId === 1) {
|
|
9
9
|
console.log("RPC providers set to historical, only the first RPC provider will be used");
|
|
10
10
|
}
|
|
11
|
-
return new ethers_1.ethers.providers.StaticJsonRpcProvider((_b = (_a = process.env[name.toUpperCase() + "_RPC"])
|
|
11
|
+
return new ethers_1.ethers.providers.StaticJsonRpcProvider((_b = ((_a = process.env[name.toUpperCase() + "_RPC"]) !== null && _a !== void 0 ? _a : defaultRpc)) === null || _b === void 0 ? void 0 : _b.split(',')[0], {
|
|
12
12
|
name: name,
|
|
13
13
|
chainId: chainId,
|
|
14
14
|
});
|
|
@@ -102,6 +102,8 @@ exports.providers = {
|
|
|
102
102
|
nova: createProvider("nova", "http://dataseed-0.rpc.novanetwork.io:8545,https://rpc.novanetwork.io:9070", 87),
|
|
103
103
|
ontology_evm: createProvider("ontology_evm", "https://dappnode1.ont.io:10339", 58),
|
|
104
104
|
jfin: createProvider("jfin", "https://rpc.jfinchain.com/", 3501),
|
|
105
|
+
canto: createProvider("canto", "https://jsonrpc.canto.nodestake.top,https://canto.evm.chandrastation.com/", 7700),
|
|
106
|
+
dogechain: createProvider("dogechain", "https://rpc01-sg.dogechain.dog,https://rpc02-sg.dogechain.dog,https://rpc03-sg.dogechain.dog", 2000),
|
|
105
107
|
};
|
|
106
108
|
function getProvider(chain) {
|
|
107
109
|
if (chain === void 0) { chain = "ethereum"; }
|