@paraswap/dex-lib 4.3.17-unichain.2 → 4.3.18

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 (169) hide show
  1. package/build/abi/BProtocol.json +1155 -0
  2. package/build/abi/Jarvis.json +1172 -0
  3. package/build/abi/MStableAsset.json +1545 -0
  4. package/build/abi/OneInchLp.json +1304 -0
  5. package/build/abi/Onebit.json +736 -0
  6. package/build/abi/Shell.json +1294 -0
  7. package/build/abi/TraderJoeV2Router.json +50 -0
  8. package/build/abi/miro-migrator/MiroMigrator.abi.json +36 -19
  9. package/build/abi/wUSDM.json +757 -0
  10. package/build/abi/zrx.v2.json +1967 -0
  11. package/build/abi/zrx.v3.json +3454 -0
  12. package/build/abi/zrx.v4.json +2193 -0
  13. package/build/config.js +0 -28
  14. package/build/config.js.map +1 -1
  15. package/build/constants.d.ts +1 -2
  16. package/build/constants.js +0 -1
  17. package/build/constants.js.map +1 -1
  18. package/build/dex/OneInchLp.d.ts +24 -0
  19. package/build/dex/OneInchLp.js +43 -0
  20. package/build/dex/OneInchLp.js.map +1 -0
  21. package/build/dex/bProtocol/bProtocol.d.ts +15 -0
  22. package/build/dex/bProtocol/bProtocol.js +56 -0
  23. package/build/dex/bProtocol/bProtocol.js.map +1 -0
  24. package/build/dex/bProtocol/types.d.ts +11 -0
  25. package/build/dex/bProtocol/types.js +8 -0
  26. package/build/dex/bProtocol/types.js.map +1 -0
  27. package/build/dex/jarvis.d.ts +56 -0
  28. package/build/dex/jarvis.js +163 -0
  29. package/build/dex/jarvis.js.map +1 -0
  30. package/build/dex/mStable.d.ts +44 -0
  31. package/build/dex/mStable.js +75 -0
  32. package/build/dex/mStable.js.map +1 -0
  33. package/build/dex/miro-migrator/config.js +3 -10
  34. package/build/dex/miro-migrator/config.js.map +1 -1
  35. package/build/dex/miro-migrator/constants.d.ts +1 -0
  36. package/build/dex/miro-migrator/constants.js +2 -1
  37. package/build/dex/miro-migrator/constants.js.map +1 -1
  38. package/build/dex/miro-migrator/miro-migrator-pool.d.ts +8 -5
  39. package/build/dex/miro-migrator/miro-migrator-pool.js +48 -30
  40. package/build/dex/miro-migrator/miro-migrator-pool.js.map +1 -1
  41. package/build/dex/miro-migrator/miro-migrator.d.ts +5 -4
  42. package/build/dex/miro-migrator/miro-migrator.js +40 -83
  43. package/build/dex/miro-migrator/miro-migrator.js.map +1 -1
  44. package/build/dex/miro-migrator/types.d.ts +2 -4
  45. package/build/dex/miro-migrator/types.js +1 -2
  46. package/build/dex/miro-migrator/types.js.map +1 -1
  47. package/build/dex/onebit/onebit.d.ts +16 -0
  48. package/build/dex/onebit/onebit.js +61 -0
  49. package/build/dex/onebit/onebit.js.map +1 -0
  50. package/build/dex/onebit/types.d.ts +14 -0
  51. package/build/dex/onebit/types.js +8 -0
  52. package/build/dex/onebit/types.js.map +1 -0
  53. package/build/dex/shell.d.ts +25 -0
  54. package/build/dex/shell.js +41 -0
  55. package/build/dex/shell.js.map +1 -0
  56. package/build/dex/swaap-v2/swaap-v2.js +1 -1
  57. package/build/dex/swaap-v2/swaap-v2.js.map +1 -1
  58. package/build/dex/swaap-v2/validators.js +2 -2
  59. package/build/dex/swaap-v2/validators.js.map +1 -1
  60. package/build/dex/trader-joe-v2.d.ts +40 -0
  61. package/build/dex/trader-joe-v2.js +74 -0
  62. package/build/dex/trader-joe-v2.js.map +1 -0
  63. package/build/dex/uniswap-v2/config.js +0 -6
  64. package/build/dex/uniswap-v2/config.js.map +1 -1
  65. package/build/dex/uniswap-v3/config.js +14 -37
  66. package/build/dex/uniswap-v3/config.js.map +1 -1
  67. package/build/dex/uniswap-v3/forks/velodrome-slipstream/velodrome-slipstream.d.ts +2 -1
  68. package/build/dex/uniswap-v3/forks/velodrome-slipstream/velodrome-slipstream.js +7 -4
  69. package/build/dex/uniswap-v3/forks/velodrome-slipstream/velodrome-slipstream.js.map +1 -1
  70. package/build/dex/uniswap-v3/types.d.ts +0 -5
  71. package/build/dex/uniswap-v3/types.js +1 -4
  72. package/build/dex/uniswap-v3/types.js.map +1 -1
  73. package/build/dex/uniswap-v3/uniswap-v3-new.d.ts +94 -0
  74. package/build/dex/uniswap-v3/uniswap-v3-new.js +923 -0
  75. package/build/dex/uniswap-v3/uniswap-v3-new.js.map +1 -0
  76. package/build/dex/uniswap-v3/uniswap-v3.d.ts +2 -2
  77. package/build/dex/uniswap-v3/uniswap-v3.js +3 -7
  78. package/build/dex/uniswap-v3/uniswap-v3.js.map +1 -1
  79. package/build/dex/uniswap-v4/config.js +0 -7
  80. package/build/dex/uniswap-v4/config.js.map +1 -1
  81. package/build/dex/uniswap-v4/uniswap-v4-pool.js +1 -1
  82. package/build/dex/uniswap-v4/uniswap-v4-pool.js.map +1 -1
  83. package/build/dex/usual-bond/config.d.ts +3 -0
  84. package/build/dex/usual-bond/config.js +13 -0
  85. package/build/dex/usual-bond/config.js.map +1 -0
  86. package/build/dex/usual-bond/types.d.ts +7 -0
  87. package/build/dex/usual-bond/types.js +3 -0
  88. package/build/dex/usual-bond/types.js.map +1 -0
  89. package/build/dex/usual-bond/usual-bond.d.ts +35 -0
  90. package/build/dex/usual-bond/usual-bond.js +176 -0
  91. package/build/dex/usual-bond/usual-bond.js.map +1 -0
  92. package/build/dex/weth/config.js +0 -3
  93. package/build/dex/weth/config.js.map +1 -1
  94. package/build/dex/wusdm/config.d.ts +3 -0
  95. package/build/dex/wusdm/config.js +43 -0
  96. package/build/dex/wusdm/config.js.map +1 -0
  97. package/build/dex/wusdm/constants.d.ts +2 -0
  98. package/build/dex/wusdm/constants.js +6 -0
  99. package/build/dex/wusdm/constants.js.map +1 -0
  100. package/build/dex/wusdm/types.d.ts +18 -0
  101. package/build/dex/wusdm/types.js +11 -0
  102. package/build/dex/wusdm/types.js.map +1 -0
  103. package/build/dex/wusdm/wusdm-pool.d.ts +21 -0
  104. package/build/dex/wusdm/wusdm-pool.js +74 -0
  105. package/build/dex/wusdm/wusdm-pool.js.map +1 -0
  106. package/build/dex/wusdm/wusdm.d.ts +46 -0
  107. package/build/dex/wusdm/wusdm.js +243 -0
  108. package/build/dex/wusdm/wusdm.js.map +1 -0
  109. package/build/dex/zerox/config.d.ts +2 -0
  110. package/build/dex/zerox/config.js +33 -0
  111. package/build/dex/zerox/config.js.map +1 -0
  112. package/build/dex/zerox/index.d.ts +22 -0
  113. package/build/dex/zerox/index.js +225 -0
  114. package/build/dex/zerox/index.js.map +1 -0
  115. package/build/dex/zerox/order.d.ts +88 -0
  116. package/build/dex/zerox/order.js +53 -0
  117. package/build/dex/zerox/order.js.map +1 -0
  118. package/build/dex/zerox/types.d.ts +73 -0
  119. package/build/dex/zerox/types.js +21 -0
  120. package/build/dex/zerox/types.js.map +1 -0
  121. package/build/executor/WETHBytecodeBuilder.js +0 -1
  122. package/build/executor/WETHBytecodeBuilder.js.map +1 -1
  123. package/package.json +1 -1
  124. package/build/abi/ekubo/twamm-data-fetcher.json +0 -216
  125. package/build/abi/ekubo/twamm.json +0 -720
  126. package/build/abi/ring-v2/few-wrapped-token.json +0 -587
  127. package/build/abi/ring-v2/ring-v2-factory.json +0 -125
  128. package/build/abi/ring-v2/ring-v2-pool.json +0 -461
  129. package/build/abi/ring-v2/ring-v2-router.json +0 -332
  130. package/build/abi/uniswap-v3/UniswapSwapRouter02.abi.json +0 -548
  131. package/build/dex/balancer-v3/hooks/akronHook.d.ts +0 -15
  132. package/build/dex/balancer-v3/hooks/akronHook.js +0 -20
  133. package/build/dex/balancer-v3/hooks/akronHook.js.map +0 -1
  134. package/build/dex/balancer-v3/quantAMMPool.d.ts +0 -17
  135. package/build/dex/balancer-v3/quantAMMPool.js +0 -43
  136. package/build/dex/balancer-v3/quantAMMPool.js.map +0 -1
  137. package/build/dex/balancer-v3/reClammPool.d.ts +0 -23
  138. package/build/dex/balancer-v3/reClammPool.js +0 -82
  139. package/build/dex/balancer-v3/reClammPool.js.map +0 -1
  140. package/build/dex/ekubo/pools/base.d.ts +0 -36
  141. package/build/dex/ekubo/pools/base.js +0 -289
  142. package/build/dex/ekubo/pools/base.js.map +0 -1
  143. package/build/dex/ekubo/pools/full-range.d.ts +0 -23
  144. package/build/dex/ekubo/pools/full-range.js +0 -99
  145. package/build/dex/ekubo/pools/full-range.js.map +0 -1
  146. package/build/dex/ekubo/pools/iface.d.ts +0 -46
  147. package/build/dex/ekubo/pools/iface.js +0 -75
  148. package/build/dex/ekubo/pools/iface.js.map +0 -1
  149. package/build/dex/ekubo/pools/math/twamm/exp2.d.ts +0 -1
  150. package/build/dex/ekubo/pools/math/twamm/exp2.js +0 -86
  151. package/build/dex/ekubo/pools/math/twamm/exp2.js.map +0 -1
  152. package/build/dex/ekubo/pools/math/twamm/sqrt-ratio.d.ts +0 -1
  153. package/build/dex/ekubo/pools/math/twamm/sqrt-ratio.js +0 -56
  154. package/build/dex/ekubo/pools/math/twamm/sqrt-ratio.js.map +0 -1
  155. package/build/dex/ekubo/pools/oracle.d.ts +0 -8
  156. package/build/dex/ekubo/pools/oracle.js +0 -19
  157. package/build/dex/ekubo/pools/oracle.js.map +0 -1
  158. package/build/dex/ekubo/pools/twamm.d.ts +0 -38
  159. package/build/dex/ekubo/pools/twamm.js +0 -253
  160. package/build/dex/ekubo/pools/twamm.js.map +0 -1
  161. package/build/dex/ekubo/pools/utils.d.ts +0 -28
  162. package/build/dex/ekubo/pools/utils.js +0 -80
  163. package/build/dex/ekubo/pools/utils.js.map +0 -1
  164. package/build/dex/miro-migrator/miro-migrator-state.d.ts +0 -27
  165. package/build/dex/miro-migrator/miro-migrator-state.js +0 -89
  166. package/build/dex/miro-migrator/miro-migrator-state.js.map +0 -1
  167. package/build/dex/usdc-transmuter/usdc-transmuter-pool.d.ts +0 -26
  168. package/build/dex/usdc-transmuter/usdc-transmuter-pool.js +0 -75
  169. package/build/dex/usdc-transmuter/usdc-transmuter-pool.js.map +0 -1
@@ -1,548 +0,0 @@
1
- [
2
- {
3
- "inputs": [
4
- { "internalType": "address", "name": "_factoryV2", "type": "address" },
5
- { "internalType": "address", "name": "factoryV3", "type": "address" },
6
- {
7
- "internalType": "address",
8
- "name": "_positionManager",
9
- "type": "address"
10
- },
11
- { "internalType": "address", "name": "_WETH9", "type": "address" }
12
- ],
13
- "stateMutability": "nonpayable",
14
- "type": "constructor"
15
- },
16
- {
17
- "inputs": [],
18
- "name": "WETH9",
19
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
20
- "stateMutability": "view",
21
- "type": "function"
22
- },
23
- {
24
- "inputs": [
25
- { "internalType": "address", "name": "token", "type": "address" }
26
- ],
27
- "name": "approveMax",
28
- "outputs": [],
29
- "stateMutability": "payable",
30
- "type": "function"
31
- },
32
- {
33
- "inputs": [
34
- { "internalType": "address", "name": "token", "type": "address" }
35
- ],
36
- "name": "approveMaxMinusOne",
37
- "outputs": [],
38
- "stateMutability": "payable",
39
- "type": "function"
40
- },
41
- {
42
- "inputs": [
43
- { "internalType": "address", "name": "token", "type": "address" }
44
- ],
45
- "name": "approveZeroThenMax",
46
- "outputs": [],
47
- "stateMutability": "payable",
48
- "type": "function"
49
- },
50
- {
51
- "inputs": [
52
- { "internalType": "address", "name": "token", "type": "address" }
53
- ],
54
- "name": "approveZeroThenMaxMinusOne",
55
- "outputs": [],
56
- "stateMutability": "payable",
57
- "type": "function"
58
- },
59
- {
60
- "inputs": [{ "internalType": "bytes", "name": "data", "type": "bytes" }],
61
- "name": "callPositionManager",
62
- "outputs": [{ "internalType": "bytes", "name": "result", "type": "bytes" }],
63
- "stateMutability": "payable",
64
- "type": "function"
65
- },
66
- {
67
- "inputs": [
68
- { "internalType": "bytes[]", "name": "paths", "type": "bytes[]" },
69
- { "internalType": "uint128[]", "name": "amounts", "type": "uint128[]" },
70
- {
71
- "internalType": "uint24",
72
- "name": "maximumTickDivergence",
73
- "type": "uint24"
74
- },
75
- { "internalType": "uint32", "name": "secondsAgo", "type": "uint32" }
76
- ],
77
- "name": "checkOracleSlippage",
78
- "outputs": [],
79
- "stateMutability": "view",
80
- "type": "function"
81
- },
82
- {
83
- "inputs": [
84
- { "internalType": "bytes", "name": "path", "type": "bytes" },
85
- {
86
- "internalType": "uint24",
87
- "name": "maximumTickDivergence",
88
- "type": "uint24"
89
- },
90
- { "internalType": "uint32", "name": "secondsAgo", "type": "uint32" }
91
- ],
92
- "name": "checkOracleSlippage",
93
- "outputs": [],
94
- "stateMutability": "view",
95
- "type": "function"
96
- },
97
- {
98
- "inputs": [
99
- {
100
- "components": [
101
- { "internalType": "bytes", "name": "path", "type": "bytes" },
102
- { "internalType": "address", "name": "recipient", "type": "address" },
103
- { "internalType": "uint256", "name": "amountIn", "type": "uint256" },
104
- {
105
- "internalType": "uint256",
106
- "name": "amountOutMinimum",
107
- "type": "uint256"
108
- }
109
- ],
110
- "internalType": "struct IV3SwapRouter.ExactInputParams",
111
- "name": "params",
112
- "type": "tuple"
113
- }
114
- ],
115
- "name": "exactInput",
116
- "outputs": [
117
- { "internalType": "uint256", "name": "amountOut", "type": "uint256" }
118
- ],
119
- "stateMutability": "payable",
120
- "type": "function"
121
- },
122
- {
123
- "inputs": [
124
- {
125
- "components": [
126
- { "internalType": "address", "name": "tokenIn", "type": "address" },
127
- { "internalType": "address", "name": "tokenOut", "type": "address" },
128
- { "internalType": "uint24", "name": "fee", "type": "uint24" },
129
- { "internalType": "address", "name": "recipient", "type": "address" },
130
- { "internalType": "uint256", "name": "amountIn", "type": "uint256" },
131
- {
132
- "internalType": "uint256",
133
- "name": "amountOutMinimum",
134
- "type": "uint256"
135
- },
136
- {
137
- "internalType": "uint160",
138
- "name": "sqrtPriceLimitX96",
139
- "type": "uint160"
140
- }
141
- ],
142
- "internalType": "struct IV3SwapRouter.ExactInputSingleParams",
143
- "name": "params",
144
- "type": "tuple"
145
- }
146
- ],
147
- "name": "exactInputSingle",
148
- "outputs": [
149
- { "internalType": "uint256", "name": "amountOut", "type": "uint256" }
150
- ],
151
- "stateMutability": "payable",
152
- "type": "function"
153
- },
154
- {
155
- "inputs": [
156
- {
157
- "components": [
158
- { "internalType": "bytes", "name": "path", "type": "bytes" },
159
- { "internalType": "address", "name": "recipient", "type": "address" },
160
- { "internalType": "uint256", "name": "amountOut", "type": "uint256" },
161
- {
162
- "internalType": "uint256",
163
- "name": "amountInMaximum",
164
- "type": "uint256"
165
- }
166
- ],
167
- "internalType": "struct IV3SwapRouter.ExactOutputParams",
168
- "name": "params",
169
- "type": "tuple"
170
- }
171
- ],
172
- "name": "exactOutput",
173
- "outputs": [
174
- { "internalType": "uint256", "name": "amountIn", "type": "uint256" }
175
- ],
176
- "stateMutability": "payable",
177
- "type": "function"
178
- },
179
- {
180
- "inputs": [
181
- {
182
- "components": [
183
- { "internalType": "address", "name": "tokenIn", "type": "address" },
184
- { "internalType": "address", "name": "tokenOut", "type": "address" },
185
- { "internalType": "uint24", "name": "fee", "type": "uint24" },
186
- { "internalType": "address", "name": "recipient", "type": "address" },
187
- { "internalType": "uint256", "name": "amountOut", "type": "uint256" },
188
- {
189
- "internalType": "uint256",
190
- "name": "amountInMaximum",
191
- "type": "uint256"
192
- },
193
- {
194
- "internalType": "uint160",
195
- "name": "sqrtPriceLimitX96",
196
- "type": "uint160"
197
- }
198
- ],
199
- "internalType": "struct IV3SwapRouter.ExactOutputSingleParams",
200
- "name": "params",
201
- "type": "tuple"
202
- }
203
- ],
204
- "name": "exactOutputSingle",
205
- "outputs": [
206
- { "internalType": "uint256", "name": "amountIn", "type": "uint256" }
207
- ],
208
- "stateMutability": "payable",
209
- "type": "function"
210
- },
211
- {
212
- "inputs": [],
213
- "name": "factory",
214
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
215
- "stateMutability": "view",
216
- "type": "function"
217
- },
218
- {
219
- "inputs": [],
220
- "name": "factoryV2",
221
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
222
- "stateMutability": "view",
223
- "type": "function"
224
- },
225
- {
226
- "inputs": [
227
- { "internalType": "address", "name": "token", "type": "address" },
228
- { "internalType": "uint256", "name": "amount", "type": "uint256" }
229
- ],
230
- "name": "getApprovalType",
231
- "outputs": [
232
- {
233
- "internalType": "enum IApproveAndCall.ApprovalType",
234
- "name": "",
235
- "type": "uint8"
236
- }
237
- ],
238
- "stateMutability": "nonpayable",
239
- "type": "function"
240
- },
241
- {
242
- "inputs": [
243
- {
244
- "components": [
245
- { "internalType": "address", "name": "token0", "type": "address" },
246
- { "internalType": "address", "name": "token1", "type": "address" },
247
- { "internalType": "uint256", "name": "tokenId", "type": "uint256" },
248
- {
249
- "internalType": "uint256",
250
- "name": "amount0Min",
251
- "type": "uint256"
252
- },
253
- { "internalType": "uint256", "name": "amount1Min", "type": "uint256" }
254
- ],
255
- "internalType": "struct IApproveAndCall.IncreaseLiquidityParams",
256
- "name": "params",
257
- "type": "tuple"
258
- }
259
- ],
260
- "name": "increaseLiquidity",
261
- "outputs": [{ "internalType": "bytes", "name": "result", "type": "bytes" }],
262
- "stateMutability": "payable",
263
- "type": "function"
264
- },
265
- {
266
- "inputs": [
267
- {
268
- "components": [
269
- { "internalType": "address", "name": "token0", "type": "address" },
270
- { "internalType": "address", "name": "token1", "type": "address" },
271
- { "internalType": "uint24", "name": "fee", "type": "uint24" },
272
- { "internalType": "int24", "name": "tickLower", "type": "int24" },
273
- { "internalType": "int24", "name": "tickUpper", "type": "int24" },
274
- {
275
- "internalType": "uint256",
276
- "name": "amount0Min",
277
- "type": "uint256"
278
- },
279
- {
280
- "internalType": "uint256",
281
- "name": "amount1Min",
282
- "type": "uint256"
283
- },
284
- { "internalType": "address", "name": "recipient", "type": "address" }
285
- ],
286
- "internalType": "struct IApproveAndCall.MintParams",
287
- "name": "params",
288
- "type": "tuple"
289
- }
290
- ],
291
- "name": "mint",
292
- "outputs": [{ "internalType": "bytes", "name": "result", "type": "bytes" }],
293
- "stateMutability": "payable",
294
- "type": "function"
295
- },
296
- {
297
- "inputs": [
298
- {
299
- "internalType": "bytes32",
300
- "name": "previousBlockhash",
301
- "type": "bytes32"
302
- },
303
- { "internalType": "bytes[]", "name": "data", "type": "bytes[]" }
304
- ],
305
- "name": "multicall",
306
- "outputs": [{ "internalType": "bytes[]", "name": "", "type": "bytes[]" }],
307
- "stateMutability": "payable",
308
- "type": "function"
309
- },
310
- {
311
- "inputs": [
312
- { "internalType": "uint256", "name": "deadline", "type": "uint256" },
313
- { "internalType": "bytes[]", "name": "data", "type": "bytes[]" }
314
- ],
315
- "name": "multicall",
316
- "outputs": [{ "internalType": "bytes[]", "name": "", "type": "bytes[]" }],
317
- "stateMutability": "payable",
318
- "type": "function"
319
- },
320
- {
321
- "inputs": [
322
- { "internalType": "bytes[]", "name": "data", "type": "bytes[]" }
323
- ],
324
- "name": "multicall",
325
- "outputs": [
326
- { "internalType": "bytes[]", "name": "results", "type": "bytes[]" }
327
- ],
328
- "stateMutability": "payable",
329
- "type": "function"
330
- },
331
- {
332
- "inputs": [],
333
- "name": "positionManager",
334
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
335
- "stateMutability": "view",
336
- "type": "function"
337
- },
338
- {
339
- "inputs": [
340
- { "internalType": "address", "name": "token", "type": "address" },
341
- { "internalType": "uint256", "name": "value", "type": "uint256" }
342
- ],
343
- "name": "pull",
344
- "outputs": [],
345
- "stateMutability": "payable",
346
- "type": "function"
347
- },
348
- {
349
- "inputs": [],
350
- "name": "refundETH",
351
- "outputs": [],
352
- "stateMutability": "payable",
353
- "type": "function"
354
- },
355
- {
356
- "inputs": [
357
- { "internalType": "address", "name": "token", "type": "address" },
358
- { "internalType": "uint256", "name": "value", "type": "uint256" },
359
- { "internalType": "uint256", "name": "deadline", "type": "uint256" },
360
- { "internalType": "uint8", "name": "v", "type": "uint8" },
361
- { "internalType": "bytes32", "name": "r", "type": "bytes32" },
362
- { "internalType": "bytes32", "name": "s", "type": "bytes32" }
363
- ],
364
- "name": "selfPermit",
365
- "outputs": [],
366
- "stateMutability": "payable",
367
- "type": "function"
368
- },
369
- {
370
- "inputs": [
371
- { "internalType": "address", "name": "token", "type": "address" },
372
- { "internalType": "uint256", "name": "nonce", "type": "uint256" },
373
- { "internalType": "uint256", "name": "expiry", "type": "uint256" },
374
- { "internalType": "uint8", "name": "v", "type": "uint8" },
375
- { "internalType": "bytes32", "name": "r", "type": "bytes32" },
376
- { "internalType": "bytes32", "name": "s", "type": "bytes32" }
377
- ],
378
- "name": "selfPermitAllowed",
379
- "outputs": [],
380
- "stateMutability": "payable",
381
- "type": "function"
382
- },
383
- {
384
- "inputs": [
385
- { "internalType": "address", "name": "token", "type": "address" },
386
- { "internalType": "uint256", "name": "nonce", "type": "uint256" },
387
- { "internalType": "uint256", "name": "expiry", "type": "uint256" },
388
- { "internalType": "uint8", "name": "v", "type": "uint8" },
389
- { "internalType": "bytes32", "name": "r", "type": "bytes32" },
390
- { "internalType": "bytes32", "name": "s", "type": "bytes32" }
391
- ],
392
- "name": "selfPermitAllowedIfNecessary",
393
- "outputs": [],
394
- "stateMutability": "payable",
395
- "type": "function"
396
- },
397
- {
398
- "inputs": [
399
- { "internalType": "address", "name": "token", "type": "address" },
400
- { "internalType": "uint256", "name": "value", "type": "uint256" },
401
- { "internalType": "uint256", "name": "deadline", "type": "uint256" },
402
- { "internalType": "uint8", "name": "v", "type": "uint8" },
403
- { "internalType": "bytes32", "name": "r", "type": "bytes32" },
404
- { "internalType": "bytes32", "name": "s", "type": "bytes32" }
405
- ],
406
- "name": "selfPermitIfNecessary",
407
- "outputs": [],
408
- "stateMutability": "payable",
409
- "type": "function"
410
- },
411
- {
412
- "inputs": [
413
- { "internalType": "uint256", "name": "amountIn", "type": "uint256" },
414
- { "internalType": "uint256", "name": "amountOutMin", "type": "uint256" },
415
- { "internalType": "address[]", "name": "path", "type": "address[]" },
416
- { "internalType": "address", "name": "to", "type": "address" }
417
- ],
418
- "name": "swapExactTokensForTokens",
419
- "outputs": [
420
- { "internalType": "uint256", "name": "amountOut", "type": "uint256" }
421
- ],
422
- "stateMutability": "payable",
423
- "type": "function"
424
- },
425
- {
426
- "inputs": [
427
- { "internalType": "uint256", "name": "amountOut", "type": "uint256" },
428
- { "internalType": "uint256", "name": "amountInMax", "type": "uint256" },
429
- { "internalType": "address[]", "name": "path", "type": "address[]" },
430
- { "internalType": "address", "name": "to", "type": "address" }
431
- ],
432
- "name": "swapTokensForExactTokens",
433
- "outputs": [
434
- { "internalType": "uint256", "name": "amountIn", "type": "uint256" }
435
- ],
436
- "stateMutability": "payable",
437
- "type": "function"
438
- },
439
- {
440
- "inputs": [
441
- { "internalType": "address", "name": "token", "type": "address" },
442
- { "internalType": "uint256", "name": "amountMinimum", "type": "uint256" },
443
- { "internalType": "address", "name": "recipient", "type": "address" }
444
- ],
445
- "name": "sweepToken",
446
- "outputs": [],
447
- "stateMutability": "payable",
448
- "type": "function"
449
- },
450
- {
451
- "inputs": [
452
- { "internalType": "address", "name": "token", "type": "address" },
453
- { "internalType": "uint256", "name": "amountMinimum", "type": "uint256" }
454
- ],
455
- "name": "sweepToken",
456
- "outputs": [],
457
- "stateMutability": "payable",
458
- "type": "function"
459
- },
460
- {
461
- "inputs": [
462
- { "internalType": "address", "name": "token", "type": "address" },
463
- { "internalType": "uint256", "name": "amountMinimum", "type": "uint256" },
464
- { "internalType": "uint256", "name": "feeBips", "type": "uint256" },
465
- { "internalType": "address", "name": "feeRecipient", "type": "address" }
466
- ],
467
- "name": "sweepTokenWithFee",
468
- "outputs": [],
469
- "stateMutability": "payable",
470
- "type": "function"
471
- },
472
- {
473
- "inputs": [
474
- { "internalType": "address", "name": "token", "type": "address" },
475
- { "internalType": "uint256", "name": "amountMinimum", "type": "uint256" },
476
- { "internalType": "address", "name": "recipient", "type": "address" },
477
- { "internalType": "uint256", "name": "feeBips", "type": "uint256" },
478
- { "internalType": "address", "name": "feeRecipient", "type": "address" }
479
- ],
480
- "name": "sweepTokenWithFee",
481
- "outputs": [],
482
- "stateMutability": "payable",
483
- "type": "function"
484
- },
485
- {
486
- "inputs": [
487
- { "internalType": "int256", "name": "amount0Delta", "type": "int256" },
488
- { "internalType": "int256", "name": "amount1Delta", "type": "int256" },
489
- { "internalType": "bytes", "name": "_data", "type": "bytes" }
490
- ],
491
- "name": "uniswapV3SwapCallback",
492
- "outputs": [],
493
- "stateMutability": "nonpayable",
494
- "type": "function"
495
- },
496
- {
497
- "inputs": [
498
- { "internalType": "uint256", "name": "amountMinimum", "type": "uint256" },
499
- { "internalType": "address", "name": "recipient", "type": "address" }
500
- ],
501
- "name": "unwrapWETH9",
502
- "outputs": [],
503
- "stateMutability": "payable",
504
- "type": "function"
505
- },
506
- {
507
- "inputs": [
508
- { "internalType": "uint256", "name": "amountMinimum", "type": "uint256" }
509
- ],
510
- "name": "unwrapWETH9",
511
- "outputs": [],
512
- "stateMutability": "payable",
513
- "type": "function"
514
- },
515
- {
516
- "inputs": [
517
- { "internalType": "uint256", "name": "amountMinimum", "type": "uint256" },
518
- { "internalType": "address", "name": "recipient", "type": "address" },
519
- { "internalType": "uint256", "name": "feeBips", "type": "uint256" },
520
- { "internalType": "address", "name": "feeRecipient", "type": "address" }
521
- ],
522
- "name": "unwrapWETH9WithFee",
523
- "outputs": [],
524
- "stateMutability": "payable",
525
- "type": "function"
526
- },
527
- {
528
- "inputs": [
529
- { "internalType": "uint256", "name": "amountMinimum", "type": "uint256" },
530
- { "internalType": "uint256", "name": "feeBips", "type": "uint256" },
531
- { "internalType": "address", "name": "feeRecipient", "type": "address" }
532
- ],
533
- "name": "unwrapWETH9WithFee",
534
- "outputs": [],
535
- "stateMutability": "payable",
536
- "type": "function"
537
- },
538
- {
539
- "inputs": [
540
- { "internalType": "uint256", "name": "value", "type": "uint256" }
541
- ],
542
- "name": "wrapETH",
543
- "outputs": [],
544
- "stateMutability": "payable",
545
- "type": "function"
546
- },
547
- { "stateMutability": "payable", "type": "receive" }
548
- ]
@@ -1,15 +0,0 @@
1
- import { CommonPoolState } from '../types';
2
- export declare const Akron: {
3
- type: "Akron";
4
- apiName: "AKRON";
5
- };
6
- export type AkronConfig = {
7
- type: typeof Akron.type;
8
- apiName: typeof Akron.apiName;
9
- hookAddress: string;
10
- };
11
- export type AkronHookState = {
12
- weights: ReadonlyArray<bigint>;
13
- minimumSwapFeePercentage: bigint;
14
- };
15
- export declare function isAkronPoolState(poolState: any): poolState is CommonPoolState;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Akron = void 0;
4
- exports.isAkronPoolState = isAkronPoolState;
5
- const config_1 = require("../config");
6
- exports.Akron = {
7
- type: 'Akron',
8
- apiName: 'AKRON',
9
- };
10
- function isAkronPoolState(poolState) {
11
- return (poolState &&
12
- typeof poolState === 'object' &&
13
- 'poolType' in poolState &&
14
- poolState.poolType === config_1.SUPPORTED_POOLS.WEIGHTED &&
15
- 'hookType' in poolState &&
16
- poolState.hookType === exports.Akron.type &&
17
- 'weights' in poolState &&
18
- 'swapFee' in poolState);
19
- }
20
- //# sourceMappingURL=akronHook.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"akronHook.js","sourceRoot":"","sources":["../../../../src/dex/balancer-v3/hooks/akronHook.ts"],"names":[],"mappings":";;;AAoBA,4CAWC;AA/BD,sCAA4C;AAI/B,QAAA,KAAK,GAAG;IACnB,IAAI,EAAE,OAAgB;IACtB,OAAO,EAAE,OAAgB;CAC1B,CAAC;AAaF,SAAgB,gBAAgB,CAAC,SAAc;IAC7C,OAAO,CACL,SAAS;QACT,OAAO,SAAS,KAAK,QAAQ;QAC7B,UAAU,IAAI,SAAS;QACvB,SAAS,CAAC,QAAQ,KAAK,wBAAe,CAAC,QAAQ;QAC/C,UAAU,IAAI,SAAS;QACvB,SAAS,CAAC,QAAQ,KAAK,aAAK,CAAC,IAAI;QACjC,SAAS,IAAI,SAAS;QACtB,SAAS,IAAI,SAAS,CACvB,CAAC;AACJ,CAAC"}
@@ -1,17 +0,0 @@
1
- import { BufferState } from '@balancer-labs/balancer-maths';
2
- import { CommonPoolState, PoolState } from './types';
3
- export interface QuantAMMMutableState {
4
- lastUpdateTime: bigint;
5
- firstFourWeightsAndMultipliers: bigint[];
6
- secondFourWeightsAndMultipliers: bigint[];
7
- lastInteropTime: bigint;
8
- currentTimestamp: bigint;
9
- }
10
- export type QuantAmmImmutable = {
11
- maxTradeSizeRatio: bigint;
12
- };
13
- export type QauntAMMPoolState = CommonPoolState & QuantAMMMutableState & QuantAmmImmutable;
14
- export declare function isQuantAMMMutableState(poolState: any): poolState is QuantAMMMutableState;
15
- export declare function isQuantAMMPoolState(poolState: PoolState | BufferState): boolean;
16
- export declare function updateLatestQuantAMMState(poolState: QauntAMMPoolState, timestamp: bigint): void;
17
- export declare function updateQuantAMMPoolState(poolState: QauntAMMPoolState, weightsAndMultipliers: string[], lastUpdateTime: string, lastInterpolationTimePossible: string): void;
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isQuantAMMMutableState = isQuantAMMMutableState;
4
- exports.isQuantAMMPoolState = isQuantAMMPoolState;
5
- exports.updateLatestQuantAMMState = updateLatestQuantAMMState;
6
- exports.updateQuantAMMPoolState = updateQuantAMMPoolState;
7
- function isQuantAMMMutableState(poolState) {
8
- return (poolState &&
9
- typeof poolState === 'object' &&
10
- 'lastUpdateTime' in poolState &&
11
- 'firstFourWeightsAndMultipliers' in poolState &&
12
- 'secondFourWeightsAndMultipliers' in poolState &&
13
- 'lastInteropTime' in poolState);
14
- }
15
- function isQuantAMMPoolState(poolState) {
16
- return (poolState.poolType === 'QUANT_AMM_WEIGHTED' &&
17
- isQuantAMMMutableState(poolState));
18
- }
19
- function updateLatestQuantAMMState(poolState, timestamp) {
20
- poolState.currentTimestamp = timestamp;
21
- }
22
- function updateQuantAMMPoolState(poolState, weightsAndMultipliers, lastUpdateTime, lastInterpolationTimePossible) {
23
- const firstFourWeightsAndMultipliers = new Array(8);
24
- const secondFourWeightsAndMultipliers = new Array(8);
25
- for (let i = 0; i < 4; i++) {
26
- // w,w,w,w,w,w,w,w,m,m,m,m,m,m,m,m
27
- // First 4 elements go to firstFourWeightsAndMultipliers[0-3]
28
- firstFourWeightsAndMultipliers[i] = BigInt(weightsAndMultipliers[i]);
29
- // Next 4 elements go to secondFourWeightsAndMultipliers[0-3]
30
- secondFourWeightsAndMultipliers[i] = BigInt(weightsAndMultipliers[i + 4]);
31
- // Next 4 elements go to firstFourWeightsAndMultipliers[4-7]
32
- firstFourWeightsAndMultipliers[i + 4] = BigInt(weightsAndMultipliers[i + 8]);
33
- // Last 4 elements go to secondFourWeightsAndMultipliers[4-7]
34
- secondFourWeightsAndMultipliers[i + 4] = BigInt(weightsAndMultipliers[i + 12]);
35
- }
36
- // Update the pool state
37
- poolState.firstFourWeightsAndMultipliers = firstFourWeightsAndMultipliers;
38
- poolState.secondFourWeightsAndMultipliers = secondFourWeightsAndMultipliers;
39
- // Update timestamps
40
- poolState.lastUpdateTime = BigInt(lastUpdateTime);
41
- poolState.lastInteropTime = BigInt(lastInterpolationTimePossible);
42
- }
43
- //# sourceMappingURL=quantAMMPool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"quantAMMPool.js","sourceRoot":"","sources":["../../../src/dex/balancer-v3/quantAMMPool.ts"],"names":[],"mappings":";;AAoBA,wDAWC;AAED,kDAKC;AAED,8DAKC;AAED,0DAmCC;AA9DD,SAAgB,sBAAsB,CACpC,SAAc;IAEd,OAAO,CACL,SAAS;QACT,OAAO,SAAS,KAAK,QAAQ;QAC7B,gBAAgB,IAAI,SAAS;QAC7B,gCAAgC,IAAI,SAAS;QAC7C,iCAAiC,IAAI,SAAS;QAC9C,iBAAiB,IAAI,SAAS,CAC/B,CAAC;AACJ,CAAC;AAED,SAAgB,mBAAmB,CAAC,SAAkC;IACpE,OAAO,CACL,SAAS,CAAC,QAAQ,KAAK,oBAAoB;QAC3C,sBAAsB,CAAC,SAAS,CAAC,CAClC,CAAC;AACJ,CAAC;AAED,SAAgB,yBAAyB,CACvC,SAA4B,EAC5B,SAAiB;IAEjB,SAAS,CAAC,gBAAgB,GAAG,SAAS,CAAC;AACzC,CAAC;AAED,SAAgB,uBAAuB,CACrC,SAA4B,EAC5B,qBAA+B,EAC/B,cAAsB,EACtB,6BAAqC;IAErC,MAAM,8BAA8B,GAAa,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;IAC9D,MAAM,+BAA+B,GAAa,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;IAE/D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,kCAAkC;QAClC,6DAA6D;QAC7D,8BAA8B,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC;QAErE,6DAA6D;QAC7D,+BAA+B,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAE1E,4DAA4D;QAC5D,8BAA8B,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAC5C,qBAAqB,CAAC,CAAC,GAAG,CAAC,CAAC,CAC7B,CAAC;QAEF,6DAA6D;QAC7D,+BAA+B,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,CAC7C,qBAAqB,CAAC,CAAC,GAAG,EAAE,CAAC,CAC9B,CAAC;IACJ,CAAC;IAED,wBAAwB;IACxB,SAAS,CAAC,8BAA8B,GAAG,8BAA8B,CAAC;IAC1E,SAAS,CAAC,+BAA+B,GAAG,+BAA+B,CAAC;IAE5E,oBAAoB;IACpB,SAAS,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;IAClD,SAAS,CAAC,eAAe,GAAG,MAAM,CAAC,6BAA6B,CAAC,CAAC;AACpE,CAAC"}