@gearbox-protocol/sdk 1.24.2 → 1.25.0
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 +1 -1
- package/contracts/AdapterType.sol +3 -2
- package/contracts/PriceFeedDataLive.sol +20 -26
- package/contracts/PriceFeedType.sol +24 -0
- package/contracts/SupportedContracts.sol +5 -2
- package/contracts/Tokens.sol +1 -1
- package/contracts/TokensData.sol +1 -1
- package/contracts/TokensLib.sol +1 -1
- package/lib/contracts/adapters.d.ts +2 -1
- package/lib/contracts/adapters.js +1 -0
- package/lib/contracts/contracts.js +5 -5
- package/lib/oracles/oracles.d.ts +24 -22
- package/lib/oracles/oracles.js +11 -8
- package/lib/oracles/priceFeeds.d.ts +2 -2
- package/lib/oracles/priceFeeds.js +236 -557
- package/lib/tokens/token.js +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 Holdings,
|
|
3
|
+
// (c) Gearbox Holdings, 2023
|
|
4
4
|
pragma solidity ^0.8.17;
|
|
5
5
|
|
|
6
6
|
import {Tokens} from "./Tokens.sol";
|
|
@@ -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 Holdings,
|
|
3
|
+
// (c) Gearbox Holdings, 2023
|
|
4
4
|
pragma solidity ^0.8.17;
|
|
5
5
|
|
|
6
6
|
enum AdapterType {
|
|
@@ -24,5 +24,6 @@ enum AdapterType {
|
|
|
24
24
|
AAVE_V2_LENDING_POOL,
|
|
25
25
|
AAVE_V2_WRAPPED_ATOKEN,
|
|
26
26
|
COMPOUND_V2_CERC20,
|
|
27
|
-
COMPOUND_V2_CETHER
|
|
27
|
+
COMPOUND_V2_CETHER,
|
|
28
|
+
ERC4626_VAULT
|
|
28
29
|
}
|
|
@@ -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 Holdings,
|
|
3
|
+
// (c) Gearbox Holdings, 2023
|
|
4
4
|
pragma solidity ^0.8.17;
|
|
5
5
|
|
|
6
6
|
import {Tokens} from "./Tokens.sol";
|
|
@@ -118,67 +118,61 @@ contract PriceFeedDataLive {
|
|
|
118
118
|
ChainlinkPriceFeedData({token: Tokens.SPELL, priceFeed: 0x8c110B94C5f1d347fAcF5E1E938AB2db60E3c9a8})
|
|
119
119
|
);
|
|
120
120
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
121
|
-
ChainlinkPriceFeedData({token: Tokens._1INCH, priceFeed:
|
|
121
|
+
ChainlinkPriceFeedData({token: Tokens._1INCH, priceFeed: 0x4813419C6783c36d10F97f08552310bf483fBD97})
|
|
122
122
|
);
|
|
123
123
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
124
|
-
ChainlinkPriceFeedData({token: Tokens.AAVE, priceFeed:
|
|
124
|
+
ChainlinkPriceFeedData({token: Tokens.AAVE, priceFeed: 0xEB24b7c2fB6497f28c937942439B4EAAE9535525})
|
|
125
125
|
);
|
|
126
126
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
127
|
-
ChainlinkPriceFeedData({token: Tokens.COMP, priceFeed:
|
|
127
|
+
ChainlinkPriceFeedData({token: Tokens.COMP, priceFeed: 0xd31C7E8aa6871Fb09D5E01f17C54895F8237fB60})
|
|
128
128
|
);
|
|
129
129
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
130
|
-
ChainlinkPriceFeedData({token: Tokens.CRV, priceFeed:
|
|
130
|
+
ChainlinkPriceFeedData({token: Tokens.CRV, priceFeed: 0x7f93084ECf52D4361A3E3E25F9Dafe005830C98C})
|
|
131
131
|
);
|
|
132
132
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
133
|
-
ChainlinkPriceFeedData({token: Tokens.DAI, priceFeed:
|
|
133
|
+
ChainlinkPriceFeedData({token: Tokens.DAI, priceFeed: 0x1d34dd6780cC0B78aAfc8bC168e99ABEA147E85d})
|
|
134
134
|
);
|
|
135
135
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
136
|
-
ChainlinkPriceFeedData({token: Tokens.DPI, priceFeed:
|
|
136
|
+
ChainlinkPriceFeedData({token: Tokens.DPI, priceFeed: 0xEA89a0168b9940b825B28CbF172B12c486a0FDf7})
|
|
137
137
|
);
|
|
138
138
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
139
|
-
ChainlinkPriceFeedData({token: Tokens.FEI, priceFeed:
|
|
139
|
+
ChainlinkPriceFeedData({token: Tokens.FEI, priceFeed: 0xAF884aF60E28214233039c243F5DF98a52355CFB})
|
|
140
140
|
);
|
|
141
141
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
142
|
-
ChainlinkPriceFeedData({token: Tokens.GUSD, priceFeed:
|
|
142
|
+
ChainlinkPriceFeedData({token: Tokens.GUSD, priceFeed: 0x2C799CE9f858c9Fe0825D87ddd68F4dB46A485BE})
|
|
143
143
|
);
|
|
144
144
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
145
|
-
ChainlinkPriceFeedData({token: Tokens.LINK, priceFeed:
|
|
145
|
+
ChainlinkPriceFeedData({token: Tokens.LINK, priceFeed: 0xa6fD8da40eCC3fd22cA8c13eF90B95cDf1346bEC})
|
|
146
146
|
);
|
|
147
147
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
148
|
-
ChainlinkPriceFeedData({token: Tokens.SNX, priceFeed:
|
|
148
|
+
ChainlinkPriceFeedData({token: Tokens.SNX, priceFeed: 0xe19591bD0a702D0E46407a512885d2ce81fc63C8})
|
|
149
149
|
);
|
|
150
150
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
151
|
-
ChainlinkPriceFeedData({token: Tokens.UNI, priceFeed:
|
|
151
|
+
ChainlinkPriceFeedData({token: Tokens.UNI, priceFeed: 0x9d5A93659c281dEBc71ADB719f19999BfdCD4177})
|
|
152
152
|
);
|
|
153
153
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
154
|
-
ChainlinkPriceFeedData({token: Tokens.USDC, priceFeed:
|
|
154
|
+
ChainlinkPriceFeedData({token: Tokens.USDC, priceFeed: 0xC24EC8bD3441da32f06BfEd3A4778133ad48a665})
|
|
155
155
|
);
|
|
156
156
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
157
|
-
ChainlinkPriceFeedData({token: Tokens.USDT, priceFeed:
|
|
157
|
+
ChainlinkPriceFeedData({token: Tokens.USDT, priceFeed: 0x45a963a68848a850262Cb5aa1F5Be7dC4a6f0Abd})
|
|
158
158
|
);
|
|
159
159
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
160
|
-
ChainlinkPriceFeedData({token: Tokens.WETH, priceFeed:
|
|
161
|
-
);
|
|
162
|
-
chainlinkPriceFeedsByNetwork[42161].push(
|
|
163
|
-
ChainlinkPriceFeedData({token: Tokens.YFI, priceFeed: 0xA027702dbb89fbd58938e4324ac03B58d812b0E1})
|
|
164
|
-
);
|
|
165
|
-
chainlinkPriceFeedsByNetwork[42161].push(
|
|
166
|
-
ChainlinkPriceFeedData({token: Tokens.CVX, priceFeed: 0xd962fC30A72A84cE50161031391756Bf2876Af5D})
|
|
160
|
+
ChainlinkPriceFeedData({token: Tokens.WETH, priceFeed: 0x491741d9F426130d1bC27Aee82f8b4Bd4E6E5f5D})
|
|
167
161
|
);
|
|
168
162
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
169
|
-
ChainlinkPriceFeedData({token: Tokens.
|
|
163
|
+
ChainlinkPriceFeedData({token: Tokens.YFI, priceFeed: 0x2d764833c4985A90Beb7DB43d4FFAD5Bb9675B9e})
|
|
170
164
|
);
|
|
171
165
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
172
|
-
ChainlinkPriceFeedData({token: Tokens.
|
|
166
|
+
ChainlinkPriceFeedData({token: Tokens.CVX, priceFeed: 0xF958760fd9c0E019e355f31c3D69f0E5239597D0})
|
|
173
167
|
);
|
|
174
168
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
175
|
-
ChainlinkPriceFeedData({token: Tokens.
|
|
169
|
+
ChainlinkPriceFeedData({token: Tokens.FRAX, priceFeed: 0xC095CEa800dBAdcCc742124b68399Ac6ADF5d8eC})
|
|
176
170
|
);
|
|
177
171
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
178
|
-
ChainlinkPriceFeedData({token: Tokens.
|
|
172
|
+
ChainlinkPriceFeedData({token: Tokens.sUSD, priceFeed: 0x725F188BF87DaF7A7c3de39276ad78a2b8559793})
|
|
179
173
|
);
|
|
180
174
|
chainlinkPriceFeedsByNetwork[42161].push(
|
|
181
|
-
ChainlinkPriceFeedData({token: Tokens.
|
|
175
|
+
ChainlinkPriceFeedData({token: Tokens.FXS, priceFeed: 0x2E49F1FbBdA0000E89376D3332A1d42dBeF3D205})
|
|
182
176
|
);
|
|
183
177
|
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.cvx3Crv, curveToken: Tokens._3Crv}));
|
|
184
178
|
likeCurvePriceFeeds.push(CurveLikePriceFeedData({lpToken: Tokens.cvxcrvFRAX, curveToken: Tokens.crvFRAX}));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// SPDX-License-Identifier: UNLICENSED
|
|
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 Holdings, 2023
|
|
4
|
+
pragma solidity ^0.8.17;
|
|
5
|
+
|
|
6
|
+
enum PriceFeedType {
|
|
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
|
+
AAVE_ORACLE,
|
|
17
|
+
COMPOUND_ORACLE,
|
|
18
|
+
BALANCER_STABLE_LP_ORACLE,
|
|
19
|
+
BALANCER_WEIGHTED_LP_ORACLE,
|
|
20
|
+
CURVE_CRYPTO_ORACLE,
|
|
21
|
+
LIKE_CURVE_LP_TOKEN_ORACLE,
|
|
22
|
+
REDSTONE_ORACLE,
|
|
23
|
+
ERC4626_VAULT_ORACLE
|
|
24
|
+
}
|
|
@@ -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 Holdings,
|
|
3
|
+
// (c) Gearbox Holdings, 2023
|
|
4
4
|
pragma solidity ^0.8.17;
|
|
5
5
|
|
|
6
6
|
import {Test} from "forge-std/Test.sol";
|
|
@@ -75,7 +75,10 @@ contract SupportedContracts is Test, ISupportedContracts {
|
|
|
75
75
|
|
|
76
76
|
uint256 public override contractCount;
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
uint16 immutable networkId;
|
|
79
|
+
|
|
80
|
+
constructor(uint16 _networkId) {
|
|
81
|
+
networkId = _networkId;
|
|
79
82
|
ContractData[] memory cd;
|
|
80
83
|
cd = new ContractData[](43);
|
|
81
84
|
cd[0] = ContractData({
|
package/contracts/Tokens.sol
CHANGED
|
@@ -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 Holdings,
|
|
3
|
+
// (c) Gearbox Holdings, 2023
|
|
4
4
|
pragma solidity ^0.8.17;
|
|
5
5
|
|
|
6
6
|
/// @dev c-Tokens and LUNA are added for unit test purposes
|
package/contracts/TokensData.sol
CHANGED
|
@@ -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 Holdings,
|
|
3
|
+
// (c) Gearbox Holdings, 2023
|
|
4
4
|
pragma solidity ^0.8.17;
|
|
5
5
|
|
|
6
6
|
import {Tokens} from "./Tokens.sol";
|
package/contracts/TokensLib.sol
CHANGED
|
@@ -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 Holdings,
|
|
3
|
+
// (c) Gearbox Holdings, 2023
|
|
4
4
|
pragma solidity ^0.8.17;
|
|
5
5
|
|
|
6
6
|
import {Tokens} from "./Tokens.sol";
|
|
@@ -24,4 +24,5 @@ var AdapterInterface;
|
|
|
24
24
|
AdapterInterface[AdapterInterface["AAVE_V2_WRAPPED_ATOKEN"] = 18] = "AAVE_V2_WRAPPED_ATOKEN";
|
|
25
25
|
AdapterInterface[AdapterInterface["COMPOUND_V2_CERC20"] = 19] = "COMPOUND_V2_CERC20";
|
|
26
26
|
AdapterInterface[AdapterInterface["COMPOUND_V2_CETHER"] = 20] = "COMPOUND_V2_CETHER";
|
|
27
|
+
AdapterInterface[AdapterInterface["ERC4626_VAULT"] = 21] = "ERC4626_VAULT";
|
|
27
28
|
})(AdapterInterface = exports.AdapterInterface || (exports.AdapterInterface = {}));
|
|
@@ -23,10 +23,10 @@ exports.contractsByNetwork = {
|
|
|
23
23
|
CURVE_MIM_POOL: token_1.tokenDataByNetwork.Mainnet.MIM_3LP3CRV,
|
|
24
24
|
CURVE_OHMFRAXBP_POOL: "0xFc1e8bf3E81383Ef07Be24c3FD146745719DE48D",
|
|
25
25
|
CURVE_CRVETH_POOL: "0x8301AE4fc9c624d1D396cbDAa1ed877821D7C511",
|
|
26
|
-
CURVE_CVXETH_POOL: "
|
|
26
|
+
CURVE_CVXETH_POOL: "0xB576491F1E6e5E62f1d8F26062Ee822B40B0E0d4",
|
|
27
27
|
CURVE_3CRYPTO_POOL: token_1.tokenDataByNetwork.Mainnet.crvUSDTWBTCWETH,
|
|
28
|
-
CURVE_LDOETH_POOL: "
|
|
29
|
-
CURVE_GEAR_POOL: "
|
|
28
|
+
CURVE_LDOETH_POOL: "0x9409280DC1e6D33AB7A8C6EC03e5763FB61772B5",
|
|
29
|
+
CURVE_GEAR_POOL: "0x0E9B5B092caD6F1c5E6bc7f89Ffe1abb5c95F1C2",
|
|
30
30
|
// YEARN
|
|
31
31
|
YEARN_DAI_VAULT: token_1.tokenDataByNetwork.Mainnet.yvDAI,
|
|
32
32
|
YEARN_USDC_VAULT: token_1.tokenDataByNetwork.Mainnet.yvUSDC,
|
|
@@ -54,7 +54,7 @@ exports.contractsByNetwork = {
|
|
|
54
54
|
LIDO_STETH_GATEWAY: "0x6f4b4aB5142787c05b7aB9A9692A0f46b997C29D",
|
|
55
55
|
LIDO_WSTETH: token_1.tokenDataByNetwork.Mainnet.wstETH,
|
|
56
56
|
// BALANCER
|
|
57
|
-
BALANCER_VAULT: "
|
|
57
|
+
BALANCER_VAULT: "0xBA12222222228d8Ba445958a75a0704d566BF2C8",
|
|
58
58
|
// GEARBOX
|
|
59
59
|
UNIVERSAL_ADAPTER: "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC",
|
|
60
60
|
},
|
|
@@ -167,7 +167,7 @@ exports.contractParams = {
|
|
|
167
167
|
protocol: protocols_1.Protocols.Curve,
|
|
168
168
|
type: adapters_1.AdapterInterface.CURVE_V1_2ASSETS,
|
|
169
169
|
pool: {
|
|
170
|
-
Mainnet: "
|
|
170
|
+
Mainnet: "0x0E9B5B092caD6F1c5E6bc7f89Ffe1abb5c95F1C2",
|
|
171
171
|
Arbitrum: constants_1.NOT_DEPLOYED,
|
|
172
172
|
},
|
|
173
173
|
tokens: ["GEAR", "WETH"],
|
package/lib/oracles/oracles.d.ts
CHANGED
|
@@ -6,44 +6,47 @@ export interface PriceFeed {
|
|
|
6
6
|
}
|
|
7
7
|
export declare enum OracleType {
|
|
8
8
|
CHAINLINK_ORACLE = 0,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
YEARN_ORACLE = 1,
|
|
10
|
+
CURVE_2LP_ORACLE = 2,
|
|
11
|
+
CURVE_3LP_ORACLE = 3,
|
|
12
|
+
CURVE_4LP_ORACLE = 4,
|
|
13
|
+
ZERO_ORACLE = 5,
|
|
14
14
|
WSTETH_ORACLE = 6,
|
|
15
15
|
BOUNDED_ORACLE = 7,
|
|
16
16
|
COMPOSITE_ORACLE = 8,
|
|
17
17
|
AAVE_ORACLE = 9,
|
|
18
18
|
COMPOUND_ORACLE = 10,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
BALANCER_STABLE_LP_ORACLE = 11,
|
|
20
|
+
BALANCER_WEIGHTED_LP_ORACLE = 12,
|
|
21
|
+
CURVE_CRYPTO_ORACLE = 13,
|
|
22
|
+
LIKE_CURVE_LP_TOKEN_ORACLE = 14,
|
|
23
|
+
REDSTONE_ORACLE = 15,
|
|
24
|
+
ERC4626_VAULT_ORACLE = 16
|
|
22
25
|
}
|
|
23
26
|
export type PriceFeedData = {
|
|
24
27
|
type: OracleType.CHAINLINK_ORACLE;
|
|
25
28
|
address: Record<NetworkType, string>;
|
|
26
29
|
} | {
|
|
27
|
-
type: OracleType.
|
|
30
|
+
type: OracleType.YEARN_ORACLE;
|
|
28
31
|
token: SupportedToken;
|
|
29
32
|
} | {
|
|
30
|
-
type: OracleType.
|
|
33
|
+
type: OracleType.CURVE_2LP_ORACLE;
|
|
31
34
|
assets: Array<SupportedToken>;
|
|
32
35
|
} | {
|
|
33
|
-
type: OracleType.
|
|
34
|
-
|
|
35
|
-
} | {
|
|
36
|
-
type: OracleType.ZERO_ORACLE;
|
|
36
|
+
type: OracleType.CURVE_3LP_ORACLE;
|
|
37
|
+
assets: Array<SupportedToken>;
|
|
37
38
|
} | {
|
|
38
|
-
type: OracleType.
|
|
39
|
-
|
|
39
|
+
type: OracleType.CURVE_4LP_ORACLE;
|
|
40
|
+
assets: Array<SupportedToken>;
|
|
40
41
|
} | {
|
|
41
|
-
type: OracleType.
|
|
42
|
-
token: SupportedToken;
|
|
42
|
+
type: OracleType.ZERO_ORACLE;
|
|
43
43
|
} | {
|
|
44
44
|
type: OracleType.BOUNDED_ORACLE;
|
|
45
45
|
targetPriceFeed: Record<NetworkType, string>;
|
|
46
46
|
upperBound: bigint;
|
|
47
|
+
} | {
|
|
48
|
+
type: OracleType.WSTETH_ORACLE;
|
|
49
|
+
token: SupportedToken;
|
|
47
50
|
} | {
|
|
48
51
|
type: OracleType.COMPOSITE_ORACLE;
|
|
49
52
|
targetToBasePriceFeed: Record<NetworkType, string>;
|
|
@@ -54,8 +57,7 @@ export type PriceFeedData = {
|
|
|
54
57
|
} | {
|
|
55
58
|
type: OracleType.BALANCER_WEIGHTED_LP_ORACLE;
|
|
56
59
|
assets: Array<SupportedToken>;
|
|
60
|
+
} | {
|
|
61
|
+
type: OracleType.LIKE_CURVE_LP_TOKEN_ORACLE;
|
|
62
|
+
curveSymbol: SupportedToken;
|
|
57
63
|
};
|
|
58
|
-
export interface TokenPriceFeedData {
|
|
59
|
-
priceFeedETH?: PriceFeedData;
|
|
60
|
-
priceFeedUSD: PriceFeedData;
|
|
61
|
-
}
|
package/lib/oracles/oracles.js
CHANGED
|
@@ -4,17 +4,20 @@ exports.OracleType = void 0;
|
|
|
4
4
|
var OracleType;
|
|
5
5
|
(function (OracleType) {
|
|
6
6
|
OracleType[OracleType["CHAINLINK_ORACLE"] = 0] = "CHAINLINK_ORACLE";
|
|
7
|
-
OracleType[OracleType["
|
|
8
|
-
OracleType[OracleType["
|
|
9
|
-
OracleType[OracleType["
|
|
10
|
-
OracleType[OracleType["
|
|
11
|
-
OracleType[OracleType["
|
|
7
|
+
OracleType[OracleType["YEARN_ORACLE"] = 1] = "YEARN_ORACLE";
|
|
8
|
+
OracleType[OracleType["CURVE_2LP_ORACLE"] = 2] = "CURVE_2LP_ORACLE";
|
|
9
|
+
OracleType[OracleType["CURVE_3LP_ORACLE"] = 3] = "CURVE_3LP_ORACLE";
|
|
10
|
+
OracleType[OracleType["CURVE_4LP_ORACLE"] = 4] = "CURVE_4LP_ORACLE";
|
|
11
|
+
OracleType[OracleType["ZERO_ORACLE"] = 5] = "ZERO_ORACLE";
|
|
12
12
|
OracleType[OracleType["WSTETH_ORACLE"] = 6] = "WSTETH_ORACLE";
|
|
13
13
|
OracleType[OracleType["BOUNDED_ORACLE"] = 7] = "BOUNDED_ORACLE";
|
|
14
14
|
OracleType[OracleType["COMPOSITE_ORACLE"] = 8] = "COMPOSITE_ORACLE";
|
|
15
15
|
OracleType[OracleType["AAVE_ORACLE"] = 9] = "AAVE_ORACLE";
|
|
16
16
|
OracleType[OracleType["COMPOUND_ORACLE"] = 10] = "COMPOUND_ORACLE";
|
|
17
|
-
OracleType[OracleType["
|
|
18
|
-
OracleType[OracleType["
|
|
19
|
-
OracleType[OracleType["
|
|
17
|
+
OracleType[OracleType["BALANCER_STABLE_LP_ORACLE"] = 11] = "BALANCER_STABLE_LP_ORACLE";
|
|
18
|
+
OracleType[OracleType["BALANCER_WEIGHTED_LP_ORACLE"] = 12] = "BALANCER_WEIGHTED_LP_ORACLE";
|
|
19
|
+
OracleType[OracleType["CURVE_CRYPTO_ORACLE"] = 13] = "CURVE_CRYPTO_ORACLE";
|
|
20
|
+
OracleType[OracleType["LIKE_CURVE_LP_TOKEN_ORACLE"] = 14] = "LIKE_CURVE_LP_TOKEN_ORACLE";
|
|
21
|
+
OracleType[OracleType["REDSTONE_ORACLE"] = 15] = "REDSTONE_ORACLE";
|
|
22
|
+
OracleType[OracleType["ERC4626_VAULT_ORACLE"] = 16] = "ERC4626_VAULT_ORACLE";
|
|
20
23
|
})(OracleType = exports.OracleType || (exports.OracleType = {}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { SupportedToken } from "../tokens/token";
|
|
2
|
-
import {
|
|
2
|
+
import { PriceFeedData } from "./oracles";
|
|
3
3
|
export declare const GAS_PRICE_FEED = "0x169e633a2d1e6c10dd91238ba11c4a708dfef37c";
|
|
4
|
-
export declare const priceFeedsByNetwork: Record<SupportedToken,
|
|
4
|
+
export declare const priceFeedsByNetwork: Record<SupportedToken, PriceFeedData>;
|