@gearbox-protocol/sdk 0.0.53 → 0.0.56

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 (63) hide show
  1. package/lib/core/contracts.d.ts +29 -16
  2. package/lib/core/contracts.js +45 -4
  3. package/lib/core/contractsRegister.js +24 -6
  4. package/lib/core/creditAccount.js +26 -20
  5. package/lib/core/events.d.ts +10 -10
  6. package/lib/core/events.js +22 -22
  7. package/lib/core/pathfinder.d.ts +35 -5
  8. package/lib/core/pathfinder.js +547 -67
  9. package/lib/core/priceFeeds.js +61 -0
  10. package/lib/core/token.d.ts +47 -15
  11. package/lib/core/token.js +204 -36
  12. package/lib/core/tradeTypes.d.ts +2 -0
  13. package/lib/core/transactions.d.ts +2 -2
  14. package/lib/core/transactions.js +10 -10
  15. package/lib/index.d.ts +2 -0
  16. package/lib/index.js +6 -1
  17. package/lib/pathfinder/connectorPathAsset.d.ts +7 -0
  18. package/lib/pathfinder/connectorPathAsset.js +144 -0
  19. package/lib/pathfinder/convexLPTokenPathAsset.d.ts +5 -0
  20. package/lib/pathfinder/convexLPTokenPathAsset.js +77 -0
  21. package/lib/pathfinder/curveLPPathAsset.d.ts +5 -0
  22. package/lib/pathfinder/curveLPPathAsset.js +72 -0
  23. package/lib/pathfinder/metaCurveLPPathAsset.d.ts +5 -0
  24. package/lib/pathfinder/metaCurveLPPathAsset.js +72 -0
  25. package/lib/pathfinder/normalTokenPathAsset.d.ts +5 -0
  26. package/lib/pathfinder/normalTokenPathAsset.js +136 -0
  27. package/lib/pathfinder/path.d.ts +41 -0
  28. package/lib/pathfinder/path.js +302 -0
  29. package/lib/pathfinder/pathfinder.d.ts +28 -0
  30. package/lib/pathfinder/pathfinder.js +519 -0
  31. package/lib/pathfinder/yearnVaultOfCurveLPPathAsset.d.ts +5 -0
  32. package/lib/pathfinder/yearnVaultOfCurveLPPathAsset.js +87 -0
  33. package/lib/pathfinder/yearnVaultOfMetaCurveLPPathAsset.d.ts +5 -0
  34. package/lib/pathfinder/yearnVaultOfMetaCurveLPPathAsset.js +87 -0
  35. package/lib/pathfinder/yearnVaultPathAsset.d.ts +5 -0
  36. package/lib/pathfinder/yearnVaultPathAsset.js +87 -0
  37. package/lib/utils/mappers.d.ts +6 -0
  38. package/lib/utils/mappers.js +33 -0
  39. package/lib/utils/types.d.ts +3 -0
  40. package/lib/utils/types.js +2 -0
  41. package/package.json +1 -1
  42. package/src/core/adapters.ts +13 -15
  43. package/src/core/contracts.ts +111 -44
  44. package/src/core/contractsRegister.ts +16 -8
  45. package/src/core/creditAccount.ts +33 -19
  46. package/src/core/events.ts +30 -22
  47. package/src/core/priceFeeds.ts +66 -0
  48. package/src/core/token.ts +645 -370
  49. package/src/core/tradeTypes.ts +2 -0
  50. package/src/core/transactions.ts +10 -10
  51. package/src/index.ts +2 -0
  52. package/src/pathfinder/connectorPathAsset.ts +69 -0
  53. package/src/pathfinder/convexLPTokenPathAsset.ts +33 -0
  54. package/src/pathfinder/curveLPPathAsset.ts +10 -0
  55. package/src/pathfinder/metaCurveLPPathAsset.ts +12 -0
  56. package/src/pathfinder/normalTokenPathAsset.ts +68 -0
  57. package/src/pathfinder/path.ts +259 -0
  58. package/src/pathfinder/yearnVaultOfCurveLPPathAsset.ts +22 -0
  59. package/src/pathfinder/yearnVaultOfMetaCurveLPPathAsset.ts +22 -0
  60. package/src/pathfinder/yearnVaultPathAsset.ts +27 -0
  61. package/src/utils/mappers.ts +23 -0
  62. package/src/utils/types.ts +3 -0
  63. package/src/core/pathfinder.ts +0 -115
package/lib/core/token.js CHANGED
@@ -1,8 +1,21 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var _a;
3
14
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.tokenDataByNetwork = exports.supportedTokens = exports.priority = exports.TokenType = void 0;
15
+ exports.tokenDataByAddress = exports.tokenDataByNetwork = exports.supportedTokens = exports.ConnectorTokens = exports.Curve3CrvUnderlyingTokenIndex = exports.priority = exports.TokenType = void 0;
16
+ var mappers_1 = require("../utils/mappers");
5
17
  var tradeTypes_1 = require("./tradeTypes");
18
+ var ethers_1 = require("ethers");
6
19
  var TokenType;
7
20
  (function (TokenType) {
8
21
  TokenType[TokenType["CONNECTOR"] = 0] = "CONNECTOR";
@@ -14,6 +27,7 @@ var TokenType;
14
27
  TokenType[TokenType["YEARN_VAULT_OF_META_CURVE_LP"] = 6] = "YEARN_VAULT_OF_META_CURVE_LP";
15
28
  TokenType[TokenType["CONVEX_LP_TOKEN"] = 7] = "CONVEX_LP_TOKEN";
16
29
  TokenType[TokenType["CONVEX_STAKED_PHANTOM_TOKEN"] = 8] = "CONVEX_STAKED_PHANTOM_TOKEN";
30
+ TokenType[TokenType["DIESEL_LP_TOKEN"] = 9] = "DIESEL_LP_TOKEN";
17
31
  })(TokenType = exports.TokenType || (exports.TokenType = {}));
18
32
  exports.priority = (_a = {},
19
33
  _a[TokenType.CONNECTOR] = 1,
@@ -25,9 +39,18 @@ exports.priority = (_a = {},
25
39
  _a[TokenType.CONVEX_LP_TOKEN] = 5,
26
40
  _a[TokenType.YEARN_VAULT_OF_META_CURVE_LP] = 5,
27
41
  _a[TokenType.CONVEX_STAKED_PHANTOM_TOKEN] = 5,
42
+ _a[TokenType.DIESEL_LP_TOKEN] = 6,
28
43
  _a);
44
+ exports.Curve3CrvUnderlyingTokenIndex = {
45
+ DAI: ethers_1.BigNumber.from(0),
46
+ USDC: ethers_1.BigNumber.from(1),
47
+ USDT: ethers_1.BigNumber.from(2)
48
+ };
49
+ exports.ConnectorTokens = ["DAI", "USDC", "WETH", "WBTC"];
29
50
  exports.supportedTokens = {
30
51
  "1INCH": {
52
+ name: "1INCH",
53
+ decimals: 18,
31
54
  symbol: "1INCH",
32
55
  type: TokenType.NORMAL_TOKEN,
33
56
  swapActions: [
@@ -42,10 +65,12 @@ exports.supportedTokens = {
42
65
  {
43
66
  type: tradeTypes_1.TradeType.UniswapV2Swap,
44
67
  contract: "SUSHISWAP_ROUTER"
45
- },
68
+ }
46
69
  ]
47
70
  },
48
71
  AAVE: {
72
+ name: "AAVE",
73
+ decimals: 18,
49
74
  symbol: "AAVE",
50
75
  type: TokenType.NORMAL_TOKEN,
51
76
  swapActions: [
@@ -60,10 +85,12 @@ exports.supportedTokens = {
60
85
  {
61
86
  type: tradeTypes_1.TradeType.UniswapV2Swap,
62
87
  contract: "SUSHISWAP_ROUTER"
63
- },
88
+ }
64
89
  ]
65
90
  },
66
91
  COMP: {
92
+ name: "COMP",
93
+ decimals: 18,
67
94
  symbol: "COMP",
68
95
  type: TokenType.NORMAL_TOKEN,
69
96
  swapActions: [
@@ -78,10 +105,12 @@ exports.supportedTokens = {
78
105
  {
79
106
  type: tradeTypes_1.TradeType.UniswapV2Swap,
80
107
  contract: "SUSHISWAP_ROUTER"
81
- },
108
+ }
82
109
  ]
83
110
  },
84
111
  CRV: {
112
+ name: "CRV",
113
+ decimals: 18,
85
114
  symbol: "CRV",
86
115
  type: TokenType.NORMAL_TOKEN,
87
116
  swapActions: [
@@ -96,10 +125,12 @@ exports.supportedTokens = {
96
125
  {
97
126
  type: tradeTypes_1.TradeType.UniswapV2Swap,
98
127
  contract: "SUSHISWAP_ROUTER"
99
- },
128
+ }
100
129
  ]
101
130
  },
102
131
  DAI: {
132
+ name: "DAI",
133
+ decimals: 18,
103
134
  symbol: "DAI",
104
135
  type: TokenType.CONNECTOR,
105
136
  swapActions: [
@@ -124,7 +155,7 @@ exports.supportedTokens = {
124
155
  type: tradeTypes_1.TradeType.CurveExchange,
125
156
  contract: "CURVE_SUSD_POOL",
126
157
  tokenOut: ["USDC", "USDT", "sUSD"]
127
- },
158
+ }
128
159
  ],
129
160
  lpActions: [
130
161
  {
@@ -145,6 +176,8 @@ exports.supportedTokens = {
145
176
  ]
146
177
  },
147
178
  DPI: {
179
+ name: "DPI",
180
+ decimals: 18,
148
181
  symbol: "DPI",
149
182
  type: TokenType.NORMAL_TOKEN,
150
183
  swapActions: [
@@ -163,6 +196,8 @@ exports.supportedTokens = {
163
196
  ]
164
197
  },
165
198
  FEI: {
199
+ name: "FEI",
200
+ decimals: 18,
166
201
  symbol: "FEI",
167
202
  type: TokenType.NORMAL_TOKEN,
168
203
  swapActions: [
@@ -181,6 +216,8 @@ exports.supportedTokens = {
181
216
  ]
182
217
  },
183
218
  LINK: {
219
+ name: "LINK",
220
+ decimals: 18,
184
221
  symbol: "LINK",
185
222
  type: TokenType.NORMAL_TOKEN,
186
223
  swapActions: [
@@ -199,6 +236,8 @@ exports.supportedTokens = {
199
236
  ]
200
237
  },
201
238
  SNX: {
239
+ name: "SNX",
240
+ decimals: 18,
202
241
  symbol: "SNX",
203
242
  type: TokenType.NORMAL_TOKEN,
204
243
  swapActions: [
@@ -217,6 +256,8 @@ exports.supportedTokens = {
217
256
  ]
218
257
  },
219
258
  SUSHI: {
259
+ name: "SUSHI",
260
+ decimals: 18,
220
261
  symbol: "SUSHI",
221
262
  type: TokenType.NORMAL_TOKEN,
222
263
  swapActions: [
@@ -227,6 +268,8 @@ exports.supportedTokens = {
227
268
  ]
228
269
  },
229
270
  UNI: {
271
+ name: "UNI",
272
+ decimals: 18,
230
273
  symbol: "UNI",
231
274
  type: TokenType.NORMAL_TOKEN,
232
275
  swapActions: [
@@ -241,6 +284,8 @@ exports.supportedTokens = {
241
284
  ]
242
285
  },
243
286
  USDC: {
287
+ name: "USDC",
288
+ decimals: 6,
244
289
  symbol: "USDC",
245
290
  type: TokenType.CONNECTOR,
246
291
  swapActions: [
@@ -286,6 +331,8 @@ exports.supportedTokens = {
286
331
  ]
287
332
  },
288
333
  USDT: {
334
+ name: "USDT",
335
+ decimals: 6,
289
336
  symbol: "USDT",
290
337
  type: TokenType.NORMAL_TOKEN,
291
338
  swapActions: [
@@ -310,7 +357,7 @@ exports.supportedTokens = {
310
357
  type: tradeTypes_1.TradeType.CurveExchange,
311
358
  contract: "CURVE_SUSD_POOL",
312
359
  tokenOut: ["DAI", "USDC", "sUSD"]
313
- },
360
+ }
314
361
  ],
315
362
  lpActions: [
316
363
  {
@@ -326,6 +373,8 @@ exports.supportedTokens = {
326
373
  ]
327
374
  },
328
375
  WBTC: {
376
+ name: "WBTC",
377
+ decimals: 8,
329
378
  symbol: "WBTC",
330
379
  type: TokenType.CONNECTOR,
331
380
  swapActions: [
@@ -351,6 +400,8 @@ exports.supportedTokens = {
351
400
  ]
352
401
  },
353
402
  WETH: {
403
+ name: "WETH",
404
+ decimals: 18,
354
405
  symbol: "WETH",
355
406
  type: TokenType.CONNECTOR,
356
407
  swapActions: [
@@ -382,10 +433,12 @@ exports.supportedTokens = {
382
433
  type: tradeTypes_1.TradeType.CurveDepositLP,
383
434
  contract: "CURVE_STETH_GATEWAY",
384
435
  tokenOut: "steCRV"
385
- },
436
+ }
386
437
  ]
387
438
  },
388
439
  YFI: {
440
+ name: "YFI",
441
+ decimals: 18,
389
442
  symbol: "YFI",
390
443
  type: TokenType.NORMAL_TOKEN,
391
444
  swapActions: [
@@ -405,6 +458,8 @@ exports.supportedTokens = {
405
458
  },
406
459
  /// UPDATE
407
460
  STETH: {
461
+ name: "stETH",
462
+ decimals: 18,
408
463
  symbol: "STETH",
409
464
  type: TokenType.NORMAL_TOKEN,
410
465
  swapActions: [
@@ -431,10 +486,12 @@ exports.supportedTokens = {
431
486
  type: tradeTypes_1.TradeType.CurveDepositLP,
432
487
  contract: "CURVE_STETH_GATEWAY",
433
488
  tokenOut: "steCRV"
434
- },
489
+ }
435
490
  ]
436
491
  },
437
492
  FTM: {
493
+ name: "FTM",
494
+ decimals: 18,
438
495
  symbol: "FTM",
439
496
  type: TokenType.NORMAL_TOKEN,
440
497
  swapActions: [
@@ -453,6 +510,8 @@ exports.supportedTokens = {
453
510
  ]
454
511
  },
455
512
  CVX: {
513
+ name: "CVX",
514
+ decimals: 18,
456
515
  symbol: "CVX",
457
516
  type: TokenType.NORMAL_TOKEN,
458
517
  swapActions: [
@@ -471,6 +530,8 @@ exports.supportedTokens = {
471
530
  ]
472
531
  },
473
532
  FRAX: {
533
+ name: "FRAX",
534
+ decimals: 18,
474
535
  symbol: "FRAX",
475
536
  type: TokenType.NORMAL_TOKEN,
476
537
  swapActions: [
@@ -501,6 +562,8 @@ exports.supportedTokens = {
501
562
  ]
502
563
  },
503
564
  FXS: {
565
+ name: "FXS",
566
+ decimals: 18,
504
567
  symbol: "FXS",
505
568
  type: TokenType.NORMAL_TOKEN,
506
569
  swapActions: [
@@ -519,6 +582,8 @@ exports.supportedTokens = {
519
582
  ]
520
583
  },
521
584
  LDO: {
585
+ name: "LDO",
586
+ decimals: 18,
522
587
  symbol: "LDO",
523
588
  type: TokenType.NORMAL_TOKEN,
524
589
  swapActions: [
@@ -537,6 +602,8 @@ exports.supportedTokens = {
537
602
  ]
538
603
  },
539
604
  SPELL: {
605
+ name: "SPELL",
606
+ decimals: 18,
540
607
  symbol: "SPELL",
541
608
  type: TokenType.NORMAL_TOKEN,
542
609
  swapActions: [
@@ -555,6 +622,8 @@ exports.supportedTokens = {
555
622
  ]
556
623
  },
557
624
  LUSD: {
625
+ name: "LUSD",
626
+ decimals: 18,
558
627
  symbol: "LUSD",
559
628
  type: TokenType.NORMAL_TOKEN,
560
629
  swapActions: [
@@ -585,6 +654,8 @@ exports.supportedTokens = {
585
654
  ]
586
655
  },
587
656
  sUSD: {
657
+ name: "sUSD",
658
+ decimals: 18,
588
659
  symbol: "sUSD",
589
660
  type: TokenType.NORMAL_TOKEN,
590
661
  swapActions: [
@@ -615,6 +686,8 @@ exports.supportedTokens = {
615
686
  ]
616
687
  },
617
688
  GUSD: {
689
+ name: "GUSD",
690
+ decimals: 18,
618
691
  symbol: "GUSD",
619
692
  type: TokenType.NORMAL_TOKEN,
620
693
  swapActions: [
@@ -645,6 +718,8 @@ exports.supportedTokens = {
645
718
  ]
646
719
  },
647
720
  LUNA: {
721
+ name: "LUNA",
722
+ decimals: 18,
648
723
  symbol: "LUNA",
649
724
  type: TokenType.NORMAL_TOKEN,
650
725
  swapActions: [
@@ -663,6 +738,8 @@ exports.supportedTokens = {
663
738
  ]
664
739
  },
665
740
  LQTY: {
741
+ name: "LQTY",
742
+ decimals: 18,
666
743
  symbol: "LQTY",
667
744
  type: TokenType.NORMAL_TOKEN,
668
745
  swapActions: [
@@ -682,6 +759,8 @@ exports.supportedTokens = {
682
759
  },
683
760
  // YEARN TOKENS
684
761
  yvDAI: {
762
+ name: "yvDAI",
763
+ decimals: 18,
685
764
  symbol: "yvDAI",
686
765
  type: TokenType.YEARN_VAULT,
687
766
  underlying: "DAI",
@@ -694,6 +773,8 @@ exports.supportedTokens = {
694
773
  ]
695
774
  },
696
775
  yvUSDC: {
776
+ name: "yvUSDC",
777
+ decimals: 6,
697
778
  symbol: "yvUSDC",
698
779
  type: TokenType.YEARN_VAULT,
699
780
  underlying: "USDC",
@@ -706,6 +787,8 @@ exports.supportedTokens = {
706
787
  ]
707
788
  },
708
789
  yvWETH: {
790
+ name: "yvWETH",
791
+ decimals: 18,
709
792
  symbol: "yvWETH",
710
793
  type: TokenType.YEARN_VAULT,
711
794
  underlying: "WETH",
@@ -718,6 +801,8 @@ exports.supportedTokens = {
718
801
  ]
719
802
  },
720
803
  yvWBTC: {
804
+ name: "yvWBTC",
805
+ decimals: 8,
721
806
  symbol: "yvWBTC",
722
807
  type: TokenType.YEARN_VAULT,
723
808
  underlying: "WBTC",
@@ -731,6 +816,8 @@ exports.supportedTokens = {
731
816
  },
732
817
  // CURVE LP TOKENS
733
818
  "3Crv": {
819
+ name: "3Crv",
820
+ decimals: 18,
734
821
  symbol: "3Crv",
735
822
  type: TokenType.CURVE_LP,
736
823
  lpActions: [
@@ -752,6 +839,8 @@ exports.supportedTokens = {
752
839
  ]
753
840
  },
754
841
  steCRV: {
842
+ name: "steCRV",
843
+ decimals: 18,
755
844
  symbol: "steCRV",
756
845
  type: TokenType.CURVE_LP,
757
846
  lpActions: [
@@ -773,6 +862,8 @@ exports.supportedTokens = {
773
862
  ]
774
863
  },
775
864
  crvPlain3andSUSD: {
865
+ name: "crvPlain3andSUSD",
866
+ decimals: 18,
776
867
  symbol: "crvPlain3andSUSD",
777
868
  type: TokenType.CURVE_LP,
778
869
  lpActions: [
@@ -795,6 +886,8 @@ exports.supportedTokens = {
795
886
  },
796
887
  // META CURVE LP TOKENS
797
888
  FRAX3CRV: {
889
+ name: "FRAX3CRV-f",
890
+ decimals: 18,
798
891
  symbol: "FRAX3CRV",
799
892
  type: TokenType.META_CURVE_LP,
800
893
  lpActions: [
@@ -816,6 +909,8 @@ exports.supportedTokens = {
816
909
  ]
817
910
  },
818
911
  LUSD3CRV: {
912
+ name: "LUSD3CRV-f",
913
+ decimals: 18,
819
914
  symbol: "LUSD3CRV",
820
915
  type: TokenType.META_CURVE_LP,
821
916
  lpActions: [
@@ -827,6 +922,8 @@ exports.supportedTokens = {
827
922
  ]
828
923
  },
829
924
  gusd3CRV: {
925
+ name: "gusd3CRV",
926
+ decimals: 18,
830
927
  symbol: "gusd3CRV",
831
928
  type: TokenType.META_CURVE_LP,
832
929
  lpActions: [
@@ -849,6 +946,8 @@ exports.supportedTokens = {
849
946
  },
850
947
  // CONVEX LP TOKENS
851
948
  cvx3Crv: {
949
+ name: "cvx3Crv",
950
+ decimals: 18,
852
951
  symbol: "cvx3Crv",
853
952
  type: TokenType.CONVEX_LP_TOKEN,
854
953
  pool: "CONVEX_3CRV_POOL",
@@ -868,6 +967,8 @@ exports.supportedTokens = {
868
967
  ]
869
968
  },
870
969
  cvxsteCRV: {
970
+ name: "cvxsteCRV",
971
+ decimals: 18,
871
972
  symbol: "cvxsteCRV",
872
973
  type: TokenType.CONVEX_LP_TOKEN,
873
974
  pool: "CONVEX_STECRV_POOL",
@@ -887,6 +988,8 @@ exports.supportedTokens = {
887
988
  ]
888
989
  },
889
990
  cvxFRAX3CRV: {
991
+ name: "cvxFRAX3CRV-f",
992
+ decimals: 18,
890
993
  symbol: "cvxFRAX3CRV",
891
994
  type: TokenType.CONVEX_LP_TOKEN,
892
995
  pool: "CONVEX_FRAX3CRV_POOL",
@@ -906,6 +1009,8 @@ exports.supportedTokens = {
906
1009
  ]
907
1010
  },
908
1011
  cvxcrvPlain3andSUSD: {
1012
+ name: "cvxcrvPlain3andSUSD",
1013
+ decimals: 18,
909
1014
  symbol: "cvxcrvPlain3andSUSD",
910
1015
  type: TokenType.CONVEX_LP_TOKEN,
911
1016
  pool: "CONVEX_SUSD_POOL",
@@ -925,6 +1030,8 @@ exports.supportedTokens = {
925
1030
  ]
926
1031
  },
927
1032
  cvxgusd3CRV: {
1033
+ name: "cvxgusd3CRV",
1034
+ decimals: 18,
928
1035
  symbol: "cvxgusd3CRV",
929
1036
  type: TokenType.CONVEX_LP_TOKEN,
930
1037
  pool: "CONVEX_GUSD_POOL",
@@ -943,33 +1050,10 @@ exports.supportedTokens = {
943
1050
  }
944
1051
  ]
945
1052
  },
946
- // YEARN- CURVE TOKENS
947
- yvCurve_stETH: {
948
- symbol: "yvCurve_stETH",
949
- type: TokenType.YEARN_VAULT_OF_CURVE_LP,
950
- underlying: "steCRV",
951
- lpActions: [
952
- {
953
- type: tradeTypes_1.TradeType.YearnWithdraw,
954
- contract: "YEARN_CURVE_STETH_VAULT",
955
- tokenOut: "steCRV"
956
- }
957
- ]
958
- },
959
- yvCURVE_FRAX_POOL: {
960
- symbol: "yvCURVE_FRAX_POOL",
961
- type: TokenType.YEARN_VAULT_OF_META_CURVE_LP,
962
- underlying: "FRAX3CRV",
963
- lpActions: [
964
- {
965
- type: tradeTypes_1.TradeType.YearnWithdraw,
966
- contract: "YEARN_CURVE_FRAX_VAULT",
967
- tokenOut: "FRAX3CRV"
968
- }
969
- ]
970
- },
971
1053
  // STAKED CONVEX
972
1054
  stkcvx3Crv: {
1055
+ name: "stkcvx3Crv",
1056
+ decimals: 18,
973
1057
  symbol: "stkcvx3Crv",
974
1058
  type: TokenType.CONVEX_STAKED_PHANTOM_TOKEN,
975
1059
  pool: "CONVEX_3CRV_POOL",
@@ -989,6 +1073,8 @@ exports.supportedTokens = {
989
1073
  ]
990
1074
  },
991
1075
  stkcvxsteCRV: {
1076
+ name: "stkcvxsteCRV",
1077
+ decimals: 18,
992
1078
  symbol: "stkcvxsteCRV",
993
1079
  type: TokenType.CONVEX_STAKED_PHANTOM_TOKEN,
994
1080
  pool: "CONVEX_STECRV_POOL",
@@ -1008,6 +1094,8 @@ exports.supportedTokens = {
1008
1094
  ]
1009
1095
  },
1010
1096
  stkcvxFRAX3CRV: {
1097
+ name: "stkcvxFRAX3CRV-f",
1098
+ decimals: 18,
1011
1099
  symbol: "stkcvxFRAX3CRV",
1012
1100
  type: TokenType.CONVEX_STAKED_PHANTOM_TOKEN,
1013
1101
  pool: "CONVEX_FRAX3CRV_POOL",
@@ -1027,6 +1115,8 @@ exports.supportedTokens = {
1027
1115
  ]
1028
1116
  },
1029
1117
  stkcvxcrvPlain3andSUSD: {
1118
+ name: "stkcvxcrvPlain3andSUSD",
1119
+ decimals: 18,
1030
1120
  symbol: "stkcvxcrvPlain3andSUSD",
1031
1121
  type: TokenType.CONVEX_STAKED_PHANTOM_TOKEN,
1032
1122
  pool: "CONVEX_SUSD_POOL",
@@ -1046,6 +1136,8 @@ exports.supportedTokens = {
1046
1136
  ]
1047
1137
  },
1048
1138
  stkcvxgusd3CRV: {
1139
+ name: "stkcvxgusd3CRV",
1140
+ decimals: 18,
1049
1141
  symbol: "stkcvxgusd3CRV",
1050
1142
  type: TokenType.CONVEX_STAKED_PHANTOM_TOKEN,
1051
1143
  pool: "CONVEX_GUSD_POOL",
@@ -1063,6 +1155,66 @@ exports.supportedTokens = {
1063
1155
  tokenOut: "gusd3CRV"
1064
1156
  }
1065
1157
  ]
1158
+ },
1159
+ // YEARN- CURVE TOKENS
1160
+ yvCurve_stETH: {
1161
+ name: "yvCurve-stETH",
1162
+ decimals: 18,
1163
+ symbol: "yvCurve_stETH",
1164
+ type: TokenType.YEARN_VAULT_OF_CURVE_LP,
1165
+ underlying: "steCRV",
1166
+ lpActions: [
1167
+ {
1168
+ type: tradeTypes_1.TradeType.YearnWithdraw,
1169
+ contract: "YEARN_CURVE_STETH_VAULT",
1170
+ tokenOut: "steCRV"
1171
+ }
1172
+ ]
1173
+ },
1174
+ yvCURVE_FRAX_POOL: {
1175
+ name: "yvCurve-FRAX",
1176
+ decimals: 18,
1177
+ symbol: "yvCURVE_FRAX_POOL",
1178
+ type: TokenType.YEARN_VAULT_OF_META_CURVE_LP,
1179
+ underlying: "FRAX3CRV",
1180
+ lpActions: [
1181
+ {
1182
+ type: tradeTypes_1.TradeType.YearnWithdraw,
1183
+ contract: "YEARN_CURVE_FRAX_VAULT",
1184
+ tokenOut: "FRAX3CRV"
1185
+ }
1186
+ ]
1187
+ },
1188
+ //GEARBOX
1189
+ dDAI: {
1190
+ name: "dDAI",
1191
+ decimals: 18,
1192
+ symbol: "dDAI",
1193
+ type: TokenType.DIESEL_LP_TOKEN
1194
+ },
1195
+ dUSDC: {
1196
+ name: "dUSDC",
1197
+ decimals: 6,
1198
+ symbol: "dUSDC",
1199
+ type: TokenType.DIESEL_LP_TOKEN
1200
+ },
1201
+ dWBTC: {
1202
+ name: "dWBTC",
1203
+ decimals: 8,
1204
+ symbol: "dWBTC",
1205
+ type: TokenType.DIESEL_LP_TOKEN
1206
+ },
1207
+ dWETH: {
1208
+ name: "dWETH",
1209
+ decimals: 18,
1210
+ symbol: "dWETH",
1211
+ type: TokenType.DIESEL_LP_TOKEN
1212
+ },
1213
+ GEAR: {
1214
+ name: "GEAR",
1215
+ decimals: 18,
1216
+ symbol: "GEAR",
1217
+ type: TokenType.NORMAL_TOKEN
1066
1218
  }
1067
1219
  };
1068
1220
  exports.tokenDataByNetwork = {
@@ -1124,7 +1276,13 @@ exports.tokenDataByNetwork = {
1124
1276
  stkcvxgusd3CRV: "0xc8124E539fD1F9E5E2F561f14aAAc5899681E274",
1125
1277
  // YEARN- CURVE TOKENS
1126
1278
  yvCurve_stETH: "0xdCD90C7f6324cfa40d7169ef80b12031770B4325",
1127
- yvCURVE_FRAX_POOL: "0xB4AdA607B9d6b2c9Ee07A275e9616B84AC560139"
1279
+ yvCURVE_FRAX_POOL: "0xB4AdA607B9d6b2c9Ee07A275e9616B84AC560139",
1280
+ //GEARBOX
1281
+ dDAI: "0x6CFaF95457d7688022FC53e7AbE052ef8DFBbdBA",
1282
+ dUSDC: "0xc411dB5f5Eb3f7d552F9B8454B2D74097ccdE6E3",
1283
+ dWBTC: "0xe753260F1955e8678DCeA8887759e07aa57E8c54",
1284
+ dWETH: "0xF21fc650C1B34eb0FDE786D52d23dA99Db3D6278",
1285
+ GEAR: "0xBa3335588D9403515223F109EdC4eB7269a9Ab5D"
1128
1286
  },
1129
1287
  //
1130
1288
  // KOVAN NETWORK
@@ -1186,6 +1344,16 @@ exports.tokenDataByNetwork = {
1186
1344
  stkcvxgusd3CRV: "",
1187
1345
  // YEARN- CURVE TOKENS
1188
1346
  yvCurve_stETH: "0xdDc2FA328321573Bc2647C0135D75012c522CDAC",
1189
- yvCURVE_FRAX_POOL: ""
1347
+ yvCURVE_FRAX_POOL: "",
1348
+ //GEARBOX
1349
+ dDAI: "0x6CFaF95457d7688022FC53e7AbE052ef8DFBbdBA",
1350
+ dUSDC: "0xc411dB5f5Eb3f7d552F9B8454B2D74097ccdE6E3",
1351
+ dWBTC: "0xe753260F1955e8678DCeA8887759e07aa57E8c54",
1352
+ dWETH: "0xF21fc650C1B34eb0FDE786D52d23dA99Db3D6278",
1353
+ GEAR: "0xBa3335588D9403515223F109EdC4eB7269a9Ab5D"
1190
1354
  }
1191
1355
  };
1356
+ exports.tokenDataByAddress = (0, mappers_1.objectEntries)(exports.tokenDataByNetwork).reduce(function (sum, _a) {
1357
+ var _ = _a[0], tokens = _a[1];
1358
+ return __assign(__assign({}, sum), (0, mappers_1.keyToLowercase)((0, mappers_1.swapKeyValue)(tokens)));
1359
+ }, {});
@@ -20,9 +20,11 @@ export declare enum TradeType {
20
20
  export declare type TradeAction = {
21
21
  type: TradeType.UniswapV2Swap;
22
22
  contract: UniswapV2Contract;
23
+ tokenOut?: NormalToken;
23
24
  } | {
24
25
  type: TradeType.UniswapV3Swap;
25
26
  contract: "UNISWAP_V3_ROUTER";
27
+ tokenOut?: NormalToken;
26
28
  } | {
27
29
  type: TradeType.CurveExchange;
28
30
  contract: CurvePoolContract;
@@ -103,7 +103,7 @@ interface RepayAccountProps extends EVMTxProps {
103
103
  export declare class TxRepayAccount extends EVMTx {
104
104
  readonly creditManager: string;
105
105
  constructor(opts: RepayAccountProps);
106
- toString(_tokenData: Record<string, TokenData>): string;
106
+ toString(_: Record<string, TokenData>): string;
107
107
  serialize(): TxSerialized;
108
108
  }
109
109
  interface CloseAccountProps extends EVMTxProps {
@@ -112,7 +112,7 @@ interface CloseAccountProps extends EVMTxProps {
112
112
  export declare class TxCloseAccount extends EVMTx {
113
113
  readonly creditManager: string;
114
114
  constructor(opts: CloseAccountProps);
115
- toString(_tokenData: Record<string, TokenData>): string;
115
+ toString(_: Record<string, TokenData>): string;
116
116
  serialize(): TxSerialized;
117
117
  }
118
118
  interface ApproveProps extends EVMTxProps {