@paraswap/dex-lib 4.0.6-rfq-pub-sub.3 → 4.0.6

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 (204) hide show
  1. package/.idea/aws.xml +17 -0
  2. package/.idea/codeStyles/Project.xml +19 -0
  3. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  4. package/.idea/misc.xml +6 -0
  5. package/.idea/modules.xml +8 -0
  6. package/.idea/paraswap-dex-lib.iml +9 -0
  7. package/.idea/prettier.xml +7 -0
  8. package/.idea/vcs.xml +6 -0
  9. package/build/abi/fluid-dex/fluid-dex.abi.json +579 -25
  10. package/build/abi/integral/factory.json +333 -0
  11. package/build/abi/integral/oracle.json +501 -0
  12. package/build/abi/{inception/inception-ineth-pool.json → integral/pool.json} +522 -543
  13. package/build/abi/{wombat/pool.json → integral/relayer.json} +720 -473
  14. package/build/dex/aave-v1/aave-v1.d.ts +1 -2
  15. package/build/dex/aave-v1/aave-v1.js +0 -23
  16. package/build/dex/aave-v1/aave-v1.js.map +1 -1
  17. package/build/dex/fluid-dex/fluid-dex-generate-pool.d.ts +49 -0
  18. package/build/dex/fluid-dex/fluid-dex-generate-pool.js +104 -0
  19. package/build/dex/fluid-dex/fluid-dex-generate-pool.js.map +1 -0
  20. package/build/dex/fluid-dex/fluid-dex-liquidity-proxy.d.ts +1 -1
  21. package/build/dex/fluid-dex/fluid-dex-liquidity-proxy.js.map +1 -1
  22. package/build/dex/fluid-dex/fluid-dex-pool.js +1 -2
  23. package/build/dex/fluid-dex/fluid-dex-pool.js.map +1 -1
  24. package/build/dex/fluid-dex/fluid-dex.d.ts +21 -2
  25. package/build/dex/fluid-dex/fluid-dex.js +108 -37
  26. package/build/dex/fluid-dex/fluid-dex.js.map +1 -1
  27. package/build/dex/fluid-dex/types.d.ts +3 -1
  28. package/build/dex/generic-rfq/generic-rfq.js +2 -1
  29. package/build/dex/generic-rfq/generic-rfq.js.map +1 -1
  30. package/build/dex/generic-rfq/rate-fetcher.d.ts +1 -4
  31. package/build/dex/generic-rfq/rate-fetcher.js +20 -52
  32. package/build/dex/generic-rfq/rate-fetcher.js.map +1 -1
  33. package/build/dex/integral/config.d.ts +4 -0
  34. package/build/dex/integral/config.js +20 -0
  35. package/build/dex/integral/config.js.map +1 -0
  36. package/build/dex/integral/context.d.ts +40 -0
  37. package/build/dex/integral/context.js +158 -0
  38. package/build/dex/integral/context.js.map +1 -0
  39. package/build/dex/integral/integral-factory.d.ts +24 -0
  40. package/build/dex/integral/integral-factory.js +95 -0
  41. package/build/dex/integral/integral-factory.js.map +1 -0
  42. package/build/dex/integral/integral-pool.d.ts +50 -0
  43. package/build/dex/integral/integral-pool.js +149 -0
  44. package/build/dex/integral/integral-pool.js.map +1 -0
  45. package/build/dex/integral/integral-pricing.d.ts +18 -0
  46. package/build/dex/integral/integral-pricing.js +114 -0
  47. package/build/dex/integral/integral-pricing.js.map +1 -0
  48. package/build/dex/integral/integral-relayer.d.ts +42 -0
  49. package/build/dex/integral/integral-relayer.js +192 -0
  50. package/build/dex/integral/integral-relayer.js.map +1 -0
  51. package/build/dex/integral/integral-token.d.ts +27 -0
  52. package/build/dex/integral/integral-token.js +59 -0
  53. package/build/dex/integral/integral-token.js.map +1 -0
  54. package/build/dex/integral/integral.d.ts +41 -0
  55. package/build/dex/integral/integral.js +376 -0
  56. package/build/dex/integral/integral.js.map +1 -0
  57. package/build/dex/integral/types.d.ts +85 -0
  58. package/build/dex/integral/types.js +9 -0
  59. package/build/dex/integral/types.js.map +1 -0
  60. package/build/dex/integral/utils-e2e.d.ts +9 -0
  61. package/build/dex/integral/utils-e2e.js +131 -0
  62. package/build/dex/integral/utils-e2e.js.map +1 -0
  63. package/build/dex/integral/utils.d.ts +17 -0
  64. package/build/dex/integral/utils.js +94 -0
  65. package/build/dex/integral/utils.js.map +1 -0
  66. package/build/dex/jarvis.d.ts +1 -2
  67. package/build/dex/jarvis.js +0 -58
  68. package/build/dex/jarvis.js.map +1 -1
  69. package/build/dex/platypus/platypus.d.ts +1 -2
  70. package/build/dex/platypus/platypus.js +0 -45
  71. package/build/dex/platypus/platypus.js.map +1 -1
  72. package/build/dex/stable-pool.js +8 -1
  73. package/build/dex/stable-pool.js.map +1 -1
  74. package/build/dex/swaap-v1/swaap-v1.d.ts +1 -2
  75. package/build/dex/swaap-v1/swaap-v1.js +0 -14
  76. package/build/dex/swaap-v1/swaap-v1.js.map +1 -1
  77. package/build/dex/trader-joe-v2.1/optimizer.d.ts +2 -0
  78. package/build/dex/trader-joe-v2.1/optimizer.js +47 -0
  79. package/build/dex/trader-joe-v2.1/optimizer.js.map +1 -0
  80. package/build/dex/zerox/index.d.ts +26 -4
  81. package/build/dex/zerox/index.js +42 -50
  82. package/build/dex/zerox/index.js.map +1 -1
  83. package/build/dex/zerox/types.d.ts +0 -29
  84. package/build/dex/zerox/types.js +1 -8
  85. package/build/dex/zerox/types.js.map +1 -1
  86. package/build/dex-helper/dummy-dex-helper.js +0 -7
  87. package/build/dex-helper/dummy-dex-helper.js.map +1 -1
  88. package/build/dex-helper/icache.d.ts +0 -2
  89. package/package.json +1 -1
  90. package/src/abi/fluid-dex/fluid-dex.abi.json +581 -25
  91. package/src/dex/fluid-dex/constants.ts +1 -0
  92. package/src/dex/fluid-dex/fluid-dex-e2e.test.ts +17 -0
  93. package/src/dex/fluid-dex/fluid-dex-events.test.ts +55 -5
  94. package/src/dex/fluid-dex/fluid-dex-liquidity-proxy.ts +1 -2
  95. package/src/dex/fluid-dex/fluid-dex-pool.ts +138 -0
  96. package/src/dex/fluid-dex/fluid-dex.ts +221 -69
  97. package/src/dex/fluid-dex/types.ts +3 -1
  98. package/src/dex/generic-rfq/generic-rfq.ts +6 -1
  99. package/src/dex/generic-rfq/rate-fetcher.ts +42 -77
  100. package/src/dex-helper/dummy-dex-helper.ts +0 -13
  101. package/src/dex-helper/icache.ts +0 -4
  102. package/tests/constants-e2e.ts +5 -0
  103. package/.vscode/launch.json +0 -53
  104. package/.vscode/settings.json +0 -2
  105. package/.vscode/tasks.json +0 -15
  106. package/build/abi/inception/inception-ratio-feed.json +0 -329
  107. package/build/abi/inception/inception-vault.json +0 -991
  108. package/build/abi/uniswap-v3/AlienBaseV3Router.abi.json +0 -52
  109. package/build/abi/usual-m-smart-m/usualM.abi.json +0 -483
  110. package/build/abi/usual-m-usd0/usualCollateralDao.abi.json +0 -681
  111. package/build/abi/usual-m-wrapped-m/usualM.abi.json +0 -509
  112. package/build/dex/aave-v2/tokens-avalanche.json +0 -44
  113. package/build/dex/aave-v2/tokens-mainnet.json +0 -188
  114. package/build/dex/aave-v2/tokens-polygon.json +0 -44
  115. package/build/dex/balancer-v3/abi/balancerBatchRouter.d.ts +0 -729
  116. package/build/dex/balancer-v3/abi/balancerBatchRouter.js +0 -732
  117. package/build/dex/balancer-v3/abi/balancerBatchRouter.js.map +0 -1
  118. package/build/dex/balancer-v3/abi/balancerRouter.d.ts +0 -1406
  119. package/build/dex/balancer-v3/abi/balancerRouter.js +0 -1175
  120. package/build/dex/balancer-v3/abi/balancerRouter.js.map +0 -1
  121. package/build/dex/balancer-v3/abi/vaultExtension.V3.d.ts +0 -2081
  122. package/build/dex/balancer-v3/abi/vaultExtension.V3.js +0 -1851
  123. package/build/dex/balancer-v3/abi/vaultExtension.V3.js.map +0 -1
  124. package/build/dex/balancer-v3/balancer-v3-sepolia-pools.d.ts +0 -34
  125. package/build/dex/balancer-v3/balancer-v3-sepolia-pools.js +0 -406
  126. package/build/dex/balancer-v3/balancer-v3-sepolia-pools.js.map +0 -1
  127. package/build/dex/inception/config.d.ts +0 -4
  128. package/build/dex/inception/config.js +0 -109
  129. package/build/dex/inception/config.js.map +0 -1
  130. package/build/dex/inception/inception-event-pool.d.ts +0 -16
  131. package/build/dex/inception/inception-event-pool.js +0 -49
  132. package/build/dex/inception/inception-event-pool.js.map +0 -1
  133. package/build/dex/inception/inception.d.ts +0 -43
  134. package/build/dex/inception/inception.js +0 -180
  135. package/build/dex/inception/inception.js.map +0 -1
  136. package/build/dex/inception/tokens.d.ts +0 -9
  137. package/build/dex/inception/tokens.js +0 -28
  138. package/build/dex/inception/tokens.js.map +0 -1
  139. package/build/dex/inception/types.d.ts +0 -22
  140. package/build/dex/inception/types.js +0 -3
  141. package/build/dex/inception/types.js.map +0 -1
  142. package/build/dex/inception/utils.d.ts +0 -7
  143. package/build/dex/inception/utils.js +0 -58
  144. package/build/dex/inception/utils.js.map +0 -1
  145. package/build/dex/maker-psm/scripts/gem.abi.json +0 -136
  146. package/build/dex/maker-psm/scripts/validate-state.d.ts +0 -0
  147. package/build/dex/maker-psm/scripts/validate-state.js +0 -185
  148. package/build/dex/maker-psm/scripts/validate-state.js.map +0 -1
  149. package/build/dex/maker-psm/scripts/vat.abi.json +0 -243
  150. package/build/dex/solidly-v3/scripts/check-event-pool-event.d.ts +0 -1
  151. package/build/dex/solidly-v3/scripts/check-event-pool-event.js +0 -53
  152. package/build/dex/solidly-v3/scripts/check-event-pool-event.js.map +0 -1
  153. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.d.ts +0 -17
  154. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js +0 -64
  155. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js.map +0 -1
  156. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.d.ts +0 -17
  157. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js +0 -79
  158. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js.map +0 -1
  159. package/build/dex/uniswap-v3/uniswap-v3-pricing.d.ts +0 -4
  160. package/build/dex/uniswap-v3/uniswap-v3-pricing.js +0 -43
  161. package/build/dex/uniswap-v3/uniswap-v3-pricing.js.map +0 -1
  162. package/build/dex/uniswap-v3/uniswap-v3-worker.d.ts +0 -1
  163. package/build/dex/uniswap-v3/uniswap-v3-worker.js +0 -10
  164. package/build/dex/uniswap-v3/uniswap-v3-worker.js.map +0 -1
  165. package/build/dex/usual/types.d.ts +0 -13
  166. package/build/dex/usual/types.js +0 -3
  167. package/build/dex/usual/types.js.map +0 -1
  168. package/build/dex/usual/usual-bond.d.ts +0 -18
  169. package/build/dex/usual/usual-bond.js +0 -52
  170. package/build/dex/usual/usual-bond.js.map +0 -1
  171. package/build/dex/usual/usual-m-smart-m.d.ts +0 -17
  172. package/build/dex/usual/usual-m-smart-m.js +0 -50
  173. package/build/dex/usual/usual-m-smart-m.js.map +0 -1
  174. package/build/dex/usual/usual-m-usd0.d.ts +0 -17
  175. package/build/dex/usual/usual-m-usd0.js +0 -51
  176. package/build/dex/usual/usual-m-usd0.js.map +0 -1
  177. package/build/dex/usual/usual-m-wrapped-m.d.ts +0 -17
  178. package/build/dex/usual/usual-m-wrapped-m.js +0 -50
  179. package/build/dex/usual/usual-m-wrapped-m.js.map +0 -1
  180. package/build/dex/usual/usual.d.ts +0 -27
  181. package/build/dex/usual/usual.js +0 -125
  182. package/build/dex/usual/usual.js.map +0 -1
  183. package/build/dex/usual-m-smart-m/config.d.ts +0 -3
  184. package/build/dex/usual-m-smart-m/config.js +0 -13
  185. package/build/dex/usual-m-smart-m/config.js.map +0 -1
  186. package/build/dex/usual-m-smart-m/types.d.ts +0 -7
  187. package/build/dex/usual-m-smart-m/types.js +0 -3
  188. package/build/dex/usual-m-smart-m/types.js.map +0 -1
  189. package/build/dex/usual-m-smart-m/usual-m-smart-m.d.ts +0 -35
  190. package/build/dex/usual-m-smart-m/usual-m-smart-m.js +0 -161
  191. package/build/dex/usual-m-smart-m/usual-m-smart-m.js.map +0 -1
  192. package/build/dex/usual-m-usd0/config.d.ts +0 -3
  193. package/build/dex/usual-m-usd0/config.js +0 -14
  194. package/build/dex/usual-m-usd0/config.js.map +0 -1
  195. package/build/dex/usual-m-usd0/types.d.ts +0 -8
  196. package/build/dex/usual-m-usd0/types.js +0 -3
  197. package/build/dex/usual-m-usd0/types.js.map +0 -1
  198. package/build/dex/usual-m-usd0/usual-m-usd0.d.ts +0 -35
  199. package/build/dex/usual-m-usd0/usual-m-usd0.js +0 -159
  200. package/build/dex/usual-m-usd0/usual-m-usd0.js.map +0 -1
  201. package/build/lib/pub-sub.d.ts +0 -39
  202. package/build/lib/pub-sub.js +0 -133
  203. package/build/lib/pub-sub.js.map +0 -1
  204. package/src/lib/pub-sub.ts +0 -174
@@ -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": "errorId",
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": "shares",
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 IFluidDexT1.PricesAndExchangePrice",
211
+ "internalType": "struct Structs.PricesAndExchangePrice",
91
212
  "name": "pex_",
92
213
  "type": "tuple"
93
214
  }
@@ -117,6 +238,346 @@
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
+ ],
386
+ "name": "LogPauseSwapAndArbitrage",
387
+ "type": "event"
388
+ },
389
+ {
390
+ "anonymous": false,
391
+ "inputs": [
392
+ ],
393
+ "name": "LogUnpauseSwapAndArbitrage",
394
+ "type": "event"
395
+ },
396
+ {
397
+ "anonymous": false,
398
+ "inputs": [
399
+ {
400
+ "indexed": false,
401
+ "internalType": "uint256",
402
+ "name": "shares",
403
+ "type": "uint256"
404
+ },
405
+ {
406
+ "indexed": false,
407
+ "internalType": "uint256",
408
+ "name": "token0Amt",
409
+ "type": "uint256"
410
+ },
411
+ {
412
+ "indexed": false,
413
+ "internalType": "uint256",
414
+ "name": "token1Amt",
415
+ "type": "uint256"
416
+ }
417
+ ],
418
+ "name": "LogPaybackDebtInOneToken",
419
+ "type": "event"
420
+ },
421
+ {
422
+ "anonymous": false,
423
+ "inputs": [
424
+ {
425
+ "indexed": false,
426
+ "internalType": "uint256",
427
+ "name": "amount0",
428
+ "type": "uint256"
429
+ },
430
+ {
431
+ "indexed": false,
432
+ "internalType": "uint256",
433
+ "name": "amount1",
434
+ "type": "uint256"
435
+ },
436
+ {
437
+ "indexed": false,
438
+ "internalType": "uint256",
439
+ "name": "shares",
440
+ "type": "uint256"
441
+ }
442
+ ],
443
+ "name": "LogPaybackDebtLiquidity",
444
+ "type": "event"
445
+ },
446
+ {
447
+ "anonymous": false,
448
+ "inputs": [
449
+ {
450
+ "indexed": false,
451
+ "internalType": "uint256",
452
+ "name": "shares",
453
+ "type": "uint256"
454
+ },
455
+ {
456
+ "indexed": false,
457
+ "internalType": "uint256",
458
+ "name": "token0Amt",
459
+ "type": "uint256"
460
+ },
461
+ {
462
+ "indexed": false,
463
+ "internalType": "uint256",
464
+ "name": "token1Amt",
465
+ "type": "uint256"
466
+ }
467
+ ],
468
+ "name": "LogPaybackPerfectDebtLiquidity",
469
+ "type": "event"
470
+ },
471
+ {
472
+ "anonymous": false,
473
+ "inputs": [
474
+ {
475
+ "indexed": false,
476
+ "internalType": "uint256",
477
+ "name": "shares",
478
+ "type": "uint256"
479
+ },
480
+ {
481
+ "indexed": false,
482
+ "internalType": "uint256",
483
+ "name": "token0Amt",
484
+ "type": "uint256"
485
+ },
486
+ {
487
+ "indexed": false,
488
+ "internalType": "uint256",
489
+ "name": "token1Amt",
490
+ "type": "uint256"
491
+ }
492
+ ],
493
+ "name": "LogWithdrawColInOneToken",
494
+ "type": "event"
495
+ },
496
+ {
497
+ "anonymous": false,
498
+ "inputs": [
499
+ {
500
+ "indexed": false,
501
+ "internalType": "uint256",
502
+ "name": "amount0",
503
+ "type": "uint256"
504
+ },
505
+ {
506
+ "indexed": false,
507
+ "internalType": "uint256",
508
+ "name": "amount1",
509
+ "type": "uint256"
510
+ },
511
+ {
512
+ "indexed": false,
513
+ "internalType": "uint256",
514
+ "name": "shares",
515
+ "type": "uint256"
516
+ }
517
+ ],
518
+ "name": "LogWithdrawColLiquidity",
519
+ "type": "event"
520
+ },
521
+ {
522
+ "anonymous": false,
523
+ "inputs": [
524
+ {
525
+ "indexed": false,
526
+ "internalType": "uint256",
527
+ "name": "shares",
528
+ "type": "uint256"
529
+ },
530
+ {
531
+ "indexed": false,
532
+ "internalType": "uint256",
533
+ "name": "token0Amt",
534
+ "type": "uint256"
535
+ },
536
+ {
537
+ "indexed": false,
538
+ "internalType": "uint256",
539
+ "name": "token1Amt",
540
+ "type": "uint256"
541
+ }
542
+ ],
543
+ "name": "LogWithdrawPerfectColLiquidity",
544
+ "type": "event"
545
+ },
546
+ {
547
+ "anonymous": false,
548
+ "inputs": [
549
+ {
550
+ "indexed": false,
551
+ "internalType": "bool",
552
+ "name": "swap0to1",
553
+ "type": "bool"
554
+ },
555
+ {
556
+ "indexed": false,
557
+ "internalType": "uint256",
558
+ "name": "amountIn",
559
+ "type": "uint256"
560
+ },
561
+ {
562
+ "indexed": false,
563
+ "internalType": "uint256",
564
+ "name": "amountOut",
565
+ "type": "uint256"
566
+ },
567
+ {
568
+ "indexed": false,
569
+ "internalType": "address",
570
+ "name": "to",
571
+ "type": "address"
572
+ }
573
+ ],
574
+ "name": "Swap",
575
+ "type": "event"
576
+ },
577
+ {
578
+ "stateMutability": "payable",
579
+ "type": "fallback"
580
+ },
120
581
  {
121
582
  "inputs": [],
122
583
  "name": "DEX_ID",
@@ -148,9 +609,9 @@
148
609
  "type": "uint256"
149
610
  },
150
611
  {
151
- "internalType": "bool",
152
- "name": "estimate_",
153
- "type": "bool"
612
+ "internalType": "address",
613
+ "name": "to_",
614
+ "type": "address"
154
615
  }
155
616
  ],
156
617
  "name": "borrow",
@@ -182,9 +643,9 @@
182
643
  "type": "uint256"
183
644
  },
184
645
  {
185
- "internalType": "bool",
186
- "name": "estimate_",
187
- "type": "bool"
646
+ "internalType": "address",
647
+ "name": "to_",
648
+ "type": "address"
188
649
  }
189
650
  ],
190
651
  "name": "borrowPerfect",
@@ -248,11 +709,11 @@
248
709
  },
249
710
  {
250
711
  "internalType": "address",
251
- "name": "perfectOperationsAndOracle",
712
+ "name": "perfectOperationsAndSwapOut",
252
713
  "type": "address"
253
714
  }
254
715
  ],
255
- "internalType": "struct IFluidDexT1.Implementations",
716
+ "internalType": "struct Structs.Implementations",
256
717
  "name": "implementations",
257
718
  "type": "tuple"
258
719
  },
@@ -307,7 +768,7 @@
307
768
  "type": "uint256"
308
769
  }
309
770
  ],
310
- "internalType": "struct IFluidDexT1.ConstantViews",
771
+ "internalType": "struct Structs.ConstantViews",
311
772
  "name": "constantsView_",
312
773
  "type": "tuple"
313
774
  }
@@ -342,7 +803,7 @@
342
803
  "type": "uint256"
343
804
  }
344
805
  ],
345
- "internalType": "struct IFluidDexT1.ConstantViews2",
806
+ "internalType": "struct Structs.ConstantViews2",
346
807
  "name": "constantsView2_",
347
808
  "type": "tuple"
348
809
  }
@@ -476,7 +937,7 @@
476
937
  "type": "uint256"
477
938
  }
478
939
  ],
479
- "internalType": "struct IFluidDexT1.CollateralReserves",
940
+ "internalType": "struct Structs.CollateralReserves",
480
941
  "name": "c_",
481
942
  "type": "tuple"
482
943
  }
@@ -547,7 +1008,7 @@
547
1008
  "type": "uint256"
548
1009
  }
549
1010
  ],
550
- "internalType": "struct IFluidDexT1.DebtReserves",
1011
+ "internalType": "struct Structs.DebtReserves",
551
1012
  "name": "d_",
552
1013
  "type": "tuple"
553
1014
  }
@@ -562,6 +1023,29 @@
562
1023
  "stateMutability": "nonpayable",
563
1024
  "type": "function"
564
1025
  },
1026
+ {
1027
+ "inputs": [
1028
+ {
1029
+ "internalType": "address",
1030
+ "name": "token_",
1031
+ "type": "address"
1032
+ },
1033
+ {
1034
+ "internalType": "uint256",
1035
+ "name": "amount_",
1036
+ "type": "uint256"
1037
+ },
1038
+ {
1039
+ "internalType": "bytes",
1040
+ "name": "data_",
1041
+ "type": "bytes"
1042
+ }
1043
+ ],
1044
+ "name": "liquidityCallback",
1045
+ "outputs": [],
1046
+ "stateMutability": "nonpayable",
1047
+ "type": "function"
1048
+ },
565
1049
  {
566
1050
  "inputs": [
567
1051
  {
@@ -605,7 +1089,7 @@
605
1089
  "type": "uint256"
606
1090
  }
607
1091
  ],
608
- "internalType": "struct IFluidDexT1.Oracle[]",
1092
+ "internalType": "struct Structs.Oracle[]",
609
1093
  "name": "twaps_",
610
1094
  "type": "tuple[]"
611
1095
  },
@@ -778,6 +1262,40 @@
778
1262
  "stateMutability": "payable",
779
1263
  "type": "function"
780
1264
  },
1265
+ {
1266
+ "inputs": [
1267
+ {
1268
+ "internalType": "bool",
1269
+ "name": "swap0to1_",
1270
+ "type": "bool"
1271
+ },
1272
+ {
1273
+ "internalType": "uint256",
1274
+ "name": "amountIn_",
1275
+ "type": "uint256"
1276
+ },
1277
+ {
1278
+ "internalType": "uint256",
1279
+ "name": "amountOutMin_",
1280
+ "type": "uint256"
1281
+ },
1282
+ {
1283
+ "internalType": "address",
1284
+ "name": "to_",
1285
+ "type": "address"
1286
+ }
1287
+ ],
1288
+ "name": "swapInWithCallback",
1289
+ "outputs": [
1290
+ {
1291
+ "internalType": "uint256",
1292
+ "name": "amountOut_",
1293
+ "type": "uint256"
1294
+ }
1295
+ ],
1296
+ "stateMutability": "payable",
1297
+ "type": "function"
1298
+ },
781
1299
  {
782
1300
  "inputs": [
783
1301
  {
@@ -812,6 +1330,40 @@
812
1330
  "stateMutability": "payable",
813
1331
  "type": "function"
814
1332
  },
1333
+ {
1334
+ "inputs": [
1335
+ {
1336
+ "internalType": "bool",
1337
+ "name": "swap0to1_",
1338
+ "type": "bool"
1339
+ },
1340
+ {
1341
+ "internalType": "uint256",
1342
+ "name": "amountOut_",
1343
+ "type": "uint256"
1344
+ },
1345
+ {
1346
+ "internalType": "uint256",
1347
+ "name": "amountInMax_",
1348
+ "type": "uint256"
1349
+ },
1350
+ {
1351
+ "internalType": "address",
1352
+ "name": "to_",
1353
+ "type": "address"
1354
+ }
1355
+ ],
1356
+ "name": "swapOutWithCallback",
1357
+ "outputs": [
1358
+ {
1359
+ "internalType": "uint256",
1360
+ "name": "amountIn_",
1361
+ "type": "uint256"
1362
+ }
1363
+ ],
1364
+ "stateMutability": "payable",
1365
+ "type": "function"
1366
+ },
815
1367
  {
816
1368
  "inputs": [
817
1369
  {
@@ -830,9 +1382,9 @@
830
1382
  "type": "uint256"
831
1383
  },
832
1384
  {
833
- "internalType": "bool",
834
- "name": "estimate_",
835
- "type": "bool"
1385
+ "internalType": "address",
1386
+ "name": "to_",
1387
+ "type": "address"
836
1388
  }
837
1389
  ],
838
1390
  "name": "withdraw",
@@ -864,9 +1416,9 @@
864
1416
  "type": "uint256"
865
1417
  },
866
1418
  {
867
- "internalType": "bool",
868
- "name": "estimate_",
869
- "type": "bool"
1419
+ "internalType": "address",
1420
+ "name": "to_",
1421
+ "type": "address"
870
1422
  }
871
1423
  ],
872
1424
  "name": "withdrawPerfect",
@@ -903,9 +1455,9 @@
903
1455
  "type": "uint256"
904
1456
  },
905
1457
  {
906
- "internalType": "bool",
907
- "name": "estimate_",
908
- "type": "bool"
1458
+ "internalType": "address",
1459
+ "name": "to_",
1460
+ "type": "address"
909
1461
  }
910
1462
  ],
911
1463
  "name": "withdrawPerfectInOneToken",
@@ -918,5 +1470,9 @@
918
1470
  ],
919
1471
  "stateMutability": "nonpayable",
920
1472
  "type": "function"
1473
+ },
1474
+ {
1475
+ "stateMutability": "payable",
1476
+ "type": "receive"
921
1477
  }
922
1478
  ]