@paraswap/dex-lib 3.4.0 → 3.4.1

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 (360) 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/README.md +3 -3
  5. package/abis.txt +92 -0
  6. package/build/abi/uniswap-v3/AlienBaseV3Router.abi.json +52 -0
  7. package/build/abi/{integral/relayer.json → wombat/pool.json} +587 -446
  8. package/build/config.js +0 -35
  9. package/build/config.js.map +1 -1
  10. package/build/constants.d.ts +0 -1
  11. package/build/constants.js +0 -1
  12. package/build/constants.js.map +1 -1
  13. package/build/dex/augustus-rfq.js +0 -1
  14. package/build/dex/augustus-rfq.js.map +1 -1
  15. package/build/dex/curve-v1/config.js +1 -57
  16. package/build/dex/curve-v1/config.js.map +1 -1
  17. package/build/dex/curve-v1-factory/config.js +1 -1
  18. package/build/dex/curve-v1-factory/config.js.map +1 -1
  19. package/build/dex/etherfi.js +1 -1
  20. package/build/dex/gmx/gmx.js.map +1 -1
  21. package/build/dex/index.js +0 -14
  22. package/build/dex/index.js.map +1 -1
  23. package/build/dex/nerve/config.js +0 -399
  24. package/build/dex/nerve/config.js.map +1 -1
  25. package/build/dex/paraswap-limit-orders/config.js +0 -7
  26. package/build/dex/paraswap-limit-orders/config.js.map +1 -1
  27. package/build/dex/quick-perps/quick-perps.js.map +1 -1
  28. package/build/dex/quickswap/config.js +0 -8
  29. package/build/dex/quickswap/config.js.map +1 -1
  30. package/build/dex/solidly/config.js +1 -27
  31. package/build/dex/solidly/config.js.map +1 -1
  32. package/build/dex/solidly/solidly.js +0 -2
  33. package/build/dex/solidly/solidly.js.map +1 -1
  34. package/build/dex/solidly-v3/scripts/check-event-pool-event.d.ts +1 -0
  35. package/build/dex/solidly-v3/scripts/check-event-pool-event.js +53 -0
  36. package/build/dex/solidly-v3/scripts/check-event-pool-event.js.map +1 -0
  37. package/build/dex/stable-pool/stable-pool.js +1 -8
  38. package/build/dex/stable-pool/stable-pool.js.map +1 -1
  39. package/build/dex/stable-pool.js +1 -8
  40. package/build/dex/stable-pool.js.map +1 -1
  41. package/build/dex/uniswap-v2/config.js +0 -152
  42. package/build/dex/uniswap-v2/config.js.map +1 -1
  43. package/build/dex/uniswap-v2/constants.js +0 -1
  44. package/build/dex/uniswap-v2/constants.js.map +1 -1
  45. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.d.ts +17 -0
  46. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js +64 -0
  47. package/build/dex/uniswap-v3/forks/alien-base-v3/alien-base-v3.js.map +1 -0
  48. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.d.ts +17 -0
  49. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js +79 -0
  50. package/build/dex/uniswap-v3/forks/alien-v3/alien-v3.js.map +1 -0
  51. package/build/dex/weth/config.js +0 -3
  52. package/build/dex/weth/config.js.map +1 -1
  53. package/build/dex/wsteth/wsteth.js.map +1 -1
  54. package/build/types.d.ts +0 -1
  55. package/package.json +1 -1
  56. package/src/config.ts +0 -39
  57. package/src/constants.ts +0 -1
  58. package/src/dex/augustus-rfq.ts +0 -1
  59. package/src/dex/curve-v1/config.ts +1 -57
  60. package/src/dex/curve-v1/curve-v1-e2e.test.ts +0 -51
  61. package/src/dex/curve-v1-factory/config.ts +1 -1
  62. package/src/dex/etherfi.ts +1 -1
  63. package/src/dex/gmx/gmx.ts +1 -4
  64. package/src/dex/index.ts +0 -14
  65. package/src/dex/nerve/config.ts +0 -400
  66. package/src/dex/nerve/nerve-e2e.test.ts +0 -507
  67. package/src/dex/nerve/nerve-events.test.ts +0 -268
  68. package/src/dex/paraswap-limit-orders/config.ts +0 -7
  69. package/src/dex/paraswap-limit-orders/paraswap-limit-orders-e2e.test.ts +2 -2
  70. package/src/dex/paraswap-limit-orders/paraswap-limit-orders-integration.test.ts +1 -1
  71. package/src/dex/quick-perps/quick-perps.ts +1 -4
  72. package/src/dex/quickswap/config.ts +0 -9
  73. package/src/dex/quickswap/quickswap-e2e.test.ts +0 -97
  74. package/src/dex/solidly/config.ts +1 -30
  75. package/src/dex/solidly/solidly-e2e.test.ts +0 -280
  76. package/src/dex/solidly/solidly-integration.test.ts +0 -135
  77. package/src/dex/solidly/solidly.ts +0 -2
  78. package/src/dex/stable-pool/stable-pool.ts +1 -8
  79. package/src/dex/uniswap-v2/config.ts +0 -185
  80. package/src/dex/uniswap-v2/constants.ts +0 -1
  81. package/src/dex/uniswap-v2/uniswap-v2-e2e-avalanche.test.ts +0 -272
  82. package/src/dex/uniswap-v2/uniswap-v2-e2e-base.test.ts +0 -6
  83. package/src/dex/uniswap-v2/uniswap-v2-e2e-bsc.test.ts +0 -325
  84. package/src/dex/uniswap-v2/uniswap-v2-e2e-mainnet.test.ts +0 -175
  85. package/src/dex/uniswap-v2/uniswap-v2-e2e-polygon.test.ts +0 -413
  86. package/src/dex/weth/config.ts +0 -3
  87. package/src/dex/wsteth/wsteth.ts +1 -4
  88. package/src/types.ts +0 -1
  89. package/tests/constants-e2e.ts +0 -21
  90. package/tests/generate-new-limit-order.ts +1 -1
  91. package/.idea/aws.xml +0 -17
  92. package/.idea/codeStyles/Project.xml +0 -19
  93. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  94. package/.idea/misc.xml +0 -6
  95. package/.idea/modules.xml +0 -8
  96. package/.idea/paraswap-dex-lib.iml +0 -9
  97. package/.idea/prettier.xml +0 -7
  98. package/.idea/vcs.xml +0 -6
  99. package/build/abi/AugustusV6.abi.json +0 -395
  100. package/build/abi/algebra/AlgebraPool.abi.json +0 -727
  101. package/build/abi/curve-v1/StableSwapFRXETH.json +0 -889
  102. package/build/abi/curve-v1/StableSwapWBETH.json +0 -1223
  103. package/build/abi/sushiswap-v3/QuoterV2.json +0 -267
  104. package/build/abi/sushiswap-v3/RouterProcessor3.json +0 -289
  105. package/build/abi/uniswap-v3/UniswapV3Quoter.abi.json +0 -193
  106. package/build/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3QuoterV2.abi.json +0 -285
  107. package/build/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3Router.abi.json +0 -583
  108. package/build/abi/wBETH.json +0 -1527
  109. package/build/abi/woo-fi/WooFeeManager.abi.json +0 -318
  110. package/build/abi/woo-fi/WooPP.abi.json +0 -548
  111. package/build/abi/woo-fi/Wooracle.abi.json +0 -260
  112. package/build/dex/aave-v3/tokens/arbitrum.json +0 -50
  113. package/build/dex/aave-v3/tokens/avalanche.json +0 -74
  114. package/build/dex/aave-v3/tokens/fantom.json +0 -62
  115. package/build/dex/aave-v3/tokens/optimism.json +0 -50
  116. package/build/dex/aave-v3/tokens/polygon.json +0 -116
  117. package/build/dex/algebra/algebra-pool.d.ts +0 -114
  118. package/build/dex/algebra/algebra-pool.js +0 -448
  119. package/build/dex/algebra/algebra-pool.js.map +0 -1
  120. package/build/dex/balancer-v2/Gyro3Pool.d.ts +0 -43
  121. package/build/dex/balancer-v2/Gyro3Pool.js +0 -160
  122. package/build/dex/balancer-v2/Gyro3Pool.js.map +0 -1
  123. package/build/dex/balancer-v2/LinearMath.d.ts +0 -88
  124. package/build/dex/balancer-v2/LinearMath.js +0 -285
  125. package/build/dex/balancer-v2/LinearMath.js.map +0 -1
  126. package/build/dex/balancer-v2/LinearPool.d.ts +0 -81
  127. package/build/dex/balancer-v2/LinearPool.js +0 -444
  128. package/build/dex/balancer-v2/LinearPool.js.map +0 -1
  129. package/build/dex/balancer-v2/PhantomStablePool.d.ts +0 -90
  130. package/build/dex/balancer-v2/PhantomStablePool.js +0 -418
  131. package/build/dex/balancer-v2/PhantomStablePool.js.map +0 -1
  132. package/build/dex/balancer-v2/StableMath.d.ts +0 -9
  133. package/build/dex/balancer-v2/StableMath.js +0 -272
  134. package/build/dex/balancer-v2/StableMath.js.map +0 -1
  135. package/build/dex/balancer-v2/balancer-v2-pool.d.ts +0 -140
  136. package/build/dex/balancer-v2/balancer-v2-pool.js +0 -647
  137. package/build/dex/balancer-v2/balancer-v2-pool.js.map +0 -1
  138. package/build/dex/curve-v1/pools/frxETHpool.d.ts +0 -7
  139. package/build/dex/curve-v1/pools/frxETHpool.js +0 -27
  140. package/build/dex/curve-v1/pools/frxETHpool.js.map +0 -1
  141. package/build/dex/curve-v1/pools/wbETHpool.d.ts +0 -29
  142. package/build/dex/curve-v1/pools/wbETHpool.js +0 -408
  143. package/build/dex/curve-v1/pools/wbETHpool.js.map +0 -1
  144. package/build/dex/integral/config.d.ts +0 -4
  145. package/build/dex/integral/config.js +0 -18
  146. package/build/dex/integral/config.js.map +0 -1
  147. package/build/dex/integral/integral-pool.d.ts +0 -39
  148. package/build/dex/integral/integral-pool.js +0 -67
  149. package/build/dex/integral/integral-pool.js.map +0 -1
  150. package/build/dex/integral/integral.d.ts +0 -48
  151. package/build/dex/integral/integral.js +0 -402
  152. package/build/dex/integral/integral.js.map +0 -1
  153. package/build/dex/integral/types.d.ts +0 -25
  154. package/build/dex/integral/types.js +0 -9
  155. package/build/dex/integral/types.js.map +0 -1
  156. package/build/dex/lighter-v1/abi/erc20.json +0 -222
  157. package/build/dex/lighter-v1/abi/factory.json +0 -291
  158. package/build/dex/lighter-v1/abi/order_book.json +0 -594
  159. package/build/dex/lighter-v1/abi/order_book_helper.json +0 -176
  160. package/build/dex/lighter-v1/abi/router.json +0 -488
  161. package/build/dex/lighter-v1/config.d.ts +0 -4
  162. package/build/dex/lighter-v1/config.js +0 -17
  163. package/build/dex/lighter-v1/config.js.map +0 -1
  164. package/build/dex/lighter-v1/constants.d.ts +0 -2
  165. package/build/dex/lighter-v1/constants.js +0 -13
  166. package/build/dex/lighter-v1/constants.js.map +0 -1
  167. package/build/dex/lighter-v1/lighter-v1-pool.d.ts +0 -57
  168. package/build/dex/lighter-v1/lighter-v1-pool.js +0 -310
  169. package/build/dex/lighter-v1/lighter-v1-pool.js.map +0 -1
  170. package/build/dex/lighter-v1/lighter-v1.d.ts +0 -45
  171. package/build/dex/lighter-v1/lighter-v1.js +0 -331
  172. package/build/dex/lighter-v1/lighter-v1.js.map +0 -1
  173. package/build/dex/lighter-v1/types.d.ts +0 -40
  174. package/build/dex/lighter-v1/types.js +0 -3
  175. package/build/dex/lighter-v1/types.js.map +0 -1
  176. package/build/dex/pancakeswap-v3/types.d.ts +0 -14
  177. package/build/dex/pancakeswap-v3/types.js +0 -3
  178. package/build/dex/pancakeswap-v3/types.js.map +0 -1
  179. package/build/dex/quickswap/camelot-v3.d.ts +0 -6
  180. package/build/dex/quickswap/camelot-v3.js +0 -19
  181. package/build/dex/quickswap/camelot-v3.js.map +0 -1
  182. package/build/dex/quickswap/zyberswap-v3.d.ts +0 -6
  183. package/build/dex/quickswap/zyberswap-v3.js +0 -19
  184. package/build/dex/quickswap/zyberswap-v3.js.map +0 -1
  185. package/build/dex/quickswap-v3.d.ts +0 -21
  186. package/build/dex/quickswap-v3.js +0 -40
  187. package/build/dex/quickswap-v3.js.map +0 -1
  188. package/build/dex/ramses-v2/config.d.ts +0 -4
  189. package/build/dex/ramses-v2/config.js +0 -28
  190. package/build/dex/ramses-v2/config.js.map +0 -1
  191. package/build/dex/ramses-v2/constants.d.ts +0 -28
  192. package/build/dex/ramses-v2/constants.js +0 -35
  193. package/build/dex/ramses-v2/constants.js.map +0 -1
  194. package/build/dex/ramses-v2/contract-math/BitMath.d.ts +0 -4
  195. package/build/dex/ramses-v2/contract-math/BitMath.js +0 -93
  196. package/build/dex/ramses-v2/contract-math/BitMath.js.map +0 -1
  197. package/build/dex/ramses-v2/contract-math/FixedPoint128.d.ts +0 -3
  198. package/build/dex/ramses-v2/contract-math/FixedPoint128.js +0 -8
  199. package/build/dex/ramses-v2/contract-math/FixedPoint128.js.map +0 -1
  200. package/build/dex/ramses-v2/contract-math/FixedPoint96.d.ts +0 -4
  201. package/build/dex/ramses-v2/contract-math/FixedPoint96.js +0 -9
  202. package/build/dex/ramses-v2/contract-math/FixedPoint96.js.map +0 -1
  203. package/build/dex/ramses-v2/contract-math/FullMath.d.ts +0 -4
  204. package/build/dex/ramses-v2/contract-math/FullMath.js +0 -19
  205. package/build/dex/ramses-v2/contract-math/FullMath.js.map +0 -1
  206. package/build/dex/ramses-v2/contract-math/LiquidityMath.d.ts +0 -3
  207. package/build/dex/ramses-v2/contract-math/LiquidityMath.js +0 -22
  208. package/build/dex/ramses-v2/contract-math/LiquidityMath.js.map +0 -1
  209. package/build/dex/ramses-v2/contract-math/Oracle.d.ts +0 -10
  210. package/build/dex/ramses-v2/contract-math/Oracle.js +0 -133
  211. package/build/dex/ramses-v2/contract-math/Oracle.js.map +0 -1
  212. package/build/dex/ramses-v2/contract-math/SqrtPriceMath.d.ts +0 -10
  213. package/build/dex/ramses-v2/contract-math/SqrtPriceMath.js +0 -91
  214. package/build/dex/ramses-v2/contract-math/SqrtPriceMath.js.map +0 -1
  215. package/build/dex/ramses-v2/contract-math/SwapMath.d.ts +0 -8
  216. package/build/dex/ramses-v2/contract-math/SwapMath.js +0 -70
  217. package/build/dex/ramses-v2/contract-math/SwapMath.js.map +0 -1
  218. package/build/dex/ramses-v2/contract-math/Tick.d.ts +0 -7
  219. package/build/dex/ramses-v2/contract-math/Tick.js +0 -45
  220. package/build/dex/ramses-v2/contract-math/Tick.js.map +0 -1
  221. package/build/dex/ramses-v2/contract-math/TickBitMap.d.ts +0 -8
  222. package/build/dex/ramses-v2/contract-math/TickBitMap.js +0 -87
  223. package/build/dex/ramses-v2/contract-math/TickBitMap.js.map +0 -1
  224. package/build/dex/ramses-v2/contract-math/TickMath.d.ts +0 -8
  225. package/build/dex/ramses-v2/contract-math/TickMath.js +0 -162
  226. package/build/dex/ramses-v2/contract-math/TickMath.js.map +0 -1
  227. package/build/dex/ramses-v2/contract-math/UnsafeMath.d.ts +0 -3
  228. package/build/dex/ramses-v2/contract-math/UnsafeMath.js +0 -10
  229. package/build/dex/ramses-v2/contract-math/UnsafeMath.js.map +0 -1
  230. package/build/dex/ramses-v2/contract-math/uniswap-v3-math.d.ts +0 -18
  231. package/build/dex/ramses-v2/contract-math/uniswap-v3-math.js +0 -392
  232. package/build/dex/ramses-v2/contract-math/uniswap-v3-math.js.map +0 -1
  233. package/build/dex/ramses-v2/contract-math/utils.d.ts +0 -3
  234. package/build/dex/ramses-v2/contract-math/utils.js +0 -16
  235. package/build/dex/ramses-v2/contract-math/utils.js.map +0 -1
  236. package/build/dex/ramses-v2/ramses-v2-pool.d.ts +0 -42
  237. package/build/dex/ramses-v2/ramses-v2-pool.js +0 -307
  238. package/build/dex/ramses-v2/ramses-v2-pool.js.map +0 -1
  239. package/build/dex/ramses-v2/ramses-v2.d.ts +0 -61
  240. package/build/dex/ramses-v2/ramses-v2.js +0 -690
  241. package/build/dex/ramses-v2/ramses-v2.js.map +0 -1
  242. package/build/dex/ramses-v2/types.d.ts +0 -154
  243. package/build/dex/ramses-v2/types.js +0 -9
  244. package/build/dex/ramses-v2/types.js.map +0 -1
  245. package/build/dex/ramses-v2/utils.d.ts +0 -6
  246. package/build/dex/ramses-v2/utils.js +0 -71
  247. package/build/dex/ramses-v2/utils.js.map +0 -1
  248. package/build/dex/solidly/forks-override/fvm.d.ts +0 -20
  249. package/build/dex/solidly/forks-override/fvm.js +0 -42
  250. package/build/dex/solidly/forks-override/fvm.js.map +0 -1
  251. package/build/dex/sushiswap-v3/config.d.ts +0 -4
  252. package/build/dex/sushiswap-v3/config.js +0 -132
  253. package/build/dex/sushiswap-v3/config.js.map +0 -1
  254. package/build/dex/sushiswap-v3/constants.d.ts +0 -4
  255. package/build/dex/sushiswap-v3/constants.js +0 -32
  256. package/build/dex/sushiswap-v3/constants.js.map +0 -1
  257. package/build/dex/sushiswap-v3/sushiswap-v3-original.d.ts +0 -56
  258. package/build/dex/sushiswap-v3/sushiswap-v3-original.js +0 -598
  259. package/build/dex/sushiswap-v3/sushiswap-v3-original.js.map +0 -1
  260. package/build/dex/sushiswap-v3/sushiswap-v3-pool.d.ts +0 -1
  261. package/build/dex/sushiswap-v3/sushiswap-v3-pool.js +0 -6
  262. package/build/dex/sushiswap-v3/sushiswap-v3-pool.js.map +0 -1
  263. package/build/dex/sushiswap-v3/sushiswap-v3.d.ts +0 -21
  264. package/build/dex/sushiswap-v3/sushiswap-v3.js +0 -58
  265. package/build/dex/sushiswap-v3/sushiswap-v3.js.map +0 -1
  266. package/build/dex/sushiswap-v3/token.d.ts +0 -6
  267. package/build/dex/sushiswap-v3/token.js +0 -23
  268. package/build/dex/sushiswap-v3/token.js.map +0 -1
  269. package/build/dex/sushiswap-v3/types.d.ts +0 -15
  270. package/build/dex/sushiswap-v3/types.js +0 -18
  271. package/build/dex/sushiswap-v3/types.js.map +0 -1
  272. package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.d.ts +0 -12
  273. package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.js +0 -23
  274. package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.js.map +0 -1
  275. package/build/dex/woo-fi/config.d.ts +0 -4
  276. package/build/dex/woo-fi/config.js +0 -141
  277. package/build/dex/woo-fi/config.js.map +0 -1
  278. package/build/dex/woo-fi/constants.d.ts +0 -5
  279. package/build/dex/woo-fi/constants.js +0 -20
  280. package/build/dex/woo-fi/constants.js.map +0 -1
  281. package/build/dex/woo-fi/types.d.ts +0 -48
  282. package/build/dex/woo-fi/types.js +0 -3
  283. package/build/dex/woo-fi/types.js.map +0 -1
  284. package/build/dex/woo-fi/woo-fi-decimal-math.d.ts +0 -14
  285. package/build/dex/woo-fi/woo-fi-decimal-math.js +0 -42
  286. package/build/dex/woo-fi/woo-fi-decimal-math.js.map +0 -1
  287. package/build/dex/woo-fi/woo-fi-math.d.ts +0 -31
  288. package/build/dex/woo-fi/woo-fi-math.js +0 -300
  289. package/build/dex/woo-fi/woo-fi-math.js.map +0 -1
  290. package/build/dex/woo-fi/woo-fi.d.ts +0 -65
  291. package/build/dex/woo-fi/woo-fi.js +0 -480
  292. package/build/dex/woo-fi/woo-fi.js.map +0 -1
  293. package/build/executor/IExecutorBytecodeBuilder.d.ts +0 -6
  294. package/build/executor/IExecutorBytecodeBuilder.js +0 -3
  295. package/build/executor/IExecutorBytecodeBuilder.js.map +0 -1
  296. package/src/abi/AaveV1_lending_pool.json +0 -27
  297. package/src/abi/platypus/asset.json +0 -490
  298. package/src/abi/platypus/avax-pool.json +0 -820
  299. package/src/abi/platypus/oracle.json +0 -119
  300. package/src/abi/platypus/pool.json +0 -677
  301. package/src/abi/smardex/all/smardex-router.json +0 -648
  302. package/src/abi/smardex/layer-1/smardex-factory.json +0 -242
  303. package/src/abi/smardex/layer-1/smardex-pool.json +0 -506
  304. package/src/abi/smardex/layer-2/smardex-factory.json +0 -185
  305. package/src/abi/smardex/layer-2/smardex-pool.json +0 -578
  306. package/src/abi/swaap-v1/asset.json +0 -490
  307. package/src/abi/swaap-v1/oracle.json +0 -119
  308. package/src/abi/swaap-v1/pool.json +0 -1346
  309. package/src/dex/aave-v1/aave-v1-e2e.test.ts +0 -105
  310. package/src/dex/aave-v1/aave-v1-integration.test.ts +0 -100
  311. package/src/dex/aave-v1/aave-v1.ts +0 -261
  312. package/src/dex/aave-v1/config.ts +0 -22
  313. package/src/dex/aave-v1/tokens-mainnet.json +0 -134
  314. package/src/dex/aave-v1/tokens.ts +0 -58
  315. package/src/dex/aave-v1/types.ts +0 -24
  316. package/src/dex/platypus/asset.ts +0 -139
  317. package/src/dex/platypus/config.ts +0 -72
  318. package/src/dex/platypus/platypus-e2e.test.ts +0 -168
  319. package/src/dex/platypus/platypus-events.test.ts +0 -167
  320. package/src/dex/platypus/platypus-integration.test.ts +0 -256
  321. package/src/dex/platypus/platypus.ts +0 -639
  322. package/src/dex/platypus/pool-avax.ts +0 -92
  323. package/src/dex/platypus/pool-base.ts +0 -155
  324. package/src/dex/platypus/pool-pure.ts +0 -71
  325. package/src/dex/platypus/pool-subscriber.ts +0 -239
  326. package/src/dex/platypus/pool.ts +0 -99
  327. package/src/dex/platypus/types.ts +0 -104
  328. package/src/dex/quickswap/spiritswap-v3.ts +0 -19
  329. package/src/dex/smardex/config.ts +0 -67
  330. package/src/dex/smardex/constants.ts +0 -35
  331. package/src/dex/smardex/sdk/constants.ts +0 -10
  332. package/src/dex/smardex/sdk/core.ts +0 -832
  333. package/src/dex/smardex/sdk/errors.ts +0 -18
  334. package/src/dex/smardex/sdk/types.ts +0 -68
  335. package/src/dex/smardex/sdk/utils.ts +0 -156
  336. package/src/dex/smardex/smardex-e2e.test.ts +0 -275
  337. package/src/dex/smardex/smardex-event-pool.ts +0 -164
  338. package/src/dex/smardex/smardex-events.test.ts +0 -297
  339. package/src/dex/smardex/smardex-integration.test.ts +0 -258
  340. package/src/dex/smardex/smardex.ts +0 -770
  341. package/src/dex/smardex/types.ts +0 -69
  342. package/src/dex/solidly/forks-override/cone.ts +0 -67
  343. package/src/dex/solidly/forks-override/solisnek.ts +0 -10
  344. package/src/dex/swaap-v1/config.ts +0 -62
  345. package/src/dex/swaap-v1/constants.ts +0 -22
  346. package/src/dex/swaap-v1/libraries/ChainlinkUtils.ts +0 -152
  347. package/src/dex/swaap-v1/libraries/Const.ts +0 -29
  348. package/src/dex/swaap-v1/libraries/GeometricBrownianMotion.ts +0 -433
  349. package/src/dex/swaap-v1/libraries/LogExpMath.ts +0 -511
  350. package/src/dex/swaap-v1/libraries/MathMMM.ts +0 -717
  351. package/src/dex/swaap-v1/libraries/Num.ts +0 -184
  352. package/src/dex/swaap-v1/libraries/PoolQuotations.ts +0 -322
  353. package/src/dex/swaap-v1/libraries/Struct.ts +0 -66
  354. package/src/dex/swaap-v1/swaap-v1-e2e.test.ts +0 -75
  355. package/src/dex/swaap-v1/swaap-v1-events.test.ts +0 -138
  356. package/src/dex/swaap-v1/swaap-v1-integration.test.ts +0 -232
  357. package/src/dex/swaap-v1/swaap-v1-pool.ts +0 -919
  358. package/src/dex/swaap-v1/swaap-v1.ts +0 -668
  359. package/src/dex/swaap-v1/types.ts +0 -124
  360. package/src/dex/uniswap-v2/uniswap-v2-e2e-ropsten.test.ts +0 -481
@@ -1,32 +1,21 @@
1
1
  [
2
- {
3
- "inputs": [],
4
- "stateMutability": "nonpayable",
5
- "type": "constructor"
6
- },
7
2
  {
8
3
  "anonymous": false,
9
4
  "inputs": [
10
5
  {
11
- "indexed": false,
6
+ "indexed": true,
12
7
  "internalType": "address",
13
8
  "name": "token",
14
9
  "type": "address"
15
10
  },
16
11
  {
17
- "indexed": false,
12
+ "indexed": true,
18
13
  "internalType": "address",
19
- "name": "to",
14
+ "name": "asset",
20
15
  "type": "address"
21
- },
22
- {
23
- "indexed": false,
24
- "internalType": "uint256",
25
- "name": "amount",
26
- "type": "uint256"
27
16
  }
28
17
  ],
29
- "name": "Approve",
18
+ "name": "AssetAdded",
30
19
  "type": "event"
31
20
  },
32
21
  {
@@ -35,49 +24,44 @@
35
24
  {
36
25
  "indexed": true,
37
26
  "internalType": "address",
38
- "name": "sender",
27
+ "name": "token",
39
28
  "type": "address"
40
29
  },
41
30
  {
42
- "indexed": false,
31
+ "indexed": true,
43
32
  "internalType": "address",
44
- "name": "tokenIn",
33
+ "name": "asset",
45
34
  "type": "address"
46
- },
35
+ }
36
+ ],
37
+ "name": "AssetRemoved",
38
+ "type": "event"
39
+ },
40
+ {
41
+ "anonymous": false,
42
+ "inputs": [
47
43
  {
48
- "indexed": false,
44
+ "indexed": true,
49
45
  "internalType": "address",
50
- "name": "tokenOut",
46
+ "name": "sender",
51
47
  "type": "address"
52
48
  },
53
49
  {
54
50
  "indexed": false,
55
- "internalType": "uint256",
56
- "name": "amountIn",
57
- "type": "uint256"
58
- },
59
- {
60
- "indexed": false,
61
- "internalType": "uint256",
62
- "name": "amountInMax",
63
- "type": "uint256"
51
+ "internalType": "address",
52
+ "name": "token",
53
+ "type": "address"
64
54
  },
65
55
  {
66
56
  "indexed": false,
67
57
  "internalType": "uint256",
68
- "name": "amountOut",
58
+ "name": "amount",
69
59
  "type": "uint256"
70
60
  },
71
- {
72
- "indexed": false,
73
- "internalType": "bool",
74
- "name": "wrapUnwrap",
75
- "type": "bool"
76
- },
77
61
  {
78
62
  "indexed": false,
79
63
  "internalType": "uint256",
80
- "name": "fee",
64
+ "name": "liquidity",
81
65
  "type": "uint256"
82
66
  },
83
67
  {
@@ -85,21 +69,28 @@
85
69
  "internalType": "address",
86
70
  "name": "to",
87
71
  "type": "address"
88
- },
72
+ }
73
+ ],
74
+ "name": "Deposit",
75
+ "type": "event"
76
+ },
77
+ {
78
+ "anonymous": false,
79
+ "inputs": [
89
80
  {
90
81
  "indexed": false,
91
82
  "internalType": "address",
92
- "name": "orderContract",
83
+ "name": "token",
93
84
  "type": "address"
94
85
  },
95
86
  {
96
- "indexed": true,
87
+ "indexed": false,
97
88
  "internalType": "uint256",
98
- "name": "orderId",
89
+ "name": "amount",
99
90
  "type": "uint256"
100
91
  }
101
92
  ],
102
- "name": "Buy",
93
+ "name": "FillPool",
103
94
  "type": "event"
104
95
  },
105
96
  {
@@ -107,12 +98,31 @@
107
98
  "inputs": [
108
99
  {
109
100
  "indexed": false,
101
+ "internalType": "uint8",
102
+ "name": "version",
103
+ "type": "uint8"
104
+ }
105
+ ],
106
+ "name": "Initialized",
107
+ "type": "event"
108
+ },
109
+ {
110
+ "anonymous": false,
111
+ "inputs": [
112
+ {
113
+ "indexed": true,
110
114
  "internalType": "address",
111
- "name": "delay",
115
+ "name": "previousOwner",
116
+ "type": "address"
117
+ },
118
+ {
119
+ "indexed": true,
120
+ "internalType": "address",
121
+ "name": "newOwner",
112
122
  "type": "address"
113
123
  }
114
124
  ],
115
- "name": "DelaySet",
125
+ "name": "OwnershipTransferred",
116
126
  "type": "event"
117
127
  },
118
128
  {
@@ -120,12 +130,12 @@
120
130
  "inputs": [
121
131
  {
122
132
  "indexed": false,
123
- "internalType": "uint256",
124
- "name": "gasCost",
125
- "type": "uint256"
133
+ "internalType": "address",
134
+ "name": "account",
135
+ "type": "address"
126
136
  }
127
137
  ],
128
- "name": "EthTransferGasCostSet",
138
+ "name": "Paused",
129
139
  "type": "event"
130
140
  },
131
141
  {
@@ -133,12 +143,18 @@
133
143
  "inputs": [
134
144
  {
135
145
  "indexed": false,
136
- "internalType": "uint256",
137
- "name": "limit",
138
- "type": "uint256"
146
+ "internalType": "address",
147
+ "name": "token",
148
+ "type": "address"
149
+ },
150
+ {
151
+ "indexed": false,
152
+ "internalType": "address",
153
+ "name": "account",
154
+ "type": "address"
139
155
  }
140
156
  ],
141
- "name": "ExecutionGasLimitSet",
157
+ "name": "PausedAsset",
142
158
  "type": "event"
143
159
  },
144
160
  {
@@ -147,11 +163,11 @@
147
163
  {
148
164
  "indexed": false,
149
165
  "internalType": "uint256",
150
- "name": "multiplier",
166
+ "name": "value",
151
167
  "type": "uint256"
152
168
  }
153
169
  ],
154
- "name": "GasPriceMultiplierSet",
170
+ "name": "SetAmpFactor",
155
171
  "type": "event"
156
172
  },
157
173
  {
@@ -160,23 +176,30 @@
160
176
  {
161
177
  "indexed": false,
162
178
  "internalType": "address",
163
- "name": "_factory",
179
+ "name": "addr",
164
180
  "type": "address"
165
- },
181
+ }
182
+ ],
183
+ "name": "SetDev",
184
+ "type": "event"
185
+ },
186
+ {
187
+ "anonymous": false,
188
+ "inputs": [
166
189
  {
167
190
  "indexed": false,
168
- "internalType": "address",
169
- "name": "_delay",
170
- "type": "address"
191
+ "internalType": "uint256",
192
+ "name": "lpDividendRatio",
193
+ "type": "uint256"
171
194
  },
172
195
  {
173
196
  "indexed": false,
174
- "internalType": "address",
175
- "name": "_weth",
176
- "type": "address"
197
+ "internalType": "uint256",
198
+ "name": "retentionRatio",
199
+ "type": "uint256"
177
200
  }
178
201
  ],
179
- "name": "Initialized",
202
+ "name": "SetFee",
180
203
  "type": "event"
181
204
  },
182
205
  {
@@ -185,11 +208,24 @@
185
208
  {
186
209
  "indexed": false,
187
210
  "internalType": "address",
188
- "name": "owner",
211
+ "name": "addr",
189
212
  "type": "address"
190
213
  }
191
214
  ],
192
- "name": "OwnerSet",
215
+ "name": "SetFeeTo",
216
+ "type": "event"
217
+ },
218
+ {
219
+ "anonymous": false,
220
+ "inputs": [
221
+ {
222
+ "indexed": false,
223
+ "internalType": "uint256",
224
+ "name": "value",
225
+ "type": "uint256"
226
+ }
227
+ ],
228
+ "name": "SetHaircutRate",
193
229
  "type": "event"
194
230
  },
195
231
  {
@@ -198,17 +234,24 @@
198
234
  {
199
235
  "indexed": false,
200
236
  "internalType": "address",
201
- "name": "pair",
237
+ "name": "addr",
202
238
  "type": "address"
203
- },
239
+ }
240
+ ],
241
+ "name": "SetMasterWombat",
242
+ "type": "event"
243
+ },
244
+ {
245
+ "anonymous": false,
246
+ "inputs": [
204
247
  {
205
248
  "indexed": false,
206
- "internalType": "bool",
207
- "name": "enabled",
208
- "type": "bool"
249
+ "internalType": "uint256",
250
+ "name": "value",
251
+ "type": "uint256"
209
252
  }
210
253
  ],
211
- "name": "PairEnabledSet",
254
+ "name": "SetMintFeeThreshold",
212
255
  "type": "event"
213
256
  },
214
257
  {
@@ -223,43 +266,25 @@
223
266
  {
224
267
  "indexed": false,
225
268
  "internalType": "address",
226
- "name": "tokenIn",
269
+ "name": "fromToken",
227
270
  "type": "address"
228
271
  },
229
272
  {
230
273
  "indexed": false,
231
274
  "internalType": "address",
232
- "name": "tokenOut",
275
+ "name": "toToken",
233
276
  "type": "address"
234
277
  },
235
278
  {
236
279
  "indexed": false,
237
280
  "internalType": "uint256",
238
- "name": "amountIn",
239
- "type": "uint256"
240
- },
241
- {
242
- "indexed": false,
243
- "internalType": "uint256",
244
- "name": "amountOut",
245
- "type": "uint256"
246
- },
247
- {
248
- "indexed": false,
249
- "internalType": "uint256",
250
- "name": "amountOutMin",
281
+ "name": "fromAmount",
251
282
  "type": "uint256"
252
283
  },
253
- {
254
- "indexed": false,
255
- "internalType": "bool",
256
- "name": "wrapUnwrap",
257
- "type": "bool"
258
- },
259
284
  {
260
285
  "indexed": false,
261
286
  "internalType": "uint256",
262
- "name": "fee",
287
+ "name": "toAmount",
263
288
  "type": "uint256"
264
289
  },
265
290
  {
@@ -267,21 +292,9 @@
267
292
  "internalType": "address",
268
293
  "name": "to",
269
294
  "type": "address"
270
- },
271
- {
272
- "indexed": false,
273
- "internalType": "address",
274
- "name": "orderContract",
275
- "type": "address"
276
- },
277
- {
278
- "indexed": true,
279
- "internalType": "uint256",
280
- "name": "orderId",
281
- "type": "uint256"
282
295
  }
283
296
  ],
284
- "name": "Sell",
297
+ "name": "Swap",
285
298
  "type": "event"
286
299
  },
287
300
  {
@@ -290,17 +303,23 @@
290
303
  {
291
304
  "indexed": false,
292
305
  "internalType": "address",
293
- "name": "pair",
306
+ "name": "token",
294
307
  "type": "address"
295
308
  },
296
309
  {
297
310
  "indexed": false,
298
311
  "internalType": "uint256",
299
- "name": "fee",
312
+ "name": "amount",
300
313
  "type": "uint256"
314
+ },
315
+ {
316
+ "indexed": false,
317
+ "internalType": "address",
318
+ "name": "to",
319
+ "type": "address"
301
320
  }
302
321
  ],
303
- "name": "SwapFeeSet",
322
+ "name": "TransferTipBucket",
304
323
  "type": "event"
305
324
  },
306
325
  {
@@ -309,17 +328,11 @@
309
328
  {
310
329
  "indexed": false,
311
330
  "internalType": "address",
312
- "name": "token",
331
+ "name": "account",
313
332
  "type": "address"
314
- },
315
- {
316
- "indexed": false,
317
- "internalType": "uint256",
318
- "name": "limit",
319
- "type": "uint256"
320
333
  }
321
334
  ],
322
- "name": "TokenLimitMaxMultiplierSet",
335
+ "name": "Unpaused",
323
336
  "type": "event"
324
337
  },
325
338
  {
@@ -333,76 +346,100 @@
333
346
  },
334
347
  {
335
348
  "indexed": false,
336
- "internalType": "uint256",
337
- "name": "limit",
338
- "type": "uint256"
349
+ "internalType": "address",
350
+ "name": "account",
351
+ "type": "address"
339
352
  }
340
353
  ],
341
- "name": "TokenLimitMinSet",
354
+ "name": "UnpausedAsset",
342
355
  "type": "event"
343
356
  },
344
357
  {
345
358
  "anonymous": false,
346
359
  "inputs": [
360
+ {
361
+ "indexed": true,
362
+ "internalType": "address",
363
+ "name": "sender",
364
+ "type": "address"
365
+ },
347
366
  {
348
367
  "indexed": false,
349
368
  "internalType": "address",
350
- "name": "pair",
369
+ "name": "token",
351
370
  "type": "address"
352
371
  },
353
372
  {
354
373
  "indexed": false,
355
- "internalType": "uint16",
356
- "name": "tolerance",
357
- "type": "uint16"
374
+ "internalType": "uint256",
375
+ "name": "amount",
376
+ "type": "uint256"
377
+ },
378
+ {
379
+ "indexed": false,
380
+ "internalType": "uint256",
381
+ "name": "liquidity",
382
+ "type": "uint256"
383
+ },
384
+ {
385
+ "indexed": true,
386
+ "internalType": "address",
387
+ "name": "to",
388
+ "type": "address"
358
389
  }
359
390
  ],
360
- "name": "ToleranceSet",
391
+ "name": "Withdraw",
361
392
  "type": "event"
362
393
  },
363
394
  {
364
- "anonymous": false,
365
395
  "inputs": [
366
396
  {
367
- "indexed": false,
368
397
  "internalType": "address",
369
- "name": "pair",
398
+ "name": "token",
370
399
  "type": "address"
371
400
  },
372
401
  {
373
- "indexed": false,
374
- "internalType": "uint32",
375
- "name": "interval",
376
- "type": "uint32"
402
+ "internalType": "address",
403
+ "name": "asset",
404
+ "type": "address"
377
405
  }
378
406
  ],
379
- "name": "TwapIntervalSet",
380
- "type": "event"
407
+ "name": "addAsset",
408
+ "outputs": [],
409
+ "stateMutability": "nonpayable",
410
+ "type": "function"
381
411
  },
382
412
  {
383
- "anonymous": false,
384
413
  "inputs": [
385
414
  {
386
- "indexed": false,
387
415
  "internalType": "address",
388
416
  "name": "token",
389
417
  "type": "address"
390
- },
418
+ }
419
+ ],
420
+ "name": "addressOfAsset",
421
+ "outputs": [
391
422
  {
392
- "indexed": false,
393
423
  "internalType": "address",
394
- "name": "to",
424
+ "name": "",
395
425
  "type": "address"
396
- },
426
+ }
427
+ ],
428
+ "stateMutability": "view",
429
+ "type": "function"
430
+ },
431
+ {
432
+ "inputs": [],
433
+ "name": "ampFactor",
434
+ "outputs": [
397
435
  {
398
- "indexed": false,
399
436
  "internalType": "uint256",
400
- "name": "amount",
437
+ "name": "",
401
438
  "type": "uint256"
402
439
  }
403
440
  ],
404
- "name": "Withdraw",
405
- "type": "event"
441
+ "stateMutability": "view",
442
+ "type": "function"
406
443
  },
407
444
  {
408
445
  "inputs": [
@@ -416,76 +453,41 @@
416
453
  "name": "amount",
417
454
  "type": "uint256"
418
455
  },
456
+ {
457
+ "internalType": "uint256",
458
+ "name": "minimumLiquidity",
459
+ "type": "uint256"
460
+ },
419
461
  {
420
462
  "internalType": "address",
421
463
  "name": "to",
422
464
  "type": "address"
465
+ },
466
+ {
467
+ "internalType": "uint256",
468
+ "name": "deadline",
469
+ "type": "uint256"
470
+ },
471
+ {
472
+ "internalType": "bool",
473
+ "name": "shouldStake",
474
+ "type": "bool"
423
475
  }
424
476
  ],
425
- "name": "approve",
426
- "outputs": [],
427
- "stateMutability": "nonpayable",
428
- "type": "function"
429
- },
430
- {
431
- "inputs": [
432
- {
433
- "components": [
434
- {
435
- "internalType": "address",
436
- "name": "tokenIn",
437
- "type": "address"
438
- },
439
- {
440
- "internalType": "address",
441
- "name": "tokenOut",
442
- "type": "address"
443
- },
444
- {
445
- "internalType": "uint256",
446
- "name": "amountInMax",
447
- "type": "uint256"
448
- },
449
- {
450
- "internalType": "uint256",
451
- "name": "amountOut",
452
- "type": "uint256"
453
- },
454
- {
455
- "internalType": "bool",
456
- "name": "wrapUnwrap",
457
- "type": "bool"
458
- },
459
- {
460
- "internalType": "address",
461
- "name": "to",
462
- "type": "address"
463
- },
464
- {
465
- "internalType": "uint32",
466
- "name": "submitDeadline",
467
- "type": "uint32"
468
- }
469
- ],
470
- "internalType": "struct ITwapRelayer.BuyParams",
471
- "name": "buyParams",
472
- "type": "tuple"
473
- }
474
- ],
475
- "name": "buy",
477
+ "name": "deposit",
476
478
  "outputs": [
477
479
  {
478
480
  "internalType": "uint256",
479
- "name": "orderId",
481
+ "name": "liquidity",
480
482
  "type": "uint256"
481
483
  }
482
484
  ],
483
- "stateMutability": "payable",
485
+ "stateMutability": "nonpayable",
484
486
  "type": "function"
485
487
  },
486
488
  {
487
489
  "inputs": [],
488
- "name": "delay",
490
+ "name": "dev",
489
491
  "outputs": [
490
492
  {
491
493
  "internalType": "address",
@@ -498,24 +500,30 @@
498
500
  },
499
501
  {
500
502
  "inputs": [],
501
- "name": "ethTransferGasCost",
503
+ "name": "endCovRatio",
502
504
  "outputs": [
503
505
  {
504
- "internalType": "uint256",
506
+ "internalType": "uint128",
505
507
  "name": "",
506
- "type": "uint256"
508
+ "type": "uint128"
507
509
  }
508
510
  ],
509
511
  "stateMutability": "view",
510
512
  "type": "function"
511
513
  },
512
514
  {
513
- "inputs": [],
514
- "name": "executionGasLimit",
515
+ "inputs": [
516
+ {
517
+ "internalType": "address",
518
+ "name": "token",
519
+ "type": "address"
520
+ }
521
+ ],
522
+ "name": "exchangeRate",
515
523
  "outputs": [
516
524
  {
517
525
  "internalType": "uint256",
518
- "name": "",
526
+ "name": "xr",
519
527
  "type": "uint256"
520
528
  }
521
529
  ],
@@ -524,7 +532,7 @@
524
532
  },
525
533
  {
526
534
  "inputs": [],
527
- "name": "factory",
535
+ "name": "feeTo",
528
536
  "outputs": [
529
537
  {
530
538
  "internalType": "address",
@@ -536,95 +544,111 @@
536
544
  "type": "function"
537
545
  },
538
546
  {
539
- "inputs": [],
540
- "name": "gasPriceMultiplier",
541
- "outputs": [
547
+ "inputs": [
548
+ {
549
+ "internalType": "address",
550
+ "name": "token",
551
+ "type": "address"
552
+ },
542
553
  {
543
554
  "internalType": "uint256",
544
- "name": "",
555
+ "name": "amount",
545
556
  "type": "uint256"
546
557
  }
547
558
  ],
548
- "stateMutability": "view",
559
+ "name": "fillPool",
560
+ "outputs": [],
561
+ "stateMutability": "nonpayable",
549
562
  "type": "function"
550
563
  },
551
564
  {
552
- "inputs": [
553
- {
554
- "internalType": "address",
555
- "name": "token0",
556
- "type": "address"
557
- },
565
+ "inputs": [],
566
+ "name": "getTokens",
567
+ "outputs": [
558
568
  {
559
- "internalType": "address",
560
- "name": "token1",
561
- "type": "address"
569
+ "internalType": "address[]",
570
+ "name": "",
571
+ "type": "address[]"
562
572
  }
563
573
  ],
564
- "name": "getPoolState",
574
+ "stateMutability": "view",
575
+ "type": "function"
576
+ },
577
+ {
578
+ "inputs": [],
579
+ "name": "globalEquilCovRatio",
565
580
  "outputs": [
566
581
  {
567
582
  "internalType": "uint256",
568
- "name": "price",
583
+ "name": "equilCovRatio",
569
584
  "type": "uint256"
570
585
  },
571
586
  {
572
587
  "internalType": "uint256",
573
- "name": "fee",
588
+ "name": "invariantInUint",
574
589
  "type": "uint256"
575
- },
576
- {
577
- "internalType": "uint256",
578
- "name": "limitMin0",
579
- "type": "uint256"
580
- },
590
+ }
591
+ ],
592
+ "stateMutability": "view",
593
+ "type": "function"
594
+ },
595
+ {
596
+ "inputs": [],
597
+ "name": "haircutRate",
598
+ "outputs": [
581
599
  {
582
600
  "internalType": "uint256",
583
- "name": "limitMax0",
601
+ "name": "",
584
602
  "type": "uint256"
585
- },
603
+ }
604
+ ],
605
+ "stateMutability": "view",
606
+ "type": "function"
607
+ },
608
+ {
609
+ "inputs": [
586
610
  {
587
611
  "internalType": "uint256",
588
- "name": "limitMin1",
612
+ "name": "ampFactor_",
589
613
  "type": "uint256"
590
614
  },
591
615
  {
592
616
  "internalType": "uint256",
593
- "name": "limitMax1",
617
+ "name": "haircutRate_",
594
618
  "type": "uint256"
595
619
  }
596
620
  ],
597
- "stateMutability": "view",
621
+ "name": "initialize",
622
+ "outputs": [],
623
+ "stateMutability": "nonpayable",
598
624
  "type": "function"
599
625
  },
600
626
  {
601
627
  "inputs": [
602
628
  {
603
629
  "internalType": "address",
604
- "name": "pair",
630
+ "name": "token",
605
631
  "type": "address"
606
- },
632
+ }
633
+ ],
634
+ "name": "isPaused",
635
+ "outputs": [
607
636
  {
608
637
  "internalType": "bool",
609
- "name": "inverted",
638
+ "name": "",
610
639
  "type": "bool"
611
640
  }
612
641
  ],
613
- "name": "getPriceByPairAddress",
642
+ "stateMutability": "view",
643
+ "type": "function"
644
+ },
645
+ {
646
+ "inputs": [],
647
+ "name": "lpDividendRatio",
614
648
  "outputs": [
615
- {
616
- "internalType": "uint8",
617
- "name": "xDecimals",
618
- "type": "uint8"
619
- },
620
- {
621
- "internalType": "uint8",
622
- "name": "yDecimals",
623
- "type": "uint8"
624
- },
625
649
  {
626
650
  "internalType": "uint256",
627
- "name": "price",
651
+ "name": "",
628
652
  "type": "uint256"
629
653
  }
630
654
  ],
@@ -632,60 +656,91 @@
632
656
  "type": "function"
633
657
  },
634
658
  {
635
- "inputs": [
659
+ "inputs": [],
660
+ "name": "masterWombat",
661
+ "outputs": [
636
662
  {
637
663
  "internalType": "address",
638
- "name": "tokenIn",
664
+ "name": "",
639
665
  "type": "address"
640
- },
666
+ }
667
+ ],
668
+ "stateMutability": "view",
669
+ "type": "function"
670
+ },
671
+ {
672
+ "inputs": [
641
673
  {
642
674
  "internalType": "address",
643
- "name": "tokenOut",
675
+ "name": "token",
644
676
  "type": "address"
645
677
  }
646
678
  ],
647
- "name": "getPriceByTokenAddresses",
679
+ "name": "mintFee",
648
680
  "outputs": [
649
681
  {
650
682
  "internalType": "uint256",
651
- "name": "price",
683
+ "name": "feeCollected",
652
684
  "type": "uint256"
653
685
  }
654
686
  ],
655
- "stateMutability": "view",
687
+ "stateMutability": "nonpayable",
656
688
  "type": "function"
657
689
  },
658
690
  {
659
- "inputs": [
691
+ "inputs": [],
692
+ "name": "mintFeeThreshold",
693
+ "outputs": [
660
694
  {
661
- "internalType": "address",
662
- "name": "_factory",
663
- "type": "address"
664
- },
695
+ "internalType": "uint256",
696
+ "name": "",
697
+ "type": "uint256"
698
+ }
699
+ ],
700
+ "stateMutability": "view",
701
+ "type": "function"
702
+ },
703
+ {
704
+ "inputs": [],
705
+ "name": "owner",
706
+ "outputs": [
665
707
  {
666
708
  "internalType": "address",
667
- "name": "_delay",
709
+ "name": "",
668
710
  "type": "address"
669
- },
711
+ }
712
+ ],
713
+ "stateMutability": "view",
714
+ "type": "function"
715
+ },
716
+ {
717
+ "inputs": [],
718
+ "name": "pause",
719
+ "outputs": [],
720
+ "stateMutability": "nonpayable",
721
+ "type": "function"
722
+ },
723
+ {
724
+ "inputs": [
670
725
  {
671
726
  "internalType": "address",
672
- "name": "_weth",
727
+ "name": "token",
673
728
  "type": "address"
674
729
  }
675
730
  ],
676
- "name": "initialize",
731
+ "name": "pauseAsset",
677
732
  "outputs": [],
678
733
  "stateMutability": "nonpayable",
679
734
  "type": "function"
680
735
  },
681
736
  {
682
737
  "inputs": [],
683
- "name": "initialized",
738
+ "name": "paused",
684
739
  "outputs": [
685
740
  {
686
- "internalType": "uint8",
741
+ "internalType": "bool",
687
742
  "name": "",
688
- "type": "uint8"
743
+ "type": "bool"
689
744
  }
690
745
  ],
691
746
  "stateMutability": "view",
@@ -695,29 +750,60 @@
695
750
  "inputs": [
696
751
  {
697
752
  "internalType": "address",
698
- "name": "",
753
+ "name": "fromToken",
699
754
  "type": "address"
755
+ },
756
+ {
757
+ "internalType": "address",
758
+ "name": "toToken",
759
+ "type": "address"
760
+ },
761
+ {
762
+ "internalType": "int256",
763
+ "name": "toAmount",
764
+ "type": "int256"
700
765
  }
701
766
  ],
702
- "name": "isPairEnabled",
767
+ "name": "quoteAmountIn",
703
768
  "outputs": [
704
769
  {
705
- "internalType": "bool",
706
- "name": "",
707
- "type": "bool"
770
+ "internalType": "uint256",
771
+ "name": "amountIn",
772
+ "type": "uint256"
773
+ },
774
+ {
775
+ "internalType": "uint256",
776
+ "name": "haircut",
777
+ "type": "uint256"
708
778
  }
709
779
  ],
710
780
  "stateMutability": "view",
711
781
  "type": "function"
712
782
  },
713
783
  {
714
- "inputs": [],
715
- "name": "owner",
716
- "outputs": [
784
+ "inputs": [
717
785
  {
718
786
  "internalType": "address",
719
- "name": "",
787
+ "name": "token",
720
788
  "type": "address"
789
+ },
790
+ {
791
+ "internalType": "uint256",
792
+ "name": "amount",
793
+ "type": "uint256"
794
+ }
795
+ ],
796
+ "name": "quotePotentialDeposit",
797
+ "outputs": [
798
+ {
799
+ "internalType": "uint256",
800
+ "name": "liquidity",
801
+ "type": "uint256"
802
+ },
803
+ {
804
+ "internalType": "uint256",
805
+ "name": "reward",
806
+ "type": "uint256"
721
807
  }
722
808
  ],
723
809
  "stateMutability": "view",
@@ -727,25 +813,30 @@
727
813
  "inputs": [
728
814
  {
729
815
  "internalType": "address",
730
- "name": "tokenIn",
816
+ "name": "fromToken",
731
817
  "type": "address"
732
818
  },
733
819
  {
734
820
  "internalType": "address",
735
- "name": "tokenOut",
821
+ "name": "toToken",
736
822
  "type": "address"
737
823
  },
738
824
  {
739
- "internalType": "uint256",
740
- "name": "amountOut",
741
- "type": "uint256"
825
+ "internalType": "int256",
826
+ "name": "fromAmount",
827
+ "type": "int256"
742
828
  }
743
829
  ],
744
- "name": "quoteBuy",
830
+ "name": "quotePotentialSwap",
745
831
  "outputs": [
746
832
  {
747
833
  "internalType": "uint256",
748
- "name": "amountIn",
834
+ "name": "potentialOutcome",
835
+ "type": "uint256"
836
+ },
837
+ {
838
+ "internalType": "uint256",
839
+ "name": "haircut",
749
840
  "type": "uint256"
750
841
  }
751
842
  ],
@@ -756,25 +847,25 @@
756
847
  "inputs": [
757
848
  {
758
849
  "internalType": "address",
759
- "name": "tokenIn",
760
- "type": "address"
761
- },
762
- {
763
- "internalType": "address",
764
- "name": "tokenOut",
850
+ "name": "token",
765
851
  "type": "address"
766
852
  },
767
853
  {
768
854
  "internalType": "uint256",
769
- "name": "amountIn",
855
+ "name": "liquidity",
770
856
  "type": "uint256"
771
857
  }
772
858
  ],
773
- "name": "quoteSell",
859
+ "name": "quotePotentialWithdraw",
774
860
  "outputs": [
775
861
  {
776
862
  "internalType": "uint256",
777
- "name": "amountOut",
863
+ "name": "amount",
864
+ "type": "uint256"
865
+ },
866
+ {
867
+ "internalType": "uint256",
868
+ "name": "fee",
778
869
  "type": "uint256"
779
870
  }
780
871
  ],
@@ -784,107 +875,79 @@
784
875
  {
785
876
  "inputs": [
786
877
  {
787
- "components": [
788
- {
789
- "internalType": "address",
790
- "name": "tokenIn",
791
- "type": "address"
792
- },
793
- {
794
- "internalType": "address",
795
- "name": "tokenOut",
796
- "type": "address"
797
- },
798
- {
799
- "internalType": "uint256",
800
- "name": "amountIn",
801
- "type": "uint256"
802
- },
803
- {
804
- "internalType": "uint256",
805
- "name": "amountOutMin",
806
- "type": "uint256"
807
- },
808
- {
809
- "internalType": "bool",
810
- "name": "wrapUnwrap",
811
- "type": "bool"
812
- },
813
- {
814
- "internalType": "address",
815
- "name": "to",
816
- "type": "address"
817
- },
818
- {
819
- "internalType": "uint32",
820
- "name": "submitDeadline",
821
- "type": "uint32"
822
- }
823
- ],
824
- "internalType": "struct ITwapRelayer.SellParams",
825
- "name": "sellParams",
826
- "type": "tuple"
827
- }
828
- ],
829
- "name": "sell",
878
+ "internalType": "address",
879
+ "name": "fromToken",
880
+ "type": "address"
881
+ },
882
+ {
883
+ "internalType": "address",
884
+ "name": "toToken",
885
+ "type": "address"
886
+ },
887
+ {
888
+ "internalType": "uint256",
889
+ "name": "liquidity",
890
+ "type": "uint256"
891
+ }
892
+ ],
893
+ "name": "quotePotentialWithdrawFromOtherAsset",
830
894
  "outputs": [
831
895
  {
832
896
  "internalType": "uint256",
833
- "name": "orderId",
897
+ "name": "amount",
898
+ "type": "uint256"
899
+ },
900
+ {
901
+ "internalType": "uint256",
902
+ "name": "withdrewAmount",
834
903
  "type": "uint256"
835
904
  }
836
905
  ],
837
- "stateMutability": "payable",
906
+ "stateMutability": "view",
838
907
  "type": "function"
839
908
  },
840
909
  {
841
910
  "inputs": [
842
911
  {
843
912
  "internalType": "address",
844
- "name": "_delay",
913
+ "name": "token",
845
914
  "type": "address"
846
915
  }
847
916
  ],
848
- "name": "setDelay",
917
+ "name": "removeAsset",
849
918
  "outputs": [],
850
919
  "stateMutability": "nonpayable",
851
920
  "type": "function"
852
921
  },
853
922
  {
854
- "inputs": [
855
- {
856
- "internalType": "uint256",
857
- "name": "gasCost",
858
- "type": "uint256"
859
- }
860
- ],
861
- "name": "setEthTransferGasCost",
923
+ "inputs": [],
924
+ "name": "renounceOwnership",
862
925
  "outputs": [],
863
926
  "stateMutability": "nonpayable",
864
927
  "type": "function"
865
928
  },
866
929
  {
867
- "inputs": [
930
+ "inputs": [],
931
+ "name": "retentionRatio",
932
+ "outputs": [
868
933
  {
869
934
  "internalType": "uint256",
870
- "name": "limit",
935
+ "name": "",
871
936
  "type": "uint256"
872
937
  }
873
938
  ],
874
- "name": "setExecutionGasLimit",
875
- "outputs": [],
876
- "stateMutability": "nonpayable",
939
+ "stateMutability": "view",
877
940
  "type": "function"
878
941
  },
879
942
  {
880
943
  "inputs": [
881
944
  {
882
945
  "internalType": "uint256",
883
- "name": "multiplier",
946
+ "name": "ampFactor_",
884
947
  "type": "uint256"
885
948
  }
886
949
  ],
887
- "name": "setGasPriceMultiplier",
950
+ "name": "setAmpFactor",
888
951
  "outputs": [],
889
952
  "stateMutability": "nonpayable",
890
953
  "type": "function"
@@ -892,12 +955,17 @@
892
955
  {
893
956
  "inputs": [
894
957
  {
895
- "internalType": "address",
896
- "name": "_owner",
897
- "type": "address"
958
+ "internalType": "uint128",
959
+ "name": "startCovRatio_",
960
+ "type": "uint128"
961
+ },
962
+ {
963
+ "internalType": "uint128",
964
+ "name": "endCovRatio_",
965
+ "type": "uint128"
898
966
  }
899
967
  ],
900
- "name": "setOwner",
968
+ "name": "setCovRatioFeeParam",
901
969
  "outputs": [],
902
970
  "stateMutability": "nonpayable",
903
971
  "type": "function"
@@ -906,16 +974,11 @@
906
974
  "inputs": [
907
975
  {
908
976
  "internalType": "address",
909
- "name": "pair",
977
+ "name": "dev_",
910
978
  "type": "address"
911
- },
912
- {
913
- "internalType": "bool",
914
- "name": "enabled",
915
- "type": "bool"
916
979
  }
917
980
  ],
918
- "name": "setPairEnabled",
981
+ "name": "setDev",
919
982
  "outputs": [],
920
983
  "stateMutability": "nonpayable",
921
984
  "type": "function"
@@ -923,17 +986,17 @@
923
986
  {
924
987
  "inputs": [
925
988
  {
926
- "internalType": "address",
927
- "name": "pair",
928
- "type": "address"
989
+ "internalType": "uint256",
990
+ "name": "lpDividendRatio_",
991
+ "type": "uint256"
929
992
  },
930
993
  {
931
994
  "internalType": "uint256",
932
- "name": "fee",
995
+ "name": "retentionRatio_",
933
996
  "type": "uint256"
934
997
  }
935
998
  ],
936
- "name": "setSwapFee",
999
+ "name": "setFee",
937
1000
  "outputs": [],
938
1001
  "stateMutability": "nonpayable",
939
1002
  "type": "function"
@@ -942,34 +1005,24 @@
942
1005
  "inputs": [
943
1006
  {
944
1007
  "internalType": "address",
945
- "name": "token",
1008
+ "name": "feeTo_",
946
1009
  "type": "address"
947
- },
948
- {
949
- "internalType": "uint256",
950
- "name": "multiplier",
951
- "type": "uint256"
952
1010
  }
953
1011
  ],
954
- "name": "setTokenLimitMaxMultiplier",
1012
+ "name": "setFeeTo",
955
1013
  "outputs": [],
956
1014
  "stateMutability": "nonpayable",
957
1015
  "type": "function"
958
1016
  },
959
1017
  {
960
1018
  "inputs": [
961
- {
962
- "internalType": "address",
963
- "name": "token",
964
- "type": "address"
965
- },
966
1019
  {
967
1020
  "internalType": "uint256",
968
- "name": "limit",
1021
+ "name": "haircutRate_",
969
1022
  "type": "uint256"
970
1023
  }
971
1024
  ],
972
- "name": "setTokenLimitMin",
1025
+ "name": "setHaircutRate",
973
1026
  "outputs": [],
974
1027
  "stateMutability": "nonpayable",
975
1028
  "type": "function"
@@ -978,16 +1031,11 @@
978
1031
  "inputs": [
979
1032
  {
980
1033
  "internalType": "address",
981
- "name": "pair",
1034
+ "name": "masterWombat_",
982
1035
  "type": "address"
983
- },
984
- {
985
- "internalType": "uint16",
986
- "name": "_tolerance",
987
- "type": "uint16"
988
1036
  }
989
1037
  ],
990
- "name": "setTolerance",
1038
+ "name": "setMasterWombat",
991
1039
  "outputs": [],
992
1040
  "stateMutability": "nonpayable",
993
1041
  "type": "function"
@@ -995,35 +1043,24 @@
995
1043
  {
996
1044
  "inputs": [
997
1045
  {
998
- "internalType": "address",
999
- "name": "pair",
1000
- "type": "address"
1001
- },
1002
- {
1003
- "internalType": "uint32",
1004
- "name": "interval",
1005
- "type": "uint32"
1046
+ "internalType": "uint256",
1047
+ "name": "mintFeeThreshold_",
1048
+ "type": "uint256"
1006
1049
  }
1007
1050
  ],
1008
- "name": "setTwapInterval",
1051
+ "name": "setMintFeeThreshold",
1009
1052
  "outputs": [],
1010
1053
  "stateMutability": "nonpayable",
1011
1054
  "type": "function"
1012
1055
  },
1013
1056
  {
1014
- "inputs": [
1015
- {
1016
- "internalType": "address",
1017
- "name": "",
1018
- "type": "address"
1019
- }
1020
- ],
1021
- "name": "swapFee",
1057
+ "inputs": [],
1058
+ "name": "startCovRatio",
1022
1059
  "outputs": [
1023
1060
  {
1024
- "internalType": "uint256",
1061
+ "internalType": "uint128",
1025
1062
  "name": "",
1026
- "type": "uint256"
1063
+ "type": "uint128"
1027
1064
  }
1028
1065
  ],
1029
1066
  "stateMutability": "view",
@@ -1033,34 +1070,64 @@
1033
1070
  "inputs": [
1034
1071
  {
1035
1072
  "internalType": "address",
1036
- "name": "",
1073
+ "name": "fromToken",
1074
+ "type": "address"
1075
+ },
1076
+ {
1077
+ "internalType": "address",
1078
+ "name": "toToken",
1079
+ "type": "address"
1080
+ },
1081
+ {
1082
+ "internalType": "uint256",
1083
+ "name": "fromAmount",
1084
+ "type": "uint256"
1085
+ },
1086
+ {
1087
+ "internalType": "uint256",
1088
+ "name": "minimumToAmount",
1089
+ "type": "uint256"
1090
+ },
1091
+ {
1092
+ "internalType": "address",
1093
+ "name": "to",
1037
1094
  "type": "address"
1095
+ },
1096
+ {
1097
+ "internalType": "uint256",
1098
+ "name": "deadline",
1099
+ "type": "uint256"
1038
1100
  }
1039
1101
  ],
1040
- "name": "tokenLimitMaxMultiplier",
1102
+ "name": "swap",
1041
1103
  "outputs": [
1042
1104
  {
1043
1105
  "internalType": "uint256",
1044
- "name": "",
1106
+ "name": "actualToAmount",
1107
+ "type": "uint256"
1108
+ },
1109
+ {
1110
+ "internalType": "uint256",
1111
+ "name": "haircut",
1045
1112
  "type": "uint256"
1046
1113
  }
1047
1114
  ],
1048
- "stateMutability": "view",
1115
+ "stateMutability": "nonpayable",
1049
1116
  "type": "function"
1050
1117
  },
1051
1118
  {
1052
1119
  "inputs": [
1053
1120
  {
1054
1121
  "internalType": "address",
1055
- "name": "",
1122
+ "name": "token",
1056
1123
  "type": "address"
1057
1124
  }
1058
1125
  ],
1059
- "name": "tokenLimitMin",
1126
+ "name": "tipBucketBalance",
1060
1127
  "outputs": [
1061
1128
  {
1062
1129
  "internalType": "uint256",
1063
- "name": "",
1130
+ "name": "balance",
1064
1131
  "type": "uint256"
1065
1132
  }
1066
1133
  ],
@@ -1071,51 +1138,56 @@
1071
1138
  "inputs": [
1072
1139
  {
1073
1140
  "internalType": "address",
1074
- "name": "",
1141
+ "name": "newOwner",
1075
1142
  "type": "address"
1076
1143
  }
1077
1144
  ],
1078
- "name": "tolerance",
1079
- "outputs": [
1080
- {
1081
- "internalType": "uint16",
1082
- "name": "",
1083
- "type": "uint16"
1084
- }
1085
- ],
1086
- "stateMutability": "view",
1145
+ "name": "transferOwnership",
1146
+ "outputs": [],
1147
+ "stateMutability": "nonpayable",
1087
1148
  "type": "function"
1088
1149
  },
1089
1150
  {
1090
1151
  "inputs": [
1091
1152
  {
1092
1153
  "internalType": "address",
1093
- "name": "",
1154
+ "name": "token",
1094
1155
  "type": "address"
1095
- }
1096
- ],
1097
- "name": "twapInterval",
1098
- "outputs": [
1156
+ },
1099
1157
  {
1100
- "internalType": "uint32",
1101
- "name": "",
1102
- "type": "uint32"
1158
+ "internalType": "uint256",
1159
+ "name": "amount",
1160
+ "type": "uint256"
1161
+ },
1162
+ {
1163
+ "internalType": "address",
1164
+ "name": "to",
1165
+ "type": "address"
1103
1166
  }
1104
1167
  ],
1105
- "stateMutability": "view",
1168
+ "name": "transferTipBucket",
1169
+ "outputs": [],
1170
+ "stateMutability": "nonpayable",
1106
1171
  "type": "function"
1107
1172
  },
1108
1173
  {
1109
1174
  "inputs": [],
1110
- "name": "weth",
1111
- "outputs": [
1175
+ "name": "unpause",
1176
+ "outputs": [],
1177
+ "stateMutability": "nonpayable",
1178
+ "type": "function"
1179
+ },
1180
+ {
1181
+ "inputs": [
1112
1182
  {
1113
1183
  "internalType": "address",
1114
- "name": "",
1184
+ "name": "token",
1115
1185
  "type": "address"
1116
1186
  }
1117
1187
  ],
1118
- "stateMutability": "view",
1188
+ "name": "unpauseAsset",
1189
+ "outputs": [],
1190
+ "stateMutability": "nonpayable",
1119
1191
  "type": "function"
1120
1192
  },
1121
1193
  {
@@ -1127,22 +1199,91 @@
1127
1199
  },
1128
1200
  {
1129
1201
  "internalType": "uint256",
1130
- "name": "amount",
1202
+ "name": "liquidity",
1203
+ "type": "uint256"
1204
+ },
1205
+ {
1206
+ "internalType": "uint256",
1207
+ "name": "minimumAmount",
1131
1208
  "type": "uint256"
1132
1209
  },
1133
1210
  {
1134
1211
  "internalType": "address",
1135
1212
  "name": "to",
1136
1213
  "type": "address"
1214
+ },
1215
+ {
1216
+ "internalType": "uint256",
1217
+ "name": "deadline",
1218
+ "type": "uint256"
1137
1219
  }
1138
1220
  ],
1139
1221
  "name": "withdraw",
1140
- "outputs": [],
1222
+ "outputs": [
1223
+ {
1224
+ "internalType": "uint256",
1225
+ "name": "amount",
1226
+ "type": "uint256"
1227
+ }
1228
+ ],
1229
+ "stateMutability": "nonpayable",
1230
+ "type": "function"
1231
+ },
1232
+ {
1233
+ "inputs": [
1234
+ {
1235
+ "internalType": "address",
1236
+ "name": "fromToken",
1237
+ "type": "address"
1238
+ },
1239
+ {
1240
+ "internalType": "address",
1241
+ "name": "toToken",
1242
+ "type": "address"
1243
+ },
1244
+ {
1245
+ "internalType": "uint256",
1246
+ "name": "liquidity",
1247
+ "type": "uint256"
1248
+ },
1249
+ {
1250
+ "internalType": "uint256",
1251
+ "name": "minimumAmount",
1252
+ "type": "uint256"
1253
+ },
1254
+ {
1255
+ "internalType": "address",
1256
+ "name": "to",
1257
+ "type": "address"
1258
+ },
1259
+ {
1260
+ "internalType": "uint256",
1261
+ "name": "deadline",
1262
+ "type": "uint256"
1263
+ }
1264
+ ],
1265
+ "name": "withdrawFromOtherAsset",
1266
+ "outputs": [
1267
+ {
1268
+ "internalType": "uint256",
1269
+ "name": "toAmount",
1270
+ "type": "uint256"
1271
+ }
1272
+ ],
1141
1273
  "stateMutability": "nonpayable",
1142
1274
  "type": "function"
1143
1275
  },
1144
1276
  {
1145
- "stateMutability": "payable",
1146
- "type": "receive"
1277
+ "inputs": [],
1278
+ "name": "creditForTokensHaircut",
1279
+ "outputs": [
1280
+ {
1281
+ "internalType": "uint128",
1282
+ "name": "",
1283
+ "type": "uint128"
1284
+ }
1285
+ ],
1286
+ "stateMutability": "view",
1287
+ "type": "function"
1147
1288
  }
1148
1289
  ]