@paraswap/dex-lib 3.10.0 → 3.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/build/abi/fluid-dex/dexFactory.abi.json +506 -0
  2. package/build/abi/fluid-dex/fluid-dex.abi.json +922 -0
  3. package/build/abi/fluid-dex/liquidityUserModule.abi.json +145 -0
  4. package/build/abi/fluid-dex/resolver.abi.json +999 -0
  5. package/build/dex/fluid-dex/config.d.ts +4 -0
  6. package/build/dex/fluid-dex/config.js +20 -0
  7. package/build/dex/fluid-dex/config.js.map +1 -0
  8. package/build/dex/fluid-dex/fluid-dex-factory.d.ts +49 -0
  9. package/build/dex/fluid-dex/fluid-dex-factory.js +104 -0
  10. package/build/dex/fluid-dex/fluid-dex-factory.js.map +1 -0
  11. package/build/dex/fluid-dex/fluid-dex-pool.d.ts +47 -0
  12. package/build/dex/fluid-dex/fluid-dex-pool.js +119 -0
  13. package/build/dex/fluid-dex/fluid-dex-pool.js.map +1 -0
  14. package/build/dex/fluid-dex/fluid-dex.d.ts +127 -0
  15. package/build/dex/fluid-dex/fluid-dex.js +502 -0
  16. package/build/dex/fluid-dex/fluid-dex.js.map +1 -0
  17. package/build/dex/fluid-dex/types.d.ts +52 -0
  18. package/build/dex/fluid-dex/types.js +3 -0
  19. package/build/dex/fluid-dex/types.js.map +1 -0
  20. package/build/dex/fluid-dex/utils.d.ts +2 -0
  21. package/build/dex/fluid-dex/utils.js +18 -0
  22. package/build/dex/fluid-dex/utils.js.map +1 -0
  23. package/build/dex/index.js +2 -0
  24. package/build/dex/index.js.map +1 -1
  25. package/build/dex/paraswap-limit-orders/paraswap-limit-orders.js +1 -1
  26. package/build/dex/paraswap-limit-orders/paraswap-limit-orders.js.map +1 -1
  27. package/package.json +1 -1
  28. package/src/abi/fluid-dex/dexFactory.abi.json +506 -0
  29. package/src/abi/fluid-dex/fluid-dex.abi.json +922 -0
  30. package/src/abi/fluid-dex/liquidityUserModule.abi.json +145 -0
  31. package/src/abi/fluid-dex/resolver.abi.json +999 -0
  32. package/src/dex/fluid-dex/config.ts +20 -0
  33. package/src/dex/fluid-dex/fluid-dex-e2e.test.ts +153 -0
  34. package/src/dex/fluid-dex/fluid-dex-events.test.ts +293 -0
  35. package/src/dex/fluid-dex/fluid-dex-factory.ts +143 -0
  36. package/src/dex/fluid-dex/fluid-dex-integration.test.ts +299 -0
  37. package/src/dex/fluid-dex/fluid-dex-pool.ts +178 -0
  38. package/src/dex/fluid-dex/fluid-dex.ts +790 -0
  39. package/src/dex/fluid-dex/types.ts +62 -0
  40. package/src/dex/fluid-dex/utils.ts +15 -0
  41. package/src/dex/index.ts +2 -0
  42. package/src/dex/paraswap-limit-orders/paraswap-limit-orders.ts +1 -1
  43. package/tests/constants-e2e.ts +2 -2
@@ -0,0 +1,922 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "uint256",
6
+ "name": "errorId",
7
+ "type": "uint256"
8
+ }
9
+ ],
10
+ "name": "FluidDexError",
11
+ "type": "error"
12
+ },
13
+ {
14
+ "inputs": [
15
+ {
16
+ "internalType": "uint256",
17
+ "name": "shares",
18
+ "type": "uint256"
19
+ }
20
+ ],
21
+ "name": "FluidDexLiquidityOutput",
22
+ "type": "error"
23
+ },
24
+ {
25
+ "inputs": [
26
+ {
27
+ "internalType": "uint256",
28
+ "name": "token0Amt",
29
+ "type": "uint256"
30
+ },
31
+ {
32
+ "internalType": "uint256",
33
+ "name": "token1Amt",
34
+ "type": "uint256"
35
+ }
36
+ ],
37
+ "name": "FluidDexPerfectLiquidityOutput",
38
+ "type": "error"
39
+ },
40
+ {
41
+ "inputs": [
42
+ {
43
+ "components": [
44
+ {
45
+ "internalType": "uint256",
46
+ "name": "lastStoredPrice",
47
+ "type": "uint256"
48
+ },
49
+ {
50
+ "internalType": "uint256",
51
+ "name": "centerPrice",
52
+ "type": "uint256"
53
+ },
54
+ {
55
+ "internalType": "uint256",
56
+ "name": "upperRange",
57
+ "type": "uint256"
58
+ },
59
+ {
60
+ "internalType": "uint256",
61
+ "name": "lowerRange",
62
+ "type": "uint256"
63
+ },
64
+ {
65
+ "internalType": "uint256",
66
+ "name": "geometricMean",
67
+ "type": "uint256"
68
+ },
69
+ {
70
+ "internalType": "uint256",
71
+ "name": "supplyToken0ExchangePrice",
72
+ "type": "uint256"
73
+ },
74
+ {
75
+ "internalType": "uint256",
76
+ "name": "borrowToken0ExchangePrice",
77
+ "type": "uint256"
78
+ },
79
+ {
80
+ "internalType": "uint256",
81
+ "name": "supplyToken1ExchangePrice",
82
+ "type": "uint256"
83
+ },
84
+ {
85
+ "internalType": "uint256",
86
+ "name": "borrowToken1ExchangePrice",
87
+ "type": "uint256"
88
+ }
89
+ ],
90
+ "internalType": "struct IFluidDexT1.PricesAndExchangePrice",
91
+ "name": "pex_",
92
+ "type": "tuple"
93
+ }
94
+ ],
95
+ "name": "FluidDexPricesAndExchangeRates",
96
+ "type": "error"
97
+ },
98
+ {
99
+ "inputs": [
100
+ {
101
+ "internalType": "uint256",
102
+ "name": "tokenAmt",
103
+ "type": "uint256"
104
+ }
105
+ ],
106
+ "name": "FluidDexSingleTokenOutput",
107
+ "type": "error"
108
+ },
109
+ {
110
+ "inputs": [
111
+ {
112
+ "internalType": "uint256",
113
+ "name": "amountOut",
114
+ "type": "uint256"
115
+ }
116
+ ],
117
+ "name": "FluidDexSwapResult",
118
+ "type": "error"
119
+ },
120
+ {
121
+ "inputs": [],
122
+ "name": "DEX_ID",
123
+ "outputs": [
124
+ {
125
+ "internalType": "uint256",
126
+ "name": "",
127
+ "type": "uint256"
128
+ }
129
+ ],
130
+ "stateMutability": "view",
131
+ "type": "function"
132
+ },
133
+ {
134
+ "inputs": [
135
+ {
136
+ "internalType": "uint256",
137
+ "name": "token0Amt_",
138
+ "type": "uint256"
139
+ },
140
+ {
141
+ "internalType": "uint256",
142
+ "name": "token1Amt_",
143
+ "type": "uint256"
144
+ },
145
+ {
146
+ "internalType": "uint256",
147
+ "name": "maxSharesAmt_",
148
+ "type": "uint256"
149
+ },
150
+ {
151
+ "internalType": "bool",
152
+ "name": "estimate_",
153
+ "type": "bool"
154
+ }
155
+ ],
156
+ "name": "borrow",
157
+ "outputs": [
158
+ {
159
+ "internalType": "uint256",
160
+ "name": "shares_",
161
+ "type": "uint256"
162
+ }
163
+ ],
164
+ "stateMutability": "nonpayable",
165
+ "type": "function"
166
+ },
167
+ {
168
+ "inputs": [
169
+ {
170
+ "internalType": "uint256",
171
+ "name": "shares_",
172
+ "type": "uint256"
173
+ },
174
+ {
175
+ "internalType": "uint256",
176
+ "name": "minToken0Borrow_",
177
+ "type": "uint256"
178
+ },
179
+ {
180
+ "internalType": "uint256",
181
+ "name": "minToken1Borrow_",
182
+ "type": "uint256"
183
+ },
184
+ {
185
+ "internalType": "bool",
186
+ "name": "estimate_",
187
+ "type": "bool"
188
+ }
189
+ ],
190
+ "name": "borrowPerfect",
191
+ "outputs": [
192
+ {
193
+ "internalType": "uint256",
194
+ "name": "token0Amt_",
195
+ "type": "uint256"
196
+ },
197
+ {
198
+ "internalType": "uint256",
199
+ "name": "token1Amt_",
200
+ "type": "uint256"
201
+ }
202
+ ],
203
+ "stateMutability": "nonpayable",
204
+ "type": "function"
205
+ },
206
+ {
207
+ "inputs": [],
208
+ "name": "constantsView",
209
+ "outputs": [
210
+ {
211
+ "components": [
212
+ {
213
+ "internalType": "uint256",
214
+ "name": "dexId",
215
+ "type": "uint256"
216
+ },
217
+ {
218
+ "internalType": "address",
219
+ "name": "liquidity",
220
+ "type": "address"
221
+ },
222
+ {
223
+ "internalType": "address",
224
+ "name": "factory",
225
+ "type": "address"
226
+ },
227
+ {
228
+ "components": [
229
+ {
230
+ "internalType": "address",
231
+ "name": "shift",
232
+ "type": "address"
233
+ },
234
+ {
235
+ "internalType": "address",
236
+ "name": "admin",
237
+ "type": "address"
238
+ },
239
+ {
240
+ "internalType": "address",
241
+ "name": "colOperations",
242
+ "type": "address"
243
+ },
244
+ {
245
+ "internalType": "address",
246
+ "name": "debtOperations",
247
+ "type": "address"
248
+ },
249
+ {
250
+ "internalType": "address",
251
+ "name": "perfectOperationsAndOracle",
252
+ "type": "address"
253
+ }
254
+ ],
255
+ "internalType": "struct IFluidDexT1.Implementations",
256
+ "name": "implementations",
257
+ "type": "tuple"
258
+ },
259
+ {
260
+ "internalType": "address",
261
+ "name": "deployerContract",
262
+ "type": "address"
263
+ },
264
+ {
265
+ "internalType": "address",
266
+ "name": "token0",
267
+ "type": "address"
268
+ },
269
+ {
270
+ "internalType": "address",
271
+ "name": "token1",
272
+ "type": "address"
273
+ },
274
+ {
275
+ "internalType": "bytes32",
276
+ "name": "supplyToken0Slot",
277
+ "type": "bytes32"
278
+ },
279
+ {
280
+ "internalType": "bytes32",
281
+ "name": "borrowToken0Slot",
282
+ "type": "bytes32"
283
+ },
284
+ {
285
+ "internalType": "bytes32",
286
+ "name": "supplyToken1Slot",
287
+ "type": "bytes32"
288
+ },
289
+ {
290
+ "internalType": "bytes32",
291
+ "name": "borrowToken1Slot",
292
+ "type": "bytes32"
293
+ },
294
+ {
295
+ "internalType": "bytes32",
296
+ "name": "exchangePriceToken0Slot",
297
+ "type": "bytes32"
298
+ },
299
+ {
300
+ "internalType": "bytes32",
301
+ "name": "exchangePriceToken1Slot",
302
+ "type": "bytes32"
303
+ },
304
+ {
305
+ "internalType": "uint256",
306
+ "name": "oracleMapping",
307
+ "type": "uint256"
308
+ }
309
+ ],
310
+ "internalType": "struct IFluidDexT1.ConstantViews",
311
+ "name": "constantsView_",
312
+ "type": "tuple"
313
+ }
314
+ ],
315
+ "stateMutability": "view",
316
+ "type": "function"
317
+ },
318
+ {
319
+ "inputs": [],
320
+ "name": "constantsView2",
321
+ "outputs": [
322
+ {
323
+ "components": [
324
+ {
325
+ "internalType": "uint256",
326
+ "name": "token0NumeratorPrecision",
327
+ "type": "uint256"
328
+ },
329
+ {
330
+ "internalType": "uint256",
331
+ "name": "token0DenominatorPrecision",
332
+ "type": "uint256"
333
+ },
334
+ {
335
+ "internalType": "uint256",
336
+ "name": "token1NumeratorPrecision",
337
+ "type": "uint256"
338
+ },
339
+ {
340
+ "internalType": "uint256",
341
+ "name": "token1DenominatorPrecision",
342
+ "type": "uint256"
343
+ }
344
+ ],
345
+ "internalType": "struct IFluidDexT1.ConstantViews2",
346
+ "name": "constantsView2_",
347
+ "type": "tuple"
348
+ }
349
+ ],
350
+ "stateMutability": "view",
351
+ "type": "function"
352
+ },
353
+ {
354
+ "inputs": [
355
+ {
356
+ "internalType": "uint256",
357
+ "name": "token0Amt_",
358
+ "type": "uint256"
359
+ },
360
+ {
361
+ "internalType": "uint256",
362
+ "name": "token1Amt_",
363
+ "type": "uint256"
364
+ },
365
+ {
366
+ "internalType": "uint256",
367
+ "name": "minSharesAmt_",
368
+ "type": "uint256"
369
+ },
370
+ {
371
+ "internalType": "bool",
372
+ "name": "estimate_",
373
+ "type": "bool"
374
+ }
375
+ ],
376
+ "name": "deposit",
377
+ "outputs": [
378
+ {
379
+ "internalType": "uint256",
380
+ "name": "shares_",
381
+ "type": "uint256"
382
+ }
383
+ ],
384
+ "stateMutability": "payable",
385
+ "type": "function"
386
+ },
387
+ {
388
+ "inputs": [
389
+ {
390
+ "internalType": "uint256",
391
+ "name": "shares_",
392
+ "type": "uint256"
393
+ },
394
+ {
395
+ "internalType": "uint256",
396
+ "name": "maxToken0Deposit_",
397
+ "type": "uint256"
398
+ },
399
+ {
400
+ "internalType": "uint256",
401
+ "name": "maxToken1Deposit_",
402
+ "type": "uint256"
403
+ },
404
+ {
405
+ "internalType": "bool",
406
+ "name": "estimate_",
407
+ "type": "bool"
408
+ }
409
+ ],
410
+ "name": "depositPerfect",
411
+ "outputs": [
412
+ {
413
+ "internalType": "uint256",
414
+ "name": "token0Amt_",
415
+ "type": "uint256"
416
+ },
417
+ {
418
+ "internalType": "uint256",
419
+ "name": "token1Amt_",
420
+ "type": "uint256"
421
+ }
422
+ ],
423
+ "stateMutability": "payable",
424
+ "type": "function"
425
+ },
426
+ {
427
+ "inputs": [
428
+ {
429
+ "internalType": "uint256",
430
+ "name": "geometricMean_",
431
+ "type": "uint256"
432
+ },
433
+ {
434
+ "internalType": "uint256",
435
+ "name": "upperRange_",
436
+ "type": "uint256"
437
+ },
438
+ {
439
+ "internalType": "uint256",
440
+ "name": "lowerRange_",
441
+ "type": "uint256"
442
+ },
443
+ {
444
+ "internalType": "uint256",
445
+ "name": "token0SupplyExchangePrice_",
446
+ "type": "uint256"
447
+ },
448
+ {
449
+ "internalType": "uint256",
450
+ "name": "token1SupplyExchangePrice_",
451
+ "type": "uint256"
452
+ }
453
+ ],
454
+ "name": "getCollateralReserves",
455
+ "outputs": [
456
+ {
457
+ "components": [
458
+ {
459
+ "internalType": "uint256",
460
+ "name": "token0RealReserves",
461
+ "type": "uint256"
462
+ },
463
+ {
464
+ "internalType": "uint256",
465
+ "name": "token1RealReserves",
466
+ "type": "uint256"
467
+ },
468
+ {
469
+ "internalType": "uint256",
470
+ "name": "token0ImaginaryReserves",
471
+ "type": "uint256"
472
+ },
473
+ {
474
+ "internalType": "uint256",
475
+ "name": "token1ImaginaryReserves",
476
+ "type": "uint256"
477
+ }
478
+ ],
479
+ "internalType": "struct IFluidDexT1.CollateralReserves",
480
+ "name": "c_",
481
+ "type": "tuple"
482
+ }
483
+ ],
484
+ "stateMutability": "view",
485
+ "type": "function"
486
+ },
487
+ {
488
+ "inputs": [
489
+ {
490
+ "internalType": "uint256",
491
+ "name": "geometricMean_",
492
+ "type": "uint256"
493
+ },
494
+ {
495
+ "internalType": "uint256",
496
+ "name": "upperRange_",
497
+ "type": "uint256"
498
+ },
499
+ {
500
+ "internalType": "uint256",
501
+ "name": "lowerRange_",
502
+ "type": "uint256"
503
+ },
504
+ {
505
+ "internalType": "uint256",
506
+ "name": "token0BorrowExchangePrice_",
507
+ "type": "uint256"
508
+ },
509
+ {
510
+ "internalType": "uint256",
511
+ "name": "token1BorrowExchangePrice_",
512
+ "type": "uint256"
513
+ }
514
+ ],
515
+ "name": "getDebtReserves",
516
+ "outputs": [
517
+ {
518
+ "components": [
519
+ {
520
+ "internalType": "uint256",
521
+ "name": "token0Debt",
522
+ "type": "uint256"
523
+ },
524
+ {
525
+ "internalType": "uint256",
526
+ "name": "token1Debt",
527
+ "type": "uint256"
528
+ },
529
+ {
530
+ "internalType": "uint256",
531
+ "name": "token0RealReserves",
532
+ "type": "uint256"
533
+ },
534
+ {
535
+ "internalType": "uint256",
536
+ "name": "token1RealReserves",
537
+ "type": "uint256"
538
+ },
539
+ {
540
+ "internalType": "uint256",
541
+ "name": "token0ImaginaryReserves",
542
+ "type": "uint256"
543
+ },
544
+ {
545
+ "internalType": "uint256",
546
+ "name": "token1ImaginaryReserves",
547
+ "type": "uint256"
548
+ }
549
+ ],
550
+ "internalType": "struct IFluidDexT1.DebtReserves",
551
+ "name": "d_",
552
+ "type": "tuple"
553
+ }
554
+ ],
555
+ "stateMutability": "view",
556
+ "type": "function"
557
+ },
558
+ {
559
+ "inputs": [],
560
+ "name": "getPricesAndExchangePrices",
561
+ "outputs": [],
562
+ "stateMutability": "nonpayable",
563
+ "type": "function"
564
+ },
565
+ {
566
+ "inputs": [
567
+ {
568
+ "internalType": "uint256[]",
569
+ "name": "secondsAgos_",
570
+ "type": "uint256[]"
571
+ }
572
+ ],
573
+ "name": "oraclePrice",
574
+ "outputs": [
575
+ {
576
+ "components": [
577
+ {
578
+ "internalType": "uint256",
579
+ "name": "twap1by0",
580
+ "type": "uint256"
581
+ },
582
+ {
583
+ "internalType": "uint256",
584
+ "name": "lowestPrice1by0",
585
+ "type": "uint256"
586
+ },
587
+ {
588
+ "internalType": "uint256",
589
+ "name": "highestPrice1by0",
590
+ "type": "uint256"
591
+ },
592
+ {
593
+ "internalType": "uint256",
594
+ "name": "twap0by1",
595
+ "type": "uint256"
596
+ },
597
+ {
598
+ "internalType": "uint256",
599
+ "name": "lowestPrice0by1",
600
+ "type": "uint256"
601
+ },
602
+ {
603
+ "internalType": "uint256",
604
+ "name": "highestPrice0by1",
605
+ "type": "uint256"
606
+ }
607
+ ],
608
+ "internalType": "struct IFluidDexT1.Oracle[]",
609
+ "name": "twaps_",
610
+ "type": "tuple[]"
611
+ },
612
+ {
613
+ "internalType": "uint256",
614
+ "name": "currentPrice_",
615
+ "type": "uint256"
616
+ }
617
+ ],
618
+ "stateMutability": "view",
619
+ "type": "function"
620
+ },
621
+ {
622
+ "inputs": [
623
+ {
624
+ "internalType": "uint256",
625
+ "name": "token0Amt_",
626
+ "type": "uint256"
627
+ },
628
+ {
629
+ "internalType": "uint256",
630
+ "name": "token1Amt_",
631
+ "type": "uint256"
632
+ },
633
+ {
634
+ "internalType": "uint256",
635
+ "name": "minSharesAmt_",
636
+ "type": "uint256"
637
+ },
638
+ {
639
+ "internalType": "bool",
640
+ "name": "estimate_",
641
+ "type": "bool"
642
+ }
643
+ ],
644
+ "name": "payback",
645
+ "outputs": [
646
+ {
647
+ "internalType": "uint256",
648
+ "name": "shares_",
649
+ "type": "uint256"
650
+ }
651
+ ],
652
+ "stateMutability": "payable",
653
+ "type": "function"
654
+ },
655
+ {
656
+ "inputs": [
657
+ {
658
+ "internalType": "uint256",
659
+ "name": "shares_",
660
+ "type": "uint256"
661
+ },
662
+ {
663
+ "internalType": "uint256",
664
+ "name": "maxToken0Payback_",
665
+ "type": "uint256"
666
+ },
667
+ {
668
+ "internalType": "uint256",
669
+ "name": "maxToken1Payback_",
670
+ "type": "uint256"
671
+ },
672
+ {
673
+ "internalType": "bool",
674
+ "name": "estimate_",
675
+ "type": "bool"
676
+ }
677
+ ],
678
+ "name": "paybackPerfect",
679
+ "outputs": [
680
+ {
681
+ "internalType": "uint256",
682
+ "name": "token0Amt_",
683
+ "type": "uint256"
684
+ },
685
+ {
686
+ "internalType": "uint256",
687
+ "name": "token1Amt_",
688
+ "type": "uint256"
689
+ }
690
+ ],
691
+ "stateMutability": "payable",
692
+ "type": "function"
693
+ },
694
+ {
695
+ "inputs": [
696
+ {
697
+ "internalType": "uint256",
698
+ "name": "shares_",
699
+ "type": "uint256"
700
+ },
701
+ {
702
+ "internalType": "uint256",
703
+ "name": "maxToken0_",
704
+ "type": "uint256"
705
+ },
706
+ {
707
+ "internalType": "uint256",
708
+ "name": "maxToken1_",
709
+ "type": "uint256"
710
+ },
711
+ {
712
+ "internalType": "bool",
713
+ "name": "estimate_",
714
+ "type": "bool"
715
+ }
716
+ ],
717
+ "name": "paybackPerfectInOneToken",
718
+ "outputs": [
719
+ {
720
+ "internalType": "uint256",
721
+ "name": "paybackAmt_",
722
+ "type": "uint256"
723
+ }
724
+ ],
725
+ "stateMutability": "payable",
726
+ "type": "function"
727
+ },
728
+ {
729
+ "inputs": [
730
+ {
731
+ "internalType": "bytes32",
732
+ "name": "slot_",
733
+ "type": "bytes32"
734
+ }
735
+ ],
736
+ "name": "readFromStorage",
737
+ "outputs": [
738
+ {
739
+ "internalType": "uint256",
740
+ "name": "result_",
741
+ "type": "uint256"
742
+ }
743
+ ],
744
+ "stateMutability": "view",
745
+ "type": "function"
746
+ },
747
+ {
748
+ "inputs": [
749
+ {
750
+ "internalType": "bool",
751
+ "name": "swap0to1_",
752
+ "type": "bool"
753
+ },
754
+ {
755
+ "internalType": "uint256",
756
+ "name": "amountIn_",
757
+ "type": "uint256"
758
+ },
759
+ {
760
+ "internalType": "uint256",
761
+ "name": "amountOutMin_",
762
+ "type": "uint256"
763
+ },
764
+ {
765
+ "internalType": "address",
766
+ "name": "to_",
767
+ "type": "address"
768
+ }
769
+ ],
770
+ "name": "swapIn",
771
+ "outputs": [
772
+ {
773
+ "internalType": "uint256",
774
+ "name": "amountOut_",
775
+ "type": "uint256"
776
+ }
777
+ ],
778
+ "stateMutability": "payable",
779
+ "type": "function"
780
+ },
781
+ {
782
+ "inputs": [
783
+ {
784
+ "internalType": "bool",
785
+ "name": "swap0to1_",
786
+ "type": "bool"
787
+ },
788
+ {
789
+ "internalType": "uint256",
790
+ "name": "amountOut_",
791
+ "type": "uint256"
792
+ },
793
+ {
794
+ "internalType": "uint256",
795
+ "name": "amountInMax_",
796
+ "type": "uint256"
797
+ },
798
+ {
799
+ "internalType": "address",
800
+ "name": "to_",
801
+ "type": "address"
802
+ }
803
+ ],
804
+ "name": "swapOut",
805
+ "outputs": [
806
+ {
807
+ "internalType": "uint256",
808
+ "name": "amountIn_",
809
+ "type": "uint256"
810
+ }
811
+ ],
812
+ "stateMutability": "payable",
813
+ "type": "function"
814
+ },
815
+ {
816
+ "inputs": [
817
+ {
818
+ "internalType": "uint256",
819
+ "name": "token0Amt_",
820
+ "type": "uint256"
821
+ },
822
+ {
823
+ "internalType": "uint256",
824
+ "name": "token1Amt_",
825
+ "type": "uint256"
826
+ },
827
+ {
828
+ "internalType": "uint256",
829
+ "name": "maxSharesAmt_",
830
+ "type": "uint256"
831
+ },
832
+ {
833
+ "internalType": "bool",
834
+ "name": "estimate_",
835
+ "type": "bool"
836
+ }
837
+ ],
838
+ "name": "withdraw",
839
+ "outputs": [
840
+ {
841
+ "internalType": "uint256",
842
+ "name": "shares_",
843
+ "type": "uint256"
844
+ }
845
+ ],
846
+ "stateMutability": "nonpayable",
847
+ "type": "function"
848
+ },
849
+ {
850
+ "inputs": [
851
+ {
852
+ "internalType": "uint256",
853
+ "name": "shares_",
854
+ "type": "uint256"
855
+ },
856
+ {
857
+ "internalType": "uint256",
858
+ "name": "minToken0Withdraw_",
859
+ "type": "uint256"
860
+ },
861
+ {
862
+ "internalType": "uint256",
863
+ "name": "minToken1Withdraw_",
864
+ "type": "uint256"
865
+ },
866
+ {
867
+ "internalType": "bool",
868
+ "name": "estimate_",
869
+ "type": "bool"
870
+ }
871
+ ],
872
+ "name": "withdrawPerfect",
873
+ "outputs": [
874
+ {
875
+ "internalType": "uint256",
876
+ "name": "token0Amt_",
877
+ "type": "uint256"
878
+ },
879
+ {
880
+ "internalType": "uint256",
881
+ "name": "token1Amt_",
882
+ "type": "uint256"
883
+ }
884
+ ],
885
+ "stateMutability": "nonpayable",
886
+ "type": "function"
887
+ },
888
+ {
889
+ "inputs": [
890
+ {
891
+ "internalType": "uint256",
892
+ "name": "shares_",
893
+ "type": "uint256"
894
+ },
895
+ {
896
+ "internalType": "uint256",
897
+ "name": "minToken0_",
898
+ "type": "uint256"
899
+ },
900
+ {
901
+ "internalType": "uint256",
902
+ "name": "minToken1_",
903
+ "type": "uint256"
904
+ },
905
+ {
906
+ "internalType": "bool",
907
+ "name": "estimate_",
908
+ "type": "bool"
909
+ }
910
+ ],
911
+ "name": "withdrawPerfectInOneToken",
912
+ "outputs": [
913
+ {
914
+ "internalType": "uint256",
915
+ "name": "withdrawAmt_",
916
+ "type": "uint256"
917
+ }
918
+ ],
919
+ "stateMutability": "nonpayable",
920
+ "type": "function"
921
+ }
922
+ ]