@gearbox-protocol/sdk 0.0.65 → 0.0.68

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.
Files changed (67) hide show
  1. package/lib/contracts/adapters.d.ts +15 -0
  2. package/lib/contracts/adapters.js +19 -0
  3. package/lib/contracts/contracts.d.ts +60 -0
  4. package/lib/contracts/contracts.js +242 -0
  5. package/lib/contracts/contractsRegister.d.ts +2 -0
  6. package/lib/contracts/contractsRegister.js +58 -0
  7. package/lib/contracts/protocols.d.ts +13 -0
  8. package/lib/contracts/protocols.js +39 -0
  9. package/lib/core/contracts.js +3 -3
  10. package/lib/core/events.js +1 -1
  11. package/lib/core/tradeTypes.d.ts +1 -1
  12. package/lib/core/transactions.js +1 -1
  13. package/lib/index.d.ts +8 -9
  14. package/lib/index.js +10 -10
  15. package/lib/oracles/oracles.d.ts +38 -0
  16. package/lib/oracles/oracles.js +12 -0
  17. package/lib/oracles/priceFeeds.d.ts +3 -0
  18. package/lib/oracles/priceFeeds.js +492 -0
  19. package/lib/pathfinder/convexLP.d.ts +1 -1
  20. package/lib/pathfinder/convexLP.js +2 -20
  21. package/lib/pathfinder/curveLP.d.ts +2 -2
  22. package/lib/pathfinder/curveLP.js +8 -27
  23. package/lib/pathfinder/path.d.ts +2 -8
  24. package/lib/pathfinder/path.js +27 -34
  25. package/lib/pathfinder/trade.d.ts +35 -0
  26. package/lib/pathfinder/trade.js +62 -0
  27. package/lib/pathfinder/tradeTypes.d.ts +83 -0
  28. package/lib/pathfinder/tradeTypes.js +26 -0
  29. package/lib/pathfinder/yVault.d.ts +1 -1
  30. package/lib/pathfinder/yVault.js +4 -23
  31. package/lib/tokens/convex.d.ts +2 -2
  32. package/lib/tokens/convex.js +1 -1
  33. package/lib/tokens/curveLP.d.ts +1 -1
  34. package/lib/tokens/curveLP.js +1 -1
  35. package/lib/tokens/gear.d.ts +1 -1
  36. package/lib/tokens/normal.d.ts +1 -1
  37. package/lib/tokens/normal.js +1 -1
  38. package/lib/tokens/token.d.ts +1 -1
  39. package/lib/tokens/token.js +5 -5
  40. package/lib/tokens/yearn.d.ts +2 -2
  41. package/lib/tokens/yearn.js +3 -3
  42. package/package.json +1 -1
  43. package/src/{core → contracts}/adapters.ts +0 -0
  44. package/src/{core → contracts}/contracts.ts +6 -6
  45. package/src/{core → contracts}/contractsRegister.ts +0 -0
  46. package/src/{core → contracts}/protocols.ts +0 -0
  47. package/src/core/events.ts +932 -915
  48. package/src/core/transactions.ts +360 -352
  49. package/src/index.ts +8 -9
  50. package/src/{core → oracles}/oracles.ts +0 -0
  51. package/src/oracles/priceFeeds.ts +528 -0
  52. package/src/pathfinder/convexLP.ts +1 -1
  53. package/src/pathfinder/curveLP.ts +3 -4
  54. package/src/pathfinder/path.ts +23 -53
  55. package/src/pathfinder/trade.ts +83 -0
  56. package/src/{core → pathfinder}/tradeTypes.ts +6 -6
  57. package/src/pathfinder/yVault.ts +1 -2
  58. package/src/tokens/convex.ts +2 -2
  59. package/src/tokens/curveLP.ts +1 -1
  60. package/src/tokens/gear.ts +1 -1
  61. package/src/tokens/normal.ts +1 -1
  62. package/src/tokens/token.ts +17 -7
  63. package/src/tokens/yearn.ts +4 -4
  64. package/src/core/creditCard.ts +0 -15
  65. package/src/core/priceFeeds.ts +0 -528
  66. package/src/core/swap.ts +0 -4
  67. package/src/core/trade.ts +0 -83
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OracleType = void 0;
4
+ var OracleType;
5
+ (function (OracleType) {
6
+ OracleType[OracleType["CHAINLINK_ORACLE"] = 0] = "CHAINLINK_ORACLE";
7
+ OracleType[OracleType["YEARN_TOKEN_ORACLE"] = 1] = "YEARN_TOKEN_ORACLE";
8
+ OracleType[OracleType["CURVE_LP_ORACLE"] = 2] = "CURVE_LP_ORACLE";
9
+ OracleType[OracleType["YEARN_CURVE_LP_ORACLE"] = 3] = "YEARN_CURVE_LP_ORACLE";
10
+ OracleType[OracleType["ZERO_ORACLE"] = 4] = "ZERO_ORACLE";
11
+ OracleType[OracleType["LIKE_CURVE_LP_ORACLE"] = 5] = "LIKE_CURVE_LP_ORACLE";
12
+ })(OracleType = exports.OracleType || (exports.OracleType = {}));
@@ -0,0 +1,3 @@
1
+ import { TokenPriceFeedData } from "./oracles";
2
+ import { SupportedToken } from "../tokens/token";
3
+ export declare const priceFeedsByNetwork: Record<SupportedToken, TokenPriceFeedData>;
@@ -0,0 +1,492 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.priceFeedsByNetwork = void 0;
4
+ var oracles_1 = require("./oracles");
5
+ exports.priceFeedsByNetwork = {
6
+ "1INCH": {
7
+ priceFeedETH: {
8
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
9
+ address: "0x72AFAECF99C9d9C8215fF44C77B94B99C28741e8",
10
+ kovan: "0x5b65757C2d37c4FDc3c029ECb8F2C7AD3FD361C9"
11
+ },
12
+ priceFeedUSD: {
13
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
14
+ address: "0xc929ad75B72593967DE83E7F7Cda0493458261D9",
15
+ kovan: "0xb32946c38C4F2e3e44Ce2aB059BfFec163816A4E"
16
+ }
17
+ },
18
+ AAVE: {
19
+ priceFeedETH: {
20
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
21
+ address: "0x6Df09E975c830ECae5bd4eD9d90f3A95a4f88012",
22
+ kovan: "0x3e12e9aE09F4ce9D5809E4b863bF4eef16f9949C"
23
+ },
24
+ priceFeedUSD: {
25
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
26
+ address: "0x547a514d5e3769680Ce22B2361c10Ea13619e8a9",
27
+ kovan: "0xF1594a023a3e061765c11af09EC6B7c63e2e9Ab5"
28
+ }
29
+ },
30
+ COMP: {
31
+ priceFeedETH: {
32
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
33
+ address: "0x1B39Ee86Ec5979ba5C322b826B3ECb8C79991699",
34
+ kovan: "0x2d2fAc1CBf67b24d3643ce084f3758115b1dCFe0"
35
+ },
36
+ priceFeedUSD: {
37
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
38
+ address: "0xdbd020CAeF83eFd542f4De03e3cF0C28A4428bd5",
39
+ kovan: "0xECF93D14d25E02bA2C13698eeDca9aA98348EFb6"
40
+ }
41
+ },
42
+ CRV: {
43
+ priceFeedETH: {
44
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
45
+ address: "0x8a12Be339B0cD1829b91Adc01977caa5E9ac121e",
46
+ kovan: "0x57F80b54722B294F0C1942AA70468Bb46437AD19"
47
+ },
48
+ priceFeedUSD: {
49
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
50
+ address: "0xcd627aa160a6fa45eb793d19ef54f5062f20f33f",
51
+ kovan: "0x55fe324Ece17b6902c2b3776c1baB1095Eb5deB0"
52
+ }
53
+ },
54
+ DAI: {
55
+ priceFeedETH: {
56
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
57
+ address: "0x773616E4d11A78F511299002da57A0a94577F1f4",
58
+ kovan: "0x22B58f1EbEDfCA50feF632bD73368b2FdA96D541"
59
+ },
60
+ priceFeedUSD: {
61
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
62
+ address: "0xAed0c38402a5d19df6E4c03F4E2DceD6e29c1ee9",
63
+ kovan: "0x777A68032a88E5A84678A77Af2CD65A7b3c0775a"
64
+ }
65
+ },
66
+ DPI: {
67
+ priceFeedETH: {
68
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
69
+ address: "0x029849bbc0b1d93b85a8b6190e979fd38F5760E2",
70
+ kovan: "0x4c1b676445935dA58a48b6dA8B2564684d80fAEE"
71
+ },
72
+ priceFeedUSD: {
73
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
74
+ address: "0xD2A593BF7594aCE1faD597adb697b5645d5edDB2",
75
+ kovan: "0x39EcBDd1069C795e65Aa3355cC42F3acD29797d8"
76
+ }
77
+ },
78
+ FEI: {
79
+ priceFeedETH: {
80
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
81
+ address: "0x7f0d2c2838c6ac24443d13e23d99490017bde370",
82
+ kovan: "0x1E13BFc6e358410f4F94EAC84C1008A138FB115B"
83
+ },
84
+ priceFeedUSD: {
85
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
86
+ address: "0x31e0a88fecb6ec0a411dbe0e9e76391498296ee9",
87
+ kovan: "0x9FE550626246234EF48a1176e8e2452A14CbbA24"
88
+ }
89
+ },
90
+ GUSD: {
91
+ priceFeedUSD: {
92
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
93
+ address: "0xa89f5d2365ce98B3cD68012b6f503ab1416245Fc",
94
+ kovan: "0x36AD5755A58c5faB253D5e40e7F0f86293d6A5f9"
95
+ }
96
+ },
97
+ LINK: {
98
+ priceFeedETH: {
99
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
100
+ address: "0xDC530D9457755926550b59e8ECcdaE7624181557",
101
+ kovan: "0x3Af8C569ab77af5230596Acf0E8c2F9351d24C38"
102
+ },
103
+ priceFeedUSD: {
104
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
105
+ address: "0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c",
106
+ kovan: "0x396c5E36DD0a0F5a5D33dae44368D4193f69a1F0"
107
+ }
108
+ },
109
+ SNX: {
110
+ priceFeedETH: {
111
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
112
+ address: "0x79291A9d692Df95334B1a0B3B4AE6bC606782f8c",
113
+ kovan: "0xF9A76ae7a1075Fe7d646b06fF05Bd48b9FA5582e"
114
+ },
115
+ priceFeedUSD: {
116
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
117
+ address: "0xDC3EA94CD0AC27d9A86C180091e7f78C683d3699",
118
+ kovan: "0x31f93DA9823d737b7E44bdee0DF389Fe62Fd1AcD"
119
+ }
120
+ },
121
+ SUSHI: {
122
+ priceFeedETH: {
123
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
124
+ address: "0xe572CeF69f43c2E488b33924AF04BDacE19079cf",
125
+ kovan: "0x6A8b2Aae8bf973EdA172C1f0e450c9D4e3C2E360"
126
+ },
127
+ priceFeedUSD: {
128
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
129
+ address: "0xcc70f09a6cc17553b2e31954cd36e4a2d89501f7",
130
+ kovan: "0x40D447115370C4B65A0d8C63275033C54A3ed61F"
131
+ }
132
+ },
133
+ UNI: {
134
+ priceFeedETH: {
135
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
136
+ address: "0xD6aA3D25116d8dA79Ea0246c4826EB951872e02e",
137
+ kovan: "0x006A9A6c0A6b5230d89f05eb1e4603AA6B1508BE"
138
+ },
139
+ priceFeedUSD: {
140
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
141
+ address: "0x553303d460EE0afB37EdFf9bE42922D8FF63220e",
142
+ kovan: "0xDA5904BdBfB4EF12a3955aEcA103F51dc87c7C39"
143
+ }
144
+ },
145
+ USDC: {
146
+ priceFeedETH: {
147
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
148
+ address: "0x986b5E1e1755e3C2440e960477f25201B0a8bbD4",
149
+ kovan: "0x64EaC61A2DFda2c3Fa04eED49AA33D021AeC8838"
150
+ },
151
+ priceFeedUSD: {
152
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
153
+ address: "0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6",
154
+ kovan: "0x9211c6b3BF41A10F78539810Cf5c64e1BB78Ec60"
155
+ }
156
+ },
157
+ USDT: {
158
+ priceFeedETH: {
159
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
160
+ address: "0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46",
161
+ kovan: "0x0bF499444525a23E7Bb61997539725cA2e928138"
162
+ },
163
+ priceFeedUSD: {
164
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
165
+ address: "0x3e7d1eab13ad0104d2750b8863b489d65364e32d",
166
+ kovan: "0x2ca5A90D34cA333661083F89D831f757A9A50148"
167
+ }
168
+ },
169
+ WBTC: {
170
+ priceFeedETH: {
171
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
172
+ address: "0xdeb288F737066589598e9214E782fa5A8eD689e8",
173
+ kovan: "0xB4F231198CAA3446fd4623e59f2EF27e7A58A54b"
174
+ },
175
+ priceFeedUSD: {
176
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
177
+ address: "0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c",
178
+ kovan: "0x6135b13325bfC4B00278B4abC5e20bbce2D6580e"
179
+ }
180
+ },
181
+ WETH: {
182
+ priceFeedUSD: {
183
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
184
+ address: "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419",
185
+ kovan: "0x9326BFA02ADD2366b30bacB125260Af641031331"
186
+ }
187
+ },
188
+ YFI: {
189
+ priceFeedETH: {
190
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
191
+ address: "0x7c5d4F8345e66f68099581Db340cd65B078C41f4",
192
+ kovan: "0x29d651D233ffFdec4Df5244a9cE842FB253fAA09"
193
+ },
194
+ priceFeedUSD: {
195
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
196
+ address: "0xA027702dbb89fbd58938e4324ac03B58d812b0E1",
197
+ kovan: "0x7f6a535B75E2c815f8865CF39Ad847971AcCC3bE"
198
+ }
199
+ },
200
+ /// UPDATE
201
+ STETH: {
202
+ priceFeedETH: {
203
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
204
+ address: "0xcfe54b5cd566ab89272946f602d76ea879cab4a8",
205
+ kovan: "0x087154969f935218e10f621D81e523C8f46C6dF9"
206
+ },
207
+ priceFeedUSD: {
208
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
209
+ address: "0xCfE54B5cD566aB89272946F602D76Ea879CAb4a8",
210
+ kovan: "0x94dd77F85E0B1e6942B044E604EBA4869369453c"
211
+ }
212
+ },
213
+ FTM: {
214
+ priceFeedETH: {
215
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
216
+ address: "0x2de7e4a9488488e0058b95854cc2f7955b35dc9b",
217
+ kovan: "0xdCd1eB60388F340d7bF6584aa4295D95b355686c"
218
+ }
219
+ },
220
+ CVX: {
221
+ priceFeedUSD: {
222
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
223
+ address: "0xd962fc30a72a84ce50161031391756bf2876af5d",
224
+ kovan: "0xa6CeAbA9326C3a7Ed6A03A1cb0809A397ed286ae"
225
+ }
226
+ },
227
+ FRAX: {
228
+ priceFeedUSD: {
229
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
230
+ address: "0xb9e1e3a9feff48998e45fa90847ed4d467e8bcfd",
231
+ kovan: "0xD696fF0750F753A605236Ab499E5432e0FdeCd72"
232
+ }
233
+ },
234
+ LUSD: {
235
+ priceFeedUSD: {
236
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
237
+ address: "0x3D7aE7E594f2f2091Ad8798313450130d0Aba3a0",
238
+ kovan: "0xc17F8AE0c6C060F76303Be13f5f059144b38e75e"
239
+ }
240
+ },
241
+ sUSD: {
242
+ priceFeedUSD: {
243
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
244
+ address: "0xad35bd71b9afe6e4bdc266b345c198eadef9ad94",
245
+ kovan: "0xe45b2D1e60d94209ef36e2E66a232daefc418de2"
246
+ }
247
+ },
248
+ FXS: {
249
+ priceFeedUSD: {
250
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
251
+ address: "0x6ebc52c8c1089be9eb3945c4350b68b8e4c2233f",
252
+ kovan: "0xC6f5343637279AF7e2a4e12066Fb5ae567275E5F"
253
+ }
254
+ },
255
+ LDO: {
256
+ priceFeedETH: {
257
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
258
+ address: "0x4e844125952d32acdf339be976c98e22f6f318db",
259
+ kovan: "0x6204148EF888786A2988E7b09c8e0A67e32cb387"
260
+ },
261
+ priceFeedUSD: {
262
+ type: oracles_1.OracleType.ZERO_ORACLE
263
+ }
264
+ // ADD ETH-> DAI Oracle!
265
+ },
266
+ LQTY: {
267
+ priceFeedUSD: {
268
+ type: oracles_1.OracleType.ZERO_ORACLE
269
+ }
270
+ },
271
+ SPELL: {
272
+ priceFeedUSD: {
273
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
274
+ address: "0x8c110b94c5f1d347facf5e1e938ab2db60e3c9a8",
275
+ kovan: "0x68da666AcD151A3edB62c1ad1b748cCcFca026d7"
276
+ }
277
+ },
278
+ LUNA: {
279
+ priceFeedETH: {
280
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
281
+ address: "0x91e9331556ed76c9393055719986409e11b56f73",
282
+ kovan: "0xEfAe1275132C3D2EE009148748e3e3e384095E5f"
283
+ }
284
+ },
285
+ yvDAI: {
286
+ priceFeedETH: {
287
+ type: oracles_1.OracleType.YEARN_TOKEN_ORACLE,
288
+ token: "DAI",
289
+ deployedKovan: ""
290
+ },
291
+ priceFeedUSD: {
292
+ type: oracles_1.OracleType.YEARN_TOKEN_ORACLE,
293
+ token: "DAI"
294
+ }
295
+ },
296
+ yvUSDC: {
297
+ priceFeedETH: {
298
+ type: oracles_1.OracleType.YEARN_TOKEN_ORACLE,
299
+ token: "USDC",
300
+ deployedKovan: ""
301
+ },
302
+ priceFeedUSD: {
303
+ type: oracles_1.OracleType.YEARN_TOKEN_ORACLE,
304
+ token: "USDC"
305
+ }
306
+ },
307
+ yvWETH: {
308
+ priceFeedUSD: {
309
+ type: oracles_1.OracleType.YEARN_TOKEN_ORACLE,
310
+ token: "WETH"
311
+ }
312
+ },
313
+ yvWBTC: {
314
+ priceFeedUSD: {
315
+ type: oracles_1.OracleType.YEARN_TOKEN_ORACLE,
316
+ token: "WBTC"
317
+ }
318
+ },
319
+ // CURVE LP TOKENS
320
+ "3Crv": {
321
+ priceFeedUSD: {
322
+ type: oracles_1.OracleType.CURVE_LP_ORACLE,
323
+ assets: ["DAI", "USDC", "USDT"]
324
+ }
325
+ },
326
+ steCRV: {
327
+ priceFeedUSD: {
328
+ type: oracles_1.OracleType.CURVE_LP_ORACLE,
329
+ assets: ["STETH", "WETH"]
330
+ }
331
+ },
332
+ FRAX3CRV: {
333
+ priceFeedUSD: {
334
+ type: oracles_1.OracleType.CURVE_LP_ORACLE,
335
+ assets: ["FRAX", "DAI", "USDC", "USDT"]
336
+ }
337
+ },
338
+ LUSD3CRV: {
339
+ priceFeedUSD: {
340
+ type: oracles_1.OracleType.CURVE_LP_ORACLE,
341
+ assets: ["LUSD", "DAI", "USDC", "USDT"]
342
+ }
343
+ },
344
+ crvPlain3andSUSD: {
345
+ priceFeedUSD: {
346
+ type: oracles_1.OracleType.CURVE_LP_ORACLE,
347
+ assets: ["DAI", "USDC", "USDT", "sUSD"]
348
+ }
349
+ },
350
+ gusd3CRV: {
351
+ priceFeedUSD: {
352
+ type: oracles_1.OracleType.CURVE_LP_ORACLE,
353
+ assets: ["GUSD", "DAI", "USDC", "USDT"]
354
+ }
355
+ },
356
+ // YEARN- CURVE TOKENS
357
+ yvCurve_stETH: {
358
+ priceFeedUSD: {
359
+ type: oracles_1.OracleType.YEARN_CURVE_LP_ORACLE,
360
+ curveSymbol: "steCRV"
361
+ }
362
+ },
363
+ yvCurve_FRAX: {
364
+ priceFeedUSD: {
365
+ type: oracles_1.OracleType.YEARN_CURVE_LP_ORACLE,
366
+ curveSymbol: "FRAX3CRV"
367
+ }
368
+ },
369
+ // CVX tokens
370
+ cvx3Crv: {
371
+ priceFeedUSD: {
372
+ type: oracles_1.OracleType.LIKE_CURVE_LP_ORACLE,
373
+ curveSymbol: "3Crv"
374
+ }
375
+ },
376
+ cvxsteCRV: {
377
+ priceFeedUSD: {
378
+ type: oracles_1.OracleType.LIKE_CURVE_LP_ORACLE,
379
+ curveSymbol: "steCRV"
380
+ }
381
+ },
382
+ cvxFRAX3CRV: {
383
+ priceFeedUSD: {
384
+ type: oracles_1.OracleType.LIKE_CURVE_LP_ORACLE,
385
+ curveSymbol: "FRAX3CRV"
386
+ }
387
+ },
388
+ cvxcrvPlain3andSUSD: {
389
+ priceFeedUSD: {
390
+ type: oracles_1.OracleType.LIKE_CURVE_LP_ORACLE,
391
+ curveSymbol: "crvPlain3andSUSD"
392
+ }
393
+ },
394
+ cvxgusd3CRV: {
395
+ priceFeedUSD: {
396
+ type: oracles_1.OracleType.LIKE_CURVE_LP_ORACLE,
397
+ curveSymbol: "gusd3CRV"
398
+ }
399
+ },
400
+ // CVX tokens
401
+ stkcvx3Crv: {
402
+ priceFeedUSD: {
403
+ type: oracles_1.OracleType.LIKE_CURVE_LP_ORACLE,
404
+ curveSymbol: "3Crv"
405
+ }
406
+ },
407
+ stkcvxsteCRV: {
408
+ priceFeedUSD: {
409
+ type: oracles_1.OracleType.LIKE_CURVE_LP_ORACLE,
410
+ curveSymbol: "steCRV"
411
+ }
412
+ },
413
+ stkcvxFRAX3CRV: {
414
+ priceFeedUSD: {
415
+ type: oracles_1.OracleType.LIKE_CURVE_LP_ORACLE,
416
+ curveSymbol: "FRAX3CRV"
417
+ }
418
+ },
419
+ stkcvxcrvPlain3andSUSD: {
420
+ priceFeedUSD: {
421
+ type: oracles_1.OracleType.LIKE_CURVE_LP_ORACLE,
422
+ curveSymbol: "crvPlain3andSUSD"
423
+ }
424
+ },
425
+ stkcvxgusd3CRV: {
426
+ priceFeedUSD: {
427
+ type: oracles_1.OracleType.LIKE_CURVE_LP_ORACLE,
428
+ curveSymbol: "gusd3CRV"
429
+ }
430
+ },
431
+ //GEARBOX
432
+ dDAI: {
433
+ priceFeedETH: {
434
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
435
+ address: "",
436
+ kovan: ""
437
+ },
438
+ priceFeedUSD: {
439
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
440
+ address: "",
441
+ kovan: ""
442
+ }
443
+ },
444
+ dUSDC: {
445
+ priceFeedETH: {
446
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
447
+ address: "",
448
+ kovan: ""
449
+ },
450
+ priceFeedUSD: {
451
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
452
+ address: "",
453
+ kovan: ""
454
+ }
455
+ },
456
+ dWBTC: {
457
+ priceFeedETH: {
458
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
459
+ address: "",
460
+ kovan: ""
461
+ },
462
+ priceFeedUSD: {
463
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
464
+ address: "",
465
+ kovan: ""
466
+ }
467
+ },
468
+ dWETH: {
469
+ priceFeedETH: {
470
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
471
+ address: "",
472
+ kovan: ""
473
+ },
474
+ priceFeedUSD: {
475
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
476
+ address: "",
477
+ kovan: ""
478
+ }
479
+ },
480
+ GEAR: {
481
+ priceFeedETH: {
482
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
483
+ address: "",
484
+ kovan: ""
485
+ },
486
+ priceFeedUSD: {
487
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
488
+ address: "",
489
+ kovan: ""
490
+ }
491
+ }
492
+ };
@@ -1,4 +1,4 @@
1
1
  import { LPWithdrawPathFinder, Path } from "./path";
2
- export declare class ConvexLPPathFinder extends LPWithdrawPathFinder {
2
+ export declare class ConvexLPPathFinder implements LPWithdrawPathFinder {
3
3
  findWithdrawPaths(p: Path): Promise<Array<Path>>;
4
4
  }
@@ -1,19 +1,4 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -52,12 +37,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
52
37
  };
53
38
  Object.defineProperty(exports, "__esModule", { value: true });
54
39
  exports.ConvexLPPathFinder = void 0;
55
- var path_1 = require("./path");
56
40
  var convex_1 = require("../tokens/convex");
57
- var ConvexLPPathFinder = /** @class */ (function (_super) {
58
- __extends(ConvexLPPathFinder, _super);
41
+ var ConvexLPPathFinder = /** @class */ (function () {
59
42
  function ConvexLPPathFinder() {
60
- return _super !== null && _super.apply(this, arguments) || this;
61
43
  }
62
44
  ConvexLPPathFinder.prototype.findWithdrawPaths = function (p) {
63
45
  return __awaiter(this, void 0, void 0, function () {
@@ -94,5 +76,5 @@ var ConvexLPPathFinder = /** @class */ (function (_super) {
94
76
  });
95
77
  };
96
78
  return ConvexLPPathFinder;
97
- }(path_1.LPWithdrawPathFinder));
79
+ }());
98
80
  exports.ConvexLPPathFinder = ConvexLPPathFinder;
@@ -1,7 +1,7 @@
1
1
  import { LPWithdrawPathFinder, Path } from "./path";
2
2
  import { CurveLPToken } from "../tokens/curveLP";
3
- import { CurvePoolContract } from "../core/contracts";
4
- export declare class CurvePathFinder extends LPWithdrawPathFinder {
3
+ import { CurvePoolContract } from "../contracts/contracts";
4
+ export declare class CurvePathFinder implements LPWithdrawPathFinder {
5
5
  lpToken: CurveLPToken;
6
6
  contract: CurvePoolContract;
7
7
  constructor(token: CurveLPToken);
@@ -1,19 +1,4 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -52,27 +37,23 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
52
37
  };
53
38
  Object.defineProperty(exports, "__esModule", { value: true });
54
39
  exports.CurvePathFinder = void 0;
55
- var path_1 = require("./path");
56
40
  var curveLP_1 = require("../tokens/curveLP");
57
- var contracts_1 = require("../core/contracts");
58
- var tradeTypes_1 = require("../core/tradeTypes");
41
+ var contracts_1 = require("../contracts/contracts");
42
+ var tradeTypes_1 = require("./tradeTypes");
59
43
  var multicall_1 = require("../utils/multicall");
60
44
  var types_1 = require("../types");
61
- var CurvePathFinder = /** @class */ (function (_super) {
62
- __extends(CurvePathFinder, _super);
45
+ var CurvePathFinder = /** @class */ (function () {
63
46
  function CurvePathFinder(token) {
64
- var _this = _super.call(this) || this;
65
- _this.lpToken = token;
66
- var curvePools = curveLP_1.curveTokens[_this.lpToken].lpActions.filter(function (a) { return a.type == tradeTypes_1.TradeType.CurveWithdrawLP; });
47
+ this.lpToken = token;
48
+ var curvePools = curveLP_1.curveTokens[this.lpToken].lpActions.filter(function (a) { return a.type == tradeTypes_1.TradeType.CurveWithdrawLP; });
67
49
  if (curvePools.length !== 1)
68
50
  throw new Error("Cant find Withdrawer");
69
- _this.contract = curvePools[0].contract;
51
+ this.contract = curvePools[0].contract;
70
52
  var wrapper = contracts_1.contractParams[curvePools[0].contract]
71
53
  .wrapper;
72
54
  if (wrapper) {
73
- _this.contract = wrapper;
55
+ this.contract = wrapper;
74
56
  }
75
- return _this;
76
57
  }
77
58
  CurvePathFinder.prototype.findWithdrawPaths = function (p) {
78
59
  return __awaiter(this, void 0, void 0, function () {
@@ -112,5 +93,5 @@ var CurvePathFinder = /** @class */ (function (_super) {
112
93
  });
113
94
  };
114
95
  return CurvePathFinder;
115
- }(path_1.LPWithdrawPathFinder));
96
+ }());
116
97
  exports.CurvePathFinder = CurvePathFinder;
@@ -29,12 +29,6 @@ export declare class Path {
29
29
  withdrawTokens(): Promise<Array<Path>>;
30
30
  clone(): Path;
31
31
  }
32
- export interface ActionData {
33
- callData: MultiCall;
34
- amountOut: BigNumber;
35
- gasLimit: BigNumber;
36
- }
37
- export declare abstract class LPWithdrawPathFinder {
38
- abstract findWithdrawPaths(p: Path): Promise<Array<Path>>;
39
- getUniswapV2SwapData(adapterAddress: string, currentTokenAddress: string, currentBalance: BigNumber, nextTokenAddress: string, p: Path): Promise<ActionData>;
32
+ export interface LPWithdrawPathFinder {
33
+ findWithdrawPaths(p: Path): Promise<Array<Path>>;
40
34
  }