@gearbox-protocol/sdk 11.2.0 → 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 (50) 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/permissionless/chains/chunked-log-transport.js +5 -1
  4. package/dist/cjs/permissionless/utils/price-update/get-price-feeds.js +5 -3
  5. package/dist/cjs/permissionless/utils/price-update/get-price-update-tx.js +5 -3
  6. package/dist/cjs/permissionless/utils/price-update/get-prices.js +7 -2
  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/router/infinifiWorker.js +517 -0
  19. package/dist/esm/abi/router/uniswapV4Worker.js +550 -0
  20. package/dist/esm/permissionless/chains/chunked-log-transport.js +5 -1
  21. package/dist/esm/permissionless/utils/price-update/get-price-feeds.js +5 -3
  22. package/dist/esm/permissionless/utils/price-update/get-price-update-tx.js +5 -3
  23. package/dist/esm/permissionless/utils/price-update/get-prices.js +10 -3
  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/router/infinifiWorker.d.ts +726 -0
  36. package/dist/types/abi/router/uniswapV4Worker.d.ts +774 -0
  37. package/dist/types/permissionless/utils/price-update/get-price-feeds.d.ts +2 -1
  38. package/dist/types/permissionless/utils/price-update/get-price-update-tx.d.ts +2 -1
  39. package/dist/types/permissionless/utils/price-update/get-prices.d.ts +2 -1
  40. package/dist/types/plugins/adapters/abi/conctructorAbiPatterns.d.ts +2 -2
  41. package/dist/types/plugins/adapters/contracts/BalancerV3RouterAdapterContract.d.ts +139 -13
  42. package/dist/types/plugins/adapters/contracts/BalancerV3WrapperAdapterContract.d.ts +117 -1
  43. package/dist/types/plugins/adapters/contracts/InfinifiGatewayAdapterContract.d.ts +351 -0
  44. package/dist/types/plugins/adapters/contracts/InfinifiUnwindingGatewayAdapterContract.d.ts +208 -0
  45. package/dist/types/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.d.ts +180 -1
  46. package/dist/types/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.d.ts +276 -1
  47. package/dist/types/plugins/adapters/contracts/PendleRouterAdapterContract.d.ts +559 -0
  48. package/dist/types/plugins/adapters/contracts/UniswapV4AdapterContract.d.ts +320 -0
  49. package/dist/types/plugins/adapters/types.d.ts +4 -1
  50. package/package.json +2 -2
@@ -0,0 +1,574 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var uniswapV4Worker_exports = {};
20
+ __export(uniswapV4Worker_exports, {
21
+ uniswapV4WorkerAbi: () => uniswapV4WorkerAbi
22
+ });
23
+ module.exports = __toCommonJS(uniswapV4Worker_exports);
24
+ const uniswapV4WorkerAbi = [
25
+ {
26
+ type: "constructor",
27
+ inputs: [{ name: "_router", type: "address", internalType: "address" }],
28
+ stateMutability: "nonpayable"
29
+ },
30
+ {
31
+ type: "function",
32
+ name: "addQuoter",
33
+ inputs: [
34
+ { name: "gateway", type: "address", internalType: "address" },
35
+ { name: "quoter", type: "address", internalType: "address" }
36
+ ],
37
+ outputs: [],
38
+ stateMutability: "nonpayable"
39
+ },
40
+ {
41
+ type: "function",
42
+ name: "buildEdges",
43
+ inputs: [
44
+ {
45
+ name: "graph",
46
+ type: "tuple",
47
+ internalType: "struct Graph",
48
+ components: [
49
+ {
50
+ name: "vertices",
51
+ type: "tuple[]",
52
+ internalType: "struct Vertex[]",
53
+ components: [
54
+ { name: "token", type: "address", internalType: "address" },
55
+ { name: "balance", type: "uint256", internalType: "uint256" },
56
+ {
57
+ name: "leftoverBalance",
58
+ type: "uint256",
59
+ internalType: "uint256"
60
+ },
61
+ { name: "numSplits", type: "uint256", internalType: "uint256" },
62
+ {
63
+ name: "currentOptimalEdge",
64
+ type: "uint256",
65
+ internalType: "uint256"
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ name: "edges",
71
+ type: "tuple[]",
72
+ internalType: "struct Edge[]",
73
+ components: [
74
+ { name: "id", type: "uint256", internalType: "uint256" },
75
+ { name: "tokenIn", type: "address", internalType: "address" },
76
+ { name: "tokenOut", type: "address", internalType: "address" },
77
+ { name: "adapter", type: "address", internalType: "address" },
78
+ { name: "worker", type: "address", internalType: "address" },
79
+ { name: "extraData", type: "bytes", internalType: "bytes" },
80
+ {
81
+ name: "amountInTotal",
82
+ type: "uint256",
83
+ internalType: "uint256"
84
+ },
85
+ {
86
+ name: "amountOutTotal",
87
+ type: "uint256",
88
+ internalType: "uint256"
89
+ },
90
+ {
91
+ name: "amountInCurrent",
92
+ type: "uint256",
93
+ internalType: "uint256"
94
+ },
95
+ {
96
+ name: "amountOutCurrent",
97
+ type: "uint256",
98
+ internalType: "uint256"
99
+ }
100
+ ]
101
+ }
102
+ ]
103
+ },
104
+ { name: "adapter", type: "address", internalType: "address" }
105
+ ],
106
+ outputs: [
107
+ {
108
+ name: "",
109
+ type: "tuple",
110
+ internalType: "struct Graph",
111
+ components: [
112
+ {
113
+ name: "vertices",
114
+ type: "tuple[]",
115
+ internalType: "struct Vertex[]",
116
+ components: [
117
+ { name: "token", type: "address", internalType: "address" },
118
+ { name: "balance", type: "uint256", internalType: "uint256" },
119
+ {
120
+ name: "leftoverBalance",
121
+ type: "uint256",
122
+ internalType: "uint256"
123
+ },
124
+ { name: "numSplits", type: "uint256", internalType: "uint256" },
125
+ {
126
+ name: "currentOptimalEdge",
127
+ type: "uint256",
128
+ internalType: "uint256"
129
+ }
130
+ ]
131
+ },
132
+ {
133
+ name: "edges",
134
+ type: "tuple[]",
135
+ internalType: "struct Edge[]",
136
+ components: [
137
+ { name: "id", type: "uint256", internalType: "uint256" },
138
+ { name: "tokenIn", type: "address", internalType: "address" },
139
+ { name: "tokenOut", type: "address", internalType: "address" },
140
+ { name: "adapter", type: "address", internalType: "address" },
141
+ { name: "worker", type: "address", internalType: "address" },
142
+ { name: "extraData", type: "bytes", internalType: "bytes" },
143
+ {
144
+ name: "amountInTotal",
145
+ type: "uint256",
146
+ internalType: "uint256"
147
+ },
148
+ {
149
+ name: "amountOutTotal",
150
+ type: "uint256",
151
+ internalType: "uint256"
152
+ },
153
+ {
154
+ name: "amountInCurrent",
155
+ type: "uint256",
156
+ internalType: "uint256"
157
+ },
158
+ {
159
+ name: "amountOutCurrent",
160
+ type: "uint256",
161
+ internalType: "uint256"
162
+ }
163
+ ]
164
+ }
165
+ ]
166
+ }
167
+ ],
168
+ stateMutability: "view"
169
+ },
170
+ {
171
+ type: "function",
172
+ name: "contractType",
173
+ inputs: [],
174
+ outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
175
+ stateMutability: "view"
176
+ },
177
+ {
178
+ type: "function",
179
+ name: "gatewayToQuoter",
180
+ inputs: [{ name: "", type: "address", internalType: "address" }],
181
+ outputs: [{ name: "", type: "address", internalType: "address" }],
182
+ stateMutability: "view"
183
+ },
184
+ {
185
+ type: "function",
186
+ name: "getEdgeAmountOutCurrent",
187
+ inputs: [
188
+ {
189
+ name: "edge",
190
+ type: "tuple",
191
+ internalType: "struct Edge",
192
+ components: [
193
+ { name: "id", type: "uint256", internalType: "uint256" },
194
+ { name: "tokenIn", type: "address", internalType: "address" },
195
+ { name: "tokenOut", type: "address", internalType: "address" },
196
+ { name: "adapter", type: "address", internalType: "address" },
197
+ { name: "worker", type: "address", internalType: "address" },
198
+ { name: "extraData", type: "bytes", internalType: "bytes" },
199
+ { name: "amountInTotal", type: "uint256", internalType: "uint256" },
200
+ { name: "amountOutTotal", type: "uint256", internalType: "uint256" },
201
+ { name: "amountInCurrent", type: "uint256", internalType: "uint256" },
202
+ {
203
+ name: "amountOutCurrent",
204
+ type: "uint256",
205
+ internalType: "uint256"
206
+ }
207
+ ]
208
+ }
209
+ ],
210
+ outputs: [
211
+ { name: "amountOutCurrent", type: "uint256", internalType: "uint256" }
212
+ ],
213
+ stateMutability: "nonpayable"
214
+ },
215
+ {
216
+ type: "function",
217
+ name: "getMulticalls",
218
+ inputs: [
219
+ {
220
+ name: "edge",
221
+ type: "tuple",
222
+ internalType: "struct Edge",
223
+ components: [
224
+ { name: "id", type: "uint256", internalType: "uint256" },
225
+ { name: "tokenIn", type: "address", internalType: "address" },
226
+ { name: "tokenOut", type: "address", internalType: "address" },
227
+ { name: "adapter", type: "address", internalType: "address" },
228
+ { name: "worker", type: "address", internalType: "address" },
229
+ { name: "extraData", type: "bytes", internalType: "bytes" },
230
+ { name: "amountInTotal", type: "uint256", internalType: "uint256" },
231
+ { name: "amountOutTotal", type: "uint256", internalType: "uint256" },
232
+ { name: "amountInCurrent", type: "uint256", internalType: "uint256" },
233
+ {
234
+ name: "amountOutCurrent",
235
+ type: "uint256",
236
+ internalType: "uint256"
237
+ }
238
+ ]
239
+ },
240
+ { name: "currentBalance", type: "uint256", internalType: "uint256" }
241
+ ],
242
+ outputs: [
243
+ {
244
+ name: "calls",
245
+ type: "tuple[]",
246
+ internalType: "struct MultiCall[]",
247
+ components: [
248
+ { name: "target", type: "address", internalType: "address" },
249
+ { name: "callData", type: "bytes", internalType: "bytes" }
250
+ ]
251
+ }
252
+ ],
253
+ stateMutability: "pure"
254
+ },
255
+ {
256
+ type: "function",
257
+ name: "isNonLinear",
258
+ inputs: [],
259
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
260
+ stateMutability: "view"
261
+ },
262
+ {
263
+ type: "function",
264
+ name: "migrate",
265
+ inputs: [],
266
+ outputs: [],
267
+ stateMutability: "nonpayable"
268
+ },
269
+ {
270
+ type: "function",
271
+ name: "processClaims",
272
+ inputs: [
273
+ {
274
+ name: "",
275
+ type: "tuple",
276
+ internalType: "struct Edge",
277
+ components: [
278
+ { name: "id", type: "uint256", internalType: "uint256" },
279
+ { name: "tokenIn", type: "address", internalType: "address" },
280
+ { name: "tokenOut", type: "address", internalType: "address" },
281
+ { name: "adapter", type: "address", internalType: "address" },
282
+ { name: "worker", type: "address", internalType: "address" },
283
+ { name: "extraData", type: "bytes", internalType: "bytes" },
284
+ { name: "amountInTotal", type: "uint256", internalType: "uint256" },
285
+ { name: "amountOutTotal", type: "uint256", internalType: "uint256" },
286
+ { name: "amountInCurrent", type: "uint256", internalType: "uint256" },
287
+ {
288
+ name: "amountOutCurrent",
289
+ type: "uint256",
290
+ internalType: "uint256"
291
+ }
292
+ ]
293
+ },
294
+ {
295
+ name: "graph",
296
+ type: "tuple",
297
+ internalType: "struct Graph",
298
+ components: [
299
+ {
300
+ name: "vertices",
301
+ type: "tuple[]",
302
+ internalType: "struct Vertex[]",
303
+ components: [
304
+ { name: "token", type: "address", internalType: "address" },
305
+ { name: "balance", type: "uint256", internalType: "uint256" },
306
+ {
307
+ name: "leftoverBalance",
308
+ type: "uint256",
309
+ internalType: "uint256"
310
+ },
311
+ { name: "numSplits", type: "uint256", internalType: "uint256" },
312
+ {
313
+ name: "currentOptimalEdge",
314
+ type: "uint256",
315
+ internalType: "uint256"
316
+ }
317
+ ]
318
+ },
319
+ {
320
+ name: "edges",
321
+ type: "tuple[]",
322
+ internalType: "struct Edge[]",
323
+ components: [
324
+ { name: "id", type: "uint256", internalType: "uint256" },
325
+ { name: "tokenIn", type: "address", internalType: "address" },
326
+ { name: "tokenOut", type: "address", internalType: "address" },
327
+ { name: "adapter", type: "address", internalType: "address" },
328
+ { name: "worker", type: "address", internalType: "address" },
329
+ { name: "extraData", type: "bytes", internalType: "bytes" },
330
+ {
331
+ name: "amountInTotal",
332
+ type: "uint256",
333
+ internalType: "uint256"
334
+ },
335
+ {
336
+ name: "amountOutTotal",
337
+ type: "uint256",
338
+ internalType: "uint256"
339
+ },
340
+ {
341
+ name: "amountInCurrent",
342
+ type: "uint256",
343
+ internalType: "uint256"
344
+ },
345
+ {
346
+ name: "amountOutCurrent",
347
+ type: "uint256",
348
+ internalType: "uint256"
349
+ }
350
+ ]
351
+ }
352
+ ]
353
+ },
354
+ { name: "", type: "address", internalType: "address" }
355
+ ],
356
+ outputs: [
357
+ {
358
+ name: "",
359
+ type: "tuple",
360
+ internalType: "struct Graph",
361
+ components: [
362
+ {
363
+ name: "vertices",
364
+ type: "tuple[]",
365
+ internalType: "struct Vertex[]",
366
+ components: [
367
+ { name: "token", type: "address", internalType: "address" },
368
+ { name: "balance", type: "uint256", internalType: "uint256" },
369
+ {
370
+ name: "leftoverBalance",
371
+ type: "uint256",
372
+ internalType: "uint256"
373
+ },
374
+ { name: "numSplits", type: "uint256", internalType: "uint256" },
375
+ {
376
+ name: "currentOptimalEdge",
377
+ type: "uint256",
378
+ internalType: "uint256"
379
+ }
380
+ ]
381
+ },
382
+ {
383
+ name: "edges",
384
+ type: "tuple[]",
385
+ internalType: "struct Edge[]",
386
+ components: [
387
+ { name: "id", type: "uint256", internalType: "uint256" },
388
+ { name: "tokenIn", type: "address", internalType: "address" },
389
+ { name: "tokenOut", type: "address", internalType: "address" },
390
+ { name: "adapter", type: "address", internalType: "address" },
391
+ { name: "worker", type: "address", internalType: "address" },
392
+ { name: "extraData", type: "bytes", internalType: "bytes" },
393
+ {
394
+ name: "amountInTotal",
395
+ type: "uint256",
396
+ internalType: "uint256"
397
+ },
398
+ {
399
+ name: "amountOutTotal",
400
+ type: "uint256",
401
+ internalType: "uint256"
402
+ },
403
+ {
404
+ name: "amountInCurrent",
405
+ type: "uint256",
406
+ internalType: "uint256"
407
+ },
408
+ {
409
+ name: "amountOutCurrent",
410
+ type: "uint256",
411
+ internalType: "uint256"
412
+ }
413
+ ]
414
+ }
415
+ ]
416
+ },
417
+ {
418
+ name: "",
419
+ type: "tuple[]",
420
+ internalType: "struct MultiCall[]",
421
+ components: [
422
+ { name: "target", type: "address", internalType: "address" },
423
+ { name: "callData", type: "bytes", internalType: "bytes" }
424
+ ]
425
+ }
426
+ ],
427
+ stateMutability: "pure"
428
+ },
429
+ {
430
+ type: "function",
431
+ name: "quoterGasLimit",
432
+ inputs: [],
433
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
434
+ stateMutability: "view"
435
+ },
436
+ {
437
+ type: "function",
438
+ name: "router",
439
+ inputs: [],
440
+ outputs: [
441
+ { name: "", type: "address", internalType: "contract IGearboxRouter" }
442
+ ],
443
+ stateMutability: "view"
444
+ },
445
+ {
446
+ type: "function",
447
+ name: "setQuoterGasLimit",
448
+ inputs: [
449
+ { name: "_quoterGasLimit", type: "uint256", internalType: "uint256" }
450
+ ],
451
+ outputs: [],
452
+ stateMutability: "nonpayable"
453
+ },
454
+ {
455
+ type: "function",
456
+ name: "trimSpecialVertex",
457
+ inputs: [
458
+ {
459
+ name: "",
460
+ type: "tuple",
461
+ internalType: "struct Edge",
462
+ components: [
463
+ { name: "id", type: "uint256", internalType: "uint256" },
464
+ { name: "tokenIn", type: "address", internalType: "address" },
465
+ { name: "tokenOut", type: "address", internalType: "address" },
466
+ { name: "adapter", type: "address", internalType: "address" },
467
+ { name: "worker", type: "address", internalType: "address" },
468
+ { name: "extraData", type: "bytes", internalType: "bytes" },
469
+ { name: "amountInTotal", type: "uint256", internalType: "uint256" },
470
+ { name: "amountOutTotal", type: "uint256", internalType: "uint256" },
471
+ { name: "amountInCurrent", type: "uint256", internalType: "uint256" },
472
+ {
473
+ name: "amountOutCurrent",
474
+ type: "uint256",
475
+ internalType: "uint256"
476
+ }
477
+ ]
478
+ },
479
+ {
480
+ name: "",
481
+ type: "tuple",
482
+ internalType: "struct Graph",
483
+ components: [
484
+ {
485
+ name: "vertices",
486
+ type: "tuple[]",
487
+ internalType: "struct Vertex[]",
488
+ components: [
489
+ { name: "token", type: "address", internalType: "address" },
490
+ { name: "balance", type: "uint256", internalType: "uint256" },
491
+ {
492
+ name: "leftoverBalance",
493
+ type: "uint256",
494
+ internalType: "uint256"
495
+ },
496
+ { name: "numSplits", type: "uint256", internalType: "uint256" },
497
+ {
498
+ name: "currentOptimalEdge",
499
+ type: "uint256",
500
+ internalType: "uint256"
501
+ }
502
+ ]
503
+ },
504
+ {
505
+ name: "edges",
506
+ type: "tuple[]",
507
+ internalType: "struct Edge[]",
508
+ components: [
509
+ { name: "id", type: "uint256", internalType: "uint256" },
510
+ { name: "tokenIn", type: "address", internalType: "address" },
511
+ { name: "tokenOut", type: "address", internalType: "address" },
512
+ { name: "adapter", type: "address", internalType: "address" },
513
+ { name: "worker", type: "address", internalType: "address" },
514
+ { name: "extraData", type: "bytes", internalType: "bytes" },
515
+ {
516
+ name: "amountInTotal",
517
+ type: "uint256",
518
+ internalType: "uint256"
519
+ },
520
+ {
521
+ name: "amountOutTotal",
522
+ type: "uint256",
523
+ internalType: "uint256"
524
+ },
525
+ {
526
+ name: "amountInCurrent",
527
+ type: "uint256",
528
+ internalType: "uint256"
529
+ },
530
+ {
531
+ name: "amountOutCurrent",
532
+ type: "uint256",
533
+ internalType: "uint256"
534
+ }
535
+ ]
536
+ }
537
+ ]
538
+ },
539
+ { name: "", type: "address", internalType: "address" }
540
+ ],
541
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
542
+ stateMutability: "pure"
543
+ },
544
+ {
545
+ type: "function",
546
+ name: "updateRouter",
547
+ inputs: [{ name: "newRouter", type: "address", internalType: "address" }],
548
+ outputs: [],
549
+ stateMutability: "nonpayable"
550
+ },
551
+ {
552
+ type: "function",
553
+ name: "version",
554
+ inputs: [],
555
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
556
+ stateMutability: "view"
557
+ },
558
+ {
559
+ type: "event",
560
+ name: "NewRouter",
561
+ inputs: [
562
+ { name: "", type: "address", indexed: true, internalType: "address" }
563
+ ],
564
+ anonymous: false
565
+ },
566
+ { type: "error", name: "FutureRouterOnlyException", inputs: [] },
567
+ { type: "error", name: "MigrationErrorException", inputs: [] },
568
+ { type: "error", name: "RouterOnlyException", inputs: [] },
569
+ { type: "error", name: "RouterOwnerOnlyException", inputs: [] }
570
+ ];
571
+ // Annotate the CommonJS export names for ESM import in node:
572
+ 0 && (module.exports = {
573
+ uniswapV4WorkerAbi
574
+ });
@@ -30,7 +30,7 @@ function chunkedLogsTransport({
30
30
  }) {
31
31
  return (opts) => {
32
32
  const baseTransport = transport(opts);
33
- return (0, import_viem.custom)({
33
+ const customTransport = (0, import_viem.custom)({
34
34
  async request({ method, params }) {
35
35
  if (method === "eth_getLogs") {
36
36
  const [logsParams] = params;
@@ -108,6 +108,10 @@ function chunkedLogsTransport({
108
108
  return baseTransport.request({ method, params });
109
109
  }
110
110
  })(opts);
111
+ return {
112
+ ...customTransport,
113
+ value: baseTransport.value
114
+ };
111
115
  };
112
116
  }
113
117
  // Annotate the CommonJS export names for ESM import in node:
@@ -59,7 +59,8 @@ function getCallsTouchedPriceFeeds(parsedCalls) {
59
59
  }
60
60
  async function getCallsTouchedUpdatablePriceFeeds({
61
61
  parsedCalls,
62
- client
62
+ client,
63
+ gasLimit
63
64
  }) {
64
65
  const addressProvider = new import_bindings.AddressProviderContract(
65
66
  import_addresses.Addresses.ADDRESS_PROVIDER,
@@ -70,8 +71,9 @@ async function getCallsTouchedUpdatablePriceFeeds({
70
71
  310n
71
72
  );
72
73
  const sdk = await import_sdk.GearboxSDK.attach({
73
- rpcURLs: [client.transport.url],
74
- marketConfigurators: []
74
+ client,
75
+ marketConfigurators: [],
76
+ gasLimit
75
77
  });
76
78
  const touchedFeeds = parsedCalls.flatMap(
77
79
  (call) => getCallTouchedPriceFeeds(call)
@@ -40,15 +40,17 @@ function getUpdateCalldata(tx) {
40
40
  async function getPriceUpdateTx({
41
41
  client,
42
42
  priceFeeds,
43
- useMulticall3 = false
43
+ useMulticall3 = false,
44
+ gasLimit
44
45
  }) {
45
46
  const pfStore = new import_bindings.PriceFeedStoreContract(
46
47
  import_addresses.Addresses.PRICE_FEED_STORE,
47
48
  client
48
49
  );
49
50
  const sdk = await import_sdk.GearboxSDK.attach({
50
- rpcURLs: [client.transport.url],
51
- marketConfigurators: []
51
+ client,
52
+ marketConfigurators: [],
53
+ gasLimit
52
54
  });
53
55
  const updateTxs = await sdk.priceFeeds.generateExternalPriceFeedsUpdateTxs(priceFeeds);
54
56
  if (useMulticall3) {
@@ -96,10 +96,15 @@ async function getPricesChunk({
96
96
  async function getPrices({
97
97
  client,
98
98
  priceFeeds,
99
- chunkSize = 10
99
+ chunkSize = 10,
100
+ gasLimit
100
101
  }) {
102
+ if (!client.chain) {
103
+ throw new Error("Chain not defined");
104
+ }
101
105
  const sdk = await import_sdk.GearboxSDK.attach({
102
- rpcURLs: [client.transport.url],
106
+ client,
107
+ gasLimit,
103
108
  marketConfigurators: [],
104
109
  redstone: {
105
110
  ignoreMissingFeeds: true
@@ -23,7 +23,10 @@ __export(AdaptersPlugin_exports, {
23
23
  module.exports = __toCommonJS(AdaptersPlugin_exports);
24
24
  var import_sdk = require("../../sdk/index.js");
25
25
  var import_AccountMigratorAdapterContract = require("./contracts/AccountMigratorAdapterContract.js");
26
+ var import_InfinifiGatewayAdapterContract = require("./contracts/InfinifiGatewayAdapterContract.js");
27
+ var import_InfinifiUnwindingGatewayAdapterContract = require("./contracts/InfinifiUnwindingGatewayAdapterContract.js");
26
28
  var import_contracts = require("./contracts/index.js");
29
+ var import_UniswapV4AdapterContract = require("./contracts/UniswapV4AdapterContract.js");
27
30
  class AdaptersPlugin extends import_sdk.BasePlugin {
28
31
  name = "Adapters";
29
32
  version = 1;
@@ -70,6 +73,10 @@ class AdaptersPlugin extends import_sdk.BasePlugin {
70
73
  return new import_contracts.ERC4626ReferralAdapterContract(this.sdk, args);
71
74
  case "ADAPTER::FLUID_DEX":
72
75
  return new import_contracts.FluidDexAdapterContract(this.sdk, args);
76
+ case "ADAPTER::INFINIFI_GATEWAY":
77
+ return new import_InfinifiGatewayAdapterContract.InfinifiGatewayAdapterContract(this.sdk, args);
78
+ case "ADAPTER::INFINIFI_UNWINDING":
79
+ return new import_InfinifiUnwindingGatewayAdapterContract.InfinifiUnwindingGatewayAdapterContract(this.sdk, args);
73
80
  case "ADAPTER::INFRARED_VAULT":
74
81
  return new import_contracts.InfraredVaultAdapterContract(this.sdk, args);
75
82
  case "ADAPTER::KODIAK_ISLAND_GATEWAY":
@@ -102,6 +109,8 @@ class AdaptersPlugin extends import_sdk.BasePlugin {
102
109
  return new import_contracts.UniswapV2AdapterContract(this.sdk, args);
103
110
  case "ADAPTER::UNISWAP_V3_ROUTER":
104
111
  return new import_contracts.UniswapV3AdapterContract(this.sdk, args);
112
+ case "ADAPTER::UNISWAP_V4_GATEWAY":
113
+ return new import_UniswapV4AdapterContract.UniswapV4AdapterContract(this.sdk, args);
105
114
  case "ADAPTER::UPSHIFT_VAULT":
106
115
  return new import_contracts.UpshiftVaultAdapterContract(this.sdk, args);
107
116
  case "ADAPTER::VELODROME_V2_ROUTER":