@paraswap/dex-lib 3.4.3-thegraph-migration.0 → 3.4.3

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