@gearbox-protocol/sdk 9.12.8 → 9.12.9
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.
|
@@ -175,6 +175,12 @@ class PriceOracleBaseContract extends import_base.BaseContract {
|
|
|
175
175
|
async updatePrices() {
|
|
176
176
|
await this.sdk.marketRegister.updatePrices([this.address]);
|
|
177
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
* All price feed tree nodes known to this oracle
|
|
180
|
+
*/
|
|
181
|
+
get priceFeeds() {
|
|
182
|
+
return this.#priceFeedTree.values().map((node) => this.sdk.priceFeeds.mustGet(node.baseParams.addr));
|
|
183
|
+
}
|
|
178
184
|
/**
|
|
179
185
|
* Paired method to updatePrices, helps to update prices on all oracles in one multicall
|
|
180
186
|
*/
|
|
@@ -146,6 +146,12 @@ class PriceOracleBaseContract extends BaseContract {
|
|
|
146
146
|
async updatePrices() {
|
|
147
147
|
await this.sdk.marketRegister.updatePrices([this.address]);
|
|
148
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* All price feed tree nodes known to this oracle
|
|
151
|
+
*/
|
|
152
|
+
get priceFeeds() {
|
|
153
|
+
return this.#priceFeedTree.values().map((node) => this.sdk.priceFeeds.mustGet(node.baseParams.addr));
|
|
154
|
+
}
|
|
149
155
|
/**
|
|
150
156
|
* Paired method to updatePrices, helps to update prices on all oracles in one multicall
|
|
151
157
|
*/
|
|
@@ -90,6 +90,10 @@ export declare abstract class PriceOracleBaseContract<abi extends Abi | readonly
|
|
|
90
90
|
* Will (re)create price feeds if needed
|
|
91
91
|
*/
|
|
92
92
|
updatePrices(): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* All price feed tree nodes known to this oracle
|
|
95
|
+
*/
|
|
96
|
+
get priceFeeds(): IPriceFeedContract[];
|
|
93
97
|
/**
|
|
94
98
|
* Paired method to updatePrices, helps to update prices on all oracles in one multicall
|
|
95
99
|
*/
|
|
@@ -20,6 +20,10 @@ export interface OnDemandPriceUpdates<T = unknown> {
|
|
|
20
20
|
multicall: MultiCall[];
|
|
21
21
|
}
|
|
22
22
|
export interface IPriceOracleContract extends IBaseContract {
|
|
23
|
+
/**
|
|
24
|
+
* All price feed tree nodes known to this oracle
|
|
25
|
+
*/
|
|
26
|
+
priceFeeds: IPriceFeedContract[];
|
|
23
27
|
/**
|
|
24
28
|
* Mapping Token => [PriceFeed Address, stalenessPeriod]
|
|
25
29
|
*/
|