@paraswap/dex-lib 4.0.4 → 4.0.5-fluid-dex-pool-discovery-issue.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.
- package/build/abi/fluid-dex/fluid-dex.abi.json +579 -25
- package/build/dex/fluid-dex/constants.d.ts +1 -0
- package/build/dex/fluid-dex/constants.js +5 -0
- package/build/dex/fluid-dex/constants.js.map +1 -0
- package/build/dex/fluid-dex/fluid-dex-liquidity-proxy.d.ts +2 -1
- package/build/dex/fluid-dex/fluid-dex-liquidity-proxy.js +2 -0
- package/build/dex/fluid-dex/fluid-dex-liquidity-proxy.js.map +1 -1
- package/build/dex/fluid-dex/fluid-dex-pool.d.ts +19 -21
- package/build/dex/fluid-dex/fluid-dex-pool.js +48 -62
- package/build/dex/fluid-dex/fluid-dex-pool.js.map +1 -1
- package/build/dex/fluid-dex/fluid-dex.d.ts +21 -2
- package/build/dex/fluid-dex/fluid-dex.js +108 -35
- package/build/dex/fluid-dex/fluid-dex.js.map +1 -1
- package/build/dex/fluid-dex/types.d.ts +3 -1
- package/package.json +1 -1
- package/src/abi/fluid-dex/fluid-dex.abi.json +581 -25
- package/src/dex/fluid-dex/constants.ts +1 -0
- package/src/dex/fluid-dex/fluid-dex-e2e.test.ts +17 -0
- package/src/dex/fluid-dex/fluid-dex-events.test.ts +55 -5
- package/src/dex/fluid-dex/fluid-dex-liquidity-proxy.ts +5 -3
- package/src/dex/fluid-dex/fluid-dex-pool.ts +139 -0
- package/src/dex/fluid-dex/fluid-dex.ts +226 -68
- package/src/dex/fluid-dex/types.ts +3 -1
- package/tests/constants-e2e.ts +5 -0
|
@@ -1,9 +1,119 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"inputs": [
|
|
4
|
+
{
|
|
5
|
+
"components": [
|
|
6
|
+
{
|
|
7
|
+
"internalType": "uint256",
|
|
8
|
+
"name": "dexId",
|
|
9
|
+
"type": "uint256"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"internalType": "address",
|
|
13
|
+
"name": "liquidity",
|
|
14
|
+
"type": "address"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"internalType": "address",
|
|
18
|
+
"name": "factory",
|
|
19
|
+
"type": "address"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"components": [
|
|
23
|
+
{
|
|
24
|
+
"internalType": "address",
|
|
25
|
+
"name": "shift",
|
|
26
|
+
"type": "address"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"internalType": "address",
|
|
30
|
+
"name": "admin",
|
|
31
|
+
"type": "address"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"internalType": "address",
|
|
35
|
+
"name": "colOperations",
|
|
36
|
+
"type": "address"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"internalType": "address",
|
|
40
|
+
"name": "debtOperations",
|
|
41
|
+
"type": "address"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"internalType": "address",
|
|
45
|
+
"name": "perfectOperationsAndSwapOut",
|
|
46
|
+
"type": "address"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"internalType": "struct Structs.Implementations",
|
|
50
|
+
"name": "implementations",
|
|
51
|
+
"type": "tuple"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"internalType": "address",
|
|
55
|
+
"name": "deployerContract",
|
|
56
|
+
"type": "address"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"internalType": "address",
|
|
60
|
+
"name": "token0",
|
|
61
|
+
"type": "address"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"internalType": "address",
|
|
65
|
+
"name": "token1",
|
|
66
|
+
"type": "address"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"internalType": "bytes32",
|
|
70
|
+
"name": "supplyToken0Slot",
|
|
71
|
+
"type": "bytes32"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"internalType": "bytes32",
|
|
75
|
+
"name": "borrowToken0Slot",
|
|
76
|
+
"type": "bytes32"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"internalType": "bytes32",
|
|
80
|
+
"name": "supplyToken1Slot",
|
|
81
|
+
"type": "bytes32"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"internalType": "bytes32",
|
|
85
|
+
"name": "borrowToken1Slot",
|
|
86
|
+
"type": "bytes32"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"internalType": "bytes32",
|
|
90
|
+
"name": "exchangePriceToken0Slot",
|
|
91
|
+
"type": "bytes32"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"internalType": "bytes32",
|
|
95
|
+
"name": "exchangePriceToken1Slot",
|
|
96
|
+
"type": "bytes32"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"internalType": "uint256",
|
|
100
|
+
"name": "oracleMapping",
|
|
101
|
+
"type": "uint256"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"internalType": "struct Structs.ConstantViews",
|
|
105
|
+
"name": "constantViews_",
|
|
106
|
+
"type": "tuple"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"stateMutability": "nonpayable",
|
|
110
|
+
"type": "constructor"
|
|
111
|
+
},
|
|
2
112
|
{
|
|
3
113
|
"inputs": [
|
|
4
114
|
{
|
|
5
115
|
"internalType": "uint256",
|
|
6
|
-
"name": "
|
|
116
|
+
"name": "errorId_",
|
|
7
117
|
"type": "uint256"
|
|
8
118
|
}
|
|
9
119
|
],
|
|
@@ -14,7 +124,18 @@
|
|
|
14
124
|
"inputs": [
|
|
15
125
|
{
|
|
16
126
|
"internalType": "uint256",
|
|
17
|
-
"name": "
|
|
127
|
+
"name": "errorId",
|
|
128
|
+
"type": "uint256"
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"name": "FluidDexFactoryError",
|
|
132
|
+
"type": "error"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"inputs": [
|
|
136
|
+
{
|
|
137
|
+
"internalType": "uint256",
|
|
138
|
+
"name": "shares_",
|
|
18
139
|
"type": "uint256"
|
|
19
140
|
}
|
|
20
141
|
],
|
|
@@ -87,7 +208,7 @@
|
|
|
87
208
|
"type": "uint256"
|
|
88
209
|
}
|
|
89
210
|
],
|
|
90
|
-
"internalType": "struct
|
|
211
|
+
"internalType": "struct Structs.PricesAndExchangePrice",
|
|
91
212
|
"name": "pex_",
|
|
92
213
|
"type": "tuple"
|
|
93
214
|
}
|
|
@@ -117,6 +238,344 @@
|
|
|
117
238
|
"name": "FluidDexSwapResult",
|
|
118
239
|
"type": "error"
|
|
119
240
|
},
|
|
241
|
+
{
|
|
242
|
+
"inputs": [
|
|
243
|
+
{
|
|
244
|
+
"internalType": "uint256",
|
|
245
|
+
"name": "errorId_",
|
|
246
|
+
"type": "uint256"
|
|
247
|
+
}
|
|
248
|
+
],
|
|
249
|
+
"name": "FluidLiquidityCalcsError",
|
|
250
|
+
"type": "error"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"inputs": [
|
|
254
|
+
{
|
|
255
|
+
"internalType": "uint256",
|
|
256
|
+
"name": "errorId_",
|
|
257
|
+
"type": "uint256"
|
|
258
|
+
}
|
|
259
|
+
],
|
|
260
|
+
"name": "FluidSafeTransferError",
|
|
261
|
+
"type": "error"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"anonymous": false,
|
|
265
|
+
"inputs": [
|
|
266
|
+
{
|
|
267
|
+
"indexed": false,
|
|
268
|
+
"internalType": "int256",
|
|
269
|
+
"name": "routing",
|
|
270
|
+
"type": "int256"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"indexed": false,
|
|
274
|
+
"internalType": "uint256",
|
|
275
|
+
"name": "amtOut",
|
|
276
|
+
"type": "uint256"
|
|
277
|
+
}
|
|
278
|
+
],
|
|
279
|
+
"name": "LogArbitrage",
|
|
280
|
+
"type": "event"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"anonymous": false,
|
|
284
|
+
"inputs": [
|
|
285
|
+
{
|
|
286
|
+
"indexed": false,
|
|
287
|
+
"internalType": "uint256",
|
|
288
|
+
"name": "amount0",
|
|
289
|
+
"type": "uint256"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"indexed": false,
|
|
293
|
+
"internalType": "uint256",
|
|
294
|
+
"name": "amount1",
|
|
295
|
+
"type": "uint256"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"indexed": false,
|
|
299
|
+
"internalType": "uint256",
|
|
300
|
+
"name": "shares",
|
|
301
|
+
"type": "uint256"
|
|
302
|
+
}
|
|
303
|
+
],
|
|
304
|
+
"name": "LogBorrowDebtLiquidity",
|
|
305
|
+
"type": "event"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"anonymous": false,
|
|
309
|
+
"inputs": [
|
|
310
|
+
{
|
|
311
|
+
"indexed": false,
|
|
312
|
+
"internalType": "uint256",
|
|
313
|
+
"name": "shares",
|
|
314
|
+
"type": "uint256"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"indexed": false,
|
|
318
|
+
"internalType": "uint256",
|
|
319
|
+
"name": "token0Amt",
|
|
320
|
+
"type": "uint256"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"indexed": false,
|
|
324
|
+
"internalType": "uint256",
|
|
325
|
+
"name": "token1Amt",
|
|
326
|
+
"type": "uint256"
|
|
327
|
+
}
|
|
328
|
+
],
|
|
329
|
+
"name": "LogBorrowPerfectDebtLiquidity",
|
|
330
|
+
"type": "event"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"anonymous": false,
|
|
334
|
+
"inputs": [
|
|
335
|
+
{
|
|
336
|
+
"indexed": false,
|
|
337
|
+
"internalType": "uint256",
|
|
338
|
+
"name": "amount0",
|
|
339
|
+
"type": "uint256"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"indexed": false,
|
|
343
|
+
"internalType": "uint256",
|
|
344
|
+
"name": "amount1",
|
|
345
|
+
"type": "uint256"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"indexed": false,
|
|
349
|
+
"internalType": "uint256",
|
|
350
|
+
"name": "shares",
|
|
351
|
+
"type": "uint256"
|
|
352
|
+
}
|
|
353
|
+
],
|
|
354
|
+
"name": "LogDepositColLiquidity",
|
|
355
|
+
"type": "event"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"anonymous": false,
|
|
359
|
+
"inputs": [
|
|
360
|
+
{
|
|
361
|
+
"indexed": false,
|
|
362
|
+
"internalType": "uint256",
|
|
363
|
+
"name": "shares",
|
|
364
|
+
"type": "uint256"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"indexed": false,
|
|
368
|
+
"internalType": "uint256",
|
|
369
|
+
"name": "token0Amt",
|
|
370
|
+
"type": "uint256"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"indexed": false,
|
|
374
|
+
"internalType": "uint256",
|
|
375
|
+
"name": "token1Amt",
|
|
376
|
+
"type": "uint256"
|
|
377
|
+
}
|
|
378
|
+
],
|
|
379
|
+
"name": "LogDepositPerfectColLiquidity",
|
|
380
|
+
"type": "event"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"anonymous": false,
|
|
384
|
+
"inputs": [],
|
|
385
|
+
"name": "LogPauseSwapAndArbitrage",
|
|
386
|
+
"type": "event"
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"anonymous": false,
|
|
390
|
+
"inputs": [],
|
|
391
|
+
"name": "LogUnpauseSwapAndArbitrage",
|
|
392
|
+
"type": "event"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"anonymous": false,
|
|
396
|
+
"inputs": [
|
|
397
|
+
{
|
|
398
|
+
"indexed": false,
|
|
399
|
+
"internalType": "uint256",
|
|
400
|
+
"name": "shares",
|
|
401
|
+
"type": "uint256"
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"indexed": false,
|
|
405
|
+
"internalType": "uint256",
|
|
406
|
+
"name": "token0Amt",
|
|
407
|
+
"type": "uint256"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"indexed": false,
|
|
411
|
+
"internalType": "uint256",
|
|
412
|
+
"name": "token1Amt",
|
|
413
|
+
"type": "uint256"
|
|
414
|
+
}
|
|
415
|
+
],
|
|
416
|
+
"name": "LogPaybackDebtInOneToken",
|
|
417
|
+
"type": "event"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"anonymous": false,
|
|
421
|
+
"inputs": [
|
|
422
|
+
{
|
|
423
|
+
"indexed": false,
|
|
424
|
+
"internalType": "uint256",
|
|
425
|
+
"name": "amount0",
|
|
426
|
+
"type": "uint256"
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"indexed": false,
|
|
430
|
+
"internalType": "uint256",
|
|
431
|
+
"name": "amount1",
|
|
432
|
+
"type": "uint256"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"indexed": false,
|
|
436
|
+
"internalType": "uint256",
|
|
437
|
+
"name": "shares",
|
|
438
|
+
"type": "uint256"
|
|
439
|
+
}
|
|
440
|
+
],
|
|
441
|
+
"name": "LogPaybackDebtLiquidity",
|
|
442
|
+
"type": "event"
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"anonymous": false,
|
|
446
|
+
"inputs": [
|
|
447
|
+
{
|
|
448
|
+
"indexed": false,
|
|
449
|
+
"internalType": "uint256",
|
|
450
|
+
"name": "shares",
|
|
451
|
+
"type": "uint256"
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
"indexed": false,
|
|
455
|
+
"internalType": "uint256",
|
|
456
|
+
"name": "token0Amt",
|
|
457
|
+
"type": "uint256"
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
"indexed": false,
|
|
461
|
+
"internalType": "uint256",
|
|
462
|
+
"name": "token1Amt",
|
|
463
|
+
"type": "uint256"
|
|
464
|
+
}
|
|
465
|
+
],
|
|
466
|
+
"name": "LogPaybackPerfectDebtLiquidity",
|
|
467
|
+
"type": "event"
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"anonymous": false,
|
|
471
|
+
"inputs": [
|
|
472
|
+
{
|
|
473
|
+
"indexed": false,
|
|
474
|
+
"internalType": "uint256",
|
|
475
|
+
"name": "shares",
|
|
476
|
+
"type": "uint256"
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"indexed": false,
|
|
480
|
+
"internalType": "uint256",
|
|
481
|
+
"name": "token0Amt",
|
|
482
|
+
"type": "uint256"
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
"indexed": false,
|
|
486
|
+
"internalType": "uint256",
|
|
487
|
+
"name": "token1Amt",
|
|
488
|
+
"type": "uint256"
|
|
489
|
+
}
|
|
490
|
+
],
|
|
491
|
+
"name": "LogWithdrawColInOneToken",
|
|
492
|
+
"type": "event"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"anonymous": false,
|
|
496
|
+
"inputs": [
|
|
497
|
+
{
|
|
498
|
+
"indexed": false,
|
|
499
|
+
"internalType": "uint256",
|
|
500
|
+
"name": "amount0",
|
|
501
|
+
"type": "uint256"
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"indexed": false,
|
|
505
|
+
"internalType": "uint256",
|
|
506
|
+
"name": "amount1",
|
|
507
|
+
"type": "uint256"
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"indexed": false,
|
|
511
|
+
"internalType": "uint256",
|
|
512
|
+
"name": "shares",
|
|
513
|
+
"type": "uint256"
|
|
514
|
+
}
|
|
515
|
+
],
|
|
516
|
+
"name": "LogWithdrawColLiquidity",
|
|
517
|
+
"type": "event"
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"anonymous": false,
|
|
521
|
+
"inputs": [
|
|
522
|
+
{
|
|
523
|
+
"indexed": false,
|
|
524
|
+
"internalType": "uint256",
|
|
525
|
+
"name": "shares",
|
|
526
|
+
"type": "uint256"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"indexed": false,
|
|
530
|
+
"internalType": "uint256",
|
|
531
|
+
"name": "token0Amt",
|
|
532
|
+
"type": "uint256"
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
"indexed": false,
|
|
536
|
+
"internalType": "uint256",
|
|
537
|
+
"name": "token1Amt",
|
|
538
|
+
"type": "uint256"
|
|
539
|
+
}
|
|
540
|
+
],
|
|
541
|
+
"name": "LogWithdrawPerfectColLiquidity",
|
|
542
|
+
"type": "event"
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"anonymous": false,
|
|
546
|
+
"inputs": [
|
|
547
|
+
{
|
|
548
|
+
"indexed": false,
|
|
549
|
+
"internalType": "bool",
|
|
550
|
+
"name": "swap0to1",
|
|
551
|
+
"type": "bool"
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"indexed": false,
|
|
555
|
+
"internalType": "uint256",
|
|
556
|
+
"name": "amountIn",
|
|
557
|
+
"type": "uint256"
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"indexed": false,
|
|
561
|
+
"internalType": "uint256",
|
|
562
|
+
"name": "amountOut",
|
|
563
|
+
"type": "uint256"
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
"indexed": false,
|
|
567
|
+
"internalType": "address",
|
|
568
|
+
"name": "to",
|
|
569
|
+
"type": "address"
|
|
570
|
+
}
|
|
571
|
+
],
|
|
572
|
+
"name": "Swap",
|
|
573
|
+
"type": "event"
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
"stateMutability": "payable",
|
|
577
|
+
"type": "fallback"
|
|
578
|
+
},
|
|
120
579
|
{
|
|
121
580
|
"inputs": [],
|
|
122
581
|
"name": "DEX_ID",
|
|
@@ -148,9 +607,9 @@
|
|
|
148
607
|
"type": "uint256"
|
|
149
608
|
},
|
|
150
609
|
{
|
|
151
|
-
"internalType": "
|
|
152
|
-
"name": "
|
|
153
|
-
"type": "
|
|
610
|
+
"internalType": "address",
|
|
611
|
+
"name": "to_",
|
|
612
|
+
"type": "address"
|
|
154
613
|
}
|
|
155
614
|
],
|
|
156
615
|
"name": "borrow",
|
|
@@ -182,9 +641,9 @@
|
|
|
182
641
|
"type": "uint256"
|
|
183
642
|
},
|
|
184
643
|
{
|
|
185
|
-
"internalType": "
|
|
186
|
-
"name": "
|
|
187
|
-
"type": "
|
|
644
|
+
"internalType": "address",
|
|
645
|
+
"name": "to_",
|
|
646
|
+
"type": "address"
|
|
188
647
|
}
|
|
189
648
|
],
|
|
190
649
|
"name": "borrowPerfect",
|
|
@@ -248,11 +707,11 @@
|
|
|
248
707
|
},
|
|
249
708
|
{
|
|
250
709
|
"internalType": "address",
|
|
251
|
-
"name": "
|
|
710
|
+
"name": "perfectOperationsAndSwapOut",
|
|
252
711
|
"type": "address"
|
|
253
712
|
}
|
|
254
713
|
],
|
|
255
|
-
"internalType": "struct
|
|
714
|
+
"internalType": "struct Structs.Implementations",
|
|
256
715
|
"name": "implementations",
|
|
257
716
|
"type": "tuple"
|
|
258
717
|
},
|
|
@@ -307,7 +766,7 @@
|
|
|
307
766
|
"type": "uint256"
|
|
308
767
|
}
|
|
309
768
|
],
|
|
310
|
-
"internalType": "struct
|
|
769
|
+
"internalType": "struct Structs.ConstantViews",
|
|
311
770
|
"name": "constantsView_",
|
|
312
771
|
"type": "tuple"
|
|
313
772
|
}
|
|
@@ -342,7 +801,7 @@
|
|
|
342
801
|
"type": "uint256"
|
|
343
802
|
}
|
|
344
803
|
],
|
|
345
|
-
"internalType": "struct
|
|
804
|
+
"internalType": "struct Structs.ConstantViews2",
|
|
346
805
|
"name": "constantsView2_",
|
|
347
806
|
"type": "tuple"
|
|
348
807
|
}
|
|
@@ -476,7 +935,7 @@
|
|
|
476
935
|
"type": "uint256"
|
|
477
936
|
}
|
|
478
937
|
],
|
|
479
|
-
"internalType": "struct
|
|
938
|
+
"internalType": "struct Structs.CollateralReserves",
|
|
480
939
|
"name": "c_",
|
|
481
940
|
"type": "tuple"
|
|
482
941
|
}
|
|
@@ -547,7 +1006,7 @@
|
|
|
547
1006
|
"type": "uint256"
|
|
548
1007
|
}
|
|
549
1008
|
],
|
|
550
|
-
"internalType": "struct
|
|
1009
|
+
"internalType": "struct Structs.DebtReserves",
|
|
551
1010
|
"name": "d_",
|
|
552
1011
|
"type": "tuple"
|
|
553
1012
|
}
|
|
@@ -562,6 +1021,29 @@
|
|
|
562
1021
|
"stateMutability": "nonpayable",
|
|
563
1022
|
"type": "function"
|
|
564
1023
|
},
|
|
1024
|
+
{
|
|
1025
|
+
"inputs": [
|
|
1026
|
+
{
|
|
1027
|
+
"internalType": "address",
|
|
1028
|
+
"name": "token_",
|
|
1029
|
+
"type": "address"
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
"internalType": "uint256",
|
|
1033
|
+
"name": "amount_",
|
|
1034
|
+
"type": "uint256"
|
|
1035
|
+
},
|
|
1036
|
+
{
|
|
1037
|
+
"internalType": "bytes",
|
|
1038
|
+
"name": "data_",
|
|
1039
|
+
"type": "bytes"
|
|
1040
|
+
}
|
|
1041
|
+
],
|
|
1042
|
+
"name": "liquidityCallback",
|
|
1043
|
+
"outputs": [],
|
|
1044
|
+
"stateMutability": "nonpayable",
|
|
1045
|
+
"type": "function"
|
|
1046
|
+
},
|
|
565
1047
|
{
|
|
566
1048
|
"inputs": [
|
|
567
1049
|
{
|
|
@@ -605,7 +1087,7 @@
|
|
|
605
1087
|
"type": "uint256"
|
|
606
1088
|
}
|
|
607
1089
|
],
|
|
608
|
-
"internalType": "struct
|
|
1090
|
+
"internalType": "struct Structs.Oracle[]",
|
|
609
1091
|
"name": "twaps_",
|
|
610
1092
|
"type": "tuple[]"
|
|
611
1093
|
},
|
|
@@ -778,6 +1260,40 @@
|
|
|
778
1260
|
"stateMutability": "payable",
|
|
779
1261
|
"type": "function"
|
|
780
1262
|
},
|
|
1263
|
+
{
|
|
1264
|
+
"inputs": [
|
|
1265
|
+
{
|
|
1266
|
+
"internalType": "bool",
|
|
1267
|
+
"name": "swap0to1_",
|
|
1268
|
+
"type": "bool"
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
"internalType": "uint256",
|
|
1272
|
+
"name": "amountIn_",
|
|
1273
|
+
"type": "uint256"
|
|
1274
|
+
},
|
|
1275
|
+
{
|
|
1276
|
+
"internalType": "uint256",
|
|
1277
|
+
"name": "amountOutMin_",
|
|
1278
|
+
"type": "uint256"
|
|
1279
|
+
},
|
|
1280
|
+
{
|
|
1281
|
+
"internalType": "address",
|
|
1282
|
+
"name": "to_",
|
|
1283
|
+
"type": "address"
|
|
1284
|
+
}
|
|
1285
|
+
],
|
|
1286
|
+
"name": "swapInWithCallback",
|
|
1287
|
+
"outputs": [
|
|
1288
|
+
{
|
|
1289
|
+
"internalType": "uint256",
|
|
1290
|
+
"name": "amountOut_",
|
|
1291
|
+
"type": "uint256"
|
|
1292
|
+
}
|
|
1293
|
+
],
|
|
1294
|
+
"stateMutability": "payable",
|
|
1295
|
+
"type": "function"
|
|
1296
|
+
},
|
|
781
1297
|
{
|
|
782
1298
|
"inputs": [
|
|
783
1299
|
{
|
|
@@ -812,6 +1328,40 @@
|
|
|
812
1328
|
"stateMutability": "payable",
|
|
813
1329
|
"type": "function"
|
|
814
1330
|
},
|
|
1331
|
+
{
|
|
1332
|
+
"inputs": [
|
|
1333
|
+
{
|
|
1334
|
+
"internalType": "bool",
|
|
1335
|
+
"name": "swap0to1_",
|
|
1336
|
+
"type": "bool"
|
|
1337
|
+
},
|
|
1338
|
+
{
|
|
1339
|
+
"internalType": "uint256",
|
|
1340
|
+
"name": "amountOut_",
|
|
1341
|
+
"type": "uint256"
|
|
1342
|
+
},
|
|
1343
|
+
{
|
|
1344
|
+
"internalType": "uint256",
|
|
1345
|
+
"name": "amountInMax_",
|
|
1346
|
+
"type": "uint256"
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
"internalType": "address",
|
|
1350
|
+
"name": "to_",
|
|
1351
|
+
"type": "address"
|
|
1352
|
+
}
|
|
1353
|
+
],
|
|
1354
|
+
"name": "swapOutWithCallback",
|
|
1355
|
+
"outputs": [
|
|
1356
|
+
{
|
|
1357
|
+
"internalType": "uint256",
|
|
1358
|
+
"name": "amountIn_",
|
|
1359
|
+
"type": "uint256"
|
|
1360
|
+
}
|
|
1361
|
+
],
|
|
1362
|
+
"stateMutability": "payable",
|
|
1363
|
+
"type": "function"
|
|
1364
|
+
},
|
|
815
1365
|
{
|
|
816
1366
|
"inputs": [
|
|
817
1367
|
{
|
|
@@ -830,9 +1380,9 @@
|
|
|
830
1380
|
"type": "uint256"
|
|
831
1381
|
},
|
|
832
1382
|
{
|
|
833
|
-
"internalType": "
|
|
834
|
-
"name": "
|
|
835
|
-
"type": "
|
|
1383
|
+
"internalType": "address",
|
|
1384
|
+
"name": "to_",
|
|
1385
|
+
"type": "address"
|
|
836
1386
|
}
|
|
837
1387
|
],
|
|
838
1388
|
"name": "withdraw",
|
|
@@ -864,9 +1414,9 @@
|
|
|
864
1414
|
"type": "uint256"
|
|
865
1415
|
},
|
|
866
1416
|
{
|
|
867
|
-
"internalType": "
|
|
868
|
-
"name": "
|
|
869
|
-
"type": "
|
|
1417
|
+
"internalType": "address",
|
|
1418
|
+
"name": "to_",
|
|
1419
|
+
"type": "address"
|
|
870
1420
|
}
|
|
871
1421
|
],
|
|
872
1422
|
"name": "withdrawPerfect",
|
|
@@ -903,9 +1453,9 @@
|
|
|
903
1453
|
"type": "uint256"
|
|
904
1454
|
},
|
|
905
1455
|
{
|
|
906
|
-
"internalType": "
|
|
907
|
-
"name": "
|
|
908
|
-
"type": "
|
|
1456
|
+
"internalType": "address",
|
|
1457
|
+
"name": "to_",
|
|
1458
|
+
"type": "address"
|
|
909
1459
|
}
|
|
910
1460
|
],
|
|
911
1461
|
"name": "withdrawPerfectInOneToken",
|
|
@@ -918,5 +1468,9 @@
|
|
|
918
1468
|
],
|
|
919
1469
|
"stateMutability": "nonpayable",
|
|
920
1470
|
"type": "function"
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
"stateMutability": "payable",
|
|
1474
|
+
"type": "receive"
|
|
921
1475
|
}
|
|
922
1476
|
]
|