@gearbox-protocol/sdk 11.2.1 → 11.3.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/compressors/subcompressors/kelpLRTWithdrawalSubcompressor.js +187 -0
  2. package/dist/cjs/abi/compressors/subcompressors/mellowFlexibleDepositSubcompressor.js +187 -0
  3. package/dist/cjs/abi/compressors/subcompressors/mellowFlexibleRedeemSubcompressor.js +187 -0
  4. package/dist/cjs/abi/compressors/withdrawalCompressor.js +42 -0
  5. package/dist/cjs/abi/router/infinifiWorker.js +541 -0
  6. package/dist/cjs/abi/router/uniswapV4Worker.js +574 -0
  7. package/dist/cjs/plugins/adapters/AdaptersPlugin.js +9 -0
  8. package/dist/cjs/plugins/adapters/abi/actionAbi.js +9 -0
  9. package/dist/cjs/plugins/adapters/abi/conctructorAbi.js +17 -8
  10. package/dist/cjs/plugins/adapters/abi/conctructorAbiPatterns.js +4 -4
  11. package/dist/cjs/plugins/adapters/contracts/BalancerV3WrapperAdapterContract.js +2 -1
  12. package/dist/cjs/plugins/adapters/contracts/InfinifiGatewayAdapterContract.js +58 -0
  13. package/dist/cjs/plugins/adapters/contracts/InfinifiUnwindingGatewayAdapterContract.js +49 -0
  14. package/dist/cjs/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.js +2 -1
  15. package/dist/cjs/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +2 -1
  16. package/dist/cjs/plugins/adapters/contracts/UniswapV4AdapterContract.js +62 -0
  17. package/dist/cjs/plugins/adapters/types.js +3 -0
  18. package/dist/esm/abi/compressors/subcompressors/kelpLRTWithdrawalSubcompressor.js +163 -0
  19. package/dist/esm/abi/compressors/subcompressors/mellowFlexibleDepositSubcompressor.js +163 -0
  20. package/dist/esm/abi/compressors/subcompressors/mellowFlexibleRedeemSubcompressor.js +163 -0
  21. package/dist/esm/abi/compressors/withdrawalCompressor.js +42 -0
  22. package/dist/esm/abi/router/infinifiWorker.js +517 -0
  23. package/dist/esm/abi/router/uniswapV4Worker.js +550 -0
  24. package/dist/esm/plugins/adapters/AdaptersPlugin.js +9 -0
  25. package/dist/esm/plugins/adapters/abi/actionAbi.js +9 -0
  26. package/dist/esm/plugins/adapters/abi/conctructorAbi.js +18 -9
  27. package/dist/esm/plugins/adapters/abi/conctructorAbiPatterns.js +3 -3
  28. package/dist/esm/plugins/adapters/contracts/BalancerV3WrapperAdapterContract.js +2 -1
  29. package/dist/esm/plugins/adapters/contracts/InfinifiGatewayAdapterContract.js +34 -0
  30. package/dist/esm/plugins/adapters/contracts/InfinifiUnwindingGatewayAdapterContract.js +25 -0
  31. package/dist/esm/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.js +2 -1
  32. package/dist/esm/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +2 -1
  33. package/dist/esm/plugins/adapters/contracts/UniswapV4AdapterContract.js +38 -0
  34. package/dist/esm/plugins/adapters/types.js +3 -0
  35. package/dist/types/abi/compressors/subcompressors/kelpLRTWithdrawalSubcompressor.d.ts +220 -0
  36. package/dist/types/abi/compressors/subcompressors/mellowFlexibleDepositSubcompressor.d.ts +220 -0
  37. package/dist/types/abi/compressors/subcompressors/mellowFlexibleRedeemSubcompressor.d.ts +220 -0
  38. package/dist/types/abi/compressors/withdrawalCompressor.d.ts +69 -0
  39. package/dist/types/abi/router/infinifiWorker.d.ts +726 -0
  40. package/dist/types/abi/router/uniswapV4Worker.d.ts +774 -0
  41. package/dist/types/permissionless/bindings/compressors/withdrawal-compressor.d.ts +69 -0
  42. package/dist/types/plugins/adapters/abi/conctructorAbiPatterns.d.ts +2 -2
  43. package/dist/types/plugins/adapters/contracts/BalancerV3RouterAdapterContract.d.ts +139 -13
  44. package/dist/types/plugins/adapters/contracts/BalancerV3WrapperAdapterContract.d.ts +117 -1
  45. package/dist/types/plugins/adapters/contracts/InfinifiGatewayAdapterContract.d.ts +351 -0
  46. package/dist/types/plugins/adapters/contracts/InfinifiUnwindingGatewayAdapterContract.d.ts +208 -0
  47. package/dist/types/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.d.ts +180 -1
  48. package/dist/types/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.d.ts +276 -1
  49. package/dist/types/plugins/adapters/contracts/PendleRouterAdapterContract.d.ts +559 -0
  50. package/dist/types/plugins/adapters/contracts/UniswapV4AdapterContract.d.ts +320 -0
  51. package/dist/types/plugins/adapters/types.d.ts +4 -1
  52. package/package.json +2 -2
@@ -0,0 +1,517 @@
1
+ const infinifiWorkerAbi = [
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
+ infinifiWorkerAbi
517
+ };