@gearbox-protocol/sdk 2.1.33 → 2.1.35

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 (77) hide show
  1. package/contracts/index.sol +8 -0
  2. package/lib/contracts/protocols.d.ts +0 -5
  3. package/lib/contracts/protocols.js +1 -43
  4. package/lib/core/creditManager.d.ts +4 -1
  5. package/lib/core/creditManager.js +26 -4
  6. package/lib/core/pool/index.d.ts +0 -1
  7. package/lib/core/pool/index.js +0 -1
  8. package/lib/core/trade.d.ts +29 -16
  9. package/lib/core/trade.js +67 -10
  10. package/lib/index.d.ts +0 -11
  11. package/lib/index.js +1 -14
  12. package/lib/parsers/creditFacadeParser.js +2 -2
  13. package/lib/parsers/creditFacadeParser.spec.js +1 -2
  14. package/lib/parsers/txParser.js +1 -1
  15. package/lib/tokens/aave.d.ts +0 -3
  16. package/lib/tokens/aave.js +0 -57
  17. package/lib/tokens/balancer.d.ts +0 -10
  18. package/lib/tokens/balancer.js +0 -29
  19. package/lib/tokens/compound.d.ts +0 -2
  20. package/lib/tokens/compound.js +0 -36
  21. package/lib/tokens/convex.d.ts +2 -2
  22. package/lib/tokens/convex.js +9 -322
  23. package/lib/tokens/curveLP.d.ts +3 -4
  24. package/lib/tokens/curveLP.js +17 -240
  25. package/lib/tokens/gear.d.ts +0 -2
  26. package/lib/tokens/normal.d.ts +0 -3
  27. package/lib/tokens/normal.js +0 -718
  28. package/lib/tokens/yearn.d.ts +0 -4
  29. package/lib/tokens/yearn.js +0 -43
  30. package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/Balances.sol/BalanceOps.d.ts +27 -0
  31. package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/Balances.sol/index.d.ts +1 -0
  32. package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/Balances.sol/index.js +2 -0
  33. package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacade.d.ts +147 -80
  34. package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacadeEvents.d.ts +35 -0
  35. package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacadeExtended.d.ts +7 -7
  36. package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacadeV2.d.ts +66 -0
  37. package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacadeV2.js +2 -0
  38. package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/index.d.ts +1 -0
  39. package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/Balances.sol/BalanceOps__factory.d.ts +28 -0
  40. package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/Balances.sol/BalanceOps__factory.js +53 -0
  41. package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/Balances.sol/index.d.ts +1 -0
  42. package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/Balances.sol/index.js +8 -0
  43. package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacadeEvents__factory.js +45 -0
  44. package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacadeExceptions__factory.js +10 -0
  45. package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacadeExtended__factory.js +0 -5
  46. package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacadeV2__factory.d.ts +18 -0
  47. package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacadeV2__factory.js +42 -0
  48. package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacade__factory.js +198 -46
  49. package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/index.d.ts +1 -0
  50. package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/index.js +3 -1
  51. package/package.json +7 -2
  52. package/lib/core/adapter.d.ts +0 -20
  53. package/lib/core/adapter.js +0 -20
  54. package/lib/core/creditOperation.d.ts +0 -9
  55. package/lib/core/operations.d.ts +0 -22
  56. package/lib/core/operations.js +0 -26
  57. package/lib/core/pool/operation.d.ts +0 -28
  58. package/lib/core/pool/operation.js +0 -36
  59. package/lib/pathfinder/tradeTypes.d.ts +0 -113
  60. package/lib/pathfinder/tradeTypes.js +0 -28
  61. package/lib/strategies/convex.d.ts +0 -57
  62. package/lib/strategies/convex.js +0 -220
  63. package/lib/strategies/creditFacade.d.ts +0 -21
  64. package/lib/strategies/creditFacade.js +0 -71
  65. package/lib/strategies/curve.d.ts +0 -45
  66. package/lib/strategies/curve.js +0 -207
  67. package/lib/strategies/lido.d.ts +0 -18
  68. package/lib/strategies/lido.js +0 -51
  69. package/lib/strategies/uniswapV2.d.ts +0 -15
  70. package/lib/strategies/uniswapV2.js +0 -44
  71. package/lib/strategies/uniswapV3.d.ts +0 -21
  72. package/lib/strategies/uniswapV3.js +0 -71
  73. package/lib/strategies/yearn.d.ts +0 -20
  74. package/lib/strategies/yearn.js +0 -128
  75. package/lib/utils/extracter.d.ts +0 -11
  76. package/lib/utils/extracter.js +0 -19
  77. /package/lib/{core/creditOperation.js → types/@gearbox-protocol/core-v2/contracts/interfaces/Balances.sol/BalanceOps.js} +0 -0
@@ -1,911 +1,193 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isNormalToken = exports.normalTokens = void 0;
4
- const tradeTypes_1 = require("../pathfinder/tradeTypes");
5
4
  const tokenType_1 = require("./tokenType");
6
5
  exports.normalTokens = {
7
6
  "1INCH": {
8
7
  name: "1INCH",
9
8
  symbol: "1INCH",
10
9
  type: tokenType_1.TokenType.NORMAL_TOKEN,
11
- swapActions: [
12
- {
13
- type: tradeTypes_1.TradeType.UniswapV3Swap,
14
- contract: "UNISWAP_V3_ROUTER",
15
- },
16
- {
17
- type: tradeTypes_1.TradeType.UniswapV2Swap,
18
- contract: "UNISWAP_V2_ROUTER",
19
- },
20
- {
21
- type: tradeTypes_1.TradeType.UniswapV2Swap,
22
- contract: "SUSHISWAP_ROUTER",
23
- },
24
- ],
25
10
  },
26
11
  AAVE: {
27
12
  name: "AAVE",
28
13
  symbol: "AAVE",
29
14
  type: tokenType_1.TokenType.NORMAL_TOKEN,
30
- swapActions: [
31
- {
32
- type: tradeTypes_1.TradeType.UniswapV3Swap,
33
- contract: "UNISWAP_V3_ROUTER",
34
- },
35
- {
36
- type: tradeTypes_1.TradeType.UniswapV2Swap,
37
- contract: "UNISWAP_V2_ROUTER",
38
- },
39
- {
40
- type: tradeTypes_1.TradeType.UniswapV2Swap,
41
- contract: "SUSHISWAP_ROUTER",
42
- },
43
- ],
44
15
  },
45
16
  COMP: {
46
17
  name: "COMP",
47
18
  symbol: "COMP",
48
19
  type: tokenType_1.TokenType.NORMAL_TOKEN,
49
- swapActions: [
50
- {
51
- type: tradeTypes_1.TradeType.UniswapV3Swap,
52
- contract: "UNISWAP_V3_ROUTER",
53
- },
54
- {
55
- type: tradeTypes_1.TradeType.UniswapV2Swap,
56
- contract: "UNISWAP_V2_ROUTER",
57
- },
58
- {
59
- type: tradeTypes_1.TradeType.UniswapV2Swap,
60
- contract: "SUSHISWAP_ROUTER",
61
- },
62
- ],
63
20
  },
64
21
  CRV: {
65
22
  name: "CRV",
66
23
  symbol: "CRV",
67
24
  type: tokenType_1.TokenType.NORMAL_TOKEN,
68
- swapActions: [
69
- {
70
- type: tradeTypes_1.TradeType.UniswapV3Swap,
71
- contract: "UNISWAP_V3_ROUTER",
72
- },
73
- {
74
- type: tradeTypes_1.TradeType.UniswapV2Swap,
75
- contract: "UNISWAP_V2_ROUTER",
76
- },
77
- {
78
- type: tradeTypes_1.TradeType.UniswapV2Swap,
79
- contract: "SUSHISWAP_ROUTER",
80
- },
81
- ],
82
25
  },
83
26
  DAI: {
84
27
  name: "DAI",
85
28
  symbol: "DAI",
86
29
  type: tokenType_1.TokenType.NORMAL_TOKEN,
87
- swapActions: [
88
- {
89
- type: tradeTypes_1.TradeType.UniswapV3Swap,
90
- contract: "UNISWAP_V3_ROUTER",
91
- },
92
- {
93
- type: tradeTypes_1.TradeType.UniswapV2Swap,
94
- contract: "UNISWAP_V2_ROUTER",
95
- },
96
- {
97
- type: tradeTypes_1.TradeType.UniswapV2Swap,
98
- contract: "SUSHISWAP_ROUTER",
99
- },
100
- {
101
- type: tradeTypes_1.TradeType.CurveExchange,
102
- contract: "CURVE_3CRV_POOL",
103
- tokenOut: ["USDC", "USDT"],
104
- },
105
- {
106
- type: tradeTypes_1.TradeType.CurveExchange,
107
- contract: "CURVE_SUSD_POOL",
108
- tokenOut: ["USDC", "USDT", "sUSD"],
109
- },
110
- ],
111
- lpActions: [
112
- {
113
- type: tradeTypes_1.TradeType.CurveDepositLP,
114
- contract: "CURVE_3CRV_POOL",
115
- tokenOut: "3Crv",
116
- },
117
- {
118
- type: tradeTypes_1.TradeType.CurveDepositLP,
119
- contract: "CURVE_SUSD_POOL",
120
- tokenOut: "crvPlain3andSUSD",
121
- },
122
- {
123
- type: tradeTypes_1.TradeType.YearnDeposit,
124
- contract: "YEARN_DAI_VAULT",
125
- tokenOut: "yvDAI",
126
- },
127
- ],
128
30
  },
129
31
  DPI: {
130
32
  name: "DPI",
131
33
  symbol: "DPI",
132
34
  type: tokenType_1.TokenType.NORMAL_TOKEN,
133
- swapActions: [
134
- {
135
- type: tradeTypes_1.TradeType.UniswapV3Swap,
136
- contract: "UNISWAP_V3_ROUTER",
137
- },
138
- {
139
- type: tradeTypes_1.TradeType.UniswapV2Swap,
140
- contract: "UNISWAP_V2_ROUTER",
141
- },
142
- {
143
- type: tradeTypes_1.TradeType.UniswapV2Swap,
144
- contract: "SUSHISWAP_ROUTER",
145
- },
146
- ],
147
35
  },
148
36
  FEI: {
149
37
  name: "FEI",
150
38
  symbol: "FEI",
151
39
  type: tokenType_1.TokenType.NORMAL_TOKEN,
152
- swapActions: [
153
- {
154
- type: tradeTypes_1.TradeType.UniswapV3Swap,
155
- contract: "UNISWAP_V3_ROUTER",
156
- },
157
- {
158
- type: tradeTypes_1.TradeType.UniswapV2Swap,
159
- contract: "UNISWAP_V2_ROUTER",
160
- },
161
- {
162
- type: tradeTypes_1.TradeType.UniswapV2Swap,
163
- contract: "SUSHISWAP_ROUTER",
164
- },
165
- ],
166
40
  },
167
41
  LINK: {
168
42
  name: "LINK",
169
43
  symbol: "LINK",
170
44
  type: tokenType_1.TokenType.NORMAL_TOKEN,
171
- swapActions: [
172
- {
173
- type: tradeTypes_1.TradeType.UniswapV3Swap,
174
- contract: "UNISWAP_V3_ROUTER",
175
- },
176
- {
177
- type: tradeTypes_1.TradeType.UniswapV2Swap,
178
- contract: "UNISWAP_V2_ROUTER",
179
- },
180
- {
181
- type: tradeTypes_1.TradeType.UniswapV2Swap,
182
- contract: "SUSHISWAP_ROUTER",
183
- },
184
- ],
185
45
  },
186
46
  SNX: {
187
47
  name: "SNX",
188
48
  symbol: "SNX",
189
49
  type: tokenType_1.TokenType.NORMAL_TOKEN,
190
- swapActions: [
191
- {
192
- type: tradeTypes_1.TradeType.UniswapV3Swap,
193
- contract: "UNISWAP_V3_ROUTER",
194
- },
195
- {
196
- type: tradeTypes_1.TradeType.UniswapV2Swap,
197
- contract: "UNISWAP_V2_ROUTER",
198
- },
199
- {
200
- type: tradeTypes_1.TradeType.UniswapV2Swap,
201
- contract: "SUSHISWAP_ROUTER",
202
- },
203
- ],
204
50
  },
205
51
  UNI: {
206
52
  name: "UNI",
207
53
  symbol: "UNI",
208
54
  type: tokenType_1.TokenType.NORMAL_TOKEN,
209
- swapActions: [
210
- {
211
- type: tradeTypes_1.TradeType.UniswapV3Swap,
212
- contract: "UNISWAP_V3_ROUTER",
213
- },
214
- {
215
- type: tradeTypes_1.TradeType.UniswapV2Swap,
216
- contract: "UNISWAP_V2_ROUTER",
217
- },
218
- ],
219
55
  },
220
56
  USDC: {
221
57
  name: "USDC",
222
58
  symbol: "USDC",
223
59
  type: tokenType_1.TokenType.NORMAL_TOKEN,
224
- swapActions: [
225
- {
226
- type: tradeTypes_1.TradeType.UniswapV3Swap,
227
- contract: "UNISWAP_V3_ROUTER",
228
- },
229
- {
230
- type: tradeTypes_1.TradeType.UniswapV2Swap,
231
- contract: "UNISWAP_V2_ROUTER",
232
- },
233
- {
234
- type: tradeTypes_1.TradeType.UniswapV2Swap,
235
- contract: "SUSHISWAP_ROUTER",
236
- },
237
- {
238
- type: tradeTypes_1.TradeType.CurveExchange,
239
- contract: "CURVE_3CRV_POOL",
240
- tokenOut: ["DAI", "USDT"],
241
- },
242
- {
243
- type: tradeTypes_1.TradeType.CurveExchange,
244
- contract: "CURVE_SUSD_POOL",
245
- tokenOut: ["DAI", "USDT", "sUSD"],
246
- },
247
- ],
248
- lpActions: [
249
- {
250
- type: tradeTypes_1.TradeType.CurveDepositLP,
251
- contract: "CURVE_3CRV_POOL",
252
- tokenOut: "3Crv",
253
- },
254
- {
255
- type: tradeTypes_1.TradeType.CurveDepositLP,
256
- contract: "CURVE_SUSD_POOL",
257
- tokenOut: "crvPlain3andSUSD",
258
- },
259
- {
260
- type: tradeTypes_1.TradeType.YearnDeposit,
261
- contract: "YEARN_USDC_VAULT",
262
- tokenOut: "yvUSDC",
263
- },
264
- ],
265
60
  },
266
61
  USDT: {
267
62
  name: "USDT",
268
63
  symbol: "USDT",
269
64
  type: tokenType_1.TokenType.NORMAL_TOKEN,
270
- swapActions: [
271
- {
272
- type: tradeTypes_1.TradeType.UniswapV3Swap,
273
- contract: "UNISWAP_V3_ROUTER",
274
- },
275
- {
276
- type: tradeTypes_1.TradeType.UniswapV2Swap,
277
- contract: "UNISWAP_V2_ROUTER",
278
- },
279
- {
280
- type: tradeTypes_1.TradeType.UniswapV2Swap,
281
- contract: "SUSHISWAP_ROUTER",
282
- },
283
- {
284
- type: tradeTypes_1.TradeType.CurveExchange,
285
- contract: "CURVE_3CRV_POOL",
286
- tokenOut: ["USDC", "DAI"],
287
- },
288
- {
289
- type: tradeTypes_1.TradeType.CurveExchange,
290
- contract: "CURVE_SUSD_POOL",
291
- tokenOut: ["DAI", "USDC", "sUSD"],
292
- },
293
- ],
294
- lpActions: [
295
- {
296
- type: tradeTypes_1.TradeType.CurveDepositLP,
297
- contract: "CURVE_3CRV_POOL",
298
- tokenOut: "3Crv",
299
- },
300
- {
301
- type: tradeTypes_1.TradeType.CurveDepositLP,
302
- contract: "CURVE_SUSD_POOL",
303
- tokenOut: "crvPlain3andSUSD",
304
- },
305
- ],
306
65
  },
307
66
  WBTC: {
308
67
  name: "WBTC",
309
68
  symbol: "WBTC",
310
69
  type: tokenType_1.TokenType.NORMAL_TOKEN,
311
- swapActions: [
312
- {
313
- type: tradeTypes_1.TradeType.UniswapV3Swap,
314
- contract: "UNISWAP_V3_ROUTER",
315
- },
316
- {
317
- type: tradeTypes_1.TradeType.UniswapV2Swap,
318
- contract: "UNISWAP_V2_ROUTER",
319
- },
320
- {
321
- type: tradeTypes_1.TradeType.UniswapV2Swap,
322
- contract: "SUSHISWAP_ROUTER",
323
- },
324
- ],
325
- lpActions: [
326
- {
327
- type: tradeTypes_1.TradeType.YearnDeposit,
328
- contract: "YEARN_WBTC_VAULT",
329
- tokenOut: "yvWBTC",
330
- },
331
- ],
332
70
  },
333
71
  WETH: {
334
72
  name: "WETH",
335
73
  symbol: "WETH",
336
74
  type: tokenType_1.TokenType.NORMAL_TOKEN,
337
- swapActions: [
338
- {
339
- type: tradeTypes_1.TradeType.UniswapV3Swap,
340
- contract: "UNISWAP_V3_ROUTER",
341
- },
342
- {
343
- type: tradeTypes_1.TradeType.UniswapV2Swap,
344
- contract: "UNISWAP_V2_ROUTER",
345
- },
346
- {
347
- type: tradeTypes_1.TradeType.UniswapV2Swap,
348
- contract: "SUSHISWAP_ROUTER",
349
- },
350
- {
351
- type: tradeTypes_1.TradeType.CurveExchange,
352
- contract: "CURVE_STETH_GATEWAY",
353
- tokenOut: ["STETH"],
354
- },
355
- ],
356
- lpActions: [
357
- {
358
- type: tradeTypes_1.TradeType.YearnDeposit,
359
- contract: "YEARN_WETH_VAULT",
360
- tokenOut: "yvWETH",
361
- },
362
- {
363
- type: tradeTypes_1.TradeType.CurveDepositLP,
364
- contract: "CURVE_STETH_GATEWAY",
365
- tokenOut: "steCRV",
366
- },
367
- {
368
- type: tradeTypes_1.TradeType.BalancerJoin,
369
- contract: "BALANCER_VAULT",
370
- tokenOut: "50OHM_50WETH",
371
- },
372
- ],
373
75
  },
374
76
  YFI: {
375
77
  name: "YFI",
376
78
  symbol: "YFI",
377
79
  type: tokenType_1.TokenType.NORMAL_TOKEN,
378
- swapActions: [
379
- {
380
- type: tradeTypes_1.TradeType.UniswapV3Swap,
381
- contract: "UNISWAP_V3_ROUTER",
382
- },
383
- {
384
- type: tradeTypes_1.TradeType.UniswapV2Swap,
385
- contract: "UNISWAP_V2_ROUTER",
386
- },
387
- {
388
- type: tradeTypes_1.TradeType.UniswapV2Swap,
389
- contract: "SUSHISWAP_ROUTER",
390
- },
391
- ],
392
80
  },
393
81
  /// UPDATE
394
82
  STETH: {
395
83
  name: "stETH",
396
84
  symbol: "STETH",
397
85
  type: tokenType_1.TokenType.NORMAL_TOKEN,
398
- swapActions: [
399
- {
400
- type: tradeTypes_1.TradeType.UniswapV3Swap,
401
- contract: "UNISWAP_V3_ROUTER",
402
- },
403
- {
404
- type: tradeTypes_1.TradeType.UniswapV2Swap,
405
- contract: "UNISWAP_V2_ROUTER",
406
- },
407
- {
408
- type: tradeTypes_1.TradeType.UniswapV2Swap,
409
- contract: "SUSHISWAP_ROUTER",
410
- },
411
- {
412
- type: tradeTypes_1.TradeType.CurveExchange,
413
- contract: "CURVE_STETH_GATEWAY",
414
- tokenOut: ["WETH"],
415
- },
416
- ],
417
- lpActions: [
418
- {
419
- type: tradeTypes_1.TradeType.CurveDepositLP,
420
- contract: "CURVE_STETH_GATEWAY",
421
- tokenOut: "steCRV",
422
- },
423
- ],
424
86
  },
425
87
  wstETH: {
426
88
  name: "wstETH",
427
89
  symbol: "wstETH",
428
90
  type: tokenType_1.TokenType.NORMAL_TOKEN,
429
- swapActions: [
430
- {
431
- type: tradeTypes_1.TradeType.UniswapV3Swap,
432
- contract: "UNISWAP_V3_ROUTER",
433
- },
434
- {
435
- type: tradeTypes_1.TradeType.UniswapV2Swap,
436
- contract: "UNISWAP_V2_ROUTER",
437
- },
438
- {
439
- type: tradeTypes_1.TradeType.UniswapV2Swap,
440
- contract: "SUSHISWAP_ROUTER",
441
- },
442
- {
443
- type: tradeTypes_1.TradeType.CurveExchange,
444
- contract: "CURVE_STETH_GATEWAY",
445
- tokenOut: ["WETH"],
446
- },
447
- ],
448
- lpActions: [
449
- {
450
- type: tradeTypes_1.TradeType.BalancerJoin,
451
- contract: "BALANCER_VAULT",
452
- tokenOut: "OHM_wstETH",
453
- },
454
- ],
455
91
  },
456
92
  CVX: {
457
93
  name: "CVX",
458
94
  symbol: "CVX",
459
95
  type: tokenType_1.TokenType.NORMAL_TOKEN,
460
- swapActions: [
461
- {
462
- type: tradeTypes_1.TradeType.UniswapV3Swap,
463
- contract: "UNISWAP_V3_ROUTER",
464
- },
465
- {
466
- type: tradeTypes_1.TradeType.UniswapV2Swap,
467
- contract: "UNISWAP_V2_ROUTER",
468
- },
469
- {
470
- type: tradeTypes_1.TradeType.UniswapV2Swap,
471
- contract: "SUSHISWAP_ROUTER",
472
- },
473
- ],
474
96
  },
475
97
  FRAX: {
476
98
  name: "FRAX",
477
99
  symbol: "FRAX",
478
100
  type: tokenType_1.TokenType.NORMAL_TOKEN,
479
- swapActions: [
480
- {
481
- type: tradeTypes_1.TradeType.UniswapV3Swap,
482
- contract: "UNISWAP_V3_ROUTER",
483
- },
484
- {
485
- type: tradeTypes_1.TradeType.UniswapV2Swap,
486
- contract: "UNISWAP_V2_ROUTER",
487
- },
488
- {
489
- type: tradeTypes_1.TradeType.UniswapV2Swap,
490
- contract: "SUSHISWAP_ROUTER",
491
- },
492
- {
493
- type: tradeTypes_1.TradeType.CurveExchange,
494
- contract: "CURVE_FRAX_POOL",
495
- tokenOut: ["3Crv"],
496
- },
497
- ],
498
- lpActions: [
499
- {
500
- type: tradeTypes_1.TradeType.CurveDepositLP,
501
- contract: "CURVE_FRAX_POOL",
502
- tokenOut: "FRAX3CRV",
503
- },
504
- ],
505
101
  },
506
102
  FXS: {
507
103
  name: "FXS",
508
104
  symbol: "FXS",
509
105
  type: tokenType_1.TokenType.NORMAL_TOKEN,
510
- swapActions: [
511
- {
512
- type: tradeTypes_1.TradeType.UniswapV3Swap,
513
- contract: "UNISWAP_V3_ROUTER",
514
- },
515
- {
516
- type: tradeTypes_1.TradeType.UniswapV2Swap,
517
- contract: "UNISWAP_V2_ROUTER",
518
- },
519
- {
520
- type: tradeTypes_1.TradeType.UniswapV2Swap,
521
- contract: "SUSHISWAP_ROUTER",
522
- },
523
- ],
524
106
  },
525
107
  LDO: {
526
108
  name: "LDO",
527
109
  symbol: "LDO",
528
110
  type: tokenType_1.TokenType.NORMAL_TOKEN,
529
- swapActions: [
530
- {
531
- type: tradeTypes_1.TradeType.UniswapV3Swap,
532
- contract: "UNISWAP_V3_ROUTER",
533
- },
534
- {
535
- type: tradeTypes_1.TradeType.UniswapV2Swap,
536
- contract: "UNISWAP_V2_ROUTER",
537
- },
538
- {
539
- type: tradeTypes_1.TradeType.UniswapV2Swap,
540
- contract: "SUSHISWAP_ROUTER",
541
- },
542
- ],
543
111
  },
544
112
  LUSD: {
545
113
  name: "LUSD",
546
114
  symbol: "LUSD",
547
115
  type: tokenType_1.TokenType.NORMAL_TOKEN,
548
- swapActions: [
549
- {
550
- type: tradeTypes_1.TradeType.UniswapV3Swap,
551
- contract: "UNISWAP_V3_ROUTER",
552
- },
553
- {
554
- type: tradeTypes_1.TradeType.UniswapV2Swap,
555
- contract: "UNISWAP_V2_ROUTER",
556
- },
557
- {
558
- type: tradeTypes_1.TradeType.UniswapV2Swap,
559
- contract: "SUSHISWAP_ROUTER",
560
- },
561
- {
562
- type: tradeTypes_1.TradeType.CurveExchange,
563
- contract: "CURVE_LUSD_POOL",
564
- tokenOut: ["3Crv"],
565
- },
566
- ],
567
- lpActions: [
568
- {
569
- type: tradeTypes_1.TradeType.CurveDepositLP,
570
- contract: "CURVE_LUSD_POOL",
571
- tokenOut: "LUSD3CRV",
572
- },
573
- ],
574
116
  },
575
117
  sUSD: {
576
118
  name: "sUSD",
577
119
  symbol: "sUSD",
578
120
  type: tokenType_1.TokenType.NORMAL_TOKEN,
579
- swapActions: [
580
- {
581
- type: tradeTypes_1.TradeType.UniswapV3Swap,
582
- contract: "UNISWAP_V3_ROUTER",
583
- },
584
- {
585
- type: tradeTypes_1.TradeType.UniswapV2Swap,
586
- contract: "UNISWAP_V2_ROUTER",
587
- },
588
- {
589
- type: tradeTypes_1.TradeType.UniswapV2Swap,
590
- contract: "SUSHISWAP_ROUTER",
591
- },
592
- {
593
- type: tradeTypes_1.TradeType.CurveExchange,
594
- contract: "CURVE_SUSD_POOL",
595
- tokenOut: ["DAI", "USDT", "USDC"],
596
- },
597
- ],
598
- lpActions: [
599
- {
600
- type: tradeTypes_1.TradeType.CurveDepositLP,
601
- contract: "CURVE_SUSD_POOL",
602
- tokenOut: "crvPlain3andSUSD",
603
- },
604
- ],
605
121
  },
606
122
  GUSD: {
607
123
  name: "GUSD",
608
124
  symbol: "GUSD",
609
125
  type: tokenType_1.TokenType.NORMAL_TOKEN,
610
- swapActions: [
611
- {
612
- type: tradeTypes_1.TradeType.UniswapV3Swap,
613
- contract: "UNISWAP_V3_ROUTER",
614
- },
615
- {
616
- type: tradeTypes_1.TradeType.UniswapV2Swap,
617
- contract: "UNISWAP_V2_ROUTER",
618
- },
619
- {
620
- type: tradeTypes_1.TradeType.UniswapV2Swap,
621
- contract: "SUSHISWAP_ROUTER",
622
- },
623
- {
624
- type: tradeTypes_1.TradeType.CurveExchange,
625
- contract: "CURVE_GUSD_POOL",
626
- tokenOut: ["3Crv"],
627
- },
628
- ],
629
- lpActions: [
630
- {
631
- type: tradeTypes_1.TradeType.CurveDepositLP,
632
- contract: "CURVE_GUSD_POOL",
633
- tokenOut: "gusd3CRV",
634
- },
635
- ],
636
126
  },
637
127
  LQTY: {
638
128
  name: "LQTY",
639
129
  symbol: "LQTY",
640
130
  type: tokenType_1.TokenType.NORMAL_TOKEN,
641
- swapActions: [
642
- {
643
- type: tradeTypes_1.TradeType.UniswapV3Swap,
644
- contract: "UNISWAP_V3_ROUTER",
645
- },
646
- {
647
- type: tradeTypes_1.TradeType.UniswapV2Swap,
648
- contract: "UNISWAP_V2_ROUTER",
649
- },
650
- {
651
- type: tradeTypes_1.TradeType.UniswapV2Swap,
652
- contract: "SUSHISWAP_ROUTER",
653
- },
654
- ],
655
131
  },
656
132
  OHM: {
657
133
  name: "OHM",
658
134
  symbol: "OHM",
659
135
  type: tokenType_1.TokenType.NORMAL_TOKEN,
660
- swapActions: [],
661
- lpActions: [
662
- {
663
- type: tradeTypes_1.TradeType.BalancerJoin,
664
- contract: "BALANCER_VAULT",
665
- tokenOut: "50OHM_50DAI",
666
- },
667
- {
668
- type: tradeTypes_1.TradeType.BalancerJoin,
669
- contract: "BALANCER_VAULT",
670
- tokenOut: "50OHM_50WETH",
671
- },
672
- {
673
- type: tradeTypes_1.TradeType.BalancerJoin,
674
- contract: "BALANCER_VAULT",
675
- tokenOut: "OHM_wstETH",
676
- },
677
- ],
678
136
  },
679
137
  MIM: {
680
138
  name: "MIM",
681
139
  symbol: "MIM",
682
140
  type: tokenType_1.TokenType.NORMAL_TOKEN,
683
- swapActions: [
684
- {
685
- type: tradeTypes_1.TradeType.UniswapV3Swap,
686
- contract: "UNISWAP_V3_ROUTER",
687
- },
688
- {
689
- type: tradeTypes_1.TradeType.UniswapV2Swap,
690
- contract: "UNISWAP_V2_ROUTER",
691
- },
692
- {
693
- type: tradeTypes_1.TradeType.UniswapV2Swap,
694
- contract: "SUSHISWAP_ROUTER",
695
- },
696
- {
697
- type: tradeTypes_1.TradeType.CurveExchange,
698
- contract: "CURVE_MIM_POOL",
699
- tokenOut: ["3Crv"],
700
- },
701
- ],
702
- lpActions: [
703
- {
704
- type: tradeTypes_1.TradeType.CurveDepositLP,
705
- contract: "CURVE_MIM_POOL",
706
- tokenOut: "MIM_3LP3CRV",
707
- },
708
- ],
709
141
  },
710
142
  SPELL: {
711
143
  name: "SPELL",
712
144
  symbol: "SPELL",
713
145
  type: tokenType_1.TokenType.NORMAL_TOKEN,
714
- swapActions: [
715
- {
716
- type: tradeTypes_1.TradeType.UniswapV3Swap,
717
- contract: "UNISWAP_V3_ROUTER",
718
- },
719
- {
720
- type: tradeTypes_1.TradeType.UniswapV2Swap,
721
- contract: "UNISWAP_V2_ROUTER",
722
- },
723
- {
724
- type: tradeTypes_1.TradeType.UniswapV2Swap,
725
- contract: "SUSHISWAP_ROUTER",
726
- },
727
- ],
728
- lpActions: [],
729
146
  },
730
147
  GMX: {
731
148
  name: "GMX",
732
149
  symbol: "GMX",
733
150
  type: tokenType_1.TokenType.NORMAL_TOKEN,
734
- swapActions: [
735
- {
736
- type: tradeTypes_1.TradeType.UniswapV3Swap,
737
- contract: "UNISWAP_V3_ROUTER",
738
- },
739
- {
740
- type: tradeTypes_1.TradeType.UniswapV2Swap,
741
- contract: "UNISWAP_V2_ROUTER",
742
- },
743
- {
744
- type: tradeTypes_1.TradeType.UniswapV2Swap,
745
- contract: "SUSHISWAP_ROUTER",
746
- },
747
- ],
748
- lpActions: [],
749
151
  },
750
152
  ARB: {
751
153
  name: "ARB",
752
154
  symbol: "ARB",
753
155
  type: tokenType_1.TokenType.NORMAL_TOKEN,
754
- swapActions: [
755
- {
756
- type: tradeTypes_1.TradeType.UniswapV3Swap,
757
- contract: "UNISWAP_V3_ROUTER",
758
- },
759
- {
760
- type: tradeTypes_1.TradeType.UniswapV2Swap,
761
- contract: "UNISWAP_V2_ROUTER",
762
- },
763
- {
764
- type: tradeTypes_1.TradeType.UniswapV2Swap,
765
- contract: "SUSHISWAP_ROUTER",
766
- },
767
- ],
768
- lpActions: [],
769
156
  },
770
157
  RDNT: {
771
158
  name: "RDNT",
772
159
  symbol: "RDNT",
773
160
  type: tokenType_1.TokenType.NORMAL_TOKEN,
774
- swapActions: [
775
- {
776
- type: tradeTypes_1.TradeType.UniswapV3Swap,
777
- contract: "UNISWAP_V3_ROUTER",
778
- },
779
- {
780
- type: tradeTypes_1.TradeType.UniswapV2Swap,
781
- contract: "UNISWAP_V2_ROUTER",
782
- },
783
- {
784
- type: tradeTypes_1.TradeType.UniswapV2Swap,
785
- contract: "SUSHISWAP_ROUTER",
786
- },
787
- ],
788
- lpActions: [],
789
161
  },
790
162
  BAL: {
791
163
  name: "BAL",
792
164
  symbol: "BAL",
793
165
  type: tokenType_1.TokenType.NORMAL_TOKEN,
794
- swapActions: [
795
- {
796
- type: tradeTypes_1.TradeType.UniswapV3Swap,
797
- contract: "UNISWAP_V3_ROUTER",
798
- },
799
- {
800
- type: tradeTypes_1.TradeType.UniswapV2Swap,
801
- contract: "UNISWAP_V2_ROUTER",
802
- },
803
- {
804
- type: tradeTypes_1.TradeType.UniswapV2Swap,
805
- contract: "SUSHISWAP_ROUTER",
806
- },
807
- ],
808
- lpActions: [],
809
166
  },
810
167
  SHIB: {
811
168
  name: "SHIB",
812
169
  symbol: "SHIB",
813
170
  type: tokenType_1.TokenType.NORMAL_TOKEN,
814
- swapActions: [
815
- {
816
- type: tradeTypes_1.TradeType.UniswapV3Swap,
817
- contract: "UNISWAP_V3_ROUTER",
818
- },
819
- {
820
- type: tradeTypes_1.TradeType.UniswapV2Swap,
821
- contract: "UNISWAP_V2_ROUTER",
822
- },
823
- ],
824
- lpActions: [],
825
171
  },
826
172
  crvUSD: {
827
173
  name: "crvUSD",
828
174
  symbol: "crvUSD",
829
175
  type: tokenType_1.TokenType.NORMAL_TOKEN,
830
- swapActions: [
831
- {
832
- type: tradeTypes_1.TradeType.CurveExchange,
833
- contract: "CURVE_CRVUSD_USDC_POOL",
834
- tokenOut: ["USDC"],
835
- },
836
- {
837
- type: tradeTypes_1.TradeType.CurveExchange,
838
- contract: "CURVE_CRVUSD_USDT_POOL",
839
- tokenOut: ["USDT"],
840
- },
841
- {
842
- type: tradeTypes_1.TradeType.CurveExchange,
843
- contract: "CURVE_CRVUSD_FRAX_POOL",
844
- tokenOut: ["FRAX"],
845
- },
846
- {
847
- type: tradeTypes_1.TradeType.CurveExchange,
848
- contract: "CURVE_TRI_CRV_POOL",
849
- tokenOut: ["WETH", "CRV"],
850
- },
851
- ],
852
176
  },
853
177
  MKR: {
854
178
  name: "MKR",
855
179
  symbol: "MKR",
856
180
  type: tokenType_1.TokenType.NORMAL_TOKEN,
857
- swapActions: [
858
- {
859
- type: tradeTypes_1.TradeType.UniswapV3Swap,
860
- contract: "UNISWAP_V3_ROUTER",
861
- },
862
- {
863
- type: tradeTypes_1.TradeType.UniswapV2Swap,
864
- contract: "UNISWAP_V2_ROUTER",
865
- },
866
- {
867
- type: tradeTypes_1.TradeType.UniswapV2Swap,
868
- contract: "SUSHISWAP_ROUTER",
869
- },
870
- ],
871
181
  },
872
182
  RPL: {
873
183
  name: "RPL",
874
184
  symbol: "RPL",
875
185
  type: tokenType_1.TokenType.NORMAL_TOKEN,
876
- swapActions: [
877
- {
878
- type: tradeTypes_1.TradeType.UniswapV3Swap,
879
- contract: "UNISWAP_V3_ROUTER",
880
- },
881
- {
882
- type: tradeTypes_1.TradeType.UniswapV2Swap,
883
- contract: "UNISWAP_V2_ROUTER",
884
- },
885
- {
886
- type: tradeTypes_1.TradeType.UniswapV2Swap,
887
- contract: "SUSHISWAP_ROUTER",
888
- },
889
- ],
890
186
  },
891
187
  APE: {
892
188
  name: "APE",
893
189
  symbol: "APE",
894
190
  type: tokenType_1.TokenType.NORMAL_TOKEN,
895
- swapActions: [
896
- {
897
- type: tradeTypes_1.TradeType.UniswapV3Swap,
898
- contract: "UNISWAP_V3_ROUTER",
899
- },
900
- {
901
- type: tradeTypes_1.TradeType.UniswapV2Swap,
902
- contract: "UNISWAP_V2_ROUTER",
903
- },
904
- {
905
- type: tradeTypes_1.TradeType.UniswapV2Swap,
906
- contract: "SUSHISWAP_ROUTER",
907
- },
908
- ],
909
191
  },
910
192
  };
911
193
  const isNormalToken = (t) => typeof t === "string" && !!exports.normalTokens[t];