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