@gearbox-protocol/sdk 4.0.0 → 4.0.2

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.
@@ -404,7 +404,13 @@ class GearboxSDK {
404
404
  return this.#timestamp;
405
405
  }
406
406
  get gear() {
407
- return this.addressProvider.getAddress(import_constants.AP_GEAR_TOKEN, import_constants.NO_VERSION);
407
+ try {
408
+ const g = this.addressProvider.getAddress(import_constants.AP_GEAR_TOKEN, import_constants.NO_VERSION);
409
+ return g;
410
+ } catch (e) {
411
+ this.logger?.warn(e);
412
+ return void 0;
413
+ }
408
414
  }
409
415
  get addressProvider() {
410
416
  if (this.#addressProvider === void 0) {
@@ -201,7 +201,7 @@ const chains = {
201
201
  ...import_chains.bsc,
202
202
  network: "BNB",
203
203
  defaultMarketConfigurators: {
204
- "0xc94add35a09a239d0f5d1c04e793459dd19a0793": "Chaos Labs"
204
+ "0x5BCF14d8470e1a6110916371aacC8E1C947A7D9d": "Chaos Labs"
205
205
  },
206
206
  isPublic: false,
207
207
  wellKnownToken: {
@@ -404,7 +404,13 @@ class GearboxSDK {
404
404
  return this.#timestamp;
405
405
  }
406
406
  get gear() {
407
- return this.addressProvider.getAddress(AP_GEAR_TOKEN, NO_VERSION);
407
+ try {
408
+ const g = this.addressProvider.getAddress(AP_GEAR_TOKEN, NO_VERSION);
409
+ return g;
410
+ } catch (e) {
411
+ this.logger?.warn(e);
412
+ return void 0;
413
+ }
408
414
  }
409
415
  get addressProvider() {
410
416
  if (this.#addressProvider === void 0) {
@@ -184,7 +184,7 @@ const chains = {
184
184
  ...bsc,
185
185
  network: "BNB",
186
186
  defaultMarketConfigurators: {
187
- "0xc94add35a09a239d0f5d1c04e793459dd19a0793": "Chaos Labs"
187
+ "0x5BCF14d8470e1a6110916371aacC8E1C947A7D9d": "Chaos Labs"
188
188
  },
189
189
  isPublic: false,
190
190
  wellKnownToken: {
@@ -145,7 +145,7 @@ export declare class GearboxSDK<Plugins extends PluginMap = {}> {
145
145
  get provider(): Provider;
146
146
  get currentBlock(): bigint;
147
147
  get timestamp(): bigint;
148
- get gear(): Address;
148
+ get gear(): Address | undefined;
149
149
  get addressProvider(): IAddressProviderContract;
150
150
  get botListContract(): BotListContract;
151
151
  get gearStakingContract(): GearStakingContract;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",