@defillama/sdk 2.3.89 → 2.3.92

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.
@@ -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
- if (process.env.SDK_DEBUG === "true") {
152
- console.log("Failed multicalls:", flatResults.filter(function (r) { return !r.success; }).map(function (r) { return r.input; }));
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; });
@@ -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,9 +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";
293
+ case 2000: // dogechain
294
+ return "0x8856C24Ba82F737CFb99Ec4785CEe4d48A842F33";
295
+ case 96: // bitkub chain
296
+ return "0xcc515Aa7eE9Be4491c98DE68ee2147F0A063759D";
289
297
  default:
290
298
  return null;
291
299
  }
@@ -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" | "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,7 @@ 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
84
  godwoken: createProvider("godwoken", "https://mainnet.godwoken.io/rpc", 71394),
85
85
  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
86
  conflux: createProvider("conflux", "https://evm.confluxrpc.com", 1030),
@@ -102,6 +102,10 @@ 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
+ bitkub: createProvider("bitkub", "https://rpc.bitkubchain.io/", 96),
106
+ bitgert: createProvider("bitgert", "https://chainrpc.com", 32520),
107
+ canto: createProvider("canto", "https://jsonrpc.canto.nodestake.top,https://canto.evm.chandrastation.com/", 7700),
108
+ dogechain: createProvider("dogechain", "https://rpc01-sg.dogechain.dog,https://rpc02-sg.dogechain.dog,https://rpc03-sg.dogechain.dog", 2000),
105
109
  };
106
110
  function getProvider(chain) {
107
111
  if (chain === void 0) { chain = "ethereum"; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defillama/sdk",
3
- "version": "2.3.89",
3
+ "version": "2.3.92",
4
4
  "description": "SDK for calculating TVL",
5
5
  "main": "build/index.js",
6
6
  "scripts": {