@gearbox-protocol/sdk 11.2.1 → 11.3.0

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