@gearbox-protocol/sdk 11.5.1 → 11.6.1

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 (52) hide show
  1. package/dist/cjs/abi/router/kelpLRTDepositPoolWorker.js +541 -0
  2. package/dist/cjs/permissionless/bindings/instance-manager.js +11 -0
  3. package/dist/cjs/plugins/adapters/AdaptersPlugin.js +8 -0
  4. package/dist/cjs/plugins/adapters/abi/actionAbi.js +6 -0
  5. package/dist/cjs/plugins/adapters/abi/conctructorAbi.js +14 -0
  6. package/dist/cjs/plugins/adapters/abi/conctructorAbiPatterns.js +15 -0
  7. package/dist/cjs/plugins/adapters/contracts/KelpLRTDepositPoolAdapterContract.js +45 -0
  8. package/dist/cjs/plugins/adapters/contracts/KelpLRTWithdrawalManagerAdapterContract.js +49 -0
  9. package/dist/cjs/plugins/adapters/contracts/MellowDepositQueueAdapterContract.js +51 -0
  10. package/dist/cjs/plugins/adapters/contracts/MellowRedeemQueueAdapterContract.js +48 -0
  11. package/dist/cjs/plugins/adapters/contracts/index.js +8 -0
  12. package/dist/cjs/plugins/adapters/types.js +4 -0
  13. package/dist/cjs/sdk/chain/chains.js +37 -4
  14. package/dist/cjs/sdk/constants/address-provider.js +2 -1
  15. package/dist/cjs/sdk/constants/addresses.js +8 -4
  16. package/dist/cjs/sdk/constants/networks.js +4 -2
  17. package/dist/cjs/sdk/router/RouterV300Contract.js +2 -1
  18. package/dist/cjs/sdk/sdk-gov-legacy/contracts/contracts.js +74 -37
  19. package/dist/cjs/sdk/sdk-gov-legacy/tokens/token.js +4 -2
  20. package/dist/cjs/sdk/sdk-gov-legacy/tokens/tokenData.js +2 -1
  21. package/dist/cjs/sdk/sdk-legacy/core/endpoint.js +2 -1
  22. package/dist/esm/abi/router/kelpLRTDepositPoolWorker.js +517 -0
  23. package/dist/esm/permissionless/bindings/instance-manager.js +11 -0
  24. package/dist/esm/plugins/adapters/AdaptersPlugin.js +12 -0
  25. package/dist/esm/plugins/adapters/abi/actionAbi.js +6 -0
  26. package/dist/esm/plugins/adapters/abi/conctructorAbi.js +16 -0
  27. package/dist/esm/plugins/adapters/abi/conctructorAbiPatterns.js +13 -0
  28. package/dist/esm/plugins/adapters/contracts/KelpLRTDepositPoolAdapterContract.js +21 -0
  29. package/dist/esm/plugins/adapters/contracts/KelpLRTWithdrawalManagerAdapterContract.js +25 -0
  30. package/dist/esm/plugins/adapters/contracts/MellowDepositQueueAdapterContract.js +27 -0
  31. package/dist/esm/plugins/adapters/contracts/MellowRedeemQueueAdapterContract.js +24 -0
  32. package/dist/esm/plugins/adapters/contracts/index.js +4 -0
  33. package/dist/esm/plugins/adapters/types.js +4 -0
  34. package/dist/esm/sdk/chain/chains.js +37 -4
  35. package/dist/esm/sdk/constants/address-provider.js +2 -1
  36. package/dist/esm/sdk/constants/addresses.js +8 -4
  37. package/dist/esm/sdk/constants/networks.js +4 -2
  38. package/dist/esm/sdk/router/RouterV300Contract.js +2 -1
  39. package/dist/esm/sdk/sdk-gov-legacy/contracts/contracts.js +74 -37
  40. package/dist/esm/sdk/sdk-gov-legacy/tokens/token.js +4 -2
  41. package/dist/esm/sdk/sdk-gov-legacy/tokens/tokenData.js +2 -1
  42. package/dist/esm/sdk/sdk-legacy/core/endpoint.js +2 -1
  43. package/dist/types/abi/router/kelpLRTDepositPoolWorker.d.ts +726 -0
  44. package/dist/types/plugins/adapters/abi/conctructorAbiPatterns.d.ts +23 -0
  45. package/dist/types/plugins/adapters/contracts/KelpLRTDepositPoolAdapterContract.d.ts +11 -0
  46. package/dist/types/plugins/adapters/contracts/KelpLRTWithdrawalManagerAdapterContract.d.ts +14 -0
  47. package/dist/types/plugins/adapters/contracts/MellowDepositQueueAdapterContract.d.ts +13 -0
  48. package/dist/types/plugins/adapters/contracts/MellowRedeemQueueAdapterContract.d.ts +12 -0
  49. package/dist/types/plugins/adapters/contracts/index.d.ts +4 -0
  50. package/dist/types/plugins/adapters/types.d.ts +5 -1
  51. package/dist/types/sdk/chain/chains.d.ts +2 -1
  52. package/package.json +1 -1
@@ -0,0 +1,517 @@
1
+ const kelpLRTDepositPoolWorkerAbi = [
2
+ {
3
+ type: "constructor",
4
+ inputs: [{ name: "_router", type: "address", internalType: "address" }],
5
+ stateMutability: "nonpayable"
6
+ },
7
+ {
8
+ type: "function",
9
+ name: "buildEdges",
10
+ inputs: [
11
+ {
12
+ name: "graph",
13
+ type: "tuple",
14
+ internalType: "struct Graph",
15
+ components: [
16
+ {
17
+ name: "vertices",
18
+ type: "tuple[]",
19
+ internalType: "struct Vertex[]",
20
+ components: [
21
+ { name: "token", type: "address", internalType: "address" },
22
+ { name: "balance", type: "uint256", internalType: "uint256" },
23
+ {
24
+ name: "leftoverBalance",
25
+ type: "uint256",
26
+ internalType: "uint256"
27
+ },
28
+ { name: "numSplits", type: "uint256", internalType: "uint256" },
29
+ {
30
+ name: "currentOptimalEdge",
31
+ type: "uint256",
32
+ internalType: "uint256"
33
+ }
34
+ ]
35
+ },
36
+ {
37
+ name: "edges",
38
+ type: "tuple[]",
39
+ internalType: "struct Edge[]",
40
+ components: [
41
+ { name: "id", type: "uint256", internalType: "uint256" },
42
+ { name: "tokenIn", type: "address", internalType: "address" },
43
+ { name: "tokenOut", type: "address", internalType: "address" },
44
+ { name: "adapter", type: "address", internalType: "address" },
45
+ { name: "worker", type: "address", internalType: "address" },
46
+ { name: "extraData", type: "bytes", internalType: "bytes" },
47
+ {
48
+ name: "amountInTotal",
49
+ type: "uint256",
50
+ internalType: "uint256"
51
+ },
52
+ {
53
+ name: "amountOutTotal",
54
+ type: "uint256",
55
+ internalType: "uint256"
56
+ },
57
+ {
58
+ name: "amountInCurrent",
59
+ type: "uint256",
60
+ internalType: "uint256"
61
+ },
62
+ {
63
+ name: "amountOutCurrent",
64
+ type: "uint256",
65
+ internalType: "uint256"
66
+ }
67
+ ]
68
+ }
69
+ ]
70
+ },
71
+ { name: "adapter", type: "address", internalType: "address" }
72
+ ],
73
+ outputs: [
74
+ {
75
+ name: "",
76
+ type: "tuple",
77
+ internalType: "struct Graph",
78
+ components: [
79
+ {
80
+ name: "vertices",
81
+ type: "tuple[]",
82
+ internalType: "struct Vertex[]",
83
+ components: [
84
+ { name: "token", type: "address", internalType: "address" },
85
+ { name: "balance", type: "uint256", internalType: "uint256" },
86
+ {
87
+ name: "leftoverBalance",
88
+ type: "uint256",
89
+ internalType: "uint256"
90
+ },
91
+ { name: "numSplits", type: "uint256", internalType: "uint256" },
92
+ {
93
+ name: "currentOptimalEdge",
94
+ type: "uint256",
95
+ internalType: "uint256"
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ name: "edges",
101
+ type: "tuple[]",
102
+ internalType: "struct Edge[]",
103
+ components: [
104
+ { name: "id", type: "uint256", internalType: "uint256" },
105
+ { name: "tokenIn", type: "address", internalType: "address" },
106
+ { name: "tokenOut", type: "address", internalType: "address" },
107
+ { name: "adapter", type: "address", internalType: "address" },
108
+ { name: "worker", type: "address", internalType: "address" },
109
+ { name: "extraData", type: "bytes", internalType: "bytes" },
110
+ {
111
+ name: "amountInTotal",
112
+ type: "uint256",
113
+ internalType: "uint256"
114
+ },
115
+ {
116
+ name: "amountOutTotal",
117
+ type: "uint256",
118
+ internalType: "uint256"
119
+ },
120
+ {
121
+ name: "amountInCurrent",
122
+ type: "uint256",
123
+ internalType: "uint256"
124
+ },
125
+ {
126
+ name: "amountOutCurrent",
127
+ type: "uint256",
128
+ internalType: "uint256"
129
+ }
130
+ ]
131
+ }
132
+ ]
133
+ }
134
+ ],
135
+ stateMutability: "view"
136
+ },
137
+ {
138
+ type: "function",
139
+ name: "contractType",
140
+ inputs: [],
141
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
142
+ stateMutability: "view"
143
+ },
144
+ {
145
+ type: "function",
146
+ name: "getEdgeAmountOutCurrent",
147
+ inputs: [
148
+ {
149
+ name: "edge",
150
+ type: "tuple",
151
+ internalType: "struct Edge",
152
+ components: [
153
+ { name: "id", type: "uint256", internalType: "uint256" },
154
+ { name: "tokenIn", type: "address", internalType: "address" },
155
+ { name: "tokenOut", type: "address", internalType: "address" },
156
+ { name: "adapter", type: "address", internalType: "address" },
157
+ { name: "worker", type: "address", internalType: "address" },
158
+ { name: "extraData", type: "bytes", internalType: "bytes" },
159
+ { name: "amountInTotal", type: "uint256", internalType: "uint256" },
160
+ { name: "amountOutTotal", type: "uint256", internalType: "uint256" },
161
+ { name: "amountInCurrent", type: "uint256", internalType: "uint256" },
162
+ {
163
+ name: "amountOutCurrent",
164
+ type: "uint256",
165
+ internalType: "uint256"
166
+ }
167
+ ]
168
+ }
169
+ ],
170
+ outputs: [
171
+ { name: "amountOutCurrent", type: "uint256", internalType: "uint256" }
172
+ ],
173
+ stateMutability: "view"
174
+ },
175
+ {
176
+ type: "function",
177
+ name: "getMulticalls",
178
+ inputs: [
179
+ {
180
+ name: "edge",
181
+ type: "tuple",
182
+ internalType: "struct Edge",
183
+ components: [
184
+ { name: "id", type: "uint256", internalType: "uint256" },
185
+ { name: "tokenIn", type: "address", internalType: "address" },
186
+ { name: "tokenOut", type: "address", internalType: "address" },
187
+ { name: "adapter", type: "address", internalType: "address" },
188
+ { name: "worker", type: "address", internalType: "address" },
189
+ { name: "extraData", type: "bytes", internalType: "bytes" },
190
+ { name: "amountInTotal", type: "uint256", internalType: "uint256" },
191
+ { name: "amountOutTotal", type: "uint256", internalType: "uint256" },
192
+ { name: "amountInCurrent", type: "uint256", internalType: "uint256" },
193
+ {
194
+ name: "amountOutCurrent",
195
+ type: "uint256",
196
+ internalType: "uint256"
197
+ }
198
+ ]
199
+ },
200
+ { name: "currentBalance", type: "uint256", internalType: "uint256" }
201
+ ],
202
+ outputs: [
203
+ {
204
+ name: "calls",
205
+ type: "tuple[]",
206
+ internalType: "struct MultiCall[]",
207
+ components: [
208
+ { name: "target", type: "address", internalType: "address" },
209
+ { name: "callData", type: "bytes", internalType: "bytes" }
210
+ ]
211
+ }
212
+ ],
213
+ stateMutability: "pure"
214
+ },
215
+ {
216
+ type: "function",
217
+ name: "isNonLinear",
218
+ inputs: [],
219
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
220
+ stateMutability: "view"
221
+ },
222
+ {
223
+ type: "function",
224
+ name: "migrate",
225
+ inputs: [],
226
+ outputs: [],
227
+ stateMutability: "nonpayable"
228
+ },
229
+ {
230
+ type: "function",
231
+ name: "processClaims",
232
+ inputs: [
233
+ {
234
+ name: "",
235
+ type: "tuple",
236
+ internalType: "struct Edge",
237
+ components: [
238
+ { name: "id", type: "uint256", internalType: "uint256" },
239
+ { name: "tokenIn", type: "address", internalType: "address" },
240
+ { name: "tokenOut", type: "address", internalType: "address" },
241
+ { name: "adapter", type: "address", internalType: "address" },
242
+ { name: "worker", type: "address", internalType: "address" },
243
+ { name: "extraData", type: "bytes", internalType: "bytes" },
244
+ { name: "amountInTotal", type: "uint256", internalType: "uint256" },
245
+ { name: "amountOutTotal", type: "uint256", internalType: "uint256" },
246
+ { name: "amountInCurrent", type: "uint256", internalType: "uint256" },
247
+ {
248
+ name: "amountOutCurrent",
249
+ type: "uint256",
250
+ internalType: "uint256"
251
+ }
252
+ ]
253
+ },
254
+ {
255
+ name: "graph",
256
+ type: "tuple",
257
+ internalType: "struct Graph",
258
+ components: [
259
+ {
260
+ name: "vertices",
261
+ type: "tuple[]",
262
+ internalType: "struct Vertex[]",
263
+ components: [
264
+ { name: "token", type: "address", internalType: "address" },
265
+ { name: "balance", type: "uint256", internalType: "uint256" },
266
+ {
267
+ name: "leftoverBalance",
268
+ type: "uint256",
269
+ internalType: "uint256"
270
+ },
271
+ { name: "numSplits", type: "uint256", internalType: "uint256" },
272
+ {
273
+ name: "currentOptimalEdge",
274
+ type: "uint256",
275
+ internalType: "uint256"
276
+ }
277
+ ]
278
+ },
279
+ {
280
+ name: "edges",
281
+ type: "tuple[]",
282
+ internalType: "struct Edge[]",
283
+ components: [
284
+ { name: "id", type: "uint256", internalType: "uint256" },
285
+ { name: "tokenIn", type: "address", internalType: "address" },
286
+ { name: "tokenOut", type: "address", internalType: "address" },
287
+ { name: "adapter", type: "address", internalType: "address" },
288
+ { name: "worker", type: "address", internalType: "address" },
289
+ { name: "extraData", type: "bytes", internalType: "bytes" },
290
+ {
291
+ name: "amountInTotal",
292
+ type: "uint256",
293
+ internalType: "uint256"
294
+ },
295
+ {
296
+ name: "amountOutTotal",
297
+ type: "uint256",
298
+ internalType: "uint256"
299
+ },
300
+ {
301
+ name: "amountInCurrent",
302
+ type: "uint256",
303
+ internalType: "uint256"
304
+ },
305
+ {
306
+ name: "amountOutCurrent",
307
+ type: "uint256",
308
+ internalType: "uint256"
309
+ }
310
+ ]
311
+ }
312
+ ]
313
+ },
314
+ { name: "", type: "address", internalType: "address" }
315
+ ],
316
+ outputs: [
317
+ {
318
+ name: "",
319
+ type: "tuple",
320
+ internalType: "struct Graph",
321
+ components: [
322
+ {
323
+ name: "vertices",
324
+ type: "tuple[]",
325
+ internalType: "struct Vertex[]",
326
+ components: [
327
+ { name: "token", type: "address", internalType: "address" },
328
+ { name: "balance", type: "uint256", internalType: "uint256" },
329
+ {
330
+ name: "leftoverBalance",
331
+ type: "uint256",
332
+ internalType: "uint256"
333
+ },
334
+ { name: "numSplits", type: "uint256", internalType: "uint256" },
335
+ {
336
+ name: "currentOptimalEdge",
337
+ type: "uint256",
338
+ internalType: "uint256"
339
+ }
340
+ ]
341
+ },
342
+ {
343
+ name: "edges",
344
+ type: "tuple[]",
345
+ internalType: "struct Edge[]",
346
+ components: [
347
+ { name: "id", type: "uint256", internalType: "uint256" },
348
+ { name: "tokenIn", type: "address", internalType: "address" },
349
+ { name: "tokenOut", type: "address", internalType: "address" },
350
+ { name: "adapter", type: "address", internalType: "address" },
351
+ { name: "worker", type: "address", internalType: "address" },
352
+ { name: "extraData", type: "bytes", internalType: "bytes" },
353
+ {
354
+ name: "amountInTotal",
355
+ type: "uint256",
356
+ internalType: "uint256"
357
+ },
358
+ {
359
+ name: "amountOutTotal",
360
+ type: "uint256",
361
+ internalType: "uint256"
362
+ },
363
+ {
364
+ name: "amountInCurrent",
365
+ type: "uint256",
366
+ internalType: "uint256"
367
+ },
368
+ {
369
+ name: "amountOutCurrent",
370
+ type: "uint256",
371
+ internalType: "uint256"
372
+ }
373
+ ]
374
+ }
375
+ ]
376
+ },
377
+ {
378
+ name: "",
379
+ type: "tuple[]",
380
+ internalType: "struct MultiCall[]",
381
+ components: [
382
+ { name: "target", type: "address", internalType: "address" },
383
+ { name: "callData", type: "bytes", internalType: "bytes" }
384
+ ]
385
+ }
386
+ ],
387
+ stateMutability: "pure"
388
+ },
389
+ {
390
+ type: "function",
391
+ name: "router",
392
+ inputs: [],
393
+ outputs: [
394
+ { name: "", type: "address", internalType: "contract IGearboxRouter" }
395
+ ],
396
+ stateMutability: "view"
397
+ },
398
+ {
399
+ type: "function",
400
+ name: "trimSpecialVertex",
401
+ inputs: [
402
+ {
403
+ name: "",
404
+ type: "tuple",
405
+ internalType: "struct Edge",
406
+ components: [
407
+ { name: "id", type: "uint256", internalType: "uint256" },
408
+ { name: "tokenIn", type: "address", internalType: "address" },
409
+ { name: "tokenOut", type: "address", internalType: "address" },
410
+ { name: "adapter", type: "address", internalType: "address" },
411
+ { name: "worker", type: "address", internalType: "address" },
412
+ { name: "extraData", type: "bytes", internalType: "bytes" },
413
+ { name: "amountInTotal", type: "uint256", internalType: "uint256" },
414
+ { name: "amountOutTotal", type: "uint256", internalType: "uint256" },
415
+ { name: "amountInCurrent", type: "uint256", internalType: "uint256" },
416
+ {
417
+ name: "amountOutCurrent",
418
+ type: "uint256",
419
+ internalType: "uint256"
420
+ }
421
+ ]
422
+ },
423
+ {
424
+ name: "",
425
+ type: "tuple",
426
+ internalType: "struct Graph",
427
+ components: [
428
+ {
429
+ name: "vertices",
430
+ type: "tuple[]",
431
+ internalType: "struct Vertex[]",
432
+ components: [
433
+ { name: "token", type: "address", internalType: "address" },
434
+ { name: "balance", type: "uint256", internalType: "uint256" },
435
+ {
436
+ name: "leftoverBalance",
437
+ type: "uint256",
438
+ internalType: "uint256"
439
+ },
440
+ { name: "numSplits", type: "uint256", internalType: "uint256" },
441
+ {
442
+ name: "currentOptimalEdge",
443
+ type: "uint256",
444
+ internalType: "uint256"
445
+ }
446
+ ]
447
+ },
448
+ {
449
+ name: "edges",
450
+ type: "tuple[]",
451
+ internalType: "struct Edge[]",
452
+ components: [
453
+ { name: "id", type: "uint256", internalType: "uint256" },
454
+ { name: "tokenIn", type: "address", internalType: "address" },
455
+ { name: "tokenOut", type: "address", internalType: "address" },
456
+ { name: "adapter", type: "address", internalType: "address" },
457
+ { name: "worker", type: "address", internalType: "address" },
458
+ { name: "extraData", type: "bytes", internalType: "bytes" },
459
+ {
460
+ name: "amountInTotal",
461
+ type: "uint256",
462
+ internalType: "uint256"
463
+ },
464
+ {
465
+ name: "amountOutTotal",
466
+ type: "uint256",
467
+ internalType: "uint256"
468
+ },
469
+ {
470
+ name: "amountInCurrent",
471
+ type: "uint256",
472
+ internalType: "uint256"
473
+ },
474
+ {
475
+ name: "amountOutCurrent",
476
+ type: "uint256",
477
+ internalType: "uint256"
478
+ }
479
+ ]
480
+ }
481
+ ]
482
+ },
483
+ { name: "", type: "address", internalType: "address" }
484
+ ],
485
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
486
+ stateMutability: "pure"
487
+ },
488
+ {
489
+ type: "function",
490
+ name: "updateRouter",
491
+ inputs: [{ name: "newRouter", type: "address", internalType: "address" }],
492
+ outputs: [],
493
+ stateMutability: "nonpayable"
494
+ },
495
+ {
496
+ type: "function",
497
+ name: "version",
498
+ inputs: [],
499
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
500
+ stateMutability: "view"
501
+ },
502
+ {
503
+ type: "event",
504
+ name: "NewRouter",
505
+ inputs: [
506
+ { name: "", type: "address", indexed: true, internalType: "address" }
507
+ ],
508
+ anonymous: false
509
+ },
510
+ { type: "error", name: "FutureRouterOnlyException", inputs: [] },
511
+ { type: "error", name: "MigrationErrorException", inputs: [] },
512
+ { type: "error", name: "RouterOnlyException", inputs: [] },
513
+ { type: "error", name: "RouterOwnerOnlyException", inputs: [] }
514
+ ];
515
+ export {
516
+ kelpLRTDepositPoolWorkerAbi
517
+ };
@@ -9,6 +9,7 @@ import { gearboxRouterAbi } from "../../abi/router/gearboxRouter.js";
9
9
  import { mellow4626WorkerAbi } from "../../abi/router/mellow4626Worker.js";
10
10
  import { pendleRouterWorkerAbi } from "../../abi/router/pendleRouterWorker.js";
11
11
  import { uniswapV3WorkerAbi } from "../../abi/router/uniswapV3Worker.js";
12
+ import { uniswapV4WorkerAbi } from "../../abi/router/uniswapV4Worker.js";
12
13
  import { json_stringify } from "../../sdk/utils/index.js";
13
14
  import { Addresses } from "../deployment/addresses.js";
14
15
  import { BaseContract } from "./base-contract.js";
@@ -102,6 +103,16 @@ class InstanceManagerContract extends BaseContract {
102
103
  if (!parsedData.functionName.startsWith("Unknown function")) {
103
104
  return parsedData;
104
105
  }
106
+ const uniswapV4Worker = new BaseContract(
107
+ uniswapV4WorkerAbi,
108
+ target,
109
+ this.client,
110
+ "UniswapV4Worker"
111
+ );
112
+ parsedData = uniswapV4Worker.parseFunctionData(calldata);
113
+ if (!parsedData.functionName.startsWith("Unknown function")) {
114
+ return parsedData;
115
+ }
105
116
  const withdrawalCompressor = new WithdrawalCompressorContract(
106
117
  target,
107
118
  this.client
@@ -21,11 +21,15 @@ import {
21
21
  ERC4626ReferralAdapterContract,
22
22
  FluidDexAdapterContract,
23
23
  InfraredVaultAdapterContract,
24
+ KelpLRTDepositPoolAdapterContract,
25
+ KelpLRTWithdrawalManagerAdapterContract,
24
26
  KodiakIslandGatewayAdapterContract,
25
27
  LidoV1AdapterContract,
26
28
  MellowClaimerAdapterContract,
29
+ MellowDepositQueueAdapterContract,
27
30
  MellowDVVAdapterContract,
28
31
  MellowERC4626VaultAdapterContract,
32
+ MellowRedeemQueueAdapterContract,
29
33
  MellowVaultAdapterContract,
30
34
  MellowWrapperAdapterContract,
31
35
  MidasIssuanceVaultAdapterContract,
@@ -93,6 +97,10 @@ class AdaptersPlugin extends BasePlugin {
93
97
  return new InfinifiUnwindingGatewayAdapterContract(this.sdk, args);
94
98
  case "ADAPTER::INFRARED_VAULT":
95
99
  return new InfraredVaultAdapterContract(this.sdk, args);
100
+ case "ADAPTER::KELP_DEPOSIT_POOL":
101
+ return new KelpLRTDepositPoolAdapterContract(this.sdk, args);
102
+ case "ADAPTER::KELP_WITHDRAWAL":
103
+ return new KelpLRTWithdrawalManagerAdapterContract(this.sdk, args);
96
104
  case "ADAPTER::KODIAK_ISLAND_GATEWAY":
97
105
  return new KodiakIslandGatewayAdapterContract(this.sdk, args);
98
106
  case "ADAPTER::LIDO_V1":
@@ -109,6 +117,10 @@ class AdaptersPlugin extends BasePlugin {
109
117
  return new MellowVaultAdapterContract(this.sdk, args);
110
118
  case "ADAPTER::MELLOW_WRAPPER":
111
119
  return new MellowWrapperAdapterContract(this.sdk, args);
120
+ case "ADAPTER::MELLOW_DEPOSIT_QUEUE":
121
+ return new MellowDepositQueueAdapterContract(this.sdk, args);
122
+ case "ADAPTER::MELLOW_REDEEM_QUEUE":
123
+ return new MellowRedeemQueueAdapterContract(this.sdk, args);
112
124
  case "ADAPTER::MIDAS_ISSUANCE_VAULT":
113
125
  return new MidasIssuanceVaultAdapterContract(this.sdk, args);
114
126
  case "ADAPTER::MIDAS_REDEMPTION_VAULT":
@@ -23,6 +23,12 @@ const adapterActionSignatures = {
23
23
  [AdapterType.INFINIFI_UNWINDING]: {
24
24
  310: "function setLockedTokenBatchStatus((address,uint32,bool)[])"
25
25
  },
26
+ [AdapterType.KELP_DEPOSIT]: {
27
+ 310: "function setAssetStatusBatch(address[],bool[])"
28
+ },
29
+ [AdapterType.KELP_WITHDRAWAL]: {
30
+ 310: "function setTokensOutBatchStatus((address,address,bool)[])"
31
+ },
26
32
  [AdapterType.KODIAK_ISLAND_GATEWAY]: {
27
33
  310: "function setIslandStatusBatch((address,uint8)[])"
28
34
  },
@@ -7,9 +7,11 @@ import {
7
7
  CURVE_V1_WRAPPER_ADAPTER_ABI,
8
8
  GATEWAY_ADAPTER_ABI,
9
9
  LP_ADAPTER_ABI,
10
+ MELLOW_DEPOSIT_ADAPTER_ABI,
10
11
  PHANTOM_TOKEN_ADAPTER_ABI,
11
12
  REFERER_ID_ADAPTER_ABI,
12
13
  STAKING_REWARDS_ADAPTER_ABI,
14
+ STRING_REFERRAL_ADAPTER_ABI,
13
15
  UINT_REFERRAL_ADAPTER_ABI
14
16
  } from "./conctructorAbiPatterns.js";
15
17
  const adapterConstructorAbi = {
@@ -134,6 +136,20 @@ const adapterConstructorAbi = {
134
136
  [AdapterType.MELLOW_WRAPPER]: {
135
137
  310: ADDRESS_REFERRAL_ADAPTER_ABI
136
138
  },
139
+ [AdapterType.MELLOW_DEPOSIT]: {
140
+ 310: MELLOW_DEPOSIT_ADAPTER_ABI
141
+ },
142
+ [AdapterType.MELLOW_REDEEM]: {
143
+ 310: PHANTOM_TOKEN_ADAPTER_ABI
144
+ },
145
+ // Kelp adapters
146
+ // address pattern [creditManager, target, string]
147
+ [AdapterType.KELP_DEPOSIT]: {
148
+ 310: STRING_REFERRAL_ADAPTER_ABI
149
+ },
150
+ [AdapterType.KELP_WITHDRAWAL]: {
151
+ 310: STRING_REFERRAL_ADAPTER_ABI
152
+ },
137
153
  // Other adapters
138
154
  // address pattern [creditManager, target, address]
139
155
  [AdapterType.CVX_V1_BASE_REWARD_POOL]: {
@@ -27,6 +27,11 @@ const UINT_REFERRAL_ADAPTER_ABI = [
27
27
  { type: "address", name: "target" },
28
28
  { type: "uint16", name: "referral" }
29
29
  ];
30
+ const STRING_REFERRAL_ADAPTER_ABI = [
31
+ { type: "address", name: "creditManager" },
32
+ { type: "address", name: "target" },
33
+ { type: "string", name: "referral" }
34
+ ];
30
35
  const REFERER_ID_ADAPTER_ABI = [
31
36
  { type: "address", name: "creditManager" },
32
37
  { type: "address", name: "target" },
@@ -57,6 +62,12 @@ const STAKING_REWARDS_ADAPTER_ABI = [
57
62
  { type: "address", name: "stakedPhantomToken" },
58
63
  { type: "uint16", name: "referral" }
59
64
  ];
65
+ const MELLOW_DEPOSIT_ADAPTER_ABI = [
66
+ { type: "address", name: "creditManager" },
67
+ { type: "address", name: "target" },
68
+ { type: "address", name: "referral" },
69
+ { type: "address", name: "phantomToken" }
70
+ ];
60
71
  export {
61
72
  ADDRESS_REFERRAL_ADAPTER_ABI,
62
73
  BASIC_ADAPTER_ABI,
@@ -65,8 +76,10 @@ export {
65
76
  CURVE_V1_WRAPPER_ADAPTER_ABI,
66
77
  GATEWAY_ADAPTER_ABI,
67
78
  LP_ADAPTER_ABI,
79
+ MELLOW_DEPOSIT_ADAPTER_ABI,
68
80
  PHANTOM_TOKEN_ADAPTER_ABI,
69
81
  REFERER_ID_ADAPTER_ABI,
70
82
  STAKING_REWARDS_ADAPTER_ABI,
83
+ STRING_REFERRAL_ADAPTER_ABI,
71
84
  UINT_REFERRAL_ADAPTER_ABI
72
85
  };
@@ -0,0 +1,21 @@
1
+ import { decodeAbiParameters } from "viem";
2
+ import { AbstractAdapterContract } from "./AbstractAdapter.js";
3
+ const abi = [];
4
+ class KelpLRTDepositPoolAdapterContract extends AbstractAdapterContract {
5
+ allowedAssets;
6
+ constructor(sdk, args) {
7
+ super(sdk, { ...args, abi });
8
+ const decoded = decodeAbiParameters(
9
+ [
10
+ { type: "address", name: "creditManager" },
11
+ { type: "address", name: "targetContract" },
12
+ { type: "address[]", name: "allowedAssets" }
13
+ ],
14
+ args.baseParams.serializedParams
15
+ );
16
+ this.allowedAssets = [...decoded[2]];
17
+ }
18
+ }
19
+ export {
20
+ KelpLRTDepositPoolAdapterContract
21
+ };