@defillama/sdk 5.0.83 → 5.0.85

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.
@@ -20,6 +20,7 @@ export declare class Balances {
20
20
  addGasToken(balance: any): void;
21
21
  addCGToken(token: string, balance: any): void;
22
22
  addTokenVannila(token: string, balance: any): void;
23
+ addUSDValue(balance: any): void;
23
24
  addTokens(tokens: string[], balances: any[], { skipChain }?: {
24
25
  skipChain?: boolean | undefined;
25
26
  }): void;
package/build/Balances.js CHANGED
@@ -58,6 +58,9 @@ class Balances {
58
58
  addTokenVannila(token, balance) {
59
59
  this._add(token, balance, { skipChain: true });
60
60
  }
61
+ addUSDValue(balance) {
62
+ this.addCGToken('tether', balance);
63
+ }
61
64
  addTokens(tokens, balances, { skipChain = false } = {}) {
62
65
  if (!Array.isArray(tokens))
63
66
  throw new Error('tokens must be an array');
@@ -41,6 +41,7 @@ export declare class ChainApi {
41
41
  skipChain?: boolean | undefined;
42
42
  }): void;
43
43
  addGasToken(balance: any): void;
44
+ addUSDValue(balance: any): void;
44
45
  addTokens(tokens: string[], balances: any[], { skipChain }?: {
45
46
  skipChain?: boolean | undefined;
46
47
  }): void;
package/build/ChainApi.js CHANGED
@@ -79,6 +79,9 @@ class ChainApi {
79
79
  addGasToken(balance) {
80
80
  this.add(nullAddress, balance);
81
81
  }
82
+ addUSDValue(balance) {
83
+ this._balances.addUSDValue(balance);
84
+ }
82
85
  addTokens(tokens, balances, { skipChain = false } = {}) {
83
86
  this.add(tokens, balances, { skipChain });
84
87
  }
@@ -380,6 +380,10 @@ function multicallAddress(chainId) {
380
380
  return '0xB32d192e07727A0F6f48e721791aa4e02cd292e1';
381
381
  case 185: // mint
382
382
  return '0xf8ac4BEB2F75d2cFFb588c63251347fdD629B92c';
383
+ case 388: // cronos_zkevm
384
+ return '0x9b122BF7a96F24EFB7A2b5765c635909dB3458F7';
385
+ case 47763: // neox
386
+ return '0xD6010D102015fEa9cB3a9AbFBB51994c0Fd6E672';
383
387
  default:
384
388
  return null;
385
389
  }
@@ -138,6 +138,7 @@ const DEPLOYMENT_BLOCK = {
138
138
  planq: 8470015,
139
139
  bob: 946071,
140
140
  bitr: 1045566,
141
+ btr: 3225645,
141
142
  dreyerx: 163720,
142
143
  cyeth: 1,
143
144
  taiko: 11269,
package/build/index.d.ts CHANGED
@@ -12,6 +12,7 @@ export * as api2 from "./api2";
12
12
  export * as blocks from "./computeTVL/blocks";
13
13
  import * as humanN from "./computeTVL/humanizeNumber";
14
14
  export * as graph from "./util/graph";
15
+ export * as indexer from "./util/indexer";
15
16
  export declare const log: typeof debugLog;
16
17
  export declare const logTable: typeof debugTable;
17
18
  export declare const humanizeNumber: typeof humanN.humanizeNumber;
package/build/index.js CHANGED
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.humanizeNumber = exports.logTable = exports.log = exports.graph = exports.blocks = exports.api2 = exports.elastic = exports.api = exports.sdkCache = exports.getEventLogs = exports.cache = exports.util = exports.setProvider = exports.getProvider = exports.Balances = exports.ChainApi = void 0;
26
+ exports.humanizeNumber = exports.logTable = exports.log = exports.indexer = exports.graph = exports.blocks = exports.api2 = exports.elastic = exports.api = exports.sdkCache = exports.getEventLogs = exports.cache = exports.util = exports.setProvider = exports.getProvider = exports.Balances = exports.ChainApi = void 0;
27
27
  const debugLog_1 = require("./util/debugLog");
28
28
  var ChainApi_1 = require("./ChainApi");
29
29
  Object.defineProperty(exports, "ChainApi", { enumerable: true, get: function () { return ChainApi_1.ChainApi; } });
@@ -43,6 +43,7 @@ exports.api2 = __importStar(require("./api2"));
43
43
  exports.blocks = __importStar(require("./computeTVL/blocks"));
44
44
  const humanN = __importStar(require("./computeTVL/humanizeNumber"));
45
45
  exports.graph = __importStar(require("./util/graph"));
46
+ exports.indexer = __importStar(require("./util/indexer"));
46
47
  exports.log = debugLog_1.debugLog;
47
48
  exports.logTable = debugLog_1.debugTable;
48
49
  exports.humanizeNumber = humanN.humanizeNumber;