@gearbox-protocol/sdk 3.0.0-vfour.190 → 3.0.0-vfour.192
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 +42 -26
- package/dist/cjs/sdk/index.d.ts +40 -17
- package/dist/esm/sdk/index.d.mts +40 -17
- package/dist/esm/sdk/index.mjs +42 -26
- package/package.json +1 -1
package/dist/cjs/sdk/index.cjs
CHANGED
|
@@ -57421,6 +57421,7 @@ var AdapterInterface = /* @__PURE__ */ ((AdapterInterface2) => {
|
|
|
57421
57421
|
AdapterInterface2[AdapterInterface2["DAI_USDS_EXCHANGE"] = 33] = "DAI_USDS_EXCHANGE";
|
|
57422
57422
|
AdapterInterface2[AdapterInterface2["STAKING_REWARDS"] = 34] = "STAKING_REWARDS";
|
|
57423
57423
|
AdapterInterface2[AdapterInterface2["EQUALIZER_ROUTER"] = 35] = "EQUALIZER_ROUTER";
|
|
57424
|
+
AdapterInterface2[AdapterInterface2["BALANCER_V3_ROUTER"] = 36] = "BALANCER_V3_ROUTER";
|
|
57424
57425
|
return AdapterInterface2;
|
|
57425
57426
|
})(AdapterInterface || {});
|
|
57426
57427
|
|
|
@@ -57956,6 +57957,15 @@ var balancerLpTokens = {
|
|
|
57956
57957
|
underlying: ["rsETH", "WETH"],
|
|
57957
57958
|
poolId: "0x58aadfb1afac0ad7fca1148f3cde6aedf5236b6d00000000000000000000067f"
|
|
57958
57959
|
},
|
|
57960
|
+
B_50WBTC_50WETH: {
|
|
57961
|
+
name: "Balancer WBTC/WETH",
|
|
57962
|
+
symbol: "B_50WBTC_50WETH",
|
|
57963
|
+
type: {
|
|
57964
|
+
AllNetworks: 10 /* BALANCER_LP_TOKEN */
|
|
57965
|
+
},
|
|
57966
|
+
underlying: ["WBTC", "WETH"],
|
|
57967
|
+
poolId: "0xa6f548df93de924d73be7d25dc02554c6bd66db500020000000000000000000e"
|
|
57968
|
+
},
|
|
57959
57969
|
rsETH_wETH_Arb: {
|
|
57960
57970
|
name: "Balancer rsETH/WETH Pool (Arbitrum)",
|
|
57961
57971
|
symbol: "rsETH_wETH_Arb",
|
|
@@ -59074,6 +59084,7 @@ var decimals = {
|
|
|
59074
59084
|
"33AURA_33ARB_33BAL": 18,
|
|
59075
59085
|
ezETH_wstETH: 18,
|
|
59076
59086
|
GHO_USDT_USDC: 18,
|
|
59087
|
+
B_50WBTC_50WETH: 18,
|
|
59077
59088
|
rsETH_WETH: 18,
|
|
59078
59089
|
rsETH_wETH_Arb: 18,
|
|
59079
59090
|
bpt_ethtri: 18,
|
|
@@ -60060,6 +60071,7 @@ var tokenDataByNetwork = {
|
|
|
60060
60071
|
bpt_ethtri: NOT_DEPLOYED,
|
|
60061
60072
|
pumpBTC_WBTC_BPT: "0x2238aB6c8c58473a5e81b86ec352322fB3f5Edd8",
|
|
60062
60073
|
eBTC_WBTC_BPT: "0xda17f3663C5D04C0B316cfA1A04Aa53eBBC8c12C",
|
|
60074
|
+
B_50WBTC_50WETH: "0xA6F548DF93de924d73be7D25dC02554c6bD66dB5",
|
|
60063
60075
|
// AURA
|
|
60064
60076
|
auraB_rETH_STABLE: "0x9497df26e5bD669Cb925eC68E730492b9300c482",
|
|
60065
60077
|
auraweETH_rETH: "0xb2912397566Dafc9cDee555a38e980661858a61a",
|
|
@@ -60341,6 +60353,7 @@ var tokenDataByNetwork = {
|
|
|
60341
60353
|
bpt_ethtri: NOT_DEPLOYED,
|
|
60342
60354
|
pumpBTC_WBTC_BPT: NOT_DEPLOYED,
|
|
60343
60355
|
eBTC_WBTC_BPT: NOT_DEPLOYED,
|
|
60356
|
+
B_50WBTC_50WETH: NOT_DEPLOYED,
|
|
60344
60357
|
// AURA
|
|
60345
60358
|
auraB_rETH_STABLE: NOT_DEPLOYED,
|
|
60346
60359
|
auraweETH_rETH: NOT_DEPLOYED,
|
|
@@ -60613,6 +60626,7 @@ var tokenDataByNetwork = {
|
|
|
60613
60626
|
GHO_USDT_USDC: NOT_DEPLOYED,
|
|
60614
60627
|
rsETH_WETH: NOT_DEPLOYED,
|
|
60615
60628
|
rsETH_wETH_Arb: NOT_DEPLOYED,
|
|
60629
|
+
B_50WBTC_50WETH: NOT_DEPLOYED,
|
|
60616
60630
|
BPT_rETH_ETH: "0x4Fd63966879300caFafBB35D157dC5229278Ed23",
|
|
60617
60631
|
BPT_WSTETH_ETH: "0x7B50775383d3D6f0215A8F290f2C9e2eEBBEceb2",
|
|
60618
60632
|
BPT_ROAD: "0x39965c9dAb5448482Cf7e002F583c812Ceb53046",
|
|
@@ -60894,6 +60908,7 @@ var tokenDataByNetwork = {
|
|
|
60894
60908
|
rsETH_wETH_Arb: NOT_DEPLOYED,
|
|
60895
60909
|
"33AURA_33ARB_33BAL": NOT_DEPLOYED,
|
|
60896
60910
|
ezETH_wstETH: NOT_DEPLOYED,
|
|
60911
|
+
B_50WBTC_50WETH: NOT_DEPLOYED,
|
|
60897
60912
|
BPT_rETH_ETH: NOT_DEPLOYED,
|
|
60898
60913
|
BPT_WSTETH_ETH: NOT_DEPLOYED,
|
|
60899
60914
|
BPT_ROAD: NOT_DEPLOYED,
|
|
@@ -62339,8 +62354,7 @@ var contractParams = {
|
|
|
62339
62354
|
name: "Curve USDeUSDC",
|
|
62340
62355
|
protocol: 2 /* Curve */,
|
|
62341
62356
|
version: 20,
|
|
62342
|
-
type:
|
|
62343
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62357
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62344
62358
|
lpToken: "USDeUSDC",
|
|
62345
62359
|
tokens: ["USDe", "USDC"]
|
|
62346
62360
|
},
|
|
@@ -62348,8 +62362,7 @@ var contractParams = {
|
|
|
62348
62362
|
name: "Curve FRAXUSDe",
|
|
62349
62363
|
protocol: 2 /* Curve */,
|
|
62350
62364
|
version: 20,
|
|
62351
|
-
type:
|
|
62352
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62365
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62353
62366
|
lpToken: "FRAXUSDe",
|
|
62354
62367
|
tokens: ["FRAX", "USDe"]
|
|
62355
62368
|
},
|
|
@@ -62357,8 +62370,7 @@ var contractParams = {
|
|
|
62357
62370
|
name: "Curve USDecrvUSD",
|
|
62358
62371
|
protocol: 2 /* Curve */,
|
|
62359
62372
|
version: 20,
|
|
62360
|
-
type:
|
|
62361
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62373
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62362
62374
|
lpToken: "USDecrvUSD",
|
|
62363
62375
|
tokens: ["USDe", "crvUSD"]
|
|
62364
62376
|
},
|
|
@@ -62366,8 +62378,7 @@ var contractParams = {
|
|
|
62366
62378
|
name: "Curve USDeDAI",
|
|
62367
62379
|
protocol: 2 /* Curve */,
|
|
62368
62380
|
version: 20,
|
|
62369
|
-
type:
|
|
62370
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62381
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62371
62382
|
lpToken: "USDeDAI",
|
|
62372
62383
|
tokens: ["USDe", "DAI"]
|
|
62373
62384
|
},
|
|
@@ -62375,8 +62386,7 @@ var contractParams = {
|
|
|
62375
62386
|
name: "Curve MtEthena",
|
|
62376
62387
|
protocol: 2 /* Curve */,
|
|
62377
62388
|
version: 20,
|
|
62378
|
-
type:
|
|
62379
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62389
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62380
62390
|
lpToken: "MtEthena",
|
|
62381
62391
|
tokens: ["sDAI", "sUSDe"]
|
|
62382
62392
|
},
|
|
@@ -62384,8 +62394,7 @@ var contractParams = {
|
|
|
62384
62394
|
name: "Curve GHOUSDe",
|
|
62385
62395
|
protocol: 2 /* Curve */,
|
|
62386
62396
|
version: 20,
|
|
62387
|
-
type:
|
|
62388
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62397
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62389
62398
|
lpToken: "GHOUSDe",
|
|
62390
62399
|
tokens: ["GHO", "USDe"]
|
|
62391
62400
|
},
|
|
@@ -63799,13 +63808,23 @@ var RedstoneUpdater = class extends SDKConstruct {
|
|
|
63799
63808
|
#logger;
|
|
63800
63809
|
#cache = /* @__PURE__ */ new Map();
|
|
63801
63810
|
#historicalTimestampMs;
|
|
63811
|
+
#gateways;
|
|
63802
63812
|
constructor(sdk) {
|
|
63803
63813
|
super(sdk);
|
|
63804
63814
|
this.#logger = childLogger("RedstoneUpdater", sdk.logger);
|
|
63805
63815
|
}
|
|
63806
|
-
|
|
63816
|
+
/**
|
|
63817
|
+
* Set redstone historical timestamp in milliseconds
|
|
63818
|
+
*/
|
|
63819
|
+
set historicalTimestamp(timestampMs) {
|
|
63807
63820
|
this.#historicalTimestampMs = 6e4 * Math.floor(timestampMs / 6e4);
|
|
63808
63821
|
}
|
|
63822
|
+
/**
|
|
63823
|
+
* Set redstone gateways
|
|
63824
|
+
*/
|
|
63825
|
+
set gateways(gateways) {
|
|
63826
|
+
this.#gateways = gateways;
|
|
63827
|
+
}
|
|
63809
63828
|
async getUpdateTxs(feeds, logContext = {}) {
|
|
63810
63829
|
this.#logger?.debug(
|
|
63811
63830
|
logContext,
|
|
@@ -63922,7 +63941,8 @@ var RedstoneUpdater = class extends SDKConstruct {
|
|
|
63922
63941
|
dataServiceId,
|
|
63923
63942
|
dataPackagesIds,
|
|
63924
63943
|
uniqueSignersCount,
|
|
63925
|
-
historicalTimestamp: this.#historicalTimestampMs
|
|
63944
|
+
historicalTimestamp: this.#historicalTimestampMs,
|
|
63945
|
+
urls: this.#gateways
|
|
63926
63946
|
});
|
|
63927
63947
|
const dataPayload = await wrapper.prepareRedstonePayload(true);
|
|
63928
63948
|
const parsed = protocol.RedstonePayload.parse(viem.toBytes(`0x${dataPayload}`));
|
|
@@ -64045,11 +64065,11 @@ var PriceFeedRegister = class extends SDKConstruct {
|
|
|
64045
64065
|
logger;
|
|
64046
64066
|
#hooks = new Hooks();
|
|
64047
64067
|
#feeds = new AddressMap();
|
|
64048
|
-
|
|
64068
|
+
redstoneUpdater;
|
|
64049
64069
|
constructor(sdk) {
|
|
64050
64070
|
super(sdk);
|
|
64051
64071
|
this.logger = childLogger("PriceFeedRegister", sdk.logger);
|
|
64052
|
-
this
|
|
64072
|
+
this.redstoneUpdater = new RedstoneUpdater(sdk);
|
|
64053
64073
|
}
|
|
64054
64074
|
addHook = this.#hooks.addHook.bind(this.#hooks);
|
|
64055
64075
|
removeHook = this.#hooks.removeHook.bind(this.#hooks);
|
|
@@ -64078,14 +64098,6 @@ var PriceFeedRegister = class extends SDKConstruct {
|
|
|
64078
64098
|
this.#feeds.upsert(data.baseParams.addr, feed);
|
|
64079
64099
|
return feed;
|
|
64080
64100
|
}
|
|
64081
|
-
/**
|
|
64082
|
-
* Set redstone historical timestamp
|
|
64083
|
-
* @param timestampMs in milliseconds, or true to use timestamp from attach block
|
|
64084
|
-
*/
|
|
64085
|
-
setRedstoneHistoricalTimestamp(timestampMs) {
|
|
64086
|
-
const ts = timestampMs === true ? Number(this.sdk.timestamp) * 1e3 : timestampMs;
|
|
64087
|
-
this.#redstoneUpdater.setHistoricalTimestamp(ts);
|
|
64088
|
-
}
|
|
64089
64101
|
/**
|
|
64090
64102
|
* Loads PARTIAL information about all updatable price feeds from MarketCompressor
|
|
64091
64103
|
* This can later be used to load price feed updates
|
|
@@ -64141,7 +64153,7 @@ var PriceFeedRegister = class extends SDKConstruct {
|
|
|
64141
64153
|
}
|
|
64142
64154
|
let maxTimestamp = 0;
|
|
64143
64155
|
if (redstonePFs.length > 0) {
|
|
64144
|
-
const redstoneUpdates = await this
|
|
64156
|
+
const redstoneUpdates = await this.redstoneUpdater.getUpdateTxs(
|
|
64145
64157
|
redstonePFs,
|
|
64146
64158
|
logContext
|
|
64147
64159
|
);
|
|
@@ -72330,6 +72342,7 @@ var GearboxSDK = class _GearboxSDK {
|
|
|
72330
72342
|
addressProvider,
|
|
72331
72343
|
blockNumber,
|
|
72332
72344
|
redstoneHistoricTimestamp,
|
|
72345
|
+
redstoneGateways,
|
|
72333
72346
|
ignoreUpdateablePrices,
|
|
72334
72347
|
marketConfigurators
|
|
72335
72348
|
} = opts;
|
|
@@ -72342,7 +72355,10 @@ var GearboxSDK = class _GearboxSDK {
|
|
|
72342
72355
|
this.#currentBlock = block.number;
|
|
72343
72356
|
this.#timestamp = block.timestamp;
|
|
72344
72357
|
if (redstoneHistoricTimestamp) {
|
|
72345
|
-
this.priceFeeds.
|
|
72358
|
+
this.priceFeeds.redstoneUpdater.historicalTimestamp = redstoneHistoricTimestamp === true ? Number(block.timestamp) * 1e3 : redstoneHistoricTimestamp;
|
|
72359
|
+
}
|
|
72360
|
+
if (redstoneGateways) {
|
|
72361
|
+
this.priceFeeds.redstoneUpdater.gateways = redstoneGateways;
|
|
72346
72362
|
}
|
|
72347
72363
|
this.logger?.info(
|
|
72348
72364
|
{
|
package/dist/cjs/sdk/index.d.ts
CHANGED
|
@@ -85126,6 +85126,38 @@ interface IHooks<HookMap extends Record<string, any[]>> {
|
|
|
85126
85126
|
removeHook: <K extends keyof HookMap>(hookName: K, fn: (...args: HookMap[K]) => void | Promise<void>) => void;
|
|
85127
85127
|
}
|
|
85128
85128
|
|
|
85129
|
+
type abi$j = typeof redstonePriceFeedAbi;
|
|
85130
|
+
declare class RedstonePriceFeedContract extends AbstractPriceFeedContract<abi$j> {
|
|
85131
|
+
readonly dataServiceId: string;
|
|
85132
|
+
readonly dataId: string;
|
|
85133
|
+
readonly signers: Hex[];
|
|
85134
|
+
readonly signersThreshold: number;
|
|
85135
|
+
constructor(sdk: GearboxSDK, args: PartialPriceFeedTreeNode);
|
|
85136
|
+
stateHuman(raw?: boolean): Omit<RedstonePriceFeedStateHuman, "stalenessPeriod">;
|
|
85137
|
+
}
|
|
85138
|
+
|
|
85139
|
+
interface UpdatePFTask {
|
|
85140
|
+
priceFeed: Address;
|
|
85141
|
+
tx: RawTx;
|
|
85142
|
+
timestamp: number;
|
|
85143
|
+
}
|
|
85144
|
+
/**
|
|
85145
|
+
* Class to update multiple redstone price feeds at once
|
|
85146
|
+
*/
|
|
85147
|
+
declare class RedstoneUpdater extends SDKConstruct {
|
|
85148
|
+
#private;
|
|
85149
|
+
constructor(sdk: GearboxSDK);
|
|
85150
|
+
/**
|
|
85151
|
+
* Set redstone historical timestamp in milliseconds
|
|
85152
|
+
*/
|
|
85153
|
+
set historicalTimestamp(timestampMs: number);
|
|
85154
|
+
/**
|
|
85155
|
+
* Set redstone gateways
|
|
85156
|
+
*/
|
|
85157
|
+
set gateways(gateways: string[]);
|
|
85158
|
+
getUpdateTxs(feeds: RedstonePriceFeedContract[], logContext?: Record<string, any>): Promise<UpdatePFTask[]>;
|
|
85159
|
+
}
|
|
85160
|
+
|
|
85129
85161
|
type PriceFeedRegisterHooks = {
|
|
85130
85162
|
/**
|
|
85131
85163
|
* Emitted when transactions to update price feeds have been generated, but before they're used anywhere
|
|
@@ -85140,6 +85172,7 @@ type PriceFeedRegisterHooks = {
|
|
|
85140
85172
|
declare class PriceFeedRegister extends SDKConstruct implements IHooks<PriceFeedRegisterHooks> {
|
|
85141
85173
|
#private;
|
|
85142
85174
|
readonly logger?: ILogger;
|
|
85175
|
+
readonly redstoneUpdater: RedstoneUpdater;
|
|
85143
85176
|
constructor(sdk: GearboxSDK);
|
|
85144
85177
|
addHook: <K extends "updatesGenerated">(hookName: K, fn: (...args: PriceFeedRegisterHooks[K]) => void | Promise<void>) => void;
|
|
85145
85178
|
removeHook: <K extends "updatesGenerated">(hookName: K, fn: (...args: PriceFeedRegisterHooks[K]) => void | Promise<void>) => void;
|
|
@@ -85153,11 +85186,6 @@ declare class PriceFeedRegister extends SDKConstruct implements IHooks<PriceFeed
|
|
|
85153
85186
|
has(address: Address): boolean;
|
|
85154
85187
|
mustGet(address: Address): IPriceFeedContract;
|
|
85155
85188
|
getOrCreate(data: PriceFeedTreeNode): IPriceFeedContract;
|
|
85156
|
-
/**
|
|
85157
|
-
* Set redstone historical timestamp
|
|
85158
|
-
* @param timestampMs in milliseconds, or true to use timestamp from attach block
|
|
85159
|
-
*/
|
|
85160
|
-
setRedstoneHistoricalTimestamp(timestampMs: number | true): void;
|
|
85161
85189
|
/**
|
|
85162
85190
|
* Loads PARTIAL information about all updatable price feeds from MarketCompressor
|
|
85163
85191
|
* This can later be used to load price feed updates
|
|
@@ -85173,16 +85201,6 @@ declare class PriceFeedRegister extends SDKConstruct implements IHooks<PriceFeed
|
|
|
85173
85201
|
create(data: PartialPriceFeedTreeNode): IPriceFeedContract;
|
|
85174
85202
|
}
|
|
85175
85203
|
|
|
85176
|
-
type abi$j = typeof redstonePriceFeedAbi;
|
|
85177
|
-
declare class RedstonePriceFeedContract extends AbstractPriceFeedContract<abi$j> {
|
|
85178
|
-
readonly dataServiceId: string;
|
|
85179
|
-
readonly dataId: string;
|
|
85180
|
-
readonly signers: Hex[];
|
|
85181
|
-
readonly signersThreshold: number;
|
|
85182
|
-
constructor(sdk: GearboxSDK, args: PartialPriceFeedTreeNode);
|
|
85183
|
-
stateHuman(raw?: boolean): Omit<RedstonePriceFeedStateHuman, "stalenessPeriod">;
|
|
85184
|
-
}
|
|
85185
|
-
|
|
85186
85204
|
/**
|
|
85187
85205
|
* Helper method to convert our RawTx into viem's multicall format
|
|
85188
85206
|
* Involves decoding what was previously encoded, but it's better than adding another method to PriceOracle
|
|
@@ -92343,6 +92361,10 @@ interface SDKOptions {
|
|
|
92343
92361
|
* Set to true to enable redstone historical mode using timestamp from attach block
|
|
92344
92362
|
*/
|
|
92345
92363
|
redstoneHistoricTimestamp?: number | true;
|
|
92364
|
+
/**
|
|
92365
|
+
* Override redstone gateways. Can be used to set caching proxies, to avoid rate limiting
|
|
92366
|
+
*/
|
|
92367
|
+
redstoneGateways?: string[];
|
|
92346
92368
|
/**
|
|
92347
92369
|
* Will skip updateable prices on attach and sync
|
|
92348
92370
|
* Makes things faster when your service is not intereseted in prices
|
|
@@ -92902,7 +92924,8 @@ declare enum AdapterInterface {
|
|
|
92902
92924
|
MELLOW_ERC4626_VAULT = 32,
|
|
92903
92925
|
DAI_USDS_EXCHANGE = 33,
|
|
92904
92926
|
STAKING_REWARDS = 34,
|
|
92905
|
-
EQUALIZER_ROUTER = 35
|
|
92927
|
+
EQUALIZER_ROUTER = 35,
|
|
92928
|
+
BALANCER_V3_ROUTER = 36
|
|
92906
92929
|
}
|
|
92907
92930
|
|
|
92908
92931
|
declare enum TradeType {
|
|
@@ -93115,7 +93138,7 @@ type ERC4626VaultOfCurveLPTokenData = {
|
|
|
93115
93138
|
declare const erc4626Tokens: Record<ERC4626LPToken, ERC4626VaultTokenData | ERC4626VaultOfCurveLPTokenData>;
|
|
93116
93139
|
declare const isERC4626LPToken: (t: unknown) => t is ERC4626LPToken;
|
|
93117
93140
|
|
|
93118
|
-
type BalancerLPToken = "USDC_DAI_USDT" | "B_rETH_STABLE" | "weETH_rETH" | "osETH_wETH_BPT" | "B_80BAL_20WETH" | "50WETH_50AURA" | "ezETH_WETH_BPT" | "weETH_ezETH_rswETH" | "GHO_USDT_USDC" | "rsETH_WETH" | "trenSTETH" | "DVstETH_wstETH_BPT" | "sUSDe_USDC_BPT" | "pumpBTC_WBTC_BPT" | "eBTC_WBTC_BPT" | "BPT_rETH_ETH" | "BPT_WSTETH_ETH" | "BPT_ROAD" | "ECLP_wstETH_WETH" | "bpt_ethtri" | "wstETH_WETH_BPT" | "wstETH_rETH_sfrxETH" | "wstETH_rETH_cbETH" | "rETH_WETH_BPT_deprecated" | "cbETH_rETH_wstETH" | "rETH_wETH_BPT" | "33AURA_33ARB_33BAL" | "ezETH_wstETH" | "rsETH_wETH_Arb";
|
|
93141
|
+
type BalancerLPToken = "USDC_DAI_USDT" | "B_rETH_STABLE" | "weETH_rETH" | "osETH_wETH_BPT" | "B_80BAL_20WETH" | "50WETH_50AURA" | "ezETH_WETH_BPT" | "weETH_ezETH_rswETH" | "GHO_USDT_USDC" | "rsETH_WETH" | "trenSTETH" | "DVstETH_wstETH_BPT" | "sUSDe_USDC_BPT" | "pumpBTC_WBTC_BPT" | "eBTC_WBTC_BPT" | "B_50WBTC_50WETH" | "BPT_rETH_ETH" | "BPT_WSTETH_ETH" | "BPT_ROAD" | "ECLP_wstETH_WETH" | "bpt_ethtri" | "wstETH_WETH_BPT" | "wstETH_rETH_sfrxETH" | "wstETH_rETH_cbETH" | "rETH_WETH_BPT_deprecated" | "cbETH_rETH_wstETH" | "rETH_wETH_BPT" | "33AURA_33ARB_33BAL" | "ezETH_wstETH" | "rsETH_wETH_Arb";
|
|
93119
93142
|
type BalancerLpTokenData = {
|
|
93120
93143
|
symbol: BalancerLPToken;
|
|
93121
93144
|
type: Partial<Record<TokenNetwork, TokenType.BALANCER_LP_TOKEN>>;
|
package/dist/esm/sdk/index.d.mts
CHANGED
|
@@ -85126,6 +85126,38 @@ interface IHooks<HookMap extends Record<string, any[]>> {
|
|
|
85126
85126
|
removeHook: <K extends keyof HookMap>(hookName: K, fn: (...args: HookMap[K]) => void | Promise<void>) => void;
|
|
85127
85127
|
}
|
|
85128
85128
|
|
|
85129
|
+
type abi$j = typeof redstonePriceFeedAbi;
|
|
85130
|
+
declare class RedstonePriceFeedContract extends AbstractPriceFeedContract<abi$j> {
|
|
85131
|
+
readonly dataServiceId: string;
|
|
85132
|
+
readonly dataId: string;
|
|
85133
|
+
readonly signers: Hex[];
|
|
85134
|
+
readonly signersThreshold: number;
|
|
85135
|
+
constructor(sdk: GearboxSDK, args: PartialPriceFeedTreeNode);
|
|
85136
|
+
stateHuman(raw?: boolean): Omit<RedstonePriceFeedStateHuman, "stalenessPeriod">;
|
|
85137
|
+
}
|
|
85138
|
+
|
|
85139
|
+
interface UpdatePFTask {
|
|
85140
|
+
priceFeed: Address;
|
|
85141
|
+
tx: RawTx;
|
|
85142
|
+
timestamp: number;
|
|
85143
|
+
}
|
|
85144
|
+
/**
|
|
85145
|
+
* Class to update multiple redstone price feeds at once
|
|
85146
|
+
*/
|
|
85147
|
+
declare class RedstoneUpdater extends SDKConstruct {
|
|
85148
|
+
#private;
|
|
85149
|
+
constructor(sdk: GearboxSDK);
|
|
85150
|
+
/**
|
|
85151
|
+
* Set redstone historical timestamp in milliseconds
|
|
85152
|
+
*/
|
|
85153
|
+
set historicalTimestamp(timestampMs: number);
|
|
85154
|
+
/**
|
|
85155
|
+
* Set redstone gateways
|
|
85156
|
+
*/
|
|
85157
|
+
set gateways(gateways: string[]);
|
|
85158
|
+
getUpdateTxs(feeds: RedstonePriceFeedContract[], logContext?: Record<string, any>): Promise<UpdatePFTask[]>;
|
|
85159
|
+
}
|
|
85160
|
+
|
|
85129
85161
|
type PriceFeedRegisterHooks = {
|
|
85130
85162
|
/**
|
|
85131
85163
|
* Emitted when transactions to update price feeds have been generated, but before they're used anywhere
|
|
@@ -85140,6 +85172,7 @@ type PriceFeedRegisterHooks = {
|
|
|
85140
85172
|
declare class PriceFeedRegister extends SDKConstruct implements IHooks<PriceFeedRegisterHooks> {
|
|
85141
85173
|
#private;
|
|
85142
85174
|
readonly logger?: ILogger;
|
|
85175
|
+
readonly redstoneUpdater: RedstoneUpdater;
|
|
85143
85176
|
constructor(sdk: GearboxSDK);
|
|
85144
85177
|
addHook: <K extends "updatesGenerated">(hookName: K, fn: (...args: PriceFeedRegisterHooks[K]) => void | Promise<void>) => void;
|
|
85145
85178
|
removeHook: <K extends "updatesGenerated">(hookName: K, fn: (...args: PriceFeedRegisterHooks[K]) => void | Promise<void>) => void;
|
|
@@ -85153,11 +85186,6 @@ declare class PriceFeedRegister extends SDKConstruct implements IHooks<PriceFeed
|
|
|
85153
85186
|
has(address: Address): boolean;
|
|
85154
85187
|
mustGet(address: Address): IPriceFeedContract;
|
|
85155
85188
|
getOrCreate(data: PriceFeedTreeNode): IPriceFeedContract;
|
|
85156
|
-
/**
|
|
85157
|
-
* Set redstone historical timestamp
|
|
85158
|
-
* @param timestampMs in milliseconds, or true to use timestamp from attach block
|
|
85159
|
-
*/
|
|
85160
|
-
setRedstoneHistoricalTimestamp(timestampMs: number | true): void;
|
|
85161
85189
|
/**
|
|
85162
85190
|
* Loads PARTIAL information about all updatable price feeds from MarketCompressor
|
|
85163
85191
|
* This can later be used to load price feed updates
|
|
@@ -85173,16 +85201,6 @@ declare class PriceFeedRegister extends SDKConstruct implements IHooks<PriceFeed
|
|
|
85173
85201
|
create(data: PartialPriceFeedTreeNode): IPriceFeedContract;
|
|
85174
85202
|
}
|
|
85175
85203
|
|
|
85176
|
-
type abi$j = typeof redstonePriceFeedAbi;
|
|
85177
|
-
declare class RedstonePriceFeedContract extends AbstractPriceFeedContract<abi$j> {
|
|
85178
|
-
readonly dataServiceId: string;
|
|
85179
|
-
readonly dataId: string;
|
|
85180
|
-
readonly signers: Hex[];
|
|
85181
|
-
readonly signersThreshold: number;
|
|
85182
|
-
constructor(sdk: GearboxSDK, args: PartialPriceFeedTreeNode);
|
|
85183
|
-
stateHuman(raw?: boolean): Omit<RedstonePriceFeedStateHuman, "stalenessPeriod">;
|
|
85184
|
-
}
|
|
85185
|
-
|
|
85186
85204
|
/**
|
|
85187
85205
|
* Helper method to convert our RawTx into viem's multicall format
|
|
85188
85206
|
* Involves decoding what was previously encoded, but it's better than adding another method to PriceOracle
|
|
@@ -92343,6 +92361,10 @@ interface SDKOptions {
|
|
|
92343
92361
|
* Set to true to enable redstone historical mode using timestamp from attach block
|
|
92344
92362
|
*/
|
|
92345
92363
|
redstoneHistoricTimestamp?: number | true;
|
|
92364
|
+
/**
|
|
92365
|
+
* Override redstone gateways. Can be used to set caching proxies, to avoid rate limiting
|
|
92366
|
+
*/
|
|
92367
|
+
redstoneGateways?: string[];
|
|
92346
92368
|
/**
|
|
92347
92369
|
* Will skip updateable prices on attach and sync
|
|
92348
92370
|
* Makes things faster when your service is not intereseted in prices
|
|
@@ -92902,7 +92924,8 @@ declare enum AdapterInterface {
|
|
|
92902
92924
|
MELLOW_ERC4626_VAULT = 32,
|
|
92903
92925
|
DAI_USDS_EXCHANGE = 33,
|
|
92904
92926
|
STAKING_REWARDS = 34,
|
|
92905
|
-
EQUALIZER_ROUTER = 35
|
|
92927
|
+
EQUALIZER_ROUTER = 35,
|
|
92928
|
+
BALANCER_V3_ROUTER = 36
|
|
92906
92929
|
}
|
|
92907
92930
|
|
|
92908
92931
|
declare enum TradeType {
|
|
@@ -93115,7 +93138,7 @@ type ERC4626VaultOfCurveLPTokenData = {
|
|
|
93115
93138
|
declare const erc4626Tokens: Record<ERC4626LPToken, ERC4626VaultTokenData | ERC4626VaultOfCurveLPTokenData>;
|
|
93116
93139
|
declare const isERC4626LPToken: (t: unknown) => t is ERC4626LPToken;
|
|
93117
93140
|
|
|
93118
|
-
type BalancerLPToken = "USDC_DAI_USDT" | "B_rETH_STABLE" | "weETH_rETH" | "osETH_wETH_BPT" | "B_80BAL_20WETH" | "50WETH_50AURA" | "ezETH_WETH_BPT" | "weETH_ezETH_rswETH" | "GHO_USDT_USDC" | "rsETH_WETH" | "trenSTETH" | "DVstETH_wstETH_BPT" | "sUSDe_USDC_BPT" | "pumpBTC_WBTC_BPT" | "eBTC_WBTC_BPT" | "BPT_rETH_ETH" | "BPT_WSTETH_ETH" | "BPT_ROAD" | "ECLP_wstETH_WETH" | "bpt_ethtri" | "wstETH_WETH_BPT" | "wstETH_rETH_sfrxETH" | "wstETH_rETH_cbETH" | "rETH_WETH_BPT_deprecated" | "cbETH_rETH_wstETH" | "rETH_wETH_BPT" | "33AURA_33ARB_33BAL" | "ezETH_wstETH" | "rsETH_wETH_Arb";
|
|
93141
|
+
type BalancerLPToken = "USDC_DAI_USDT" | "B_rETH_STABLE" | "weETH_rETH" | "osETH_wETH_BPT" | "B_80BAL_20WETH" | "50WETH_50AURA" | "ezETH_WETH_BPT" | "weETH_ezETH_rswETH" | "GHO_USDT_USDC" | "rsETH_WETH" | "trenSTETH" | "DVstETH_wstETH_BPT" | "sUSDe_USDC_BPT" | "pumpBTC_WBTC_BPT" | "eBTC_WBTC_BPT" | "B_50WBTC_50WETH" | "BPT_rETH_ETH" | "BPT_WSTETH_ETH" | "BPT_ROAD" | "ECLP_wstETH_WETH" | "bpt_ethtri" | "wstETH_WETH_BPT" | "wstETH_rETH_sfrxETH" | "wstETH_rETH_cbETH" | "rETH_WETH_BPT_deprecated" | "cbETH_rETH_wstETH" | "rETH_wETH_BPT" | "33AURA_33ARB_33BAL" | "ezETH_wstETH" | "rsETH_wETH_Arb";
|
|
93119
93142
|
type BalancerLpTokenData = {
|
|
93120
93143
|
symbol: BalancerLPToken;
|
|
93121
93144
|
type: Partial<Record<TokenNetwork, TokenType.BALANCER_LP_TOKEN>>;
|
package/dist/esm/sdk/index.mjs
CHANGED
|
@@ -57414,6 +57414,7 @@ var AdapterInterface = /* @__PURE__ */ ((AdapterInterface2) => {
|
|
|
57414
57414
|
AdapterInterface2[AdapterInterface2["DAI_USDS_EXCHANGE"] = 33] = "DAI_USDS_EXCHANGE";
|
|
57415
57415
|
AdapterInterface2[AdapterInterface2["STAKING_REWARDS"] = 34] = "STAKING_REWARDS";
|
|
57416
57416
|
AdapterInterface2[AdapterInterface2["EQUALIZER_ROUTER"] = 35] = "EQUALIZER_ROUTER";
|
|
57417
|
+
AdapterInterface2[AdapterInterface2["BALANCER_V3_ROUTER"] = 36] = "BALANCER_V3_ROUTER";
|
|
57417
57418
|
return AdapterInterface2;
|
|
57418
57419
|
})(AdapterInterface || {});
|
|
57419
57420
|
|
|
@@ -57949,6 +57950,15 @@ var balancerLpTokens = {
|
|
|
57949
57950
|
underlying: ["rsETH", "WETH"],
|
|
57950
57951
|
poolId: "0x58aadfb1afac0ad7fca1148f3cde6aedf5236b6d00000000000000000000067f"
|
|
57951
57952
|
},
|
|
57953
|
+
B_50WBTC_50WETH: {
|
|
57954
|
+
name: "Balancer WBTC/WETH",
|
|
57955
|
+
symbol: "B_50WBTC_50WETH",
|
|
57956
|
+
type: {
|
|
57957
|
+
AllNetworks: 10 /* BALANCER_LP_TOKEN */
|
|
57958
|
+
},
|
|
57959
|
+
underlying: ["WBTC", "WETH"],
|
|
57960
|
+
poolId: "0xa6f548df93de924d73be7d25dc02554c6bd66db500020000000000000000000e"
|
|
57961
|
+
},
|
|
57952
57962
|
rsETH_wETH_Arb: {
|
|
57953
57963
|
name: "Balancer rsETH/WETH Pool (Arbitrum)",
|
|
57954
57964
|
symbol: "rsETH_wETH_Arb",
|
|
@@ -59067,6 +59077,7 @@ var decimals = {
|
|
|
59067
59077
|
"33AURA_33ARB_33BAL": 18,
|
|
59068
59078
|
ezETH_wstETH: 18,
|
|
59069
59079
|
GHO_USDT_USDC: 18,
|
|
59080
|
+
B_50WBTC_50WETH: 18,
|
|
59070
59081
|
rsETH_WETH: 18,
|
|
59071
59082
|
rsETH_wETH_Arb: 18,
|
|
59072
59083
|
bpt_ethtri: 18,
|
|
@@ -60053,6 +60064,7 @@ var tokenDataByNetwork = {
|
|
|
60053
60064
|
bpt_ethtri: NOT_DEPLOYED,
|
|
60054
60065
|
pumpBTC_WBTC_BPT: "0x2238aB6c8c58473a5e81b86ec352322fB3f5Edd8",
|
|
60055
60066
|
eBTC_WBTC_BPT: "0xda17f3663C5D04C0B316cfA1A04Aa53eBBC8c12C",
|
|
60067
|
+
B_50WBTC_50WETH: "0xA6F548DF93de924d73be7D25dC02554c6bD66dB5",
|
|
60056
60068
|
// AURA
|
|
60057
60069
|
auraB_rETH_STABLE: "0x9497df26e5bD669Cb925eC68E730492b9300c482",
|
|
60058
60070
|
auraweETH_rETH: "0xb2912397566Dafc9cDee555a38e980661858a61a",
|
|
@@ -60334,6 +60346,7 @@ var tokenDataByNetwork = {
|
|
|
60334
60346
|
bpt_ethtri: NOT_DEPLOYED,
|
|
60335
60347
|
pumpBTC_WBTC_BPT: NOT_DEPLOYED,
|
|
60336
60348
|
eBTC_WBTC_BPT: NOT_DEPLOYED,
|
|
60349
|
+
B_50WBTC_50WETH: NOT_DEPLOYED,
|
|
60337
60350
|
// AURA
|
|
60338
60351
|
auraB_rETH_STABLE: NOT_DEPLOYED,
|
|
60339
60352
|
auraweETH_rETH: NOT_DEPLOYED,
|
|
@@ -60606,6 +60619,7 @@ var tokenDataByNetwork = {
|
|
|
60606
60619
|
GHO_USDT_USDC: NOT_DEPLOYED,
|
|
60607
60620
|
rsETH_WETH: NOT_DEPLOYED,
|
|
60608
60621
|
rsETH_wETH_Arb: NOT_DEPLOYED,
|
|
60622
|
+
B_50WBTC_50WETH: NOT_DEPLOYED,
|
|
60609
60623
|
BPT_rETH_ETH: "0x4Fd63966879300caFafBB35D157dC5229278Ed23",
|
|
60610
60624
|
BPT_WSTETH_ETH: "0x7B50775383d3D6f0215A8F290f2C9e2eEBBEceb2",
|
|
60611
60625
|
BPT_ROAD: "0x39965c9dAb5448482Cf7e002F583c812Ceb53046",
|
|
@@ -60887,6 +60901,7 @@ var tokenDataByNetwork = {
|
|
|
60887
60901
|
rsETH_wETH_Arb: NOT_DEPLOYED,
|
|
60888
60902
|
"33AURA_33ARB_33BAL": NOT_DEPLOYED,
|
|
60889
60903
|
ezETH_wstETH: NOT_DEPLOYED,
|
|
60904
|
+
B_50WBTC_50WETH: NOT_DEPLOYED,
|
|
60890
60905
|
BPT_rETH_ETH: NOT_DEPLOYED,
|
|
60891
60906
|
BPT_WSTETH_ETH: NOT_DEPLOYED,
|
|
60892
60907
|
BPT_ROAD: NOT_DEPLOYED,
|
|
@@ -62332,8 +62347,7 @@ var contractParams = {
|
|
|
62332
62347
|
name: "Curve USDeUSDC",
|
|
62333
62348
|
protocol: 2 /* Curve */,
|
|
62334
62349
|
version: 20,
|
|
62335
|
-
type:
|
|
62336
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62350
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62337
62351
|
lpToken: "USDeUSDC",
|
|
62338
62352
|
tokens: ["USDe", "USDC"]
|
|
62339
62353
|
},
|
|
@@ -62341,8 +62355,7 @@ var contractParams = {
|
|
|
62341
62355
|
name: "Curve FRAXUSDe",
|
|
62342
62356
|
protocol: 2 /* Curve */,
|
|
62343
62357
|
version: 20,
|
|
62344
|
-
type:
|
|
62345
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62358
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62346
62359
|
lpToken: "FRAXUSDe",
|
|
62347
62360
|
tokens: ["FRAX", "USDe"]
|
|
62348
62361
|
},
|
|
@@ -62350,8 +62363,7 @@ var contractParams = {
|
|
|
62350
62363
|
name: "Curve USDecrvUSD",
|
|
62351
62364
|
protocol: 2 /* Curve */,
|
|
62352
62365
|
version: 20,
|
|
62353
|
-
type:
|
|
62354
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62366
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62355
62367
|
lpToken: "USDecrvUSD",
|
|
62356
62368
|
tokens: ["USDe", "crvUSD"]
|
|
62357
62369
|
},
|
|
@@ -62359,8 +62371,7 @@ var contractParams = {
|
|
|
62359
62371
|
name: "Curve USDeDAI",
|
|
62360
62372
|
protocol: 2 /* Curve */,
|
|
62361
62373
|
version: 20,
|
|
62362
|
-
type:
|
|
62363
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62374
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62364
62375
|
lpToken: "USDeDAI",
|
|
62365
62376
|
tokens: ["USDe", "DAI"]
|
|
62366
62377
|
},
|
|
@@ -62368,8 +62379,7 @@ var contractParams = {
|
|
|
62368
62379
|
name: "Curve MtEthena",
|
|
62369
62380
|
protocol: 2 /* Curve */,
|
|
62370
62381
|
version: 20,
|
|
62371
|
-
type:
|
|
62372
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62382
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62373
62383
|
lpToken: "MtEthena",
|
|
62374
62384
|
tokens: ["sDAI", "sUSDe"]
|
|
62375
62385
|
},
|
|
@@ -62377,8 +62387,7 @@ var contractParams = {
|
|
|
62377
62387
|
name: "Curve GHOUSDe",
|
|
62378
62388
|
protocol: 2 /* Curve */,
|
|
62379
62389
|
version: 20,
|
|
62380
|
-
type:
|
|
62381
|
-
// NOTE: This is actually stable NG, however the old adapter is used in swap only mode before audits
|
|
62390
|
+
type: 23 /* CURVE_STABLE_NG */,
|
|
62382
62391
|
lpToken: "GHOUSDe",
|
|
62383
62392
|
tokens: ["GHO", "USDe"]
|
|
62384
62393
|
},
|
|
@@ -63792,13 +63801,23 @@ var RedstoneUpdater = class extends SDKConstruct {
|
|
|
63792
63801
|
#logger;
|
|
63793
63802
|
#cache = /* @__PURE__ */ new Map();
|
|
63794
63803
|
#historicalTimestampMs;
|
|
63804
|
+
#gateways;
|
|
63795
63805
|
constructor(sdk) {
|
|
63796
63806
|
super(sdk);
|
|
63797
63807
|
this.#logger = childLogger("RedstoneUpdater", sdk.logger);
|
|
63798
63808
|
}
|
|
63799
|
-
|
|
63809
|
+
/**
|
|
63810
|
+
* Set redstone historical timestamp in milliseconds
|
|
63811
|
+
*/
|
|
63812
|
+
set historicalTimestamp(timestampMs) {
|
|
63800
63813
|
this.#historicalTimestampMs = 6e4 * Math.floor(timestampMs / 6e4);
|
|
63801
63814
|
}
|
|
63815
|
+
/**
|
|
63816
|
+
* Set redstone gateways
|
|
63817
|
+
*/
|
|
63818
|
+
set gateways(gateways) {
|
|
63819
|
+
this.#gateways = gateways;
|
|
63820
|
+
}
|
|
63802
63821
|
async getUpdateTxs(feeds, logContext = {}) {
|
|
63803
63822
|
this.#logger?.debug(
|
|
63804
63823
|
logContext,
|
|
@@ -63915,7 +63934,8 @@ var RedstoneUpdater = class extends SDKConstruct {
|
|
|
63915
63934
|
dataServiceId,
|
|
63916
63935
|
dataPackagesIds,
|
|
63917
63936
|
uniqueSignersCount,
|
|
63918
|
-
historicalTimestamp: this.#historicalTimestampMs
|
|
63937
|
+
historicalTimestamp: this.#historicalTimestampMs,
|
|
63938
|
+
urls: this.#gateways
|
|
63919
63939
|
});
|
|
63920
63940
|
const dataPayload = await wrapper.prepareRedstonePayload(true);
|
|
63921
63941
|
const parsed = RedstonePayload.parse(toBytes(`0x${dataPayload}`));
|
|
@@ -64038,11 +64058,11 @@ var PriceFeedRegister = class extends SDKConstruct {
|
|
|
64038
64058
|
logger;
|
|
64039
64059
|
#hooks = new Hooks();
|
|
64040
64060
|
#feeds = new AddressMap();
|
|
64041
|
-
|
|
64061
|
+
redstoneUpdater;
|
|
64042
64062
|
constructor(sdk) {
|
|
64043
64063
|
super(sdk);
|
|
64044
64064
|
this.logger = childLogger("PriceFeedRegister", sdk.logger);
|
|
64045
|
-
this
|
|
64065
|
+
this.redstoneUpdater = new RedstoneUpdater(sdk);
|
|
64046
64066
|
}
|
|
64047
64067
|
addHook = this.#hooks.addHook.bind(this.#hooks);
|
|
64048
64068
|
removeHook = this.#hooks.removeHook.bind(this.#hooks);
|
|
@@ -64071,14 +64091,6 @@ var PriceFeedRegister = class extends SDKConstruct {
|
|
|
64071
64091
|
this.#feeds.upsert(data.baseParams.addr, feed);
|
|
64072
64092
|
return feed;
|
|
64073
64093
|
}
|
|
64074
|
-
/**
|
|
64075
|
-
* Set redstone historical timestamp
|
|
64076
|
-
* @param timestampMs in milliseconds, or true to use timestamp from attach block
|
|
64077
|
-
*/
|
|
64078
|
-
setRedstoneHistoricalTimestamp(timestampMs) {
|
|
64079
|
-
const ts = timestampMs === true ? Number(this.sdk.timestamp) * 1e3 : timestampMs;
|
|
64080
|
-
this.#redstoneUpdater.setHistoricalTimestamp(ts);
|
|
64081
|
-
}
|
|
64082
64094
|
/**
|
|
64083
64095
|
* Loads PARTIAL information about all updatable price feeds from MarketCompressor
|
|
64084
64096
|
* This can later be used to load price feed updates
|
|
@@ -64134,7 +64146,7 @@ var PriceFeedRegister = class extends SDKConstruct {
|
|
|
64134
64146
|
}
|
|
64135
64147
|
let maxTimestamp = 0;
|
|
64136
64148
|
if (redstonePFs.length > 0) {
|
|
64137
|
-
const redstoneUpdates = await this
|
|
64149
|
+
const redstoneUpdates = await this.redstoneUpdater.getUpdateTxs(
|
|
64138
64150
|
redstonePFs,
|
|
64139
64151
|
logContext
|
|
64140
64152
|
);
|
|
@@ -72323,6 +72335,7 @@ var GearboxSDK = class _GearboxSDK {
|
|
|
72323
72335
|
addressProvider,
|
|
72324
72336
|
blockNumber,
|
|
72325
72337
|
redstoneHistoricTimestamp,
|
|
72338
|
+
redstoneGateways,
|
|
72326
72339
|
ignoreUpdateablePrices,
|
|
72327
72340
|
marketConfigurators
|
|
72328
72341
|
} = opts;
|
|
@@ -72335,7 +72348,10 @@ var GearboxSDK = class _GearboxSDK {
|
|
|
72335
72348
|
this.#currentBlock = block.number;
|
|
72336
72349
|
this.#timestamp = block.timestamp;
|
|
72337
72350
|
if (redstoneHistoricTimestamp) {
|
|
72338
|
-
this.priceFeeds.
|
|
72351
|
+
this.priceFeeds.redstoneUpdater.historicalTimestamp = redstoneHistoricTimestamp === true ? Number(block.timestamp) * 1e3 : redstoneHistoricTimestamp;
|
|
72352
|
+
}
|
|
72353
|
+
if (redstoneGateways) {
|
|
72354
|
+
this.priceFeeds.redstoneUpdater.gateways = redstoneGateways;
|
|
72339
72355
|
}
|
|
72340
72356
|
this.logger?.info(
|
|
72341
72357
|
{
|