@gearbox-protocol/sdk 3.0.0-vfour.33 → 3.0.0-vfour.35

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.
@@ -17584,7 +17584,8 @@ var CreditFacadeContract = class extends BaseContract {
17584
17584
  super(sdk, {
17585
17585
  ...creditFacade.baseParams,
17586
17586
  name: `CreditFacadeV3(${creditManager.name})`,
17587
- abi: creditFacadeV3Abi
17587
+ // Add multicall strictly for parsing, but use only creditFacadeV3Abi in types, so only this part is visible to typescript elsewhere
17588
+ abi: [...creditFacadeV3Abi, ...iCreditFacadeV3MulticallAbi]
17588
17589
  });
17589
17590
  this.state = {
17590
17591
  ...this.contractData,
@@ -19307,6 +19308,9 @@ var PriceOracleContract = class extends BaseContract {
19307
19308
  for (const tx of txs) {
19308
19309
  const { to: priceFeed, callData } = tx;
19309
19310
  const [token, reserve] = this.#findTokenForPriceFeed(priceFeed);
19311
+ if (!token) {
19312
+ continue;
19313
+ }
19310
19314
  const { args } = viem.decodeFunctionData({
19311
19315
  abi: iUpdatablePriceFeedAbi,
19312
19316
  data: callData
@@ -19391,7 +19395,8 @@ var PriceOracleContract = class extends BaseContract {
19391
19395
  });
19392
19396
  }
19393
19397
  /**
19394
- * Helper method to find "attachment point" of price feed (makes sense for updatable price feeds only) - token (in v3.0 can be ticker) and main/reserve flag
19398
+ * Helper method to find "attachment point" of price feed (makes sense for updatable price feeds only) -
19399
+ * returns token (in v3.0 can be ticker) and main/reserve flag
19395
19400
  *
19396
19401
  * @param priceFeed
19397
19402
  * @returns
@@ -19411,7 +19416,7 @@ var PriceOracleContract = class extends BaseContract {
19411
19416
  if (ticker) {
19412
19417
  return [ticker, false];
19413
19418
  }
19414
- throw new Error(`cannot find token for price feed ${priceFeed}`);
19419
+ return [void 0, false];
19415
19420
  }
19416
19421
  get state() {
19417
19422
  return {
@@ -17582,7 +17582,8 @@ var CreditFacadeContract = class extends BaseContract {
17582
17582
  super(sdk, {
17583
17583
  ...creditFacade.baseParams,
17584
17584
  name: `CreditFacadeV3(${creditManager.name})`,
17585
- abi: creditFacadeV3Abi
17585
+ // Add multicall strictly for parsing, but use only creditFacadeV3Abi in types, so only this part is visible to typescript elsewhere
17586
+ abi: [...creditFacadeV3Abi, ...iCreditFacadeV3MulticallAbi]
17586
17587
  });
17587
17588
  this.state = {
17588
17589
  ...this.contractData,
@@ -19305,6 +19306,9 @@ var PriceOracleContract = class extends BaseContract {
19305
19306
  for (const tx of txs) {
19306
19307
  const { to: priceFeed, callData } = tx;
19307
19308
  const [token, reserve] = this.#findTokenForPriceFeed(priceFeed);
19309
+ if (!token) {
19310
+ continue;
19311
+ }
19308
19312
  const { args } = decodeFunctionData({
19309
19313
  abi: iUpdatablePriceFeedAbi,
19310
19314
  data: callData
@@ -19389,7 +19393,8 @@ var PriceOracleContract = class extends BaseContract {
19389
19393
  });
19390
19394
  }
19391
19395
  /**
19392
- * Helper method to find "attachment point" of price feed (makes sense for updatable price feeds only) - token (in v3.0 can be ticker) and main/reserve flag
19396
+ * Helper method to find "attachment point" of price feed (makes sense for updatable price feeds only) -
19397
+ * returns token (in v3.0 can be ticker) and main/reserve flag
19393
19398
  *
19394
19399
  * @param priceFeed
19395
19400
  * @returns
@@ -19409,7 +19414,7 @@ var PriceOracleContract = class extends BaseContract {
19409
19414
  if (ticker) {
19410
19415
  return [ticker, false];
19411
19416
  }
19412
- throw new Error(`cannot find token for price feed ${priceFeed}`);
19417
+ return [void 0, false];
19413
19418
  }
19414
19419
  get state() {
19415
19420
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "3.0.0-vfour.33",
3
+ "version": "3.0.0-vfour.35",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,