@paraswap/dex-lib 3.9.7-fluid-dex.3 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/.vscode/launch.json +53 -0
  2. package/.vscode/settings.json +2 -0
  3. package/.vscode/tasks.json +15 -0
  4. package/build/abi/{integral/pool.json → inception/inception-ineth-pool.json} +558 -537
  5. package/build/abi/inception/inception-ratio-feed.json +329 -0
  6. package/build/abi/inception/inception-vault.json +991 -0
  7. package/build/abi/uniswap-v3/AlienBaseV3Router.abi.json +52 -0
  8. package/build/abi/{integral/relayer.json → wombat/pool.json} +474 -721
  9. package/build/config.js +28 -0
  10. package/build/config.js.map +1 -1
  11. package/build/constants.d.ts +2 -1
  12. package/build/constants.js +1 -0
  13. package/build/constants.js.map +1 -1
  14. package/build/dex/aave-v1/aave-v1.d.ts +2 -1
  15. package/build/dex/aave-v1/aave-v1.js +23 -0
  16. package/build/dex/aave-v1/aave-v1.js.map +1 -1
  17. package/build/dex/aave-v2/tokens-avalanche.json +44 -0
  18. package/build/dex/aave-v2/tokens-mainnet.json +188 -0
  19. package/build/dex/aave-v2/tokens-polygon.json +44 -0
  20. package/build/dex/aave-v3/aave-v3.js +1 -1
  21. package/build/dex/aave-v3/aave-v3.js.map +1 -1
  22. package/build/dex/aave-v3/config.js +6 -0
  23. package/build/dex/aave-v3/config.js.map +1 -1
  24. package/build/dex/aave-v3-stata/config.js +3 -3
  25. package/build/dex/aave-v3-stata/config.js.map +1 -1
  26. package/build/dex/algebra/algebra-pool-v1_9_bidirectional_fee.js +1 -1
  27. package/build/dex/algebra/algebra-pool-v1_9_bidirectional_fee.js.map +1 -1
  28. package/build/dex/algebra/config.js +20 -0
  29. package/build/dex/algebra/config.js.map +1 -1
  30. package/build/dex/balancer-v2/balancer-v2.js +1 -1
  31. package/build/dex/balancer-v2/balancer-v2.js.map +1 -1
  32. package/build/dex/balancer-v2/config.js +4 -0
  33. package/build/dex/balancer-v2/config.js.map +1 -1
  34. package/build/dex/curve-v1/config.js +36 -0
  35. package/build/dex/curve-v1/config.js.map +1 -1
  36. package/build/dex/curve-v1/curve-v1.js +1 -1
  37. package/build/dex/curve-v1/curve-v1.js.map +1 -1
  38. package/build/dex/curve-v1-factory/constants.js +1 -0
  39. package/build/dex/curve-v1-factory/constants.js.map +1 -1
  40. package/build/dex/curve-v1-factory/curve-v1-factory.js +1 -1
  41. package/build/dex/curve-v1-factory/curve-v1-factory.js.map +1 -1
  42. package/build/dex/curve-v1-stable-ng/config.js +28 -0
  43. package/build/dex/curve-v1-stable-ng/config.js.map +1 -1
  44. package/build/dex/inception/config.d.ts +4 -0
  45. package/build/dex/inception/config.js +109 -0
  46. package/build/dex/inception/config.js.map +1 -0
  47. package/build/dex/inception/inception-event-pool.d.ts +16 -0
  48. package/build/dex/inception/inception-event-pool.js +49 -0
  49. package/build/dex/inception/inception-event-pool.js.map +1 -0
  50. package/build/dex/inception/inception.d.ts +43 -0
  51. package/build/dex/inception/inception.js +180 -0
  52. package/build/dex/inception/inception.js.map +1 -0
  53. package/build/dex/inception/tokens.d.ts +9 -0
  54. package/build/dex/inception/tokens.js +28 -0
  55. package/build/dex/inception/tokens.js.map +1 -0
  56. package/build/dex/inception/types.d.ts +22 -0
  57. package/build/dex/{fluid-dex → inception}/types.js.map +1 -1
  58. package/build/dex/inception/utils.d.ts +7 -0
  59. package/build/dex/inception/utils.js +58 -0
  60. package/build/dex/inception/utils.js.map +1 -0
  61. package/build/dex/index.js +0 -2
  62. package/build/dex/index.js.map +1 -1
  63. package/build/dex/jarvis.d.ts +2 -1
  64. package/build/dex/jarvis.js +58 -0
  65. package/build/dex/jarvis.js.map +1 -1
  66. package/build/dex/maker-psm/scripts/gem.abi.json +136 -0
  67. package/build/dex/maker-psm/scripts/validate-state.d.ts +0 -0
  68. package/build/dex/maker-psm/scripts/validate-state.js +185 -0
  69. package/build/dex/maker-psm/scripts/validate-state.js.map +1 -0
  70. package/build/dex/maker-psm/scripts/vat.abi.json +243 -0
  71. package/build/dex/platypus/platypus.d.ts +2 -1
  72. package/build/dex/platypus/platypus.js +45 -0
  73. package/build/dex/platypus/platypus.js.map +1 -1
  74. package/build/dex/solidly-v3/scripts/check-event-pool-event.d.ts +1 -0
  75. package/build/dex/solidly-v3/scripts/check-event-pool-event.js +53 -0
  76. package/build/dex/solidly-v3/scripts/check-event-pool-event.js.map +1 -0
  77. package/build/dex/stable-pool.js +1 -8
  78. package/build/dex/stable-pool.js.map +1 -1
  79. package/build/dex/swaap-v1/swaap-v1.d.ts +2 -1
  80. package/build/dex/swaap-v1/swaap-v1.js +14 -0
  81. package/build/dex/swaap-v1/swaap-v1.js.map +1 -1
  82. package/build/dex/uniswap-v2/config.js +14 -0
  83. package/build/dex/uniswap-v2/config.js.map +1 -1
  84. package/build/dex/uniswap-v2/nomiswap-v2.js +10 -0
  85. package/build/dex/uniswap-v2/nomiswap-v2.js.map +1 -1
  86. package/build/dex/uniswap-v2/uniswap-v2.js +1 -1
  87. package/build/dex/uniswap-v2/uniswap-v2.js.map +1 -1
  88. package/build/dex/uniswap-v3/config.js +14 -0
  89. package/build/dex/uniswap-v3/config.js.map +1 -1
  90. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.d.ts +17 -0
  91. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js +64 -0
  92. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js.map +1 -0
  93. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.d.ts +17 -0
  94. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js +79 -0
  95. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js.map +1 -0
  96. package/build/dex/uniswap-v3/uniswap-v3-pricing.d.ts +4 -0
  97. package/build/dex/uniswap-v3/uniswap-v3-pricing.js +43 -0
  98. package/build/dex/uniswap-v3/uniswap-v3-pricing.js.map +1 -0
  99. package/build/dex/uniswap-v3/uniswap-v3-worker.d.ts +1 -0
  100. package/build/dex/uniswap-v3/uniswap-v3-worker.js +10 -0
  101. package/build/dex/uniswap-v3/uniswap-v3-worker.js.map +1 -0
  102. package/build/dex/uniswap-v3/uniswap-v3.js +1 -0
  103. package/build/dex/uniswap-v3/uniswap-v3.js.map +1 -1
  104. package/build/dex/weth/config.js +5 -0
  105. package/build/dex/weth/config.js.map +1 -1
  106. package/build/dex/wusdm/config.js +8 -0
  107. package/build/dex/wusdm/config.js.map +1 -1
  108. package/build/dex/wusdm/wusdm.d.ts +1 -0
  109. package/build/dex/wusdm/wusdm.js +9 -4
  110. package/build/dex/wusdm/wusdm.js.map +1 -1
  111. package/build/dex/zerox/index.d.ts +4 -26
  112. package/build/dex/zerox/index.js +50 -42
  113. package/build/dex/zerox/index.js.map +1 -1
  114. package/build/dex/zerox/types.d.ts +29 -0
  115. package/build/dex/zerox/types.js +8 -1
  116. package/build/dex/zerox/types.js.map +1 -1
  117. package/build/executor/WETHBytecodeBuilder.js +1 -0
  118. package/build/executor/WETHBytecodeBuilder.js.map +1 -1
  119. package/package.json +1 -1
  120. package/src/config.ts +29 -1
  121. package/src/constants.ts +1 -0
  122. package/src/dex/aave-v3/aave-v3-e2e.test.ts +69 -0
  123. package/src/dex/aave-v3/aave-v3.ts +1 -1
  124. package/src/dex/aave-v3/config.ts +7 -0
  125. package/src/dex/aave-v3-stata/config.ts +4 -4
  126. package/src/dex/algebra/algebra-e2e.test.ts +22 -0
  127. package/src/dex/algebra/algebra-pool-v1_9_bidirectional_fee.ts +1 -1
  128. package/src/dex/algebra/config.ts +21 -0
  129. package/src/dex/balancer-v2/balancer-v2-e2e.test.ts +22 -250
  130. package/src/dex/balancer-v2/balancer-v2.ts +1 -1
  131. package/src/dex/balancer-v2/config.ts +4 -0
  132. package/src/dex/curve-v1/config.ts +36 -0
  133. package/src/dex/curve-v1/curve-v1-e2e.test.ts +69 -0
  134. package/src/dex/curve-v1/curve-v1.ts +1 -1
  135. package/src/dex/curve-v1-factory/constants.ts +1 -0
  136. package/src/dex/curve-v1-factory/curve-v1-factory.ts +2 -1
  137. package/src/dex/curve-v1-stable-ng/config.ts +28 -0
  138. package/src/dex/curve-v1-stable-ng/curve-v1-stable-ng-e2e.test.ts +20 -0
  139. package/src/dex/index.ts +0 -2
  140. package/src/dex/uniswap-v2/config.ts +16 -0
  141. package/src/dex/uniswap-v2/nomiswap-v2.ts +11 -0
  142. package/src/dex/uniswap-v2/uniswap-v2-e2e-gnosis.test.ts +283 -0
  143. package/src/dex/uniswap-v2/uniswap-v2.ts +1 -1
  144. package/src/dex/uniswap-v3/config.ts +14 -0
  145. package/src/dex/uniswap-v3/uniswap-v3-e2e.test.ts +24 -0
  146. package/src/dex/uniswap-v3/uniswap-v3.ts +1 -0
  147. package/src/dex/weth/config.ts +5 -0
  148. package/src/dex/wusdm/config.ts +8 -0
  149. package/src/dex/wusdm/wusdm-e2e.test.ts +38 -0
  150. package/src/dex/wusdm/wusdm.ts +11 -4
  151. package/src/executor/WETHBytecodeBuilder.ts +3 -2
  152. package/tests/constants-e2e.ts +77 -2
  153. package/.idea/aws.xml +0 -17
  154. package/.idea/codeStyles/Project.xml +0 -19
  155. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  156. package/.idea/misc.xml +0 -6
  157. package/.idea/modules.xml +0 -8
  158. package/.idea/paraswap-dex-lib.iml +0 -9
  159. package/.idea/prettier.xml +0 -7
  160. package/.idea/vcs.xml +0 -6
  161. package/build/abi/fluid-dex/dexFactory.abi.json +0 -506
  162. package/build/abi/fluid-dex/fluid-dex.abi.json +0 -922
  163. package/build/abi/fluid-dex/liquidityUserModule.abi.json +0 -145
  164. package/build/abi/fluid-dex/resolver.abi.json +0 -999
  165. package/build/abi/integral/factory.json +0 -333
  166. package/build/abi/integral/oracle.json +0 -501
  167. package/build/dex/fluid-dex/config.d.ts +0 -4
  168. package/build/dex/fluid-dex/config.js +0 -20
  169. package/build/dex/fluid-dex/config.js.map +0 -1
  170. package/build/dex/fluid-dex/fluid-dex-factory.d.ts +0 -49
  171. package/build/dex/fluid-dex/fluid-dex-factory.js +0 -104
  172. package/build/dex/fluid-dex/fluid-dex-factory.js.map +0 -1
  173. package/build/dex/fluid-dex/fluid-dex-generate-pool.d.ts +0 -49
  174. package/build/dex/fluid-dex/fluid-dex-generate-pool.js +0 -104
  175. package/build/dex/fluid-dex/fluid-dex-generate-pool.js.map +0 -1
  176. package/build/dex/fluid-dex/fluid-dex-pool.d.ts +0 -47
  177. package/build/dex/fluid-dex/fluid-dex-pool.js +0 -119
  178. package/build/dex/fluid-dex/fluid-dex-pool.js.map +0 -1
  179. package/build/dex/fluid-dex/fluid-dex.d.ts +0 -126
  180. package/build/dex/fluid-dex/fluid-dex.js +0 -500
  181. package/build/dex/fluid-dex/fluid-dex.js.map +0 -1
  182. package/build/dex/fluid-dex/types.d.ts +0 -52
  183. package/build/dex/integral/config.d.ts +0 -4
  184. package/build/dex/integral/config.js +0 -20
  185. package/build/dex/integral/config.js.map +0 -1
  186. package/build/dex/integral/context.d.ts +0 -40
  187. package/build/dex/integral/context.js +0 -158
  188. package/build/dex/integral/context.js.map +0 -1
  189. package/build/dex/integral/integral-factory.d.ts +0 -24
  190. package/build/dex/integral/integral-factory.js +0 -95
  191. package/build/dex/integral/integral-factory.js.map +0 -1
  192. package/build/dex/integral/integral-pool.d.ts +0 -50
  193. package/build/dex/integral/integral-pool.js +0 -149
  194. package/build/dex/integral/integral-pool.js.map +0 -1
  195. package/build/dex/integral/integral-pricing.d.ts +0 -18
  196. package/build/dex/integral/integral-pricing.js +0 -114
  197. package/build/dex/integral/integral-pricing.js.map +0 -1
  198. package/build/dex/integral/integral-relayer.d.ts +0 -42
  199. package/build/dex/integral/integral-relayer.js +0 -192
  200. package/build/dex/integral/integral-relayer.js.map +0 -1
  201. package/build/dex/integral/integral-token.d.ts +0 -27
  202. package/build/dex/integral/integral-token.js +0 -59
  203. package/build/dex/integral/integral-token.js.map +0 -1
  204. package/build/dex/integral/integral.d.ts +0 -41
  205. package/build/dex/integral/integral.js +0 -376
  206. package/build/dex/integral/integral.js.map +0 -1
  207. package/build/dex/integral/types.d.ts +0 -85
  208. package/build/dex/integral/types.js +0 -9
  209. package/build/dex/integral/types.js.map +0 -1
  210. package/build/dex/integral/utils-e2e.d.ts +0 -9
  211. package/build/dex/integral/utils-e2e.js +0 -131
  212. package/build/dex/integral/utils-e2e.js.map +0 -1
  213. package/build/dex/integral/utils.d.ts +0 -17
  214. package/build/dex/integral/utils.js +0 -94
  215. package/build/dex/integral/utils.js.map +0 -1
  216. package/build/dex/trader-joe-v2.1/optimizer.d.ts +0 -2
  217. package/build/dex/trader-joe-v2.1/optimizer.js +0 -47
  218. package/build/dex/trader-joe-v2.1/optimizer.js.map +0 -1
  219. package/src/abi/fluid-dex/dexFactory.abi.json +0 -506
  220. package/src/abi/fluid-dex/fluid-dex.abi.json +0 -922
  221. package/src/abi/fluid-dex/liquidityUserModule.abi.json +0 -145
  222. package/src/abi/fluid-dex/resolver.abi.json +0 -999
  223. package/src/dex/fluid-dex/config.ts +0 -20
  224. package/src/dex/fluid-dex/fluid-dex-e2e.test.ts +0 -154
  225. package/src/dex/fluid-dex/fluid-dex-events.test.ts +0 -293
  226. package/src/dex/fluid-dex/fluid-dex-factory.ts +0 -143
  227. package/src/dex/fluid-dex/fluid-dex-integration.test.ts +0 -260
  228. package/src/dex/fluid-dex/fluid-dex-pool.ts +0 -178
  229. package/src/dex/fluid-dex/fluid-dex.ts +0 -782
  230. package/src/dex/fluid-dex/types.ts +0 -62
  231. /package/build/dex/{fluid-dex → inception}/types.js +0 -0
@@ -1,999 +0,0 @@
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
- ]