@gearbox-protocol/sdk 3.0.0-vfour.181 → 3.0.0-vfour.182
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.
- package/dist/cjs/sdk/index.cjs +10 -0
- package/dist/cjs/sdk/index.d.ts +6 -0
- package/dist/esm/sdk/index.d.mts +6 -0
- package/dist/esm/sdk/index.mjs +10 -0
- package/package.json +1 -1
package/dist/cjs/sdk/index.cjs
CHANGED
|
@@ -65636,6 +65636,16 @@ var PriceOracleBaseContract = class extends BaseContract {
|
|
|
65636
65636
|
);
|
|
65637
65637
|
return result;
|
|
65638
65638
|
}
|
|
65639
|
+
/**
|
|
65640
|
+
* Returns true if oracle's price feed tree contains given price feed
|
|
65641
|
+
* @param priceFeed
|
|
65642
|
+
* @returns
|
|
65643
|
+
*/
|
|
65644
|
+
usesPriceFeed(priceFeed) {
|
|
65645
|
+
return this.#priceFeedTree.some(
|
|
65646
|
+
(node) => node.baseParams.addr.toLowerCase() === priceFeed.toLowerCase()
|
|
65647
|
+
);
|
|
65648
|
+
}
|
|
65639
65649
|
/**
|
|
65640
65650
|
* Tries to convert amount of token into underlying of current market
|
|
65641
65651
|
* @param token
|
package/dist/cjs/sdk/index.d.ts
CHANGED
|
@@ -84813,6 +84813,12 @@ declare class PriceOracleBaseContract<abi extends Abi | readonly unknown[]> exte
|
|
|
84813
84813
|
* @returns
|
|
84814
84814
|
*/
|
|
84815
84815
|
onDemandPriceUpdates(updates?: UpdatePriceFeedsResult): OnDemandPriceUpdate[];
|
|
84816
|
+
/**
|
|
84817
|
+
* Returns true if oracle's price feed tree contains given price feed
|
|
84818
|
+
* @param priceFeed
|
|
84819
|
+
* @returns
|
|
84820
|
+
*/
|
|
84821
|
+
usesPriceFeed(priceFeed: Address): boolean;
|
|
84816
84822
|
/**
|
|
84817
84823
|
* Tries to convert amount of token into underlying of current market
|
|
84818
84824
|
* @param token
|
package/dist/esm/sdk/index.d.mts
CHANGED
|
@@ -84813,6 +84813,12 @@ declare class PriceOracleBaseContract<abi extends Abi | readonly unknown[]> exte
|
|
|
84813
84813
|
* @returns
|
|
84814
84814
|
*/
|
|
84815
84815
|
onDemandPriceUpdates(updates?: UpdatePriceFeedsResult): OnDemandPriceUpdate[];
|
|
84816
|
+
/**
|
|
84817
|
+
* Returns true if oracle's price feed tree contains given price feed
|
|
84818
|
+
* @param priceFeed
|
|
84819
|
+
* @returns
|
|
84820
|
+
*/
|
|
84821
|
+
usesPriceFeed(priceFeed: Address): boolean;
|
|
84816
84822
|
/**
|
|
84817
84823
|
* Tries to convert amount of token into underlying of current market
|
|
84818
84824
|
* @param token
|
package/dist/esm/sdk/index.mjs
CHANGED
|
@@ -65629,6 +65629,16 @@ var PriceOracleBaseContract = class extends BaseContract {
|
|
|
65629
65629
|
);
|
|
65630
65630
|
return result;
|
|
65631
65631
|
}
|
|
65632
|
+
/**
|
|
65633
|
+
* Returns true if oracle's price feed tree contains given price feed
|
|
65634
|
+
* @param priceFeed
|
|
65635
|
+
* @returns
|
|
65636
|
+
*/
|
|
65637
|
+
usesPriceFeed(priceFeed) {
|
|
65638
|
+
return this.#priceFeedTree.some(
|
|
65639
|
+
(node) => node.baseParams.addr.toLowerCase() === priceFeed.toLowerCase()
|
|
65640
|
+
);
|
|
65641
|
+
}
|
|
65632
65642
|
/**
|
|
65633
65643
|
* Tries to convert amount of token into underlying of current market
|
|
65634
65644
|
* @param token
|