@defillama/sdk 3.0.46 → 3.0.49

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.
@@ -4,6 +4,7 @@ import { ethers } from "ethers";
4
4
  export declare class ChainApi {
5
5
  block?: Block;
6
6
  chain: Chain | string;
7
+ chainId?: number;
7
8
  timestamp?: number;
8
9
  provider: ethers.providers.BaseProvider;
9
10
  _balances: Balances;
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
- var _a;
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
  }());
@@ -363,6 +363,12 @@ function multicallAddress(chainId) {
363
363
  return "0x918D8F3670c67f14Ff3fEB025D46B9C165d12a23";
364
364
  case 2025: // rpg
365
365
  return "0x692D7f4B08E4490d546Cb9242F082064acd8c6cd";
366
+ case 324: // zksync era
367
+ return "0xb1F9b5FCD56122CdfD7086e017ec63E50dC075e7";
368
+ case 9117: // bone
369
+ return "0x538b8b1e982604f4949b13B495ED1684278D7845";
370
+ case 15551: // loop
371
+ return "0x474a0768AeE3D378356524F331235b3e5fD21416";
366
372
  default:
367
373
  return null;
368
374
  }