@defillama/sdk 2.3.90 → 2.3.93
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 +9 -3
- package/build/general.d.ts +1 -1
- package/build/general.js +5 -2
- 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
|
@@ -233,7 +233,7 @@ function multicallAddress(chainId) {
|
|
|
233
233
|
case 10:
|
|
234
234
|
return exports.MULTICALL_ADDRESS_OPTIMISM;
|
|
235
235
|
case 25:
|
|
236
|
-
return "0x5e954f5972EC6BFc7dECd75779F10d848230345F"; // cronos
|
|
236
|
+
return "0x5e954f5972EC6BFc7dECd75779F10d848230345F"; // cronos
|
|
237
237
|
case 288:
|
|
238
238
|
return "0x80Ae459D058436ecB4e043ac48cfd209B578CBF0"; // boba
|
|
239
239
|
case 4689:
|
|
@@ -244,7 +244,7 @@ function multicallAddress(chainId) {
|
|
|
244
244
|
return "0xfFE2FF36c5b8D948f788a34f867784828aa7415D"; // palm
|
|
245
245
|
case 416:
|
|
246
246
|
return "0x834a005DDCF990Ba1a79f259e840e58F2D14F49a"; // sx
|
|
247
|
-
case 246: // energy web chain
|
|
247
|
+
case 246: // energy web chain
|
|
248
248
|
case 336: // shiden
|
|
249
249
|
case 592: // astar
|
|
250
250
|
case 269: // High performance blockchain
|
|
@@ -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
|
|
@@ -283,11 +285,15 @@ function multicallAddress(chainId) {
|
|
|
283
285
|
return "0x9eE9904815B80C39C1a27294E69a8626EAa7952d"; // rei network
|
|
284
286
|
case 87:
|
|
285
287
|
return "0x7A5a7579eb8DdEd352848cFDD0a5530C4e56FF7f"; // nova
|
|
288
|
+
case 32520:
|
|
289
|
+
return "0x5AE90c229d7A8AFc12bFa263AC672548aEb1D765"; // bitgert/brise
|
|
286
290
|
case 820: // callisto
|
|
287
291
|
case 199: // bittorrent
|
|
288
292
|
return "0xB2fB6dA40DF36CcFFDc3B0F99df4871C7b86FCe7";
|
|
289
|
-
case
|
|
293
|
+
case 2000: // dogechain
|
|
290
294
|
return "0x8856C24Ba82F737CFb99Ec4785CEe4d48A842F33";
|
|
295
|
+
case 96: // bitkub chain
|
|
296
|
+
return "0xcc515Aa7eE9Be4491c98DE68ee2147F0A063759D";
|
|
291
297
|
default:
|
|
292
298
|
return null;
|
|
293
299
|
}
|
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" | "canto" | "dogechain";
|
|
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" | "bitkub" | "bitgert" | "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
|
@@ -80,7 +80,8 @@ exports.providers = {
|
|
|
80
80
|
syscoin: createProvider("syscoin", 'https://rpc.ankr.com/syscoin,https://rpc.syscoin.org', 57),
|
|
81
81
|
moonbeam: createProvider("moonbeam", 'https://rpc.api.moonbeam.network', 1284),
|
|
82
82
|
curio: createProvider("curio", 'https://mainnet-api.skalenodes.com/v1/fit-betelgeuse', 836542336838601),
|
|
83
|
-
astar: createProvider("astar", "https://rpc.astar.network:8545,https://astar.api.onfinality.io/public", 592),
|
|
83
|
+
astar: createProvider("astar", "https://evm.astar.network/,https://rpc.astar.network:8545,https://astar.api.onfinality.io/public", 592),
|
|
84
|
+
godwoken_v1: createProvider("godwoken", "https://v1.mainnet.godwoken.io/rpc", 71402),
|
|
84
85
|
godwoken: createProvider("godwoken", "https://mainnet.godwoken.io/rpc", 71394),
|
|
85
86
|
evmos: createProvider("evmos", "https://jsonrpc-evmos-ia.notional.ventures,https://evmos-json-rpc.stakely.io,https://evmos-mainnet.gateway.pokt.network/v1/lb/627586ddea1b320039c95205,https://eth.bd.evmos.org:8545/", 9001),
|
|
86
87
|
conflux: createProvider("conflux", "https://evm.confluxrpc.com", 1030),
|
|
@@ -102,8 +103,10 @@ exports.providers = {
|
|
|
102
103
|
nova: createProvider("nova", "http://dataseed-0.rpc.novanetwork.io:8545,https://rpc.novanetwork.io:9070", 87),
|
|
103
104
|
ontology_evm: createProvider("ontology_evm", "https://dappnode1.ont.io:10339", 58),
|
|
104
105
|
jfin: createProvider("jfin", "https://rpc.jfinchain.com/", 3501),
|
|
106
|
+
bitkub: createProvider("bitkub", "https://rpc.bitkubchain.io/", 96),
|
|
107
|
+
bitgert: createProvider("bitgert", "https://chainrpc.com", 32520),
|
|
105
108
|
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",
|
|
109
|
+
dogechain: createProvider("dogechain", "https://dogechain.ankr.com,https://rpc.dogechain.dog,https://rpc01-sg.dogechain.dog,https://rpc02-sg.dogechain.dog,https://rpc03-sg.dogechain.dog", 2000),
|
|
107
110
|
};
|
|
108
111
|
function getProvider(chain) {
|
|
109
112
|
if (chain === void 0) { chain = "ethereum"; }
|