@gearbox-protocol/sdk 1.27.3 → 1.27.4
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/contracts/AdapterData.sol +240 -77
- package/contracts/AdapterType.sol +24 -24
- package/contracts/ContractType.sol +63 -0
- package/contracts/PriceFeedDataLive.sol +153 -110
- package/contracts/PriceFeedType.sol +2 -21
- package/contracts/SupportedContracts.sol +224 -118
- package/contracts/Tokens.sol +17 -3
- package/contracts/TokensData.sol +986 -217
- package/contracts/TokensLib.sol +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// SPDX-License-Identifier: UNLICENSED
|
|
2
2
|
// Gearbox. Generalized leverage protocol that allows to take leverage and then use it across other DeFi protocols and platforms in a composable way.
|
|
3
|
-
// (c) Gearbox
|
|
3
|
+
// (c) Gearbox Foundation, 2023
|
|
4
4
|
pragma solidity ^0.8.17;
|
|
5
5
|
|
|
6
6
|
import {Tokens} from "./Tokens.sol";
|
|
@@ -19,9 +19,9 @@ struct CurvePriceFeedData {
|
|
|
19
19
|
Contracts pool;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
struct
|
|
23
|
-
Tokens
|
|
24
|
-
Tokens
|
|
22
|
+
struct TheSamePriceFeedData {
|
|
23
|
+
Tokens token;
|
|
24
|
+
Tokens tokenHasSamePriceFeed;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
struct SingeTokenPriceFeedData {
|
|
@@ -40,17 +40,33 @@ struct BoundedPriceFeedData {
|
|
|
40
40
|
uint256 upperBound;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
struct GenericLPPriceFeedData {
|
|
44
|
+
Tokens lpToken;
|
|
45
|
+
Tokens underlying;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
struct RedStonePriceFeedData {
|
|
49
|
+
string tokenSymbol;
|
|
50
|
+
bytes32 dataFeedId;
|
|
51
|
+
address[10] signers;
|
|
52
|
+
uint8 signersThreshold;
|
|
53
|
+
}
|
|
54
|
+
|
|
43
55
|
contract PriceFeedDataLive {
|
|
44
56
|
uint16 networkId;
|
|
45
57
|
|
|
46
58
|
mapping(uint16 => ChainlinkPriceFeedData[]) chainlinkPriceFeedsByNetwork;
|
|
47
59
|
SingeTokenPriceFeedData[] zeroPriceFeeds;
|
|
48
60
|
CurvePriceFeedData[] curvePriceFeeds;
|
|
49
|
-
|
|
61
|
+
TheSamePriceFeedData[] theSamePriceFeeds;
|
|
50
62
|
SingeTokenPriceFeedData[] yearnPriceFeeds;
|
|
51
63
|
mapping(uint16 => BoundedPriceFeedData[]) boundedPriceFeedsByNetwork;
|
|
52
64
|
mapping(uint16 => CompositePriceFeedData[]) compositePriceFeedsByNetwork;
|
|
53
65
|
SingeTokenPriceFeedData wstethPriceFeed;
|
|
66
|
+
GenericLPPriceFeedData[] wrappedAaveV2PriceFeeds;
|
|
67
|
+
GenericLPPriceFeedData[] compoundV2PriceFeeds;
|
|
68
|
+
GenericLPPriceFeedData[] erc4626PriceFeeds;
|
|
69
|
+
RedStonePriceFeedData[] redStonePriceFeeds;
|
|
54
70
|
|
|
55
71
|
constructor(uint16 _networkId) {
|
|
56
72
|
networkId = _networkId;
|
|
@@ -180,111 +196,6 @@ contract PriceFeedDataLive {
|
|
|
180
196
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
181
197
|
ChainlinkPriceFeedData({token: Tokens.BAL, priceFeed: 0xBE5eA816870D11239c543F84b71439511D70B94f})
|
|
182
198
|
);
|
|
183
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.cvx3Crv, curveToken: Tokens._3Crv}));
|
|
184
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.cvxcrvFRAX, curveToken: Tokens.crvFRAX}));
|
|
185
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.cvxsteCRV, curveToken: Tokens.steCRV}));
|
|
186
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.cvxFRAX3CRV, curveToken: Tokens.FRAX3CRV}));
|
|
187
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.cvxLUSD3CRV, curveToken: Tokens.LUSD3CRV}));
|
|
188
|
-
likeCurvePriceFeeds.push(
|
|
189
|
-
CurveLikePriceFeedData({lpToken: Tokens.cvxcrvPlain3andSUSD, curveToken: Tokens.crvPlain3andSUSD})
|
|
190
|
-
);
|
|
191
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.cvxgusd3CRV, curveToken: Tokens.gusd3CRV}));
|
|
192
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.cvxOHMFRAXBP, curveToken: Tokens.OHMFRAXBP}));
|
|
193
|
-
likeCurvePriceFeeds.push(
|
|
194
|
-
CurveLikePriceFeedData({lpToken: Tokens.cvxMIM_3LP3CRV, curveToken: Tokens.MIM_3LP3CRV})
|
|
195
|
-
);
|
|
196
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.cvxcrvCRVETH, curveToken: Tokens.crvCRVETH}));
|
|
197
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.cvxcrvCVXETH, curveToken: Tokens.crvCVXETH}));
|
|
198
|
-
likeCurvePriceFeeds.push(
|
|
199
|
-
CurveLikePriceFeedData({lpToken: Tokens.cvxcrvUSDTWBTCWETH, curveToken: Tokens.crvUSDTWBTCWETH})
|
|
200
|
-
);
|
|
201
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.cvxLDOETH, curveToken: Tokens.LDOETH}));
|
|
202
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.stkcvx3Crv, curveToken: Tokens._3Crv}));
|
|
203
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.stkcvxcrvFRAX, curveToken: Tokens.crvFRAX}));
|
|
204
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.stkcvxsteCRV, curveToken: Tokens.steCRV}));
|
|
205
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.stkcvxFRAX3CRV, curveToken: Tokens.FRAX3CRV}));
|
|
206
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.stkcvxLUSD3CRV, curveToken: Tokens.LUSD3CRV}));
|
|
207
|
-
likeCurvePriceFeeds.push(
|
|
208
|
-
CurveLikePriceFeedData({lpToken: Tokens.stkcvxcrvPlain3andSUSD, curveToken: Tokens.crvPlain3andSUSD})
|
|
209
|
-
);
|
|
210
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.stkcvxgusd3CRV, curveToken: Tokens.gusd3CRV}));
|
|
211
|
-
likeCurvePriceFeeds.push(
|
|
212
|
-
CurveLikePriceFeedData({lpToken: Tokens.stkcvxOHMFRAXBP, curveToken: Tokens.OHMFRAXBP})
|
|
213
|
-
);
|
|
214
|
-
likeCurvePriceFeeds.push(
|
|
215
|
-
CurveLikePriceFeedData({lpToken: Tokens.stkcvxMIM_3LP3CRV, curveToken: Tokens.MIM_3LP3CRV})
|
|
216
|
-
);
|
|
217
|
-
likeCurvePriceFeeds.push(
|
|
218
|
-
CurveLikePriceFeedData({lpToken: Tokens.stkcvxcrvCRVETH, curveToken: Tokens.crvCRVETH})
|
|
219
|
-
);
|
|
220
|
-
likeCurvePriceFeeds.push(
|
|
221
|
-
CurveLikePriceFeedData({lpToken: Tokens.stkcvxcrvCVXETH, curveToken: Tokens.crvCVXETH})
|
|
222
|
-
);
|
|
223
|
-
likeCurvePriceFeeds.push(
|
|
224
|
-
CurveLikePriceFeedData({lpToken: Tokens.stkcvxcrvUSDTWBTCWETH, curveToken: Tokens.crvUSDTWBTCWETH})
|
|
225
|
-
);
|
|
226
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.stkcvxLDOETH, curveToken: Tokens.LDOETH}));
|
|
227
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.aDAI, curveToken: Tokens.DAI}));
|
|
228
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.aUSDC, curveToken: Tokens.USDC}));
|
|
229
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.aUSDT, curveToken: Tokens.USDT}));
|
|
230
|
-
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.aWETH, curveToken: Tokens.WETH}));
|
|
231
|
-
compositePriceFeedsByNetwork[1].push(
|
|
232
|
-
CompositePriceFeedData({
|
|
233
|
-
token: Tokens.WBTC,
|
|
234
|
-
targetToBaseFeed: 0xfdFD9C85aD200c506Cf9e21F1FD8dd01932FBB23,
|
|
235
|
-
baseToUSDFeed: 0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c
|
|
236
|
-
})
|
|
237
|
-
);
|
|
238
|
-
compositePriceFeedsByNetwork[1].push(
|
|
239
|
-
CompositePriceFeedData({
|
|
240
|
-
token: Tokens.STETH,
|
|
241
|
-
targetToBaseFeed: 0x86392dC19c0b719886221c78AB11eb8Cf5c52812,
|
|
242
|
-
baseToUSDFeed: 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419
|
|
243
|
-
})
|
|
244
|
-
);
|
|
245
|
-
compositePriceFeedsByNetwork[1].push(
|
|
246
|
-
CompositePriceFeedData({
|
|
247
|
-
token: Tokens.LDO,
|
|
248
|
-
targetToBaseFeed: 0x4e844125952D32AcdF339BE976c98E22F6F318dB,
|
|
249
|
-
baseToUSDFeed: 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419
|
|
250
|
-
})
|
|
251
|
-
);
|
|
252
|
-
compositePriceFeedsByNetwork[1].push(
|
|
253
|
-
CompositePriceFeedData({
|
|
254
|
-
token: Tokens.OHM,
|
|
255
|
-
targetToBaseFeed: 0x9a72298ae3886221820B1c878d12D872087D3a23,
|
|
256
|
-
baseToUSDFeed: 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419
|
|
257
|
-
})
|
|
258
|
-
);
|
|
259
|
-
compositePriceFeedsByNetwork[42161].push(
|
|
260
|
-
CompositePriceFeedData({
|
|
261
|
-
token: Tokens.WBTC,
|
|
262
|
-
targetToBaseFeed: 0x0017abAc5b6f291F9164e35B1234CA1D697f9CF4,
|
|
263
|
-
baseToUSDFeed: 0x6ce185860a4963106506C203335A2910413708e9
|
|
264
|
-
})
|
|
265
|
-
);
|
|
266
|
-
compositePriceFeedsByNetwork[42161].push(
|
|
267
|
-
CompositePriceFeedData({
|
|
268
|
-
token: Tokens.STETH,
|
|
269
|
-
targetToBaseFeed: 0xded2c52b75B24732e9107377B7Ba93eC1fFa4BAf,
|
|
270
|
-
baseToUSDFeed: 0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612
|
|
271
|
-
})
|
|
272
|
-
);
|
|
273
|
-
boundedPriceFeedsByNetwork[1].push(
|
|
274
|
-
BoundedPriceFeedData({
|
|
275
|
-
token: Tokens.LUSD,
|
|
276
|
-
priceFeed: 0x3D7aE7E594f2f2091Ad8798313450130d0Aba3a0,
|
|
277
|
-
upperBound: 110000000
|
|
278
|
-
})
|
|
279
|
-
);
|
|
280
|
-
boundedPriceFeedsByNetwork[42161].push(
|
|
281
|
-
BoundedPriceFeedData({
|
|
282
|
-
token: Tokens.LUSD,
|
|
283
|
-
priceFeed: 0x0411D28c94d85A36bC72Cb0f875dfA8371D8fFfF,
|
|
284
|
-
upperBound: 110000000
|
|
285
|
-
})
|
|
286
|
-
);
|
|
287
|
-
|
|
288
199
|
zeroPriceFeeds.push(SingeTokenPriceFeedData({token: Tokens.LQTY}));
|
|
289
200
|
curvePriceFeeds.push(
|
|
290
201
|
CurvePriceFeedData({
|
|
@@ -342,6 +253,130 @@ contract PriceFeedDataLive {
|
|
|
342
253
|
pool: Contracts.CURVE_MIM_POOL
|
|
343
254
|
})
|
|
344
255
|
);
|
|
256
|
+
theSamePriceFeeds.push(TheSamePriceFeedData({token: Tokens.cvx3Crv, tokenHasSamePriceFeed: Tokens._3Crv}));
|
|
257
|
+
theSamePriceFeeds.push(TheSamePriceFeedData({token: Tokens.cvxcrvFRAX, tokenHasSamePriceFeed: Tokens.crvFRAX}));
|
|
258
|
+
theSamePriceFeeds.push(TheSamePriceFeedData({token: Tokens.cvxsteCRV, tokenHasSamePriceFeed: Tokens.steCRV}));
|
|
259
|
+
theSamePriceFeeds.push(
|
|
260
|
+
TheSamePriceFeedData({token: Tokens.cvxFRAX3CRV, tokenHasSamePriceFeed: Tokens.FRAX3CRV})
|
|
261
|
+
);
|
|
262
|
+
theSamePriceFeeds.push(
|
|
263
|
+
TheSamePriceFeedData({token: Tokens.cvxLUSD3CRV, tokenHasSamePriceFeed: Tokens.LUSD3CRV})
|
|
264
|
+
);
|
|
265
|
+
theSamePriceFeeds.push(
|
|
266
|
+
TheSamePriceFeedData({token: Tokens.cvxcrvPlain3andSUSD, tokenHasSamePriceFeed: Tokens.crvPlain3andSUSD})
|
|
267
|
+
);
|
|
268
|
+
theSamePriceFeeds.push(
|
|
269
|
+
TheSamePriceFeedData({token: Tokens.cvxgusd3CRV, tokenHasSamePriceFeed: Tokens.gusd3CRV})
|
|
270
|
+
);
|
|
271
|
+
theSamePriceFeeds.push(
|
|
272
|
+
TheSamePriceFeedData({token: Tokens.cvxOHMFRAXBP, tokenHasSamePriceFeed: Tokens.OHMFRAXBP})
|
|
273
|
+
);
|
|
274
|
+
theSamePriceFeeds.push(
|
|
275
|
+
TheSamePriceFeedData({token: Tokens.cvxMIM_3LP3CRV, tokenHasSamePriceFeed: Tokens.MIM_3LP3CRV})
|
|
276
|
+
);
|
|
277
|
+
theSamePriceFeeds.push(
|
|
278
|
+
TheSamePriceFeedData({token: Tokens.cvxcrvCRVETH, tokenHasSamePriceFeed: Tokens.crvCRVETH})
|
|
279
|
+
);
|
|
280
|
+
theSamePriceFeeds.push(
|
|
281
|
+
TheSamePriceFeedData({token: Tokens.cvxcrvCVXETH, tokenHasSamePriceFeed: Tokens.crvCVXETH})
|
|
282
|
+
);
|
|
283
|
+
theSamePriceFeeds.push(
|
|
284
|
+
TheSamePriceFeedData({token: Tokens.cvxcrvUSDTWBTCWETH, tokenHasSamePriceFeed: Tokens.crvUSDTWBTCWETH})
|
|
285
|
+
);
|
|
286
|
+
theSamePriceFeeds.push(TheSamePriceFeedData({token: Tokens.cvxLDOETH, tokenHasSamePriceFeed: Tokens.LDOETH}));
|
|
287
|
+
theSamePriceFeeds.push(TheSamePriceFeedData({token: Tokens.stkcvx3Crv, tokenHasSamePriceFeed: Tokens._3Crv}));
|
|
288
|
+
theSamePriceFeeds.push(
|
|
289
|
+
TheSamePriceFeedData({token: Tokens.stkcvxcrvFRAX, tokenHasSamePriceFeed: Tokens.crvFRAX})
|
|
290
|
+
);
|
|
291
|
+
theSamePriceFeeds.push(TheSamePriceFeedData({token: Tokens.stkcvxsteCRV, tokenHasSamePriceFeed: Tokens.steCRV}));
|
|
292
|
+
theSamePriceFeeds.push(
|
|
293
|
+
TheSamePriceFeedData({token: Tokens.stkcvxFRAX3CRV, tokenHasSamePriceFeed: Tokens.FRAX3CRV})
|
|
294
|
+
);
|
|
295
|
+
theSamePriceFeeds.push(
|
|
296
|
+
TheSamePriceFeedData({token: Tokens.stkcvxLUSD3CRV, tokenHasSamePriceFeed: Tokens.LUSD3CRV})
|
|
297
|
+
);
|
|
298
|
+
theSamePriceFeeds.push(
|
|
299
|
+
TheSamePriceFeedData({token: Tokens.stkcvxcrvPlain3andSUSD, tokenHasSamePriceFeed: Tokens.crvPlain3andSUSD})
|
|
300
|
+
);
|
|
301
|
+
theSamePriceFeeds.push(
|
|
302
|
+
TheSamePriceFeedData({token: Tokens.stkcvxgusd3CRV, tokenHasSamePriceFeed: Tokens.gusd3CRV})
|
|
303
|
+
);
|
|
304
|
+
theSamePriceFeeds.push(
|
|
305
|
+
TheSamePriceFeedData({token: Tokens.stkcvxOHMFRAXBP, tokenHasSamePriceFeed: Tokens.OHMFRAXBP})
|
|
306
|
+
);
|
|
307
|
+
theSamePriceFeeds.push(
|
|
308
|
+
TheSamePriceFeedData({token: Tokens.stkcvxMIM_3LP3CRV, tokenHasSamePriceFeed: Tokens.MIM_3LP3CRV})
|
|
309
|
+
);
|
|
310
|
+
theSamePriceFeeds.push(
|
|
311
|
+
TheSamePriceFeedData({token: Tokens.stkcvxcrvCRVETH, tokenHasSamePriceFeed: Tokens.crvCRVETH})
|
|
312
|
+
);
|
|
313
|
+
theSamePriceFeeds.push(
|
|
314
|
+
TheSamePriceFeedData({token: Tokens.stkcvxcrvCVXETH, tokenHasSamePriceFeed: Tokens.crvCVXETH})
|
|
315
|
+
);
|
|
316
|
+
theSamePriceFeeds.push(
|
|
317
|
+
TheSamePriceFeedData({token: Tokens.stkcvxcrvUSDTWBTCWETH, tokenHasSamePriceFeed: Tokens.crvUSDTWBTCWETH})
|
|
318
|
+
);
|
|
319
|
+
theSamePriceFeeds.push(TheSamePriceFeedData({token: Tokens.stkcvxLDOETH, tokenHasSamePriceFeed: Tokens.LDOETH}));
|
|
320
|
+
theSamePriceFeeds.push(TheSamePriceFeedData({token: Tokens.aDAI, tokenHasSamePriceFeed: Tokens.DAI}));
|
|
321
|
+
theSamePriceFeeds.push(TheSamePriceFeedData({token: Tokens.aUSDC, tokenHasSamePriceFeed: Tokens.USDC}));
|
|
322
|
+
theSamePriceFeeds.push(TheSamePriceFeedData({token: Tokens.aUSDT, tokenHasSamePriceFeed: Tokens.USDT}));
|
|
323
|
+
theSamePriceFeeds.push(TheSamePriceFeedData({token: Tokens.aWETH, tokenHasSamePriceFeed: Tokens.WETH}));
|
|
324
|
+
boundedPriceFeedsByNetwork[1].push(
|
|
325
|
+
BoundedPriceFeedData({
|
|
326
|
+
token: Tokens.LUSD,
|
|
327
|
+
priceFeed: 0x3D7aE7E594f2f2091Ad8798313450130d0Aba3a0,
|
|
328
|
+
upperBound: 110000000
|
|
329
|
+
})
|
|
330
|
+
);
|
|
331
|
+
boundedPriceFeedsByNetwork[42161].push(
|
|
332
|
+
BoundedPriceFeedData({
|
|
333
|
+
token: Tokens.LUSD,
|
|
334
|
+
priceFeed: 0x0411D28c94d85A36bC72Cb0f875dfA8371D8fFfF,
|
|
335
|
+
upperBound: 110000000
|
|
336
|
+
})
|
|
337
|
+
);
|
|
338
|
+
compositePriceFeedsByNetwork[1].push(
|
|
339
|
+
CompositePriceFeedData({
|
|
340
|
+
token: Tokens.WBTC,
|
|
341
|
+
targetToBaseFeed: 0xfdFD9C85aD200c506Cf9e21F1FD8dd01932FBB23,
|
|
342
|
+
baseToUSDFeed: 0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c
|
|
343
|
+
})
|
|
344
|
+
);
|
|
345
|
+
compositePriceFeedsByNetwork[1].push(
|
|
346
|
+
CompositePriceFeedData({
|
|
347
|
+
token: Tokens.STETH,
|
|
348
|
+
targetToBaseFeed: 0x86392dC19c0b719886221c78AB11eb8Cf5c52812,
|
|
349
|
+
baseToUSDFeed: 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419
|
|
350
|
+
})
|
|
351
|
+
);
|
|
352
|
+
compositePriceFeedsByNetwork[1].push(
|
|
353
|
+
CompositePriceFeedData({
|
|
354
|
+
token: Tokens.LDO,
|
|
355
|
+
targetToBaseFeed: 0x4e844125952D32AcdF339BE976c98E22F6F318dB,
|
|
356
|
+
baseToUSDFeed: 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419
|
|
357
|
+
})
|
|
358
|
+
);
|
|
359
|
+
compositePriceFeedsByNetwork[1].push(
|
|
360
|
+
CompositePriceFeedData({
|
|
361
|
+
token: Tokens.OHM,
|
|
362
|
+
targetToBaseFeed: 0x9a72298ae3886221820B1c878d12D872087D3a23,
|
|
363
|
+
baseToUSDFeed: 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419
|
|
364
|
+
})
|
|
365
|
+
);
|
|
366
|
+
compositePriceFeedsByNetwork[42161].push(
|
|
367
|
+
CompositePriceFeedData({
|
|
368
|
+
token: Tokens.WBTC,
|
|
369
|
+
targetToBaseFeed: 0x0017abAc5b6f291F9164e35B1234CA1D697f9CF4,
|
|
370
|
+
baseToUSDFeed: 0x6ce185860a4963106506C203335A2910413708e9
|
|
371
|
+
})
|
|
372
|
+
);
|
|
373
|
+
compositePriceFeedsByNetwork[42161].push(
|
|
374
|
+
CompositePriceFeedData({
|
|
375
|
+
token: Tokens.STETH,
|
|
376
|
+
targetToBaseFeed: 0xded2c52b75B24732e9107377B7Ba93eC1fFa4BAf,
|
|
377
|
+
baseToUSDFeed: 0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612
|
|
378
|
+
})
|
|
379
|
+
);
|
|
345
380
|
yearnPriceFeeds.push(SingeTokenPriceFeedData({token: Tokens.yvDAI}));
|
|
346
381
|
yearnPriceFeeds.push(SingeTokenPriceFeedData({token: Tokens.yvUSDC}));
|
|
347
382
|
yearnPriceFeeds.push(SingeTokenPriceFeedData({token: Tokens.yvWETH}));
|
|
@@ -349,6 +384,14 @@ contract PriceFeedDataLive {
|
|
|
349
384
|
yearnPriceFeeds.push(SingeTokenPriceFeedData({token: Tokens.yvCurve_stETH}));
|
|
350
385
|
yearnPriceFeeds.push(SingeTokenPriceFeedData({token: Tokens.yvCurve_FRAX}));
|
|
351
386
|
wstethPriceFeed = SingeTokenPriceFeedData({token: Tokens.wstETH});
|
|
387
|
+
wrappedAaveV2PriceFeeds.push(GenericLPPriceFeedData({lpToken: Tokens.waDAI, underlying: Tokens.aDAI}));
|
|
388
|
+
wrappedAaveV2PriceFeeds.push(GenericLPPriceFeedData({lpToken: Tokens.waUSDC, underlying: Tokens.aUSDC}));
|
|
389
|
+
wrappedAaveV2PriceFeeds.push(GenericLPPriceFeedData({lpToken: Tokens.waUSDT, underlying: Tokens.aUSDT}));
|
|
390
|
+
wrappedAaveV2PriceFeeds.push(GenericLPPriceFeedData({lpToken: Tokens.waWETH, underlying: Tokens.aWETH}));
|
|
391
|
+
compoundV2PriceFeeds.push(GenericLPPriceFeedData({lpToken: Tokens.cDAI, underlying: Tokens.DAI}));
|
|
392
|
+
compoundV2PriceFeeds.push(GenericLPPriceFeedData({lpToken: Tokens.cUSDC, underlying: Tokens.USDC}));
|
|
393
|
+
compoundV2PriceFeeds.push(GenericLPPriceFeedData({lpToken: Tokens.cUSDT, underlying: Tokens.USDT}));
|
|
394
|
+
compoundV2PriceFeeds.push(GenericLPPriceFeedData({lpToken: Tokens.cWETH, underlying: Tokens.WETH}));
|
|
352
395
|
}
|
|
353
396
|
|
|
354
397
|
function chainlinkPriceFeeds(uint256 index) external view returns (ChainlinkPriceFeedData memory) {
|
|
@@ -1,25 +1,6 @@
|
|
|
1
1
|
// SPDX-License-Identifier: UNLICENSED
|
|
2
2
|
// Gearbox. Generalized leverage protocol that allows to take leverage and then use it across other DeFi protocols and platforms in a composable way.
|
|
3
|
-
// (c) Gearbox
|
|
3
|
+
// (c) Gearbox Foundation, 2023
|
|
4
4
|
pragma solidity ^0.8.17;
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
CHAINLINK_ORACLE,
|
|
8
|
-
YEARN_ORACLE,
|
|
9
|
-
CURVE_2LP_ORACLE,
|
|
10
|
-
CURVE_3LP_ORACLE,
|
|
11
|
-
CURVE_4LP_ORACLE,
|
|
12
|
-
ZERO_ORACLE,
|
|
13
|
-
WSTETH_ORACLE,
|
|
14
|
-
BOUNDED_ORACLE,
|
|
15
|
-
COMPOSITE_ORACLE,
|
|
16
|
-
WRAPPED_AAVE_V2_ORACLE,
|
|
17
|
-
COMPOUND_V2_ORACLE,
|
|
18
|
-
BALANCER_STABLE_LP_ORACLE,
|
|
19
|
-
BALANCER_WEIGHTED_LP_ORACLE,
|
|
20
|
-
CURVE_CRYPTO_ORACLE,
|
|
21
|
-
THE_SAME_AS,
|
|
22
|
-
REDSTONE_ORACLE,
|
|
23
|
-
ERC4626_VAULT_ORACLE,
|
|
24
|
-
NETWORK_DIFFERENT
|
|
25
|
-
}
|
|
6
|
+
// $ENUM_PRICEFEEDTYPE$
|