@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,999 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ { "internalType": "address", "name": "factory_", "type": "address" }
5
+ ],
6
+ "stateMutability": "nonpayable",
7
+ "type": "constructor"
8
+ },
9
+ {
10
+ "inputs": [],
11
+ "name": "FACTORY",
12
+ "outputs": [
13
+ {
14
+ "internalType": "contract IFluidDexFactory",
15
+ "name": "",
16
+ "type": "address"
17
+ }
18
+ ],
19
+ "stateMutability": "view",
20
+ "type": "function"
21
+ },
22
+ {
23
+ "inputs": [
24
+ { "internalType": "address", "name": "dex_", "type": "address" },
25
+ { "internalType": "bool", "name": "swap0to1_", "type": "bool" },
26
+ { "internalType": "uint256", "name": "amountIn_", "type": "uint256" },
27
+ { "internalType": "uint256", "name": "amountOutMin_", "type": "uint256" }
28
+ ],
29
+ "name": "estimateSwapIn",
30
+ "outputs": [
31
+ { "internalType": "uint256", "name": "amountOut_", "type": "uint256" }
32
+ ],
33
+ "stateMutability": "payable",
34
+ "type": "function"
35
+ },
36
+ {
37
+ "inputs": [
38
+ { "internalType": "address", "name": "dex_", "type": "address" },
39
+ { "internalType": "bool", "name": "swap0to1_", "type": "bool" },
40
+ { "internalType": "uint256", "name": "amountOut_", "type": "uint256" },
41
+ { "internalType": "uint256", "name": "amountInMax_", "type": "uint256" }
42
+ ],
43
+ "name": "estimateSwapOut",
44
+ "outputs": [
45
+ { "internalType": "uint256", "name": "amountIn_", "type": "uint256" }
46
+ ],
47
+ "stateMutability": "payable",
48
+ "type": "function"
49
+ },
50
+ {
51
+ "inputs": [],
52
+ "name": "getAllPoolAddresses",
53
+ "outputs": [
54
+ { "internalType": "address[]", "name": "pools_", "type": "address[]" }
55
+ ],
56
+ "stateMutability": "view",
57
+ "type": "function"
58
+ },
59
+ {
60
+ "inputs": [],
61
+ "name": "getAllPools",
62
+ "outputs": [
63
+ {
64
+ "components": [
65
+ { "internalType": "address", "name": "pool", "type": "address" },
66
+ { "internalType": "address", "name": "token0", "type": "address" },
67
+ { "internalType": "address", "name": "token1", "type": "address" },
68
+ { "internalType": "uint256", "name": "fee", "type": "uint256" }
69
+ ],
70
+ "internalType": "struct Structs.Pool[]",
71
+ "name": "pools_",
72
+ "type": "tuple[]"
73
+ }
74
+ ],
75
+ "stateMutability": "view",
76
+ "type": "function"
77
+ },
78
+ {
79
+ "inputs": [],
80
+ "name": "getAllPoolsReserves",
81
+ "outputs": [
82
+ {
83
+ "components": [
84
+ { "internalType": "address", "name": "pool", "type": "address" },
85
+ { "internalType": "address", "name": "token0", "type": "address" },
86
+ { "internalType": "address", "name": "token1", "type": "address" },
87
+ { "internalType": "uint256", "name": "fee", "type": "uint256" },
88
+ {
89
+ "components": [
90
+ {
91
+ "internalType": "uint256",
92
+ "name": "token0RealReserves",
93
+ "type": "uint256"
94
+ },
95
+ {
96
+ "internalType": "uint256",
97
+ "name": "token1RealReserves",
98
+ "type": "uint256"
99
+ },
100
+ {
101
+ "internalType": "uint256",
102
+ "name": "token0ImaginaryReserves",
103
+ "type": "uint256"
104
+ },
105
+ {
106
+ "internalType": "uint256",
107
+ "name": "token1ImaginaryReserves",
108
+ "type": "uint256"
109
+ }
110
+ ],
111
+ "internalType": "struct IFluidDexT1.CollateralReserves",
112
+ "name": "collateralReserves",
113
+ "type": "tuple"
114
+ },
115
+ {
116
+ "components": [
117
+ {
118
+ "internalType": "uint256",
119
+ "name": "token0Debt",
120
+ "type": "uint256"
121
+ },
122
+ {
123
+ "internalType": "uint256",
124
+ "name": "token1Debt",
125
+ "type": "uint256"
126
+ },
127
+ {
128
+ "internalType": "uint256",
129
+ "name": "token0RealReserves",
130
+ "type": "uint256"
131
+ },
132
+ {
133
+ "internalType": "uint256",
134
+ "name": "token1RealReserves",
135
+ "type": "uint256"
136
+ },
137
+ {
138
+ "internalType": "uint256",
139
+ "name": "token0ImaginaryReserves",
140
+ "type": "uint256"
141
+ },
142
+ {
143
+ "internalType": "uint256",
144
+ "name": "token1ImaginaryReserves",
145
+ "type": "uint256"
146
+ }
147
+ ],
148
+ "internalType": "struct IFluidDexT1.DebtReserves",
149
+ "name": "debtReserves",
150
+ "type": "tuple"
151
+ }
152
+ ],
153
+ "internalType": "struct Structs.PoolWithReserves[]",
154
+ "name": "poolsReserves_",
155
+ "type": "tuple[]"
156
+ }
157
+ ],
158
+ "stateMutability": "nonpayable",
159
+ "type": "function"
160
+ },
161
+ {
162
+ "inputs": [],
163
+ "name": "getAllPoolsReservesAdjusted",
164
+ "outputs": [
165
+ {
166
+ "components": [
167
+ { "internalType": "address", "name": "pool", "type": "address" },
168
+ { "internalType": "address", "name": "token0", "type": "address" },
169
+ { "internalType": "address", "name": "token1", "type": "address" },
170
+ { "internalType": "uint256", "name": "fee", "type": "uint256" },
171
+ {
172
+ "components": [
173
+ {
174
+ "internalType": "uint256",
175
+ "name": "token0RealReserves",
176
+ "type": "uint256"
177
+ },
178
+ {
179
+ "internalType": "uint256",
180
+ "name": "token1RealReserves",
181
+ "type": "uint256"
182
+ },
183
+ {
184
+ "internalType": "uint256",
185
+ "name": "token0ImaginaryReserves",
186
+ "type": "uint256"
187
+ },
188
+ {
189
+ "internalType": "uint256",
190
+ "name": "token1ImaginaryReserves",
191
+ "type": "uint256"
192
+ }
193
+ ],
194
+ "internalType": "struct IFluidDexT1.CollateralReserves",
195
+ "name": "collateralReserves",
196
+ "type": "tuple"
197
+ },
198
+ {
199
+ "components": [
200
+ {
201
+ "internalType": "uint256",
202
+ "name": "token0Debt",
203
+ "type": "uint256"
204
+ },
205
+ {
206
+ "internalType": "uint256",
207
+ "name": "token1Debt",
208
+ "type": "uint256"
209
+ },
210
+ {
211
+ "internalType": "uint256",
212
+ "name": "token0RealReserves",
213
+ "type": "uint256"
214
+ },
215
+ {
216
+ "internalType": "uint256",
217
+ "name": "token1RealReserves",
218
+ "type": "uint256"
219
+ },
220
+ {
221
+ "internalType": "uint256",
222
+ "name": "token0ImaginaryReserves",
223
+ "type": "uint256"
224
+ },
225
+ {
226
+ "internalType": "uint256",
227
+ "name": "token1ImaginaryReserves",
228
+ "type": "uint256"
229
+ }
230
+ ],
231
+ "internalType": "struct IFluidDexT1.DebtReserves",
232
+ "name": "debtReserves",
233
+ "type": "tuple"
234
+ }
235
+ ],
236
+ "internalType": "struct Structs.PoolWithReserves[]",
237
+ "name": "poolsReserves_",
238
+ "type": "tuple[]"
239
+ }
240
+ ],
241
+ "stateMutability": "nonpayable",
242
+ "type": "function"
243
+ },
244
+ {
245
+ "inputs": [
246
+ { "internalType": "address", "name": "dex_", "type": "address" }
247
+ ],
248
+ "name": "getDexCollateralReserves",
249
+ "outputs": [
250
+ {
251
+ "components": [
252
+ {
253
+ "internalType": "uint256",
254
+ "name": "token0RealReserves",
255
+ "type": "uint256"
256
+ },
257
+ {
258
+ "internalType": "uint256",
259
+ "name": "token1RealReserves",
260
+ "type": "uint256"
261
+ },
262
+ {
263
+ "internalType": "uint256",
264
+ "name": "token0ImaginaryReserves",
265
+ "type": "uint256"
266
+ },
267
+ {
268
+ "internalType": "uint256",
269
+ "name": "token1ImaginaryReserves",
270
+ "type": "uint256"
271
+ }
272
+ ],
273
+ "internalType": "struct IFluidDexT1.CollateralReserves",
274
+ "name": "reserves_",
275
+ "type": "tuple"
276
+ }
277
+ ],
278
+ "stateMutability": "nonpayable",
279
+ "type": "function"
280
+ },
281
+ {
282
+ "inputs": [
283
+ { "internalType": "address", "name": "dex_", "type": "address" }
284
+ ],
285
+ "name": "getDexCollateralReservesAdjusted",
286
+ "outputs": [
287
+ {
288
+ "components": [
289
+ {
290
+ "internalType": "uint256",
291
+ "name": "token0RealReserves",
292
+ "type": "uint256"
293
+ },
294
+ {
295
+ "internalType": "uint256",
296
+ "name": "token1RealReserves",
297
+ "type": "uint256"
298
+ },
299
+ {
300
+ "internalType": "uint256",
301
+ "name": "token0ImaginaryReserves",
302
+ "type": "uint256"
303
+ },
304
+ {
305
+ "internalType": "uint256",
306
+ "name": "token1ImaginaryReserves",
307
+ "type": "uint256"
308
+ }
309
+ ],
310
+ "internalType": "struct IFluidDexT1.CollateralReserves",
311
+ "name": "reserves_",
312
+ "type": "tuple"
313
+ }
314
+ ],
315
+ "stateMutability": "nonpayable",
316
+ "type": "function"
317
+ },
318
+ {
319
+ "inputs": [
320
+ { "internalType": "address", "name": "dex_", "type": "address" }
321
+ ],
322
+ "name": "getDexDebtReserves",
323
+ "outputs": [
324
+ {
325
+ "components": [
326
+ {
327
+ "internalType": "uint256",
328
+ "name": "token0Debt",
329
+ "type": "uint256"
330
+ },
331
+ {
332
+ "internalType": "uint256",
333
+ "name": "token1Debt",
334
+ "type": "uint256"
335
+ },
336
+ {
337
+ "internalType": "uint256",
338
+ "name": "token0RealReserves",
339
+ "type": "uint256"
340
+ },
341
+ {
342
+ "internalType": "uint256",
343
+ "name": "token1RealReserves",
344
+ "type": "uint256"
345
+ },
346
+ {
347
+ "internalType": "uint256",
348
+ "name": "token0ImaginaryReserves",
349
+ "type": "uint256"
350
+ },
351
+ {
352
+ "internalType": "uint256",
353
+ "name": "token1ImaginaryReserves",
354
+ "type": "uint256"
355
+ }
356
+ ],
357
+ "internalType": "struct IFluidDexT1.DebtReserves",
358
+ "name": "reserves_",
359
+ "type": "tuple"
360
+ }
361
+ ],
362
+ "stateMutability": "nonpayable",
363
+ "type": "function"
364
+ },
365
+ {
366
+ "inputs": [
367
+ { "internalType": "address", "name": "dex_", "type": "address" }
368
+ ],
369
+ "name": "getDexDebtReservesAdjusted",
370
+ "outputs": [
371
+ {
372
+ "components": [
373
+ {
374
+ "internalType": "uint256",
375
+ "name": "token0Debt",
376
+ "type": "uint256"
377
+ },
378
+ {
379
+ "internalType": "uint256",
380
+ "name": "token1Debt",
381
+ "type": "uint256"
382
+ },
383
+ {
384
+ "internalType": "uint256",
385
+ "name": "token0RealReserves",
386
+ "type": "uint256"
387
+ },
388
+ {
389
+ "internalType": "uint256",
390
+ "name": "token1RealReserves",
391
+ "type": "uint256"
392
+ },
393
+ {
394
+ "internalType": "uint256",
395
+ "name": "token0ImaginaryReserves",
396
+ "type": "uint256"
397
+ },
398
+ {
399
+ "internalType": "uint256",
400
+ "name": "token1ImaginaryReserves",
401
+ "type": "uint256"
402
+ }
403
+ ],
404
+ "internalType": "struct IFluidDexT1.DebtReserves",
405
+ "name": "reserves_",
406
+ "type": "tuple"
407
+ }
408
+ ],
409
+ "stateMutability": "nonpayable",
410
+ "type": "function"
411
+ },
412
+ {
413
+ "inputs": [
414
+ { "internalType": "address", "name": "dex_", "type": "address" }
415
+ ],
416
+ "name": "getDexPricesAndExchangePrices",
417
+ "outputs": [
418
+ {
419
+ "components": [
420
+ {
421
+ "internalType": "uint256",
422
+ "name": "lastStoredPrice",
423
+ "type": "uint256"
424
+ },
425
+ {
426
+ "internalType": "uint256",
427
+ "name": "centerPrice",
428
+ "type": "uint256"
429
+ },
430
+ {
431
+ "internalType": "uint256",
432
+ "name": "upperRange",
433
+ "type": "uint256"
434
+ },
435
+ {
436
+ "internalType": "uint256",
437
+ "name": "lowerRange",
438
+ "type": "uint256"
439
+ },
440
+ {
441
+ "internalType": "uint256",
442
+ "name": "geometricMean",
443
+ "type": "uint256"
444
+ },
445
+ {
446
+ "internalType": "uint256",
447
+ "name": "supplyToken0ExchangePrice",
448
+ "type": "uint256"
449
+ },
450
+ {
451
+ "internalType": "uint256",
452
+ "name": "borrowToken0ExchangePrice",
453
+ "type": "uint256"
454
+ },
455
+ {
456
+ "internalType": "uint256",
457
+ "name": "supplyToken1ExchangePrice",
458
+ "type": "uint256"
459
+ },
460
+ {
461
+ "internalType": "uint256",
462
+ "name": "borrowToken1ExchangePrice",
463
+ "type": "uint256"
464
+ }
465
+ ],
466
+ "internalType": "struct IFluidDexT1.PricesAndExchangePrice",
467
+ "name": "pex_",
468
+ "type": "tuple"
469
+ }
470
+ ],
471
+ "stateMutability": "nonpayable",
472
+ "type": "function"
473
+ },
474
+ {
475
+ "inputs": [
476
+ { "internalType": "uint256", "name": "poolId_", "type": "uint256" }
477
+ ],
478
+ "name": "getPool",
479
+ "outputs": [
480
+ {
481
+ "components": [
482
+ { "internalType": "address", "name": "pool", "type": "address" },
483
+ { "internalType": "address", "name": "token0", "type": "address" },
484
+ { "internalType": "address", "name": "token1", "type": "address" },
485
+ { "internalType": "uint256", "name": "fee", "type": "uint256" }
486
+ ],
487
+ "internalType": "struct Structs.Pool",
488
+ "name": "pool_",
489
+ "type": "tuple"
490
+ }
491
+ ],
492
+ "stateMutability": "view",
493
+ "type": "function"
494
+ },
495
+ {
496
+ "inputs": [
497
+ { "internalType": "uint256", "name": "poolId_", "type": "uint256" }
498
+ ],
499
+ "name": "getPoolAddress",
500
+ "outputs": [
501
+ { "internalType": "address", "name": "pool_", "type": "address" }
502
+ ],
503
+ "stateMutability": "view",
504
+ "type": "function"
505
+ },
506
+ {
507
+ "inputs": [
508
+ { "internalType": "address", "name": "pool_", "type": "address" }
509
+ ],
510
+ "name": "getPoolConstantsView",
511
+ "outputs": [
512
+ {
513
+ "components": [
514
+ { "internalType": "uint256", "name": "dexId", "type": "uint256" },
515
+ { "internalType": "address", "name": "liquidity", "type": "address" },
516
+ { "internalType": "address", "name": "factory", "type": "address" },
517
+ {
518
+ "components": [
519
+ { "internalType": "address", "name": "shift", "type": "address" },
520
+ { "internalType": "address", "name": "admin", "type": "address" },
521
+ {
522
+ "internalType": "address",
523
+ "name": "colOperations",
524
+ "type": "address"
525
+ },
526
+ {
527
+ "internalType": "address",
528
+ "name": "debtOperations",
529
+ "type": "address"
530
+ },
531
+ {
532
+ "internalType": "address",
533
+ "name": "perfectOperationsAndOracle",
534
+ "type": "address"
535
+ }
536
+ ],
537
+ "internalType": "struct IFluidDexT1.Implementations",
538
+ "name": "implementations",
539
+ "type": "tuple"
540
+ },
541
+ {
542
+ "internalType": "address",
543
+ "name": "deployerContract",
544
+ "type": "address"
545
+ },
546
+ { "internalType": "address", "name": "token0", "type": "address" },
547
+ { "internalType": "address", "name": "token1", "type": "address" },
548
+ {
549
+ "internalType": "bytes32",
550
+ "name": "supplyToken0Slot",
551
+ "type": "bytes32"
552
+ },
553
+ {
554
+ "internalType": "bytes32",
555
+ "name": "borrowToken0Slot",
556
+ "type": "bytes32"
557
+ },
558
+ {
559
+ "internalType": "bytes32",
560
+ "name": "supplyToken1Slot",
561
+ "type": "bytes32"
562
+ },
563
+ {
564
+ "internalType": "bytes32",
565
+ "name": "borrowToken1Slot",
566
+ "type": "bytes32"
567
+ },
568
+ {
569
+ "internalType": "bytes32",
570
+ "name": "exchangePriceToken0Slot",
571
+ "type": "bytes32"
572
+ },
573
+ {
574
+ "internalType": "bytes32",
575
+ "name": "exchangePriceToken1Slot",
576
+ "type": "bytes32"
577
+ },
578
+ {
579
+ "internalType": "uint256",
580
+ "name": "oracleMapping",
581
+ "type": "uint256"
582
+ }
583
+ ],
584
+ "internalType": "struct IFluidDexT1.ConstantViews",
585
+ "name": "constantsView_",
586
+ "type": "tuple"
587
+ }
588
+ ],
589
+ "stateMutability": "view",
590
+ "type": "function"
591
+ },
592
+ {
593
+ "inputs": [
594
+ { "internalType": "address", "name": "pool_", "type": "address" }
595
+ ],
596
+ "name": "getPoolConstantsView2",
597
+ "outputs": [
598
+ {
599
+ "components": [
600
+ {
601
+ "internalType": "uint256",
602
+ "name": "token0NumeratorPrecision",
603
+ "type": "uint256"
604
+ },
605
+ {
606
+ "internalType": "uint256",
607
+ "name": "token0DenominatorPrecision",
608
+ "type": "uint256"
609
+ },
610
+ {
611
+ "internalType": "uint256",
612
+ "name": "token1NumeratorPrecision",
613
+ "type": "uint256"
614
+ },
615
+ {
616
+ "internalType": "uint256",
617
+ "name": "token1DenominatorPrecision",
618
+ "type": "uint256"
619
+ }
620
+ ],
621
+ "internalType": "struct IFluidDexT1.ConstantViews2",
622
+ "name": "constantsView2_",
623
+ "type": "tuple"
624
+ }
625
+ ],
626
+ "stateMutability": "view",
627
+ "type": "function"
628
+ },
629
+ {
630
+ "inputs": [
631
+ { "internalType": "address", "name": "pool_", "type": "address" }
632
+ ],
633
+ "name": "getPoolFee",
634
+ "outputs": [
635
+ { "internalType": "uint256", "name": "fee_", "type": "uint256" }
636
+ ],
637
+ "stateMutability": "view",
638
+ "type": "function"
639
+ },
640
+ {
641
+ "inputs": [
642
+ { "internalType": "address", "name": "pool_", "type": "address" }
643
+ ],
644
+ "name": "getPoolReserves",
645
+ "outputs": [
646
+ {
647
+ "components": [
648
+ { "internalType": "address", "name": "pool", "type": "address" },
649
+ { "internalType": "address", "name": "token0", "type": "address" },
650
+ { "internalType": "address", "name": "token1", "type": "address" },
651
+ { "internalType": "uint256", "name": "fee", "type": "uint256" },
652
+ {
653
+ "components": [
654
+ {
655
+ "internalType": "uint256",
656
+ "name": "token0RealReserves",
657
+ "type": "uint256"
658
+ },
659
+ {
660
+ "internalType": "uint256",
661
+ "name": "token1RealReserves",
662
+ "type": "uint256"
663
+ },
664
+ {
665
+ "internalType": "uint256",
666
+ "name": "token0ImaginaryReserves",
667
+ "type": "uint256"
668
+ },
669
+ {
670
+ "internalType": "uint256",
671
+ "name": "token1ImaginaryReserves",
672
+ "type": "uint256"
673
+ }
674
+ ],
675
+ "internalType": "struct IFluidDexT1.CollateralReserves",
676
+ "name": "collateralReserves",
677
+ "type": "tuple"
678
+ },
679
+ {
680
+ "components": [
681
+ {
682
+ "internalType": "uint256",
683
+ "name": "token0Debt",
684
+ "type": "uint256"
685
+ },
686
+ {
687
+ "internalType": "uint256",
688
+ "name": "token1Debt",
689
+ "type": "uint256"
690
+ },
691
+ {
692
+ "internalType": "uint256",
693
+ "name": "token0RealReserves",
694
+ "type": "uint256"
695
+ },
696
+ {
697
+ "internalType": "uint256",
698
+ "name": "token1RealReserves",
699
+ "type": "uint256"
700
+ },
701
+ {
702
+ "internalType": "uint256",
703
+ "name": "token0ImaginaryReserves",
704
+ "type": "uint256"
705
+ },
706
+ {
707
+ "internalType": "uint256",
708
+ "name": "token1ImaginaryReserves",
709
+ "type": "uint256"
710
+ }
711
+ ],
712
+ "internalType": "struct IFluidDexT1.DebtReserves",
713
+ "name": "debtReserves",
714
+ "type": "tuple"
715
+ }
716
+ ],
717
+ "internalType": "struct Structs.PoolWithReserves",
718
+ "name": "poolReserves_",
719
+ "type": "tuple"
720
+ }
721
+ ],
722
+ "stateMutability": "nonpayable",
723
+ "type": "function"
724
+ },
725
+ {
726
+ "inputs": [
727
+ { "internalType": "address", "name": "pool_", "type": "address" }
728
+ ],
729
+ "name": "getPoolReservesAdjusted",
730
+ "outputs": [
731
+ {
732
+ "components": [
733
+ { "internalType": "address", "name": "pool", "type": "address" },
734
+ { "internalType": "address", "name": "token0", "type": "address" },
735
+ { "internalType": "address", "name": "token1", "type": "address" },
736
+ { "internalType": "uint256", "name": "fee", "type": "uint256" },
737
+ {
738
+ "components": [
739
+ {
740
+ "internalType": "uint256",
741
+ "name": "token0RealReserves",
742
+ "type": "uint256"
743
+ },
744
+ {
745
+ "internalType": "uint256",
746
+ "name": "token1RealReserves",
747
+ "type": "uint256"
748
+ },
749
+ {
750
+ "internalType": "uint256",
751
+ "name": "token0ImaginaryReserves",
752
+ "type": "uint256"
753
+ },
754
+ {
755
+ "internalType": "uint256",
756
+ "name": "token1ImaginaryReserves",
757
+ "type": "uint256"
758
+ }
759
+ ],
760
+ "internalType": "struct IFluidDexT1.CollateralReserves",
761
+ "name": "collateralReserves",
762
+ "type": "tuple"
763
+ },
764
+ {
765
+ "components": [
766
+ {
767
+ "internalType": "uint256",
768
+ "name": "token0Debt",
769
+ "type": "uint256"
770
+ },
771
+ {
772
+ "internalType": "uint256",
773
+ "name": "token1Debt",
774
+ "type": "uint256"
775
+ },
776
+ {
777
+ "internalType": "uint256",
778
+ "name": "token0RealReserves",
779
+ "type": "uint256"
780
+ },
781
+ {
782
+ "internalType": "uint256",
783
+ "name": "token1RealReserves",
784
+ "type": "uint256"
785
+ },
786
+ {
787
+ "internalType": "uint256",
788
+ "name": "token0ImaginaryReserves",
789
+ "type": "uint256"
790
+ },
791
+ {
792
+ "internalType": "uint256",
793
+ "name": "token1ImaginaryReserves",
794
+ "type": "uint256"
795
+ }
796
+ ],
797
+ "internalType": "struct IFluidDexT1.DebtReserves",
798
+ "name": "debtReserves",
799
+ "type": "tuple"
800
+ }
801
+ ],
802
+ "internalType": "struct Structs.PoolWithReserves",
803
+ "name": "poolReserves_",
804
+ "type": "tuple"
805
+ }
806
+ ],
807
+ "stateMutability": "nonpayable",
808
+ "type": "function"
809
+ },
810
+ {
811
+ "inputs": [
812
+ { "internalType": "address", "name": "pool_", "type": "address" }
813
+ ],
814
+ "name": "getPoolTokens",
815
+ "outputs": [
816
+ { "internalType": "address", "name": "token0_", "type": "address" },
817
+ { "internalType": "address", "name": "token1_", "type": "address" }
818
+ ],
819
+ "stateMutability": "view",
820
+ "type": "function"
821
+ },
822
+ {
823
+ "inputs": [
824
+ { "internalType": "address[]", "name": "pools_", "type": "address[]" }
825
+ ],
826
+ "name": "getPoolsReserves",
827
+ "outputs": [
828
+ {
829
+ "components": [
830
+ { "internalType": "address", "name": "pool", "type": "address" },
831
+ { "internalType": "address", "name": "token0", "type": "address" },
832
+ { "internalType": "address", "name": "token1", "type": "address" },
833
+ { "internalType": "uint256", "name": "fee", "type": "uint256" },
834
+ {
835
+ "components": [
836
+ {
837
+ "internalType": "uint256",
838
+ "name": "token0RealReserves",
839
+ "type": "uint256"
840
+ },
841
+ {
842
+ "internalType": "uint256",
843
+ "name": "token1RealReserves",
844
+ "type": "uint256"
845
+ },
846
+ {
847
+ "internalType": "uint256",
848
+ "name": "token0ImaginaryReserves",
849
+ "type": "uint256"
850
+ },
851
+ {
852
+ "internalType": "uint256",
853
+ "name": "token1ImaginaryReserves",
854
+ "type": "uint256"
855
+ }
856
+ ],
857
+ "internalType": "struct IFluidDexT1.CollateralReserves",
858
+ "name": "collateralReserves",
859
+ "type": "tuple"
860
+ },
861
+ {
862
+ "components": [
863
+ {
864
+ "internalType": "uint256",
865
+ "name": "token0Debt",
866
+ "type": "uint256"
867
+ },
868
+ {
869
+ "internalType": "uint256",
870
+ "name": "token1Debt",
871
+ "type": "uint256"
872
+ },
873
+ {
874
+ "internalType": "uint256",
875
+ "name": "token0RealReserves",
876
+ "type": "uint256"
877
+ },
878
+ {
879
+ "internalType": "uint256",
880
+ "name": "token1RealReserves",
881
+ "type": "uint256"
882
+ },
883
+ {
884
+ "internalType": "uint256",
885
+ "name": "token0ImaginaryReserves",
886
+ "type": "uint256"
887
+ },
888
+ {
889
+ "internalType": "uint256",
890
+ "name": "token1ImaginaryReserves",
891
+ "type": "uint256"
892
+ }
893
+ ],
894
+ "internalType": "struct IFluidDexT1.DebtReserves",
895
+ "name": "debtReserves",
896
+ "type": "tuple"
897
+ }
898
+ ],
899
+ "internalType": "struct Structs.PoolWithReserves[]",
900
+ "name": "poolsReserves_",
901
+ "type": "tuple[]"
902
+ }
903
+ ],
904
+ "stateMutability": "nonpayable",
905
+ "type": "function"
906
+ },
907
+ {
908
+ "inputs": [
909
+ { "internalType": "address[]", "name": "pools_", "type": "address[]" }
910
+ ],
911
+ "name": "getPoolsReservesAdjusted",
912
+ "outputs": [
913
+ {
914
+ "components": [
915
+ { "internalType": "address", "name": "pool", "type": "address" },
916
+ { "internalType": "address", "name": "token0", "type": "address" },
917
+ { "internalType": "address", "name": "token1", "type": "address" },
918
+ { "internalType": "uint256", "name": "fee", "type": "uint256" },
919
+ {
920
+ "components": [
921
+ {
922
+ "internalType": "uint256",
923
+ "name": "token0RealReserves",
924
+ "type": "uint256"
925
+ },
926
+ {
927
+ "internalType": "uint256",
928
+ "name": "token1RealReserves",
929
+ "type": "uint256"
930
+ },
931
+ {
932
+ "internalType": "uint256",
933
+ "name": "token0ImaginaryReserves",
934
+ "type": "uint256"
935
+ },
936
+ {
937
+ "internalType": "uint256",
938
+ "name": "token1ImaginaryReserves",
939
+ "type": "uint256"
940
+ }
941
+ ],
942
+ "internalType": "struct IFluidDexT1.CollateralReserves",
943
+ "name": "collateralReserves",
944
+ "type": "tuple"
945
+ },
946
+ {
947
+ "components": [
948
+ {
949
+ "internalType": "uint256",
950
+ "name": "token0Debt",
951
+ "type": "uint256"
952
+ },
953
+ {
954
+ "internalType": "uint256",
955
+ "name": "token1Debt",
956
+ "type": "uint256"
957
+ },
958
+ {
959
+ "internalType": "uint256",
960
+ "name": "token0RealReserves",
961
+ "type": "uint256"
962
+ },
963
+ {
964
+ "internalType": "uint256",
965
+ "name": "token1RealReserves",
966
+ "type": "uint256"
967
+ },
968
+ {
969
+ "internalType": "uint256",
970
+ "name": "token0ImaginaryReserves",
971
+ "type": "uint256"
972
+ },
973
+ {
974
+ "internalType": "uint256",
975
+ "name": "token1ImaginaryReserves",
976
+ "type": "uint256"
977
+ }
978
+ ],
979
+ "internalType": "struct IFluidDexT1.DebtReserves",
980
+ "name": "debtReserves",
981
+ "type": "tuple"
982
+ }
983
+ ],
984
+ "internalType": "struct Structs.PoolWithReserves[]",
985
+ "name": "poolsReserves_",
986
+ "type": "tuple[]"
987
+ }
988
+ ],
989
+ "stateMutability": "nonpayable",
990
+ "type": "function"
991
+ },
992
+ {
993
+ "inputs": [],
994
+ "name": "getTotalPools",
995
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
996
+ "stateMutability": "view",
997
+ "type": "function"
998
+ }
999
+ ]