@gearbox-protocol/sdk 0.0.4 → 0.0.7

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.
@@ -1,3 +1,140 @@
1
1
  import { NetworkType } from "./constants";
2
- import { TokenSavedData } from "./tokenData";
3
- export declare const tokenDataByNetwork: Record<NetworkType, Record<string, TokenSavedData>>;
2
+ export declare const supportedTokens: {
3
+ "1INCH": {
4
+ type: string;
5
+ };
6
+ AAVE: {
7
+ type: string;
8
+ };
9
+ COMP: {
10
+ type: string;
11
+ };
12
+ CRV: {
13
+ type: string;
14
+ };
15
+ DAI: {
16
+ type: string;
17
+ };
18
+ DPI: {
19
+ type: string;
20
+ };
21
+ FEI: {
22
+ type: string;
23
+ };
24
+ LINK: {
25
+ type: string;
26
+ };
27
+ SNX: {
28
+ type: string;
29
+ };
30
+ SUSHI: {
31
+ type: string;
32
+ };
33
+ UNI: {
34
+ type: string;
35
+ };
36
+ USDC: {
37
+ type: string;
38
+ };
39
+ USDT: {
40
+ type: string;
41
+ };
42
+ WBTC: {
43
+ type: string;
44
+ };
45
+ WETH: {
46
+ type: string;
47
+ };
48
+ YFI: {
49
+ type: string;
50
+ };
51
+ STETH: {
52
+ type: string;
53
+ };
54
+ FTM: {
55
+ type: string;
56
+ };
57
+ CVX: {
58
+ type: string;
59
+ };
60
+ FRAX: {
61
+ type: string;
62
+ };
63
+ FXS: {
64
+ type: string;
65
+ };
66
+ LDO: {
67
+ type: string;
68
+ };
69
+ SPELL: {
70
+ type: string;
71
+ };
72
+ LUSD: {
73
+ type: string;
74
+ };
75
+ sUSD: {
76
+ type: string;
77
+ };
78
+ GUSD: {
79
+ type: string;
80
+ };
81
+ LUNA: {
82
+ type: string;
83
+ };
84
+ yvDAI: {
85
+ type: string;
86
+ };
87
+ yvUSDC: {
88
+ type: string;
89
+ };
90
+ yvWETH: {
91
+ type: string;
92
+ };
93
+ yvWBTC: {
94
+ type: string;
95
+ };
96
+ "3Crv": {
97
+ type: string;
98
+ };
99
+ steCRV: {
100
+ type: string;
101
+ };
102
+ FRAX3CRV: {
103
+ type: string;
104
+ };
105
+ LUSD3CRV: {
106
+ type: string;
107
+ };
108
+ crvPlain3andSUSD: {
109
+ type: string;
110
+ };
111
+ gusd3CRV: {
112
+ type: string;
113
+ };
114
+ cvx3Crv: {
115
+ type: string;
116
+ };
117
+ cvxsteCRV: {
118
+ type: string;
119
+ };
120
+ cvxFRAX3CRV: {
121
+ type: string;
122
+ };
123
+ cvxcrvPlain3andSUSD: {
124
+ type: string;
125
+ };
126
+ cvxgusd3CRV: {
127
+ type: string;
128
+ };
129
+ yvCurve_stETH: {
130
+ type: string;
131
+ };
132
+ yvCurve_FRAX: {
133
+ type: string;
134
+ };
135
+ yvCurve_d3pool: {
136
+ type: string;
137
+ };
138
+ };
139
+ export declare type SupportedTokens = keyof typeof supportedTokens;
140
+ export declare const tokenDataByNetwork: Record<NetworkType, Record<SupportedTokens, string>>;
package/lib/core/token.js CHANGED
@@ -1,6 +1,148 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.tokenDataByNetwork = void 0;
3
+ exports.tokenDataByNetwork = exports.supportedTokens = void 0;
4
+ exports.supportedTokens = {
5
+ "1INCH": {
6
+ type: "volatile"
7
+ },
8
+ AAVE: {
9
+ type: "volatile"
10
+ },
11
+ COMP: {
12
+ type: "volatile"
13
+ },
14
+ CRV: {
15
+ type: "volatile"
16
+ },
17
+ DAI: {
18
+ type: "stable"
19
+ },
20
+ DPI: {
21
+ type: "volatile"
22
+ },
23
+ FEI: {
24
+ type: "stable"
25
+ },
26
+ LINK: {
27
+ type: "volatile"
28
+ },
29
+ SNX: {
30
+ type: "volatile"
31
+ },
32
+ SUSHI: {
33
+ type: "volatile"
34
+ },
35
+ UNI: {
36
+ type: "volatile"
37
+ },
38
+ USDC: {
39
+ type: "stable"
40
+ },
41
+ USDT: {
42
+ type: "stable"
43
+ },
44
+ WBTC: {
45
+ type: "core"
46
+ },
47
+ WETH: {
48
+ type: "core"
49
+ },
50
+ YFI: {
51
+ type: "volatile"
52
+ },
53
+ /// UPDATE
54
+ STETH: {
55
+ type: "volatile"
56
+ },
57
+ FTM: {
58
+ type: "volatile"
59
+ },
60
+ CVX: {
61
+ type: "volatile"
62
+ },
63
+ FRAX: {
64
+ type: "stable"
65
+ },
66
+ FXS: {
67
+ type: "volatile"
68
+ },
69
+ LDO: {
70
+ type: "volatile"
71
+ },
72
+ SPELL: {
73
+ type: "volatile"
74
+ },
75
+ LUSD: {
76
+ type: "stable"
77
+ },
78
+ sUSD: {
79
+ type: "stable"
80
+ },
81
+ GUSD: {
82
+ type: "stable"
83
+ },
84
+ LUNA: {
85
+ type: "volatile"
86
+ },
87
+ // YEARN TOKENS
88
+ yvDAI: {
89
+ type: "lp"
90
+ },
91
+ yvUSDC: {
92
+ type: "lp"
93
+ },
94
+ yvWETH: {
95
+ type: "lp"
96
+ },
97
+ yvWBTC: {
98
+ type: "lp"
99
+ },
100
+ // CURVE LP TOKENS
101
+ "3Crv": {
102
+ type: "lp"
103
+ },
104
+ steCRV: {
105
+ type: "lp"
106
+ },
107
+ FRAX3CRV: {
108
+ type: "lp"
109
+ },
110
+ LUSD3CRV: {
111
+ type: "lp"
112
+ },
113
+ crvPlain3andSUSD: {
114
+ type: "lp"
115
+ },
116
+ gusd3CRV: {
117
+ type: "lp"
118
+ },
119
+ // CONVEX LP TOKENS
120
+ cvx3Crv: {
121
+ type: "lp"
122
+ },
123
+ cvxsteCRV: {
124
+ type: "lp"
125
+ },
126
+ cvxFRAX3CRV: {
127
+ type: "lp"
128
+ },
129
+ cvxcrvPlain3andSUSD: {
130
+ type: "lp"
131
+ },
132
+ cvxgusd3CRV: {
133
+ type: "lp"
134
+ },
135
+ // YEARN- CURVE TOKENS
136
+ yvCurve_stETH: {
137
+ type: "lp"
138
+ },
139
+ yvCurve_FRAX: {
140
+ type: "lp"
141
+ },
142
+ yvCurve_d3pool: {
143
+ type: "lp"
144
+ }
145
+ };
4
146
  exports.tokenDataByNetwork = {
5
147
  //
6
148
  // MAINNET NETWORK
@@ -8,222 +150,111 @@ exports.tokenDataByNetwork = {
8
150
  // DAI DPI GRT LINK SNX SRM SUSHI UNI USDC
9
151
  // USDT YFI ZRX
10
152
  Mainnet: {
11
- "1INCH": {
12
- address: "0x111111111117dc0aa78b770fa6a738034120c302",
13
- type: "volatile"
14
- },
15
- AAVE: {
16
- address: "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9",
17
- type: "volatile"
18
- },
19
- COMP: {
20
- address: "0xc00e94cb662c3520282e6f5717214004a7f26888",
21
- type: "volatile"
22
- },
23
- CRV: {
24
- address: "0xD533a949740bb3306d119CC777fa900bA034cd52",
25
- type: "volatile"
26
- },
27
- DAI: {
28
- address: "0x6B175474E89094C44Da98b954EedeAC495271d0F",
29
- type: "stable"
30
- },
31
- DPI: {
32
- address: "0x1494ca1f11d487c2bbe4543e90080aeba4ba3c2b",
33
- type: "volatile"
34
- },
35
- FEI: {
36
- address: "0x956F47F50A910163D8BF957Cf5846D573E7f87CA",
37
- type: "stable"
38
- },
39
- LINK: {
40
- address: "0x514910771AF9Ca656af840dff83E8264EcF986CA",
41
- type: "volatile"
42
- },
43
- SNX: {
44
- address: "0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",
45
- type: "volatile"
46
- },
47
- SUSHI: {
48
- address: "0x6b3595068778dd592e39a122f4f5a5cf09c90fe2",
49
- type: "volatile"
50
- },
51
- UNI: {
52
- address: "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984",
53
- type: "volatile"
54
- },
55
- USDC: {
56
- address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
57
- type: "stable"
58
- },
59
- USDT: {
60
- address: "0xdac17f958d2ee523a2206206994597c13d831ec7",
61
- type: "stable"
62
- },
63
- WBTC: {
64
- address: "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
65
- type: "core"
66
- },
67
- WETH: {
68
- address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
69
- type: "core"
70
- },
71
- YFI: {
72
- address: "0x0bc529c00c6401aef6d220be8c6ea1667f6ad93e",
73
- type: "volatile"
74
- },
153
+ "1INCH": "0x111111111117dc0aa78b770fa6a738034120c302",
154
+ AAVE: "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9",
155
+ COMP: "0xc00e94cb662c3520282e6f5717214004a7f26888",
156
+ CRV: "0xD533a949740bb3306d119CC777fa900bA034cd52",
157
+ DAI: "0x6B175474E89094C44Da98b954EedeAC495271d0F",
158
+ DPI: "0x1494ca1f11d487c2bbe4543e90080aeba4ba3c2b",
159
+ FEI: "0x956F47F50A910163D8BF957Cf5846D573E7f87CA",
160
+ LINK: "0x514910771AF9Ca656af840dff83E8264EcF986CA",
161
+ SNX: "0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",
162
+ SUSHI: "0x6b3595068778dd592e39a122f4f5a5cf09c90fe2",
163
+ UNI: "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984",
164
+ USDC: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
165
+ USDT: "0xdac17f958d2ee523a2206206994597c13d831ec7",
166
+ WBTC: "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
167
+ WETH: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
168
+ YFI: "0x0bc529c00c6401aef6d220be8c6ea1667f6ad93e",
75
169
  /// UPDATE
76
- STETH: {
77
- address: "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
78
- type: "volatile"
79
- },
80
- FTM: {
81
- address: "0x4E15361FD6b4BB609Fa63C81A2be19d873717870",
82
- type: "volatile"
83
- },
84
- CVX: {
85
- address: "0x4e3fbd56cd56c3e72c1403e103b45db9da5b9d2b",
86
- type: "volatile"
87
- },
88
- FRAX: {
89
- address: "0x853d955acef822db058eb8505911ed77f175b99e",
90
- type: "stable"
91
- },
92
- FXS: {
93
- address: "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0",
94
- type: "volatile"
95
- },
96
- LDO: {
97
- address: "0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32",
98
- type: "volatile"
99
- },
100
- SPELL: {
101
- address: "0x090185f2135308BaD17527004364eBcC2D37e5F6",
102
- type: "volatile"
103
- },
104
- LUSD: {
105
- address: "0x5f98805A4E8be255a32880FDeC7F6728C6568bA0",
106
- type: "stable"
107
- },
108
- SUSD: {
109
- address: "0x57Ab1ec28D129707052df4dF418D58a2D46d5f51",
110
- type: "stable"
111
- },
112
- GUSD: {
113
- address: "0x056fd409e1d7a124bd7017459dfea2f387b6d5cd",
114
- type: "stable"
115
- },
170
+ STETH: "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
171
+ FTM: "0x4E15361FD6b4BB609Fa63C81A2be19d873717870",
172
+ CVX: "0x4e3fbd56cd56c3e72c1403e103b45db9da5b9d2b",
173
+ FRAX: "0x853d955acef822db058eb8505911ed77f175b99e",
174
+ FXS: "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0",
175
+ LDO: "0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32",
176
+ SPELL: "0x090185f2135308BaD17527004364eBcC2D37e5F6",
177
+ LUSD: "0x5f98805A4E8be255a32880FDeC7F6728C6568bA0",
178
+ sUSD: "0x57Ab1ec28D129707052df4dF418D58a2D46d5f51",
179
+ GUSD: "0x056fd409e1d7a124bd7017459dfea2f387b6d5cd",
180
+ LUNA: "0xd2877702675e6ceb975b4a1dff9fb7baf4c91ea9",
116
181
  // YEARN TOKENS
117
- yvDAI: {
118
- address: "0xdA816459F1AB5631232FE5e97a05BBBb94970c95",
119
- type: "lp"
120
- },
121
- yvUSDC: {
122
- address: "0xa354f35829ae975e850e23e9615b11da1b3dc4de",
123
- type: "lp"
124
- },
125
- yvWETH: {
126
- address: "0xa258C4606Ca8206D8aA700cE2143D7db854D168c",
127
- type: "lp"
128
- },
129
- yvWBTC: {
130
- address: "0xA696a63cc78DfFa1a63E9E50587C197387FF6C7E",
131
- type: "lp"
132
- },
182
+ yvDAI: "0xdA816459F1AB5631232FE5e97a05BBBb94970c95",
183
+ yvUSDC: "0xa354f35829ae975e850e23e9615b11da1b3dc4de",
184
+ yvWETH: "0xa258C4606Ca8206D8aA700cE2143D7db854D168c",
185
+ yvWBTC: "0xA696a63cc78DfFa1a63E9E50587C197387FF6C7E",
133
186
  // CURVE LP TOKENS
134
- "3Crv": {
135
- address: "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490",
136
- type: "lp"
137
- },
138
- steCRV: {
139
- address: "0x06325440d014e39736583c165c2963ba99faf14e",
140
- type: "lp"
141
- },
142
- FRAX3CRV: {
143
- address: "0xd632f22692fac7611d2aa1c0d552930d43caed3b",
144
- type: "lp"
145
- },
146
- LUSD3CRV: {
147
- address: "0xEd279fDD11cA84bEef15AF5D39BB4d4bEE23F0cA",
148
- type: "lp"
149
- },
150
- crvPlain3andSUSD: {
151
- address: "0xC25a3A3b969415c80451098fa907EC722572917F",
152
- type: "lp"
153
- },
154
- gusd3CRV: {
155
- address: "0xD2967f45c4f384DEEa880F807Be904762a3DeA07",
156
- type: "lp"
157
- },
187
+ "3Crv": "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490",
188
+ steCRV: "0x06325440d014e39736583c165c2963ba99faf14e",
189
+ FRAX3CRV: "0xd632f22692fac7611d2aa1c0d552930d43caed3b",
190
+ LUSD3CRV: "0xEd279fDD11cA84bEef15AF5D39BB4d4bEE23F0cA",
191
+ crvPlain3andSUSD: "0xC25a3A3b969415c80451098fa907EC722572917F",
192
+ gusd3CRV: "0xD2967f45c4f384DEEa880F807Be904762a3DeA07",
158
193
  // CONVEX LP TOKENS
159
- cvx3Crv: {
160
- address: "0x30D9410ED1D5DA1F6C8391af5338C93ab8d4035C",
161
- type: "lp"
162
- },
163
- cvxsteCRV: {
164
- address: "0x9518c9063eB0262D791f38d8d6Eb0aca33c63ed0",
165
- type: "lp"
166
- },
167
- cvxFRAX3CRV: {
168
- address: "0xbE0F6478E0E4894CFb14f32855603A083A57c7dA",
169
- type: "lp"
170
- },
171
- cvxcrvPlain3andSUSD: {
172
- address: "0x11D200ef1409cecA8D6d23e6496550f707772F11",
173
- type: "lp"
174
- },
175
- cvxgusd3CRV: {
176
- address: "0x15c2471ef46Fa721990730cfa526BcFb45574576",
177
- type: "lp"
178
- },
194
+ cvx3Crv: "0x30D9410ED1D5DA1F6C8391af5338C93ab8d4035C",
195
+ cvxsteCRV: "0x9518c9063eB0262D791f38d8d6Eb0aca33c63ed0",
196
+ cvxFRAX3CRV: "0xbE0F6478E0E4894CFb14f32855603A083A57c7dA",
197
+ cvxcrvPlain3andSUSD: "0x11D200ef1409cecA8D6d23e6496550f707772F11",
198
+ cvxgusd3CRV: "0x15c2471ef46Fa721990730cfa526BcFb45574576",
179
199
  // YEARN- CURVE TOKENS
180
- yvCurve_stETH: {
181
- address: "0xdCD90C7f6324cfa40d7169ef80b12031770B4325",
182
- type: "lp"
183
- },
184
- yvCurve_FRAX: {
185
- address: "0xB4AdA607B9d6b2c9Ee07A275e9616B84AC560139",
186
- type: "lp"
187
- },
188
- yvCurve_d3pool: {
189
- address: "0x16825039dfe2a5b01F3E1E6a2BBF9a576c6F95c4",
190
- type: "lp"
191
- }
200
+ yvCurve_stETH: "0xdCD90C7f6324cfa40d7169ef80b12031770B4325",
201
+ yvCurve_FRAX: "0xB4AdA607B9d6b2c9Ee07A275e9616B84AC560139",
202
+ yvCurve_d3pool: "0x16825039dfe2a5b01F3E1E6a2BBF9a576c6F95c4"
192
203
  },
193
204
  //
194
205
  // KOVAN NETWORK
195
206
  // DAI LINK REP SNX USDC WBTC ZRX
196
207
  //
197
208
  Kovan: {
198
- DAI: {
199
- address: "0x9DC7B33C3B63fc00ed5472fBD7813eDDa6a64752",
200
- type: "stable"
201
- },
202
- LINK: {
203
- address: "0x6C994935826574E870549F09efF43BA8089A3D25",
204
- type: "volatile"
205
- },
206
- // REP: {
207
- // address: "0x633317172c0D41451F62025D73CE59065A370a50",
208
- // priceFeedETH: "0x3A7e6117F2979EFf81855de32819FBba48a63e9e",
209
- // type: "volatile",
210
- // },
211
- SNX: {
212
- address: "0xB48891df9267EF65AABd32F497F6F2d1eB22A186",
213
- type: "volatile"
214
- },
215
- USDC: {
216
- address: "0x31EeB2d0F9B6fD8642914aB10F4dD473677D80df",
217
- type: "stable"
218
- },
219
- WBTC: {
220
- address: "0xE36bC5d8b689AD6d80e78c3e736670e80d4b329D",
221
- type: "core"
222
- }
223
- // ZRX: {
224
- // address: "0xB730c1449c58f29C69df33ccD5bd9d3cA66b23C1",
225
- // priceFeedETH: "0xBc3f28Ccc21E9b5856E81E6372aFf57307E2E883",
226
- // type: "volatile",
227
- // },
209
+ "1INCH": "0x6601ce61E41cd6760E763555A806AB5578EB2a9E",
210
+ AAVE: "0xed2eAe2533bc70dB9030174a7F085e0853289726",
211
+ COMP: "0x90F7A59Fa3993bBc6bA4C6c4ef515958a5bF8a24",
212
+ CRV: "0xD533a949740bb3306d119CC777fa900bA034cd52",
213
+ DAI: "0x9DC7B33C3B63fc00ed5472fBD7813eDDa6a64752",
214
+ DPI: "0xF4f06DE71eFc17799297573341C42f3B4C63D589",
215
+ FEI: "0xe1eC2f7B12d4be4075c3B53DB2e48C018B404179",
216
+ LINK: "0x6C994935826574E870549F09efF43BA8089A3D25",
217
+ SNX: "0xB48891df9267EF65AABd32F497F6F2d1eB22A186",
218
+ SUSHI: "0x635E9E7Aa9fA72C56B9A1286026A93E1b8c4090a",
219
+ UNI: "0x1B24F1F2CEFf945FE9EE017F929a6D31394f94b1",
220
+ USDT: "0xdac17f958d2ee523a2206206994597c13d831ec7",
221
+ USDC: "0x31EeB2d0F9B6fD8642914aB10F4dD473677D80df",
222
+ WBTC: "0xE36bC5d8b689AD6d80e78c3e736670e80d4b329D",
223
+ WETH: "",
224
+ YFI: "0x1df5DF6d0196bE6AE6A2EED915a0Cc6cAEA84C2D",
225
+ /// UPDATE
226
+ STETH: "0x3D98404e5854B785C168c12f9ACB0ab97BBa6702",
227
+ FTM: "0x5DE02cFf707eBC43f58DFB022518c18C66147b1E",
228
+ CVX: "0x4973acDDb1d3F2aB09f408A2dD004ED851D761be",
229
+ FRAX: "0x301b0B83E5F5deC5233075368B8b459CEedc0948",
230
+ FXS: "0x25eb8A9B30981d1F04C306829FEBc855FA86695A",
231
+ LDO: "0x99bB41898474aDb38e098fFdB0cD17d2619cA3ef",
232
+ SPELL: "0x20f979FD40caF4aaa4e7A179E1a5C422a897ca6c",
233
+ LUSD: "0x397acA500A56706dd4aAC0592Ed5B8CCAeCfc2d5",
234
+ sUSD: "0x32aeb9B672a81C43391c90a95a4D6c9A9D4459B6",
235
+ GUSD: "0x3cee6494bf400F8C24871dBD331B9436a9CfaBbb",
236
+ LUNA: "0x9dc1D71fAeE18bF77C6166aBC8b218D3336919F1",
237
+ // YEARN TOKENS
238
+ yvDAI: "",
239
+ yvUSDC: "",
240
+ yvWETH: "",
241
+ yvWBTC: "",
242
+ // CURVE LP TOKENS
243
+ "3Crv": "",
244
+ steCRV: "",
245
+ FRAX3CRV: "",
246
+ LUSD3CRV: "",
247
+ crvPlain3andSUSD: "",
248
+ gusd3CRV: "",
249
+ // CONVEX LP TOKENS
250
+ cvx3Crv: "",
251
+ cvxsteCRV: "",
252
+ cvxFRAX3CRV: "",
253
+ cvxcrvPlain3andSUSD: "",
254
+ cvxgusd3CRV: "",
255
+ // YEARN- CURVE TOKENS
256
+ yvCurve_stETH: "",
257
+ yvCurve_FRAX: "",
258
+ yvCurve_d3pool: ""
228
259
  }
229
260
  };
@@ -1,6 +1,7 @@
1
1
  import { BigNumber } from "ethers";
2
2
  import { TokenDataPayload } from "../payload/token";
3
3
  import { NetworkType } from "./constants";
4
+ import { SupportedTokens } from "./token";
4
5
  export declare class TokenData {
5
6
  readonly id: string;
6
7
  readonly symbol: string;
@@ -20,9 +21,8 @@ export interface TokenAllowance {
20
21
  }
21
22
  export declare type TokenType = "core" | "stable" | "volatile" | "lp";
22
23
  export interface TokenSavedData {
23
- address: string;
24
24
  type: TokenType;
25
25
  }
26
26
  export declare const WETHToken: Record<NetworkType, string>;
27
- export declare const connectors: Record<NetworkType, Array<string>>;
27
+ export declare const connectors: Record<NetworkType, Array<SupportedTokens>>;
28
28
  export declare function getConnectors(networkType: NetworkType): string[];
@@ -45,10 +45,9 @@ exports.connectors = {
45
45
  };
46
46
  function getConnectors(networkType) {
47
47
  return exports.connectors[networkType].map(function (e) {
48
- var _a;
49
48
  var result = e === "WETH"
50
49
  ? exports.WETHToken[networkType]
51
- : (_a = token_1.tokenDataByNetwork[networkType][e]) === null || _a === void 0 ? void 0 : _a.address;
50
+ : token_1.tokenDataByNetwork[networkType][e];
52
51
  if (!result) {
53
52
  throw new Error("connector token ".concat(e, " not found"));
54
53
  }
package/lib/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -1,5 +1,5 @@
1
- import { Multicall2 } from "../types/Multicall2";
2
1
  import { ethers } from "ethers";
2
+ import { Multicall2 } from "../types/Multicall2";
3
3
  export interface CallData<T extends ethers.utils.Interface> {
4
4
  method: keyof T["functions"];
5
5
  params?: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "0.0.4",
3
+ "version": "0.0.7",
4
4
  "description": "Gearbox SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
package/src/core/token.ts CHANGED
@@ -1,9 +1,198 @@
1
1
  import { NetworkType } from "./constants";
2
- import { TokenSavedData } from "./tokenData";
2
+
3
+ export const supportedTokens = {
4
+ "1INCH": {
5
+ type: "volatile"
6
+ },
7
+
8
+ AAVE: {
9
+ type: "volatile"
10
+ },
11
+
12
+ COMP: {
13
+ type: "volatile"
14
+ },
15
+
16
+ CRV: {
17
+ type: "volatile"
18
+ },
19
+
20
+ DAI: {
21
+ type: "stable"
22
+ },
23
+
24
+ DPI: {
25
+ type: "volatile"
26
+ },
27
+
28
+ FEI: {
29
+ type: "stable"
30
+ },
31
+
32
+ LINK: {
33
+ type: "volatile"
34
+ },
35
+
36
+ SNX: {
37
+ type: "volatile"
38
+ },
39
+
40
+ SUSHI: {
41
+ type: "volatile"
42
+ },
43
+
44
+ UNI: {
45
+ type: "volatile"
46
+ },
47
+
48
+ USDC: {
49
+ type: "stable"
50
+ },
51
+
52
+ USDT: {
53
+ type: "stable"
54
+ },
55
+
56
+ WBTC: {
57
+ type: "core"
58
+ },
59
+
60
+ WETH: {
61
+ type: "core"
62
+ },
63
+
64
+ YFI: {
65
+ type: "volatile"
66
+ },
67
+
68
+ /// UPDATE
69
+ STETH: {
70
+ type: "volatile"
71
+ },
72
+
73
+ FTM: {
74
+ type: "volatile"
75
+ },
76
+
77
+ CVX: {
78
+ type: "volatile"
79
+ },
80
+
81
+ FRAX: {
82
+ type: "stable"
83
+ },
84
+
85
+ FXS: {
86
+ type: "volatile"
87
+ },
88
+
89
+ LDO: {
90
+ type: "volatile"
91
+ },
92
+
93
+ SPELL: {
94
+ type: "volatile"
95
+ },
96
+
97
+ LUSD: {
98
+ type: "stable"
99
+ },
100
+
101
+ sUSD: {
102
+ type: "stable"
103
+ },
104
+
105
+ GUSD: {
106
+ type: "stable"
107
+ },
108
+
109
+ LUNA: {
110
+ type: "volatile"
111
+ },
112
+
113
+ // YEARN TOKENS
114
+ yvDAI: {
115
+ type: "lp"
116
+ },
117
+
118
+ yvUSDC: {
119
+ type: "lp"
120
+ },
121
+
122
+ yvWETH: {
123
+ type: "lp"
124
+ },
125
+
126
+ yvWBTC: {
127
+ type: "lp"
128
+ },
129
+
130
+ // CURVE LP TOKENS
131
+
132
+ "3Crv": {
133
+ type: "lp"
134
+ },
135
+
136
+ steCRV: {
137
+ type: "lp"
138
+ },
139
+
140
+ FRAX3CRV: {
141
+ type: "lp"
142
+ },
143
+
144
+ LUSD3CRV: {
145
+ type: "lp"
146
+ },
147
+
148
+ crvPlain3andSUSD: {
149
+ type: "lp"
150
+ },
151
+
152
+ gusd3CRV: {
153
+ type: "lp"
154
+ },
155
+
156
+ // CONVEX LP TOKENS
157
+
158
+ cvx3Crv: {
159
+ type: "lp"
160
+ },
161
+
162
+ cvxsteCRV: {
163
+ type: "lp"
164
+ },
165
+
166
+ cvxFRAX3CRV: {
167
+ type: "lp"
168
+ },
169
+
170
+ cvxcrvPlain3andSUSD: {
171
+ type: "lp"
172
+ },
173
+
174
+ cvxgusd3CRV: {
175
+ type: "lp"
176
+ },
177
+
178
+ // YEARN- CURVE TOKENS
179
+ yvCurve_stETH: {
180
+ type: "lp"
181
+ },
182
+ yvCurve_FRAX: {
183
+ type: "lp"
184
+ },
185
+
186
+ yvCurve_d3pool: {
187
+ type: "lp"
188
+ }
189
+ };
190
+
191
+ export type SupportedTokens = keyof typeof supportedTokens;
3
192
 
4
193
  export const tokenDataByNetwork: Record<
5
194
  NetworkType,
6
- Record<string, TokenSavedData>
195
+ Record<SupportedTokens, string>
7
196
  > = {
8
197
  //
9
198
  // MAINNET NETWORK
@@ -11,226 +200,61 @@ export const tokenDataByNetwork: Record<
11
200
  // DAI DPI GRT LINK SNX SRM SUSHI UNI USDC
12
201
  // USDT YFI ZRX
13
202
  Mainnet: {
14
- "1INCH": {
15
- address: "0x111111111117dc0aa78b770fa6a738034120c302",
16
- type: "volatile"
17
- },
18
-
19
- AAVE: {
20
- address: "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9",
21
- type: "volatile"
22
- },
23
-
24
- COMP: {
25
- address: "0xc00e94cb662c3520282e6f5717214004a7f26888",
26
- type: "volatile"
27
- },
28
-
29
- CRV: {
30
- address: "0xD533a949740bb3306d119CC777fa900bA034cd52",
31
- type: "volatile"
32
- },
33
-
34
- DAI: {
35
- address: "0x6B175474E89094C44Da98b954EedeAC495271d0F",
36
- type: "stable"
37
- },
38
-
39
- DPI: {
40
- address: "0x1494ca1f11d487c2bbe4543e90080aeba4ba3c2b",
41
- type: "volatile"
42
- },
43
-
44
- FEI: {
45
- address: "0x956F47F50A910163D8BF957Cf5846D573E7f87CA",
46
- type: "stable"
47
- },
48
-
49
- LINK: {
50
- address: "0x514910771AF9Ca656af840dff83E8264EcF986CA",
51
- type: "volatile"
52
- },
53
-
54
- SNX: {
55
- address: "0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",
56
- type: "volatile"
57
- },
58
-
59
- SUSHI: {
60
- address: "0x6b3595068778dd592e39a122f4f5a5cf09c90fe2",
61
- type: "volatile"
62
- },
63
-
64
- UNI: {
65
- address: "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984",
66
- type: "volatile"
67
- },
68
-
69
- USDC: {
70
- address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
71
- type: "stable"
72
- },
73
-
74
- USDT: {
75
- address: "0xdac17f958d2ee523a2206206994597c13d831ec7",
76
- type: "stable"
77
- },
78
-
79
- WBTC: {
80
- address: "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
81
- type: "core"
82
- },
83
-
84
- WETH: {
85
- address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
86
- type: "core"
87
- },
88
-
89
- YFI: {
90
- address: "0x0bc529c00c6401aef6d220be8c6ea1667f6ad93e",
91
- type: "volatile"
92
- },
203
+ "1INCH": "0x111111111117dc0aa78b770fa6a738034120c302",
204
+ AAVE: "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9",
205
+ COMP: "0xc00e94cb662c3520282e6f5717214004a7f26888",
206
+ CRV: "0xD533a949740bb3306d119CC777fa900bA034cd52",
207
+ DAI: "0x6B175474E89094C44Da98b954EedeAC495271d0F",
208
+ DPI: "0x1494ca1f11d487c2bbe4543e90080aeba4ba3c2b",
209
+ FEI: "0x956F47F50A910163D8BF957Cf5846D573E7f87CA",
210
+ LINK: "0x514910771AF9Ca656af840dff83E8264EcF986CA",
211
+ SNX: "0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",
212
+ SUSHI: "0x6b3595068778dd592e39a122f4f5a5cf09c90fe2",
213
+ UNI: "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984",
214
+ USDC: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
215
+ USDT: "0xdac17f958d2ee523a2206206994597c13d831ec7",
216
+ WBTC: "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
217
+ WETH: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
218
+ YFI: "0x0bc529c00c6401aef6d220be8c6ea1667f6ad93e",
93
219
 
94
220
  /// UPDATE
95
- STETH: {
96
- address: "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
97
- type: "volatile"
98
- },
99
-
100
- FTM: {
101
- address: "0x4E15361FD6b4BB609Fa63C81A2be19d873717870",
102
- type: "volatile"
103
- },
104
-
105
- CVX: {
106
- address: "0x4e3fbd56cd56c3e72c1403e103b45db9da5b9d2b",
107
- type: "volatile"
108
- },
109
-
110
- FRAX: {
111
- address: "0x853d955acef822db058eb8505911ed77f175b99e",
112
- type: "stable"
113
- },
114
-
115
- FXS: {
116
- address: "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0",
117
- type: "volatile"
118
- },
119
-
120
- LDO: {
121
- address: "0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32",
122
- type: "volatile"
123
- },
124
-
125
- SPELL: {
126
- address: "0x090185f2135308BaD17527004364eBcC2D37e5F6",
127
- type: "volatile"
128
- },
129
-
130
- LUSD: {
131
- address: "0x5f98805A4E8be255a32880FDeC7F6728C6568bA0",
132
- type: "stable"
133
- },
134
-
135
- SUSD: {
136
- address: "0x57Ab1ec28D129707052df4dF418D58a2D46d5f51",
137
- type: "stable"
138
- },
139
-
140
- GUSD: {
141
- address: "0x056fd409e1d7a124bd7017459dfea2f387b6d5cd",
142
- type: "stable"
143
- },
221
+ STETH: "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
222
+ FTM: "0x4E15361FD6b4BB609Fa63C81A2be19d873717870",
223
+ CVX: "0x4e3fbd56cd56c3e72c1403e103b45db9da5b9d2b",
224
+ FRAX: "0x853d955acef822db058eb8505911ed77f175b99e",
225
+ FXS: "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0",
226
+ LDO: "0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32",
227
+ SPELL: "0x090185f2135308BaD17527004364eBcC2D37e5F6",
228
+ LUSD: "0x5f98805A4E8be255a32880FDeC7F6728C6568bA0",
229
+ sUSD: "0x57Ab1ec28D129707052df4dF418D58a2D46d5f51",
230
+ GUSD: "0x056fd409e1d7a124bd7017459dfea2f387b6d5cd",
231
+ LUNA: "0xd2877702675e6ceb975b4a1dff9fb7baf4c91ea9",
144
232
 
145
233
  // YEARN TOKENS
146
- yvDAI: {
147
- address: "0xdA816459F1AB5631232FE5e97a05BBBb94970c95",
148
- type: "lp"
149
- },
150
- yvUSDC: {
151
- address: "0xa354f35829ae975e850e23e9615b11da1b3dc4de",
152
- type: "lp"
153
- },
154
- yvWETH: {
155
- address: "0xa258C4606Ca8206D8aA700cE2143D7db854D168c",
156
- type: "lp"
157
- },
158
- yvWBTC: {
159
- address: "0xA696a63cc78DfFa1a63E9E50587C197387FF6C7E",
160
- type: "lp"
161
- },
234
+ yvDAI: "0xdA816459F1AB5631232FE5e97a05BBBb94970c95",
235
+ yvUSDC: "0xa354f35829ae975e850e23e9615b11da1b3dc4de",
236
+ yvWETH: "0xa258C4606Ca8206D8aA700cE2143D7db854D168c",
237
+ yvWBTC: "0xA696a63cc78DfFa1a63E9E50587C197387FF6C7E",
162
238
 
163
239
  // CURVE LP TOKENS
164
-
165
- "3Crv": {
166
- address: "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490",
167
- type: "lp"
168
- },
169
-
170
- steCRV: {
171
- address: "0x06325440d014e39736583c165c2963ba99faf14e",
172
- type: "lp"
173
- },
174
- FRAX3CRV: {
175
- address: "0xd632f22692fac7611d2aa1c0d552930d43caed3b",
176
- type: "lp"
177
- },
178
- LUSD3CRV: {
179
- address: "0xEd279fDD11cA84bEef15AF5D39BB4d4bEE23F0cA",
180
- type: "lp"
181
- },
182
-
183
- crvPlain3andSUSD: {
184
- address: "0xC25a3A3b969415c80451098fa907EC722572917F",
185
- type: "lp"
186
- },
187
-
188
- gusd3CRV: {
189
- address: "0xD2967f45c4f384DEEa880F807Be904762a3DeA07",
190
- type: "lp"
191
- },
240
+ "3Crv": "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490",
241
+ steCRV: "0x06325440d014e39736583c165c2963ba99faf14e",
242
+ FRAX3CRV: "0xd632f22692fac7611d2aa1c0d552930d43caed3b",
243
+ LUSD3CRV: "0xEd279fDD11cA84bEef15AF5D39BB4d4bEE23F0cA",
244
+ crvPlain3andSUSD: "0xC25a3A3b969415c80451098fa907EC722572917F",
245
+ gusd3CRV: "0xD2967f45c4f384DEEa880F807Be904762a3DeA07",
192
246
 
193
247
  // CONVEX LP TOKENS
194
-
195
- cvx3Crv: {
196
- address: "0x30D9410ED1D5DA1F6C8391af5338C93ab8d4035C",
197
- type: "lp"
198
- },
199
-
200
- cvxsteCRV: {
201
- address: "0x9518c9063eB0262D791f38d8d6Eb0aca33c63ed0",
202
- type: "lp"
203
- },
204
-
205
- cvxFRAX3CRV: {
206
- address: "0xbE0F6478E0E4894CFb14f32855603A083A57c7dA",
207
- type: "lp"
208
- },
209
-
210
- cvxcrvPlain3andSUSD: {
211
- address: "0x11D200ef1409cecA8D6d23e6496550f707772F11",
212
- type: "lp"
213
- },
214
-
215
- cvxgusd3CRV: {
216
- address: "0x15c2471ef46Fa721990730cfa526BcFb45574576",
217
- type: "lp"
218
- },
248
+ cvx3Crv: "0x30D9410ED1D5DA1F6C8391af5338C93ab8d4035C",
249
+ cvxsteCRV: "0x9518c9063eB0262D791f38d8d6Eb0aca33c63ed0",
250
+ cvxFRAX3CRV: "0xbE0F6478E0E4894CFb14f32855603A083A57c7dA",
251
+ cvxcrvPlain3andSUSD: "0x11D200ef1409cecA8D6d23e6496550f707772F11",
252
+ cvxgusd3CRV: "0x15c2471ef46Fa721990730cfa526BcFb45574576",
219
253
 
220
254
  // YEARN- CURVE TOKENS
221
- yvCurve_stETH: {
222
- address: "0xdCD90C7f6324cfa40d7169ef80b12031770B4325",
223
- type: "lp"
224
- },
225
- yvCurve_FRAX: {
226
- address: "0xB4AdA607B9d6b2c9Ee07A275e9616B84AC560139",
227
- type: "lp"
228
- },
229
-
230
- yvCurve_d3pool: {
231
- address: "0x16825039dfe2a5b01F3E1E6a2BBF9a576c6F95c4",
232
- type: "lp"
233
- }
255
+ yvCurve_stETH: "0xdCD90C7f6324cfa40d7169ef80b12031770B4325",
256
+ yvCurve_FRAX: "0xB4AdA607B9d6b2c9Ee07A275e9616B84AC560139",
257
+ yvCurve_d3pool: "0x16825039dfe2a5b01F3E1E6a2BBF9a576c6F95c4"
234
258
  },
235
259
 
236
260
  //
@@ -238,38 +262,60 @@ export const tokenDataByNetwork: Record<
238
262
  // DAI LINK REP SNX USDC WBTC ZRX
239
263
  //
240
264
  Kovan: {
241
- DAI: {
242
- address: "0x9DC7B33C3B63fc00ed5472fBD7813eDDa6a64752",
243
- type: "stable"
244
- },
245
-
246
- LINK: {
247
- address: "0x6C994935826574E870549F09efF43BA8089A3D25",
248
- type: "volatile"
249
- },
250
- // REP: {
251
- // address: "0x633317172c0D41451F62025D73CE59065A370a50",
252
- // priceFeedETH: "0x3A7e6117F2979EFf81855de32819FBba48a63e9e",
253
- // type: "volatile",
254
- // },
255
- SNX: {
256
- address: "0xB48891df9267EF65AABd32F497F6F2d1eB22A186",
257
- type: "volatile"
258
- },
259
-
260
- USDC: {
261
- address: "0x31EeB2d0F9B6fD8642914aB10F4dD473677D80df",
262
- type: "stable"
263
- },
264
- WBTC: {
265
- address: "0xE36bC5d8b689AD6d80e78c3e736670e80d4b329D",
266
- type: "core"
267
- }
268
-
269
- // ZRX: {
270
- // address: "0xB730c1449c58f29C69df33ccD5bd9d3cA66b23C1",
271
- // priceFeedETH: "0xBc3f28Ccc21E9b5856E81E6372aFf57307E2E883",
272
- // type: "volatile",
273
- // },
265
+ "1INCH": "0x6601ce61E41cd6760E763555A806AB5578EB2a9E",
266
+ AAVE: "0xed2eAe2533bc70dB9030174a7F085e0853289726",
267
+ COMP: "0x90F7A59Fa3993bBc6bA4C6c4ef515958a5bF8a24",
268
+ CRV: "0xD533a949740bb3306d119CC777fa900bA034cd52",
269
+ DAI: "0x9DC7B33C3B63fc00ed5472fBD7813eDDa6a64752",
270
+ DPI: "0xF4f06DE71eFc17799297573341C42f3B4C63D589",
271
+ FEI: "0xe1eC2f7B12d4be4075c3B53DB2e48C018B404179",
272
+ LINK: "0x6C994935826574E870549F09efF43BA8089A3D25",
273
+ SNX: "0xB48891df9267EF65AABd32F497F6F2d1eB22A186",
274
+ SUSHI: "0x635E9E7Aa9fA72C56B9A1286026A93E1b8c4090a",
275
+ UNI: "0x1B24F1F2CEFf945FE9EE017F929a6D31394f94b1",
276
+ USDT: "0xdac17f958d2ee523a2206206994597c13d831ec7",
277
+ USDC: "0x31EeB2d0F9B6fD8642914aB10F4dD473677D80df",
278
+ WBTC: "0xE36bC5d8b689AD6d80e78c3e736670e80d4b329D",
279
+ WETH: "",
280
+ YFI: "0x1df5DF6d0196bE6AE6A2EED915a0Cc6cAEA84C2D",
281
+
282
+ /// UPDATE
283
+ STETH: "0x3D98404e5854B785C168c12f9ACB0ab97BBa6702",
284
+ FTM: "0x5DE02cFf707eBC43f58DFB022518c18C66147b1E",
285
+ CVX: "0x4973acDDb1d3F2aB09f408A2dD004ED851D761be",
286
+ FRAX: "0x301b0B83E5F5deC5233075368B8b459CEedc0948",
287
+ FXS: "0x25eb8A9B30981d1F04C306829FEBc855FA86695A",
288
+ LDO: "0x99bB41898474aDb38e098fFdB0cD17d2619cA3ef",
289
+ SPELL: "0x20f979FD40caF4aaa4e7A179E1a5C422a897ca6c",
290
+ LUSD: "0x397acA500A56706dd4aAC0592Ed5B8CCAeCfc2d5",
291
+ sUSD: "0x32aeb9B672a81C43391c90a95a4D6c9A9D4459B6",
292
+ GUSD: "0x3cee6494bf400F8C24871dBD331B9436a9CfaBbb",
293
+ LUNA: "0x9dc1D71fAeE18bF77C6166aBC8b218D3336919F1",
294
+
295
+ // YEARN TOKENS
296
+ yvDAI: "",
297
+ yvUSDC: "",
298
+ yvWETH: "",
299
+ yvWBTC: "",
300
+
301
+ // CURVE LP TOKENS
302
+ "3Crv": "",
303
+ steCRV: "",
304
+ FRAX3CRV: "",
305
+ LUSD3CRV: "",
306
+ crvPlain3andSUSD: "",
307
+ gusd3CRV: "",
308
+
309
+ // CONVEX LP TOKENS
310
+ cvx3Crv: "",
311
+ cvxsteCRV: "",
312
+ cvxFRAX3CRV: "",
313
+ cvxcrvPlain3andSUSD: "",
314
+ cvxgusd3CRV: "",
315
+
316
+ // YEARN- CURVE TOKENS
317
+ yvCurve_stETH: "",
318
+ yvCurve_FRAX: "",
319
+ yvCurve_d3pool: ""
274
320
  }
275
321
  };
@@ -2,7 +2,7 @@ import { BigNumber } from "ethers";
2
2
  import { TokenDataPayload } from "../payload/token";
3
3
  import { STATIC_TOKEN } from "../config";
4
4
  import { NetworkType } from "./constants";
5
- import { tokenDataByNetwork } from "./token";
5
+ import { SupportedTokens, tokenDataByNetwork } from "./token";
6
6
 
7
7
  export class TokenData {
8
8
  public readonly id: string;
@@ -42,7 +42,6 @@ export interface TokenAllowance {
42
42
  export type TokenType = "core" | "stable" | "volatile" | "lp";
43
43
 
44
44
  export interface TokenSavedData {
45
- address: string;
46
45
  type: TokenType;
47
46
  }
48
47
 
@@ -51,7 +50,7 @@ export const WETHToken: Record<NetworkType, string> = {
51
50
  Kovan: "0xd0a1e359811322d97991e03f863a0c30c2cf029c",
52
51
  };
53
52
 
54
- export const connectors: Record<NetworkType, Array<string>> = {
53
+ export const connectors: Record<NetworkType, Array<SupportedTokens>> = {
55
54
  Mainnet: [
56
55
  "WETH",
57
56
  "1INCH",
@@ -74,7 +73,7 @@ export function getConnectors(networkType: NetworkType) {
74
73
  const result =
75
74
  e === "WETH"
76
75
  ? WETHToken[networkType]
77
- : tokenDataByNetwork[networkType][e]?.address;
76
+ : tokenDataByNetwork[networkType][e];
78
77
 
79
78
  if (!result) {
80
79
  throw new Error(`connector token ${e} not found`);
@@ -1,5 +1,6 @@
1
- import { Multicall2 } from "../types/Multicall2";
2
1
  import { ethers } from "ethers";
2
+ import { Multicall2 } from "../types/Multicall2";
3
+
3
4
  import { Multicall2__factory } from "../types/factories/Multicall2__factory";
4
5
 
5
6
  export interface CallData<T extends ethers.utils.Interface> {