@gearbox-protocol/sdk 1.10.0 → 1.10.2

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,4 +1,5 @@
1
1
  import type { ConvexPoolContract, SupportedContract } from "../contracts/contracts";
2
+ import { TradeAction } from "../pathfinder/tradeTypes";
2
3
  import type { CurveLPToken } from "./curveLP";
3
4
  import type { SupportedToken, TokenBase } from "./token";
4
5
  import { TokenType } from "./tokenType";
@@ -8,6 +9,7 @@ declare type BaseConvexToken = {
8
9
  pool: ConvexPoolContract;
9
10
  pid: number;
10
11
  underlying: CurveLPToken;
12
+ lpActions: Array<TradeAction>;
11
13
  } & TokenBase;
12
14
  export declare type ConvexLPTokenData = {
13
15
  symbol: ConvexLPToken;
@@ -12,6 +12,7 @@ var __assign = (this && this.__assign) || function () {
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
14
  exports.convexLpTokenByPid = exports.convexPoolByPid = exports.isConvexStakedPhantomToken = exports.isConvexLPToken = exports.isConvexToken = exports.convexTokens = void 0;
15
+ var tradeTypes_1 = require("../pathfinder/tradeTypes");
15
16
  var tokenType_1 = require("./tokenType");
16
17
  var convexLpTokens = {
17
18
  cvx3Crv: {
@@ -22,6 +23,18 @@ var convexLpTokens = {
22
23
  pid: 9,
23
24
  underlying: "3Crv",
24
25
  stakedToken: "stkcvx3Crv",
26
+ lpActions: [
27
+ {
28
+ type: tradeTypes_1.TradeType.ConvexWithdrawLP,
29
+ contract: "CONVEX_BOOSTER",
30
+ tokenOut: "3Crv",
31
+ },
32
+ {
33
+ type: tradeTypes_1.TradeType.ConvexStake,
34
+ contract: "CONVEX_3CRV_POOL",
35
+ tokenOut: "stkcvx3Crv",
36
+ },
37
+ ],
25
38
  },
26
39
  cvxcrvFRAX: {
27
40
  name: "Convex cvxcrvFRAX",
@@ -30,7 +43,19 @@ var convexLpTokens = {
30
43
  pool: "CONVEX_FRAX_USDC_POOL",
31
44
  pid: 100,
32
45
  underlying: "crvFRAX",
33
- stakedToken: "stkcvx3Crv",
46
+ stakedToken: "stkcvxcrvFRAX",
47
+ lpActions: [
48
+ {
49
+ type: tradeTypes_1.TradeType.ConvexWithdrawLP,
50
+ contract: "CONVEX_BOOSTER",
51
+ tokenOut: "crvFRAX",
52
+ },
53
+ {
54
+ type: tradeTypes_1.TradeType.ConvexStake,
55
+ contract: "CONVEX_3CRV_POOL",
56
+ tokenOut: "stkcvxcrvFRAX",
57
+ },
58
+ ],
34
59
  },
35
60
  cvxsteCRV: {
36
61
  name: "Convex cvxsteCRV",
@@ -40,6 +65,18 @@ var convexLpTokens = {
40
65
  pid: 25,
41
66
  underlying: "steCRV",
42
67
  stakedToken: "stkcvxsteCRV",
68
+ lpActions: [
69
+ {
70
+ type: tradeTypes_1.TradeType.ConvexWithdrawLP,
71
+ contract: "CONVEX_BOOSTER",
72
+ tokenOut: "steCRV",
73
+ },
74
+ {
75
+ type: tradeTypes_1.TradeType.ConvexStake,
76
+ contract: "CONVEX_STECRV_POOL",
77
+ tokenOut: "stkcvxsteCRV",
78
+ },
79
+ ],
43
80
  },
44
81
  cvxFRAX3CRV: {
45
82
  name: "Convex cvxFRAX3CRV-f",
@@ -49,6 +86,18 @@ var convexLpTokens = {
49
86
  pid: 32,
50
87
  underlying: "FRAX3CRV",
51
88
  stakedToken: "stkcvxFRAX3CRV",
89
+ lpActions: [
90
+ {
91
+ type: tradeTypes_1.TradeType.ConvexWithdrawLP,
92
+ contract: "CONVEX_BOOSTER",
93
+ tokenOut: "FRAX3CRV",
94
+ },
95
+ {
96
+ type: tradeTypes_1.TradeType.ConvexStake,
97
+ contract: "CONVEX_FRAX3CRV_POOL",
98
+ tokenOut: "stkcvxFRAX3CRV",
99
+ },
100
+ ],
52
101
  },
53
102
  cvxLUSD3CRV: {
54
103
  name: "Convex cvxLUSD3CRV-f",
@@ -58,6 +107,18 @@ var convexLpTokens = {
58
107
  pid: 33,
59
108
  underlying: "LUSD3CRV",
60
109
  stakedToken: "stkcvxLUSD3CRV",
110
+ lpActions: [
111
+ {
112
+ type: tradeTypes_1.TradeType.ConvexWithdrawLP,
113
+ contract: "CONVEX_BOOSTER",
114
+ tokenOut: "LUSD3CRV",
115
+ },
116
+ {
117
+ type: tradeTypes_1.TradeType.ConvexStake,
118
+ contract: "CONVEX_LUSD3CRV_POOL",
119
+ tokenOut: "stkcvxLUSD3CRV",
120
+ },
121
+ ],
61
122
  },
62
123
  cvxcrvPlain3andSUSD: {
63
124
  name: "Convex cvxcrvPlain3andSUSD",
@@ -67,6 +128,18 @@ var convexLpTokens = {
67
128
  pid: 4,
68
129
  underlying: "crvPlain3andSUSD",
69
130
  stakedToken: "stkcvxcrvPlain3andSUSD",
131
+ lpActions: [
132
+ {
133
+ type: tradeTypes_1.TradeType.ConvexWithdrawLP,
134
+ contract: "CONVEX_BOOSTER",
135
+ tokenOut: "crvPlain3andSUSD",
136
+ },
137
+ {
138
+ type: tradeTypes_1.TradeType.ConvexStake,
139
+ contract: "CONVEX_SUSD_POOL",
140
+ tokenOut: "stkcvxcrvPlain3andSUSD",
141
+ },
142
+ ],
70
143
  },
71
144
  cvxgusd3CRV: {
72
145
  name: "Convex cvxgusd3CRV",
@@ -76,6 +149,18 @@ var convexLpTokens = {
76
149
  pid: 10,
77
150
  underlying: "gusd3CRV",
78
151
  stakedToken: "stkcvxgusd3CRV",
152
+ lpActions: [
153
+ {
154
+ type: tradeTypes_1.TradeType.ConvexWithdrawLP,
155
+ contract: "CONVEX_BOOSTER",
156
+ tokenOut: "gusd3CRV",
157
+ },
158
+ {
159
+ type: tradeTypes_1.TradeType.ConvexStake,
160
+ contract: "CONVEX_GUSD_POOL",
161
+ tokenOut: "stkcvxgusd3CRV",
162
+ },
163
+ ],
79
164
  },
80
165
  };
81
166
  var convexStakedPhantomTokens = {
@@ -87,6 +172,18 @@ var convexStakedPhantomTokens = {
87
172
  pid: 9,
88
173
  underlying: "3Crv",
89
174
  lpToken: "cvx3Crv",
175
+ lpActions: [
176
+ {
177
+ type: tradeTypes_1.TradeType.ConvexWithdraw,
178
+ contract: "CONVEX_3CRV_POOL",
179
+ tokenOut: "cvx3Crv",
180
+ },
181
+ {
182
+ type: tradeTypes_1.TradeType.ConvexWithdrawAndUnwrap,
183
+ contract: "CONVEX_3CRV_POOL",
184
+ tokenOut: "3Crv",
185
+ },
186
+ ],
90
187
  },
91
188
  stkcvxcrvFRAX: {
92
189
  name: "Convex stkcvxcrvFRAX",
@@ -96,6 +193,18 @@ var convexStakedPhantomTokens = {
96
193
  pid: 100,
97
194
  underlying: "crvFRAX",
98
195
  lpToken: "cvxcrvFRAX",
196
+ lpActions: [
197
+ {
198
+ type: tradeTypes_1.TradeType.ConvexWithdraw,
199
+ contract: "CONVEX_FRAX_USDC_POOL",
200
+ tokenOut: "cvxcrvFRAX",
201
+ },
202
+ {
203
+ type: tradeTypes_1.TradeType.ConvexWithdrawAndUnwrap,
204
+ contract: "CONVEX_FRAX_USDC_POOL",
205
+ tokenOut: "crvFRAX",
206
+ },
207
+ ],
99
208
  },
100
209
  stkcvxsteCRV: {
101
210
  name: "Convex stkcvxsteCRV",
@@ -105,6 +214,18 @@ var convexStakedPhantomTokens = {
105
214
  pid: 25,
106
215
  underlying: "steCRV",
107
216
  lpToken: "cvxsteCRV",
217
+ lpActions: [
218
+ {
219
+ type: tradeTypes_1.TradeType.ConvexWithdraw,
220
+ contract: "CONVEX_STECRV_POOL",
221
+ tokenOut: "cvxsteCRV",
222
+ },
223
+ {
224
+ type: tradeTypes_1.TradeType.ConvexWithdrawAndUnwrap,
225
+ contract: "CONVEX_STECRV_POOL",
226
+ tokenOut: "steCRV",
227
+ },
228
+ ],
108
229
  },
109
230
  stkcvxFRAX3CRV: {
110
231
  name: "Convex stkcvxFRAX3CRV-f",
@@ -114,6 +235,18 @@ var convexStakedPhantomTokens = {
114
235
  pid: 32,
115
236
  underlying: "FRAX3CRV",
116
237
  lpToken: "cvxFRAX3CRV",
238
+ lpActions: [
239
+ {
240
+ type: tradeTypes_1.TradeType.ConvexWithdraw,
241
+ contract: "CONVEX_FRAX3CRV_POOL",
242
+ tokenOut: "cvxFRAX3CRV",
243
+ },
244
+ {
245
+ type: tradeTypes_1.TradeType.ConvexWithdrawAndUnwrap,
246
+ contract: "CONVEX_FRAX3CRV_POOL",
247
+ tokenOut: "FRAX3CRV",
248
+ },
249
+ ],
117
250
  },
118
251
  stkcvxLUSD3CRV: {
119
252
  name: "Convex stkcvxLUSD3CRV-f",
@@ -123,6 +256,18 @@ var convexStakedPhantomTokens = {
123
256
  pid: 33,
124
257
  underlying: "LUSD3CRV",
125
258
  lpToken: "cvxLUSD3CRV",
259
+ lpActions: [
260
+ {
261
+ type: tradeTypes_1.TradeType.ConvexWithdraw,
262
+ contract: "CONVEX_LUSD3CRV_POOL",
263
+ tokenOut: "cvxLUSD3CRV",
264
+ },
265
+ {
266
+ type: tradeTypes_1.TradeType.ConvexWithdrawAndUnwrap,
267
+ contract: "CONVEX_LUSD3CRV_POOL",
268
+ tokenOut: "LUSD3CRV",
269
+ },
270
+ ],
126
271
  },
127
272
  stkcvxcrvPlain3andSUSD: {
128
273
  name: "Convex stkcvxcrvPlain3andSUSD",
@@ -132,6 +277,18 @@ var convexStakedPhantomTokens = {
132
277
  pid: 4,
133
278
  underlying: "crvPlain3andSUSD",
134
279
  lpToken: "cvxcrvPlain3andSUSD",
280
+ lpActions: [
281
+ {
282
+ type: tradeTypes_1.TradeType.ConvexWithdraw,
283
+ contract: "CONVEX_SUSD_POOL",
284
+ tokenOut: "cvxcrvPlain3andSUSD",
285
+ },
286
+ {
287
+ type: tradeTypes_1.TradeType.ConvexWithdrawAndUnwrap,
288
+ contract: "CONVEX_SUSD_POOL",
289
+ tokenOut: "crvPlain3andSUSD",
290
+ },
291
+ ],
135
292
  },
136
293
  stkcvxgusd3CRV: {
137
294
  name: "Convex stkcvxgusd3CRV",
@@ -141,6 +298,18 @@ var convexStakedPhantomTokens = {
141
298
  pid: 10,
142
299
  underlying: "gusd3CRV",
143
300
  lpToken: "cvxgusd3CRV",
301
+ lpActions: [
302
+ {
303
+ type: tradeTypes_1.TradeType.ConvexWithdraw,
304
+ contract: "CONVEX_GUSD_POOL",
305
+ tokenOut: "cvxgusd3CRV",
306
+ },
307
+ {
308
+ type: tradeTypes_1.TradeType.ConvexWithdrawAndUnwrap,
309
+ contract: "CONVEX_GUSD_POOL",
310
+ tokenOut: "gusd3CRV",
311
+ },
312
+ ],
144
313
  },
145
314
  };
146
315
  exports.convexTokens = __assign(__assign({}, convexLpTokens), convexStakedPhantomTokens);
@@ -69,7 +69,7 @@ exports.tokenDataByNetwork = {
69
69
  cvxgusd3CRV: "0x15c2471ef46Fa721990730cfa526BcFb45574576",
70
70
  // CONVEX PHANTOM TOKEN ADDRESSES
71
71
  stkcvx3Crv: "0x2eD0f32d7C8b0f7EA7E40277C62Fb9C5DE092003",
72
- stkcvxcrvFRAX: "DEPLOY ME",
72
+ stkcvxcrvFRAX: "0xE36cbd724F500353C23297789A5f88fe3d920523",
73
73
  stkcvxsteCRV: "0x2210aa245Bf766eE99325c607807A08e636B5173",
74
74
  stkcvxFRAX3CRV: "0x2AF29502110080081FDF726dfBf61ABE3bA9Ef3C",
75
75
  stkcvxLUSD3CRV: "0x77e6290D1779B606235407fdf37A14D94D0DFB40",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "1.10.0",
3
+ "version": "1.10.2",
4
4
  "description": "Gearbox SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",