@paraswap/dex-lib 2.28.9-take-surplus.0 → 2.28.9-take-surplus.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 (330) hide show
  1. package/build/abi/RamsesV2StateMulticall.abi.json +891 -0
  2. package/build/abi/aerodrome/aerodrome-pool-factory.json +586 -0
  3. package/build/abi/algebra/AlgebraFactory-v1_1.abi.json +250 -0
  4. package/build/abi/api3-proxy.json +53 -0
  5. package/build/abi/api3-server-v1.json +463 -0
  6. package/build/abi/nomiswap-v2/nomiswap-v2-pool.json +773 -0
  7. package/build/abi/pancakeswap-v3/PancakeswapV3Factory.abi.json +300 -0
  8. package/build/abi/quick-perps/fast-price-events.json +70 -0
  9. package/build/abi/quick-perps/fast-price-feed.json +741 -0
  10. package/build/abi/quick-perps/reader.json +313 -0
  11. package/build/abi/quick-perps/vault-price-feed.json +323 -0
  12. package/build/abi/quick-perps/vault.json +1953 -0
  13. package/build/abi/quickPerps/fast-price-events.json +70 -0
  14. package/build/abi/quickPerps/fast-price-feed.json +748 -0
  15. package/build/abi/quickPerps/reader.json +313 -0
  16. package/build/abi/quickPerps/vault-price-feed.json +477 -0
  17. package/build/abi/quickPerps/vault.json +1953 -0
  18. package/build/abi/ramses-v2/RamsesV2Pool.abi.json +1599 -0
  19. package/build/abi/uniswap-v3/UniswapV3Factory.abi.json +148 -0
  20. package/build/abi/uniswap-v3/UniswapV3QuoterV2.abi.json +155 -0
  21. package/build/composed-event-subscriber.js +8 -2
  22. package/build/composed-event-subscriber.js.map +1 -1
  23. package/build/config.d.ts +0 -1
  24. package/build/config.js +75 -14
  25. package/build/config.js.map +1 -1
  26. package/build/constants.d.ts +2 -1
  27. package/build/constants.js +1 -0
  28. package/build/constants.js.map +1 -1
  29. package/build/dex/algebra/algebra-factory.d.ts +25 -0
  30. package/build/dex/algebra/algebra-factory.js +43 -0
  31. package/build/dex/algebra/algebra-factory.js.map +1 -0
  32. package/build/dex/algebra/algebra-pool-v1_1.d.ts +16 -2
  33. package/build/dex/algebra/algebra-pool-v1_1.js +166 -4
  34. package/build/dex/algebra/algebra-pool-v1_1.js.map +1 -1
  35. package/build/dex/algebra/algebra.d.ts +4 -1
  36. package/build/dex/algebra/algebra.js +42 -21
  37. package/build/dex/algebra/algebra.js.map +1 -1
  38. package/build/dex/algebra/config.js +1 -0
  39. package/build/dex/algebra/config.js.map +1 -1
  40. package/build/dex/algebra/lib/TickTable.js +51 -40
  41. package/build/dex/algebra/lib/TickTable.js.map +1 -1
  42. package/build/dex/algebra/types.d.ts +5 -2
  43. package/build/dex/algebra/utils.d.ts +3 -1
  44. package/build/dex/algebra/utils.js +59 -1
  45. package/build/dex/algebra/utils.js.map +1 -1
  46. package/build/dex/balancer-v2/balancer-v2.js +79 -6
  47. package/build/dex/balancer-v2/balancer-v2.js.map +1 -1
  48. package/build/dex/balancer-v2/config.js +10 -2
  49. package/build/dex/balancer-v2/config.js.map +1 -1
  50. package/build/dex/balancer-v2/optimizer.js +38 -51
  51. package/build/dex/balancer-v2/optimizer.js.map +1 -1
  52. package/build/dex/balancer-v2/types.d.ts +0 -4
  53. package/build/dex/balancer-v2/types.js.map +1 -1
  54. package/build/dex/curve-v1/config.js +40 -38
  55. package/build/dex/curve-v1/config.js.map +1 -1
  56. package/build/dex/curve-v1-factory/config.js +17 -9
  57. package/build/dex/curve-v1-factory/config.js.map +1 -1
  58. package/build/dex/curve-v1-factory/curve-v1-factory.d.ts +1 -1
  59. package/build/dex/curve-v1-factory/curve-v1-factory.js +205 -182
  60. package/build/dex/curve-v1-factory/curve-v1-factory.js.map +1 -1
  61. package/build/dex/curve-v1-factory/curve-v1-pool-manager.d.ts +2 -1
  62. package/build/dex/curve-v1-factory/curve-v1-pool-manager.js +8 -2
  63. package/build/dex/curve-v1-factory/curve-v1-pool-manager.js.map +1 -1
  64. package/build/dex/curve-v1-factory/price-handlers/functions/_calc_withdraw_one_coin.js +1 -0
  65. package/build/dex/curve-v1-factory/price-handlers/functions/_calc_withdraw_one_coin.js.map +1 -1
  66. package/build/dex/curve-v1-factory/price-handlers/functions/_dynamic_fee.js +1 -0
  67. package/build/dex/curve-v1-factory/price-handlers/functions/_dynamic_fee.js.map +1 -1
  68. package/build/dex/curve-v1-factory/price-handlers/functions/_rates.js +2 -1
  69. package/build/dex/curve-v1-factory/price-handlers/functions/_rates.js.map +1 -1
  70. package/build/dex/curve-v1-factory/price-handlers/functions/_xp.js +1 -0
  71. package/build/dex/curve-v1-factory/price-handlers/functions/_xp.js.map +1 -1
  72. package/build/dex/curve-v1-factory/price-handlers/functions/_xp_mem.js +1 -0
  73. package/build/dex/curve-v1-factory/price-handlers/functions/_xp_mem.js.map +1 -1
  74. package/build/dex/curve-v1-factory/price-handlers/functions/calc_token_amount.js +61 -14
  75. package/build/dex/curve-v1-factory/price-handlers/functions/calc_token_amount.js.map +1 -1
  76. package/build/dex/curve-v1-factory/price-handlers/functions/calc_withdraw_one_coin.js +1 -0
  77. package/build/dex/curve-v1-factory/price-handlers/functions/calc_withdraw_one_coin.js.map +1 -1
  78. package/build/dex/curve-v1-factory/price-handlers/functions/constants.js +10 -0
  79. package/build/dex/curve-v1-factory/price-handlers/functions/constants.js.map +1 -1
  80. package/build/dex/curve-v1-factory/price-handlers/functions/get_D.js +1 -0
  81. package/build/dex/curve-v1-factory/price-handlers/functions/get_D.js.map +1 -1
  82. package/build/dex/curve-v1-factory/price-handlers/functions/get_D_mem.js +1 -0
  83. package/build/dex/curve-v1-factory/price-handlers/functions/get_D_mem.js.map +1 -1
  84. package/build/dex/curve-v1-factory/price-handlers/functions/get_D_precisions.js +1 -0
  85. package/build/dex/curve-v1-factory/price-handlers/functions/get_D_precisions.js.map +1 -1
  86. package/build/dex/curve-v1-factory/price-handlers/functions/get_dy.js +1 -0
  87. package/build/dex/curve-v1-factory/price-handlers/functions/get_dy.js.map +1 -1
  88. package/build/dex/curve-v1-factory/price-handlers/functions/get_dy_underlying.js +1 -0
  89. package/build/dex/curve-v1-factory/price-handlers/functions/get_dy_underlying.js.map +1 -1
  90. package/build/dex/curve-v1-factory/price-handlers/functions/get_y.js +1 -0
  91. package/build/dex/curve-v1-factory/price-handlers/functions/get_y.js.map +1 -1
  92. package/build/dex/curve-v1-factory/price-handlers/functions/get_y_D.js +1 -0
  93. package/build/dex/curve-v1-factory/price-handlers/functions/get_y_D.js.map +1 -1
  94. package/build/dex/curve-v1-factory/state-polling-pools/custom-pool-polling.js +11 -4
  95. package/build/dex/curve-v1-factory/state-polling-pools/custom-pool-polling.js.map +1 -1
  96. package/build/dex/curve-v1-factory/state-polling-pools/factory-pool-polling.d.ts +1 -1
  97. package/build/dex/curve-v1-factory/state-polling-pools/factory-pool-polling.js +2 -2
  98. package/build/dex/curve-v1-factory/state-polling-pools/factory-pool-polling.js.map +1 -1
  99. package/build/dex/curve-v1-factory/types.d.ts +4 -1
  100. package/build/dex/curve-v1-factory/types.js +1 -0
  101. package/build/dex/curve-v1-factory/types.js.map +1 -1
  102. package/build/dex/generic-rfq/generic-rfq.d.ts +2 -1
  103. package/build/dex/generic-rfq/generic-rfq.js +9 -5
  104. package/build/dex/generic-rfq/generic-rfq.js.map +1 -1
  105. package/build/dex/generic-rfq/rate-fetcher.d.ts +1 -1
  106. package/build/dex/generic-rfq/rate-fetcher.js +2 -1
  107. package/build/dex/generic-rfq/rate-fetcher.js.map +1 -1
  108. package/build/dex/generic-rfq/types.d.ts +1 -0
  109. package/build/dex/generic-rfq/types.js.map +1 -1
  110. package/build/dex/hashflow/hashflow.d.ts +1 -0
  111. package/build/dex/hashflow/hashflow.js +1 -0
  112. package/build/dex/hashflow/hashflow.js.map +1 -1
  113. package/build/dex/idex.d.ts +1 -0
  114. package/build/dex/index.d.ts +1 -0
  115. package/build/dex/index.js +21 -0
  116. package/build/dex/index.js.map +1 -1
  117. package/build/dex/maverick-v1/config.js +9 -0
  118. package/build/dex/maverick-v1/config.js.map +1 -1
  119. package/build/dex/maverick-v1/maverick-v1.js +11 -2
  120. package/build/dex/maverick-v1/maverick-v1.js.map +1 -1
  121. package/build/dex/maverick-v1/scripts/event-sequence.d.ts +1 -0
  122. package/build/dex/maverick-v1/scripts/event-sequence.js +110 -0
  123. package/build/dex/maverick-v1/scripts/event-sequence.js.map +1 -0
  124. package/build/dex/pancakeswap-v3/config.js +17 -0
  125. package/build/dex/pancakeswap-v3/config.js.map +1 -1
  126. package/build/dex/pancakeswap-v3/pancakeswap-v3-factory.d.ts +26 -0
  127. package/build/dex/pancakeswap-v3/pancakeswap-v3-factory.js +44 -0
  128. package/build/dex/pancakeswap-v3/pancakeswap-v3-factory.js.map +1 -0
  129. package/build/dex/pancakeswap-v3/pancakeswap-v3.d.ts +3 -0
  130. package/build/dex/pancakeswap-v3/pancakeswap-v3.js +26 -2
  131. package/build/dex/pancakeswap-v3/pancakeswap-v3.js.map +1 -1
  132. package/build/dex/quick-perps/config.d.ts +11 -0
  133. package/build/dex/quick-perps/config.js +27 -0
  134. package/build/dex/quick-perps/config.js.map +1 -0
  135. package/build/dex/quick-perps/fast-price-feed.d.ts +26 -0
  136. package/build/dex/quick-perps/fast-price-feed.js +176 -0
  137. package/build/dex/quick-perps/fast-price-feed.js.map +1 -0
  138. package/build/dex/quick-perps/pool.d.ts +21 -0
  139. package/build/dex/quick-perps/pool.js +225 -0
  140. package/build/dex/quick-perps/pool.js.map +1 -0
  141. package/build/dex/quick-perps/quick-perps.d.ts +52 -0
  142. package/build/dex/quick-perps/quick-perps.js +211 -0
  143. package/build/dex/quick-perps/quick-perps.js.map +1 -0
  144. package/build/dex/quick-perps/types.d.ts +98 -0
  145. package/build/dex/quick-perps/types.js +3 -0
  146. package/build/dex/quick-perps/types.js.map +1 -0
  147. package/build/dex/quick-perps/usdq.d.ts +15 -0
  148. package/build/dex/quick-perps/usdq.js +61 -0
  149. package/build/dex/quick-perps/usdq.js.map +1 -0
  150. package/build/dex/quick-perps/vault-price-feed.d.ts +43 -0
  151. package/build/dex/quick-perps/vault-price-feed.js +194 -0
  152. package/build/dex/quick-perps/vault-price-feed.js.map +1 -0
  153. package/build/dex/quick-perps/vault-utils.d.ts +8 -0
  154. package/build/dex/quick-perps/vault-utils.js +41 -0
  155. package/build/dex/quick-perps/vault-utils.js.map +1 -0
  156. package/build/dex/quick-perps/vault.d.ts +46 -0
  157. package/build/dex/quick-perps/vault.js +166 -0
  158. package/build/dex/quick-perps/vault.js.map +1 -0
  159. package/build/dex/solidly/config.js +52 -2
  160. package/build/dex/solidly/config.js.map +1 -1
  161. package/build/dex/solidly/forks-override/aerodrome.d.ts +14 -0
  162. package/build/dex/solidly/forks-override/aerodrome.js +48 -0
  163. package/build/dex/solidly/forks-override/aerodrome.js.map +1 -0
  164. package/build/dex/solidly/forks-override/equalizer.d.ts +20 -0
  165. package/build/dex/solidly/forks-override/equalizer.js +46 -0
  166. package/build/dex/solidly/forks-override/equalizer.js.map +1 -0
  167. package/build/dex/solidly/forks-override/ramses.d.ts +44 -0
  168. package/build/dex/solidly/forks-override/ramses.js +144 -0
  169. package/build/dex/solidly/forks-override/ramses.js.map +1 -0
  170. package/build/dex/solidly/forks-override/velodromeV2.d.ts +20 -0
  171. package/build/dex/solidly/forks-override/velodromeV2.js +50 -0
  172. package/build/dex/solidly/forks-override/velodromeV2.js.map +1 -0
  173. package/build/dex/solidly/solidly.js +4 -0
  174. package/build/dex/solidly/solidly.js.map +1 -1
  175. package/build/dex/uniswap-v2/nomiswap-v2.d.ts +24 -0
  176. package/build/dex/uniswap-v2/nomiswap-v2.js +44 -0
  177. package/build/dex/uniswap-v2/nomiswap-v2.js.map +1 -0
  178. package/build/dex/uniswap-v3/config.js +166 -0
  179. package/build/dex/uniswap-v3/config.js.map +1 -1
  180. package/build/dex/uniswap-v3/forks/ramses-v2/ramses-v2-pool.d.ts +19 -0
  181. package/build/dex/uniswap-v3/forks/ramses-v2/ramses-v2-pool.js +99 -0
  182. package/build/dex/uniswap-v3/forks/ramses-v2/ramses-v2-pool.js.map +1 -0
  183. package/build/dex/uniswap-v3/forks/ramses-v2/utils.d.ts +4 -0
  184. package/build/dex/uniswap-v3/forks/ramses-v2/utils.js +63 -0
  185. package/build/dex/uniswap-v3/forks/ramses-v2/utils.js.map +1 -0
  186. package/build/dex/uniswap-v3/types.d.ts +10 -1
  187. package/build/dex/uniswap-v3/types.js.map +1 -1
  188. package/build/dex/uniswap-v3/uniswap-v3-factory.d.ts +26 -0
  189. package/build/dex/uniswap-v3/uniswap-v3-factory.js +44 -0
  190. package/build/dex/uniswap-v3/uniswap-v3-factory.js.map +1 -0
  191. package/build/dex/uniswap-v3/uniswap-v3-pool.d.ts +8 -6
  192. package/build/dex/uniswap-v3/uniswap-v3-pool.js +5 -2
  193. package/build/dex/uniswap-v3/uniswap-v3-pool.js.map +1 -1
  194. package/build/dex/uniswap-v3/uniswap-v3.d.ts +7 -4
  195. package/build/dex/uniswap-v3/uniswap-v3.js +51 -10
  196. package/build/dex/uniswap-v3/uniswap-v3.js.map +1 -1
  197. package/build/dex/weth/config.js +3 -0
  198. package/build/dex/weth/config.js.map +1 -1
  199. package/build/dex/woo-fi-v2/config.js +13 -0
  200. package/build/dex/woo-fi-v2/config.js.map +1 -1
  201. package/build/dex-helper/dummy-dex-helper.js +7 -1
  202. package/build/dex-helper/dummy-dex-helper.js.map +1 -1
  203. package/build/dex-helper/icache.d.ts +1 -0
  204. package/build/lib/api3-feed.d.ts +30 -0
  205. package/build/lib/api3-feed.js +100 -0
  206. package/build/lib/api3-feed.js.map +1 -0
  207. package/build/lib/decoders.d.ts +3 -0
  208. package/build/lib/decoders.js +9 -1
  209. package/build/lib/decoders.js.map +1 -1
  210. package/build/stateful-event-subscriber.d.ts +1 -0
  211. package/build/stateful-event-subscriber.js +6 -0
  212. package/build/stateful-event-subscriber.js.map +1 -1
  213. package/build/types.d.ts +2 -0
  214. package/build/workers.d.ts +0 -0
  215. package/build/workers.js +2 -0
  216. package/build/workers.js.map +1 -0
  217. package/package.json +1 -1
  218. package/src/abi/RamsesV2Pool.abi.json +1554 -0
  219. package/src/abi/RamsesV2Quoter.abi.json +274 -0
  220. package/src/abi/RamsesV2StateMulticall.abi.json +891 -0
  221. package/src/abi/aerodrome/aerodrome-pool-factory.json +586 -0
  222. package/src/abi/algebra/AlgebraFactory-v1_1.abi.json +250 -0
  223. package/src/abi/api3-proxy.json +53 -0
  224. package/src/abi/api3-server-v1.json +463 -0
  225. package/src/abi/nomiswap-v2/nomiswap-v2-pool.json +773 -0
  226. package/src/abi/pancakeswap-v3/PancakeswapV3Factory.abi.json +300 -0
  227. package/src/abi/quick-perps/fast-price-events.json +70 -0
  228. package/src/abi/quick-perps/fast-price-feed.json +741 -0
  229. package/src/abi/quick-perps/reader.json +313 -0
  230. package/src/abi/quick-perps/vault-price-feed.json +323 -0
  231. package/src/abi/quick-perps/vault.json +1953 -0
  232. package/src/abi/ramses-v2/RamsesV2Pool.abi.json +1599 -0
  233. package/src/composed-event-subscriber.ts +16 -11
  234. package/src/config.ts +80 -14
  235. package/src/constants.ts +1 -0
  236. package/src/dex/algebra/algebra-factory.ts +70 -0
  237. package/src/dex/algebra/algebra-integration.test.ts +316 -16
  238. package/src/dex/algebra/algebra-pool-v1_1.ts +259 -8
  239. package/src/dex/algebra/algebra.ts +73 -22
  240. package/src/dex/algebra/config.ts +1 -0
  241. package/src/dex/algebra/lib/TickTable.ts +75 -74
  242. package/src/dex/algebra/types.ts +6 -2
  243. package/src/dex/algebra/utils.ts +83 -2
  244. package/src/dex/balancer-v2/balancer-v2-e2e.test.ts +133 -4
  245. package/src/dex/balancer-v2/balancer-v2.ts +87 -6
  246. package/src/dex/balancer-v2/config.ts +11 -2
  247. package/src/dex/balancer-v2/optimizer.ts +49 -62
  248. package/src/dex/balancer-v2/types.ts +0 -4
  249. package/src/dex/curve-v1/config.ts +40 -38
  250. package/src/dex/curve-v1-factory/config.ts +17 -9
  251. package/src/dex/curve-v1-factory/curve-v1-factory-e2e.test.ts +19 -0
  252. package/src/dex/curve-v1-factory/curve-v1-factory-integration.test.ts +165 -45
  253. package/src/dex/curve-v1-factory/curve-v1-factory.ts +477 -415
  254. package/src/dex/curve-v1-factory/curve-v1-pool-manager.ts +15 -2
  255. package/src/dex/curve-v1-factory/price-handlers/functions/_calc_withdraw_one_coin.ts +1 -0
  256. package/src/dex/curve-v1-factory/price-handlers/functions/_dynamic_fee.ts +1 -0
  257. package/src/dex/curve-v1-factory/price-handlers/functions/_rates.ts +2 -1
  258. package/src/dex/curve-v1-factory/price-handlers/functions/_xp.ts +1 -0
  259. package/src/dex/curve-v1-factory/price-handlers/functions/_xp_mem.ts +1 -0
  260. package/src/dex/curve-v1-factory/price-handlers/functions/calc_token_amount.ts +71 -13
  261. package/src/dex/curve-v1-factory/price-handlers/functions/calc_withdraw_one_coin.ts +1 -0
  262. package/src/dex/curve-v1-factory/price-handlers/functions/constants.ts +11 -0
  263. package/src/dex/curve-v1-factory/price-handlers/functions/get_D.ts +2 -0
  264. package/src/dex/curve-v1-factory/price-handlers/functions/get_D_mem.ts +1 -0
  265. package/src/dex/curve-v1-factory/price-handlers/functions/get_D_precisions.ts +1 -0
  266. package/src/dex/curve-v1-factory/price-handlers/functions/get_dy.ts +1 -0
  267. package/src/dex/curve-v1-factory/price-handlers/functions/get_dy_underlying.ts +1 -0
  268. package/src/dex/curve-v1-factory/price-handlers/functions/get_y.ts +1 -0
  269. package/src/dex/curve-v1-factory/price-handlers/functions/get_y_D.ts +1 -0
  270. package/src/dex/curve-v1-factory/state-polling-pools/custom-pool-polling.ts +13 -5
  271. package/src/dex/curve-v1-factory/state-polling-pools/factory-pool-polling.ts +2 -1
  272. package/src/dex/curve-v1-factory/types.ts +3 -1
  273. package/src/dex/generic-rfq/example-api.test.ts +1 -1
  274. package/src/dex/generic-rfq/generic-rfq.ts +12 -4
  275. package/src/dex/generic-rfq/rate-fetcher.ts +4 -2
  276. package/src/dex/generic-rfq/types.ts +1 -0
  277. package/src/dex/hashflow/hashflow-e2e.test.ts +36 -3
  278. package/src/dex/hashflow/hashflow.ts +2 -1
  279. package/src/dex/idex.ts +1 -0
  280. package/src/dex/index.ts +21 -0
  281. package/src/dex/maverick-v1/config.ts +10 -0
  282. package/src/dex/maverick-v1/maverick-v1-e2e.test.ts +115 -1
  283. package/src/dex/maverick-v1/maverick-v1.ts +12 -2
  284. package/src/dex/pancakeswap-v3/config.ts +19 -0
  285. package/src/dex/pancakeswap-v3/pancakeswap-v3-e2e.test.ts +114 -0
  286. package/src/dex/pancakeswap-v3/pancakeswap-v3-factory.ts +73 -0
  287. package/src/dex/pancakeswap-v3/pancakeswap-v3.ts +50 -2
  288. package/src/dex/quick-perps/config.ts +31 -0
  289. package/src/dex/quick-perps/fast-price-feed.ts +279 -0
  290. package/src/dex/quick-perps/pool.ts +407 -0
  291. package/src/dex/quick-perps/quick-perps-e2e.test.ts +65 -0
  292. package/src/dex/quick-perps/quick-perps-events.test.ts +100 -0
  293. package/src/dex/quick-perps/quick-perps-integration.test.ts +153 -0
  294. package/src/dex/quick-perps/quick-perps.ts +302 -0
  295. package/src/dex/quick-perps/types.ts +97 -0
  296. package/src/dex/quick-perps/usdq.ts +83 -0
  297. package/src/dex/quick-perps/vault-price-feed.ts +322 -0
  298. package/src/dex/quick-perps/vault-utils.ts +53 -0
  299. package/src/dex/quick-perps/vault.ts +290 -0
  300. package/src/dex/solidly/config.ts +58 -2
  301. package/src/dex/solidly/forks-override/aerodrome.ts +53 -0
  302. package/src/dex/solidly/forks-override/equalizer.ts +58 -0
  303. package/src/dex/solidly/forks-override/ramses.ts +253 -0
  304. package/src/dex/solidly/forks-override/velodromeV2.ts +63 -0
  305. package/src/dex/solidly/solidly-e2e.test.ts +313 -1
  306. package/src/dex/solidly/solidly-integration.test.ts +540 -41
  307. package/src/dex/solidly/solidly.ts +5 -0
  308. package/src/dex/uniswap-v2/nomiswap-v2.ts +63 -0
  309. package/src/dex/uniswap-v2/uniswap-v2-e2e-bsc.test.ts +120 -1
  310. package/src/dex/uniswap-v3/config.ts +174 -0
  311. package/src/dex/uniswap-v3/forks/ramses-v2/ramses-v2-pool.ts +156 -0
  312. package/src/dex/uniswap-v3/forks/ramses-v2/utils.ts +72 -0
  313. package/src/dex/uniswap-v3/types.ts +14 -1
  314. package/src/dex/uniswap-v3/uniswap-v3-e2e.test.ts +1071 -346
  315. package/src/dex/uniswap-v3/uniswap-v3-factory.ts +73 -0
  316. package/src/dex/uniswap-v3/uniswap-v3-integration.test.ts +787 -14
  317. package/src/dex/uniswap-v3/uniswap-v3-pool.ts +13 -5
  318. package/src/dex/uniswap-v3/uniswap-v3.ts +87 -20
  319. package/src/dex/weth/config.ts +3 -0
  320. package/src/dex/woo-fi-v2/config.ts +13 -0
  321. package/src/dex/woo-fi-v2/woo-fi-v2-e2e.test.ts +64 -0
  322. package/src/dex-helper/dummy-dex-helper.ts +8 -1
  323. package/src/dex-helper/icache.ts +2 -0
  324. package/src/lib/api3-feed.ts +175 -0
  325. package/src/lib/decoders.ts +13 -0
  326. package/src/stateful-event-subscriber.ts +8 -0
  327. package/src/types.ts +2 -0
  328. package/tests/constants-e2e.ts +102 -6
  329. package/tests/tenderly-simulation.ts +48 -4
  330. package/tests/utils-e2e.ts +21 -11
@@ -0,0 +1,1599 @@
1
+ [
2
+ {
3
+ "inputs": [],
4
+ "stateMutability": "nonpayable",
5
+ "type": "constructor"
6
+ },
7
+ {
8
+ "anonymous": false,
9
+ "inputs": [
10
+ {
11
+ "indexed": false,
12
+ "internalType": "uint24",
13
+ "name": "oldFee",
14
+ "type": "uint24"
15
+ },
16
+ {
17
+ "indexed": false,
18
+ "internalType": "uint24",
19
+ "name": "newFee",
20
+ "type": "uint24"
21
+ }
22
+ ],
23
+ "name": "FeeAdjustment",
24
+ "type": "event"
25
+ },
26
+ {
27
+ "anonymous": false,
28
+ "inputs": [
29
+ {
30
+ "indexed": true,
31
+ "internalType": "address",
32
+ "name": "owner",
33
+ "type": "address"
34
+ },
35
+ {
36
+ "indexed": true,
37
+ "internalType": "int24",
38
+ "name": "tickLower",
39
+ "type": "int24"
40
+ },
41
+ {
42
+ "indexed": true,
43
+ "internalType": "int24",
44
+ "name": "tickUpper",
45
+ "type": "int24"
46
+ },
47
+ {
48
+ "indexed": false,
49
+ "internalType": "uint128",
50
+ "name": "amount",
51
+ "type": "uint128"
52
+ },
53
+ {
54
+ "indexed": false,
55
+ "internalType": "uint256",
56
+ "name": "amount0",
57
+ "type": "uint256"
58
+ },
59
+ {
60
+ "indexed": false,
61
+ "internalType": "uint256",
62
+ "name": "amount1",
63
+ "type": "uint256"
64
+ }
65
+ ],
66
+ "name": "Burn",
67
+ "type": "event"
68
+ },
69
+ {
70
+ "anonymous": false,
71
+ "inputs": [
72
+ {
73
+ "indexed": true,
74
+ "internalType": "address",
75
+ "name": "owner",
76
+ "type": "address"
77
+ },
78
+ {
79
+ "indexed": false,
80
+ "internalType": "address",
81
+ "name": "recipient",
82
+ "type": "address"
83
+ },
84
+ {
85
+ "indexed": true,
86
+ "internalType": "int24",
87
+ "name": "tickLower",
88
+ "type": "int24"
89
+ },
90
+ {
91
+ "indexed": true,
92
+ "internalType": "int24",
93
+ "name": "tickUpper",
94
+ "type": "int24"
95
+ },
96
+ {
97
+ "indexed": false,
98
+ "internalType": "uint128",
99
+ "name": "amount0",
100
+ "type": "uint128"
101
+ },
102
+ {
103
+ "indexed": false,
104
+ "internalType": "uint128",
105
+ "name": "amount1",
106
+ "type": "uint128"
107
+ }
108
+ ],
109
+ "name": "Collect",
110
+ "type": "event"
111
+ },
112
+ {
113
+ "anonymous": false,
114
+ "inputs": [
115
+ {
116
+ "indexed": true,
117
+ "internalType": "address",
118
+ "name": "sender",
119
+ "type": "address"
120
+ },
121
+ {
122
+ "indexed": true,
123
+ "internalType": "address",
124
+ "name": "recipient",
125
+ "type": "address"
126
+ },
127
+ {
128
+ "indexed": false,
129
+ "internalType": "uint128",
130
+ "name": "amount0",
131
+ "type": "uint128"
132
+ },
133
+ {
134
+ "indexed": false,
135
+ "internalType": "uint128",
136
+ "name": "amount1",
137
+ "type": "uint128"
138
+ }
139
+ ],
140
+ "name": "CollectProtocol",
141
+ "type": "event"
142
+ },
143
+ {
144
+ "anonymous": false,
145
+ "inputs": [
146
+ {
147
+ "indexed": true,
148
+ "internalType": "address",
149
+ "name": "sender",
150
+ "type": "address"
151
+ },
152
+ {
153
+ "indexed": true,
154
+ "internalType": "address",
155
+ "name": "recipient",
156
+ "type": "address"
157
+ },
158
+ {
159
+ "indexed": false,
160
+ "internalType": "uint256",
161
+ "name": "amount0",
162
+ "type": "uint256"
163
+ },
164
+ {
165
+ "indexed": false,
166
+ "internalType": "uint256",
167
+ "name": "amount1",
168
+ "type": "uint256"
169
+ },
170
+ {
171
+ "indexed": false,
172
+ "internalType": "uint256",
173
+ "name": "paid0",
174
+ "type": "uint256"
175
+ },
176
+ {
177
+ "indexed": false,
178
+ "internalType": "uint256",
179
+ "name": "paid1",
180
+ "type": "uint256"
181
+ }
182
+ ],
183
+ "name": "Flash",
184
+ "type": "event"
185
+ },
186
+ {
187
+ "anonymous": false,
188
+ "inputs": [
189
+ {
190
+ "indexed": false,
191
+ "internalType": "uint16",
192
+ "name": "observationCardinalityNextOld",
193
+ "type": "uint16"
194
+ },
195
+ {
196
+ "indexed": false,
197
+ "internalType": "uint16",
198
+ "name": "observationCardinalityNextNew",
199
+ "type": "uint16"
200
+ }
201
+ ],
202
+ "name": "IncreaseObservationCardinalityNext",
203
+ "type": "event"
204
+ },
205
+ {
206
+ "anonymous": false,
207
+ "inputs": [
208
+ {
209
+ "indexed": false,
210
+ "internalType": "uint160",
211
+ "name": "sqrtPriceX96",
212
+ "type": "uint160"
213
+ },
214
+ {
215
+ "indexed": false,
216
+ "internalType": "int24",
217
+ "name": "tick",
218
+ "type": "int24"
219
+ }
220
+ ],
221
+ "name": "Initialize",
222
+ "type": "event"
223
+ },
224
+ {
225
+ "anonymous": false,
226
+ "inputs": [
227
+ {
228
+ "indexed": false,
229
+ "internalType": "address",
230
+ "name": "sender",
231
+ "type": "address"
232
+ },
233
+ {
234
+ "indexed": true,
235
+ "internalType": "address",
236
+ "name": "owner",
237
+ "type": "address"
238
+ },
239
+ {
240
+ "indexed": true,
241
+ "internalType": "int24",
242
+ "name": "tickLower",
243
+ "type": "int24"
244
+ },
245
+ {
246
+ "indexed": true,
247
+ "internalType": "int24",
248
+ "name": "tickUpper",
249
+ "type": "int24"
250
+ },
251
+ {
252
+ "indexed": false,
253
+ "internalType": "uint128",
254
+ "name": "amount",
255
+ "type": "uint128"
256
+ },
257
+ {
258
+ "indexed": false,
259
+ "internalType": "uint256",
260
+ "name": "amount0",
261
+ "type": "uint256"
262
+ },
263
+ {
264
+ "indexed": false,
265
+ "internalType": "uint256",
266
+ "name": "amount1",
267
+ "type": "uint256"
268
+ }
269
+ ],
270
+ "name": "Mint",
271
+ "type": "event"
272
+ },
273
+ {
274
+ "anonymous": false,
275
+ "inputs": [
276
+ {
277
+ "indexed": false,
278
+ "internalType": "uint8",
279
+ "name": "feeProtocol0Old",
280
+ "type": "uint8"
281
+ },
282
+ {
283
+ "indexed": false,
284
+ "internalType": "uint8",
285
+ "name": "feeProtocol1Old",
286
+ "type": "uint8"
287
+ },
288
+ {
289
+ "indexed": false,
290
+ "internalType": "uint8",
291
+ "name": "feeProtocol0New",
292
+ "type": "uint8"
293
+ },
294
+ {
295
+ "indexed": false,
296
+ "internalType": "uint8",
297
+ "name": "feeProtocol1New",
298
+ "type": "uint8"
299
+ }
300
+ ],
301
+ "name": "SetFeeProtocol",
302
+ "type": "event"
303
+ },
304
+ {
305
+ "anonymous": false,
306
+ "inputs": [
307
+ {
308
+ "indexed": true,
309
+ "internalType": "address",
310
+ "name": "sender",
311
+ "type": "address"
312
+ },
313
+ {
314
+ "indexed": true,
315
+ "internalType": "address",
316
+ "name": "recipient",
317
+ "type": "address"
318
+ },
319
+ {
320
+ "indexed": false,
321
+ "internalType": "int256",
322
+ "name": "amount0",
323
+ "type": "int256"
324
+ },
325
+ {
326
+ "indexed": false,
327
+ "internalType": "int256",
328
+ "name": "amount1",
329
+ "type": "int256"
330
+ },
331
+ {
332
+ "indexed": false,
333
+ "internalType": "uint160",
334
+ "name": "sqrtPriceX96",
335
+ "type": "uint160"
336
+ },
337
+ {
338
+ "indexed": false,
339
+ "internalType": "uint128",
340
+ "name": "liquidity",
341
+ "type": "uint128"
342
+ },
343
+ {
344
+ "indexed": false,
345
+ "internalType": "int24",
346
+ "name": "tick",
347
+ "type": "int24"
348
+ }
349
+ ],
350
+ "name": "Swap",
351
+ "type": "event"
352
+ },
353
+ {
354
+ "inputs": [
355
+ {
356
+ "internalType": "uint256",
357
+ "name": "period",
358
+ "type": "uint256"
359
+ }
360
+ ],
361
+ "name": "boostInfos",
362
+ "outputs": [
363
+ {
364
+ "internalType": "uint128",
365
+ "name": "totalBoostAmount",
366
+ "type": "uint128"
367
+ },
368
+ {
369
+ "internalType": "int128",
370
+ "name": "totalVeRamAmount",
371
+ "type": "int128"
372
+ }
373
+ ],
374
+ "stateMutability": "view",
375
+ "type": "function"
376
+ },
377
+ {
378
+ "inputs": [
379
+ {
380
+ "internalType": "uint256",
381
+ "name": "period",
382
+ "type": "uint256"
383
+ },
384
+ {
385
+ "internalType": "bytes32",
386
+ "name": "key",
387
+ "type": "bytes32"
388
+ }
389
+ ],
390
+ "name": "boostInfos",
391
+ "outputs": [
392
+ {
393
+ "internalType": "uint128",
394
+ "name": "boostAmount",
395
+ "type": "uint128"
396
+ },
397
+ {
398
+ "internalType": "int128",
399
+ "name": "veRamAmount",
400
+ "type": "int128"
401
+ },
402
+ {
403
+ "internalType": "int256",
404
+ "name": "secondsDebtX96",
405
+ "type": "int256"
406
+ },
407
+ {
408
+ "internalType": "int256",
409
+ "name": "boostedSecondsDebtX96",
410
+ "type": "int256"
411
+ }
412
+ ],
413
+ "stateMutability": "view",
414
+ "type": "function"
415
+ },
416
+ {
417
+ "inputs": [],
418
+ "name": "boostedLiquidity",
419
+ "outputs": [
420
+ {
421
+ "internalType": "uint128",
422
+ "name": "",
423
+ "type": "uint128"
424
+ }
425
+ ],
426
+ "stateMutability": "view",
427
+ "type": "function"
428
+ },
429
+ {
430
+ "inputs": [
431
+ {
432
+ "internalType": "uint256",
433
+ "name": "index",
434
+ "type": "uint256"
435
+ },
436
+ {
437
+ "internalType": "int24",
438
+ "name": "tickLower",
439
+ "type": "int24"
440
+ },
441
+ {
442
+ "internalType": "int24",
443
+ "name": "tickUpper",
444
+ "type": "int24"
445
+ },
446
+ {
447
+ "internalType": "uint128",
448
+ "name": "amount",
449
+ "type": "uint128"
450
+ }
451
+ ],
452
+ "name": "burn",
453
+ "outputs": [
454
+ {
455
+ "internalType": "uint256",
456
+ "name": "amount0",
457
+ "type": "uint256"
458
+ },
459
+ {
460
+ "internalType": "uint256",
461
+ "name": "amount1",
462
+ "type": "uint256"
463
+ }
464
+ ],
465
+ "stateMutability": "nonpayable",
466
+ "type": "function"
467
+ },
468
+ {
469
+ "inputs": [
470
+ {
471
+ "internalType": "int24",
472
+ "name": "tickLower",
473
+ "type": "int24"
474
+ },
475
+ {
476
+ "internalType": "int24",
477
+ "name": "tickUpper",
478
+ "type": "int24"
479
+ },
480
+ {
481
+ "internalType": "uint128",
482
+ "name": "amount",
483
+ "type": "uint128"
484
+ }
485
+ ],
486
+ "name": "burn",
487
+ "outputs": [
488
+ {
489
+ "internalType": "uint256",
490
+ "name": "amount0",
491
+ "type": "uint256"
492
+ },
493
+ {
494
+ "internalType": "uint256",
495
+ "name": "amount1",
496
+ "type": "uint256"
497
+ }
498
+ ],
499
+ "stateMutability": "nonpayable",
500
+ "type": "function"
501
+ },
502
+ {
503
+ "inputs": [
504
+ {
505
+ "internalType": "uint256",
506
+ "name": "index",
507
+ "type": "uint256"
508
+ },
509
+ {
510
+ "internalType": "int24",
511
+ "name": "tickLower",
512
+ "type": "int24"
513
+ },
514
+ {
515
+ "internalType": "int24",
516
+ "name": "tickUpper",
517
+ "type": "int24"
518
+ },
519
+ {
520
+ "internalType": "uint128",
521
+ "name": "amount",
522
+ "type": "uint128"
523
+ },
524
+ {
525
+ "internalType": "uint256",
526
+ "name": "veRamTokenId",
527
+ "type": "uint256"
528
+ }
529
+ ],
530
+ "name": "burn",
531
+ "outputs": [
532
+ {
533
+ "internalType": "uint256",
534
+ "name": "amount0",
535
+ "type": "uint256"
536
+ },
537
+ {
538
+ "internalType": "uint256",
539
+ "name": "amount1",
540
+ "type": "uint256"
541
+ }
542
+ ],
543
+ "stateMutability": "nonpayable",
544
+ "type": "function"
545
+ },
546
+ {
547
+ "inputs": [
548
+ {
549
+ "internalType": "address",
550
+ "name": "recipient",
551
+ "type": "address"
552
+ },
553
+ {
554
+ "internalType": "int24",
555
+ "name": "tickLower",
556
+ "type": "int24"
557
+ },
558
+ {
559
+ "internalType": "int24",
560
+ "name": "tickUpper",
561
+ "type": "int24"
562
+ },
563
+ {
564
+ "internalType": "uint128",
565
+ "name": "amount0Requested",
566
+ "type": "uint128"
567
+ },
568
+ {
569
+ "internalType": "uint128",
570
+ "name": "amount1Requested",
571
+ "type": "uint128"
572
+ }
573
+ ],
574
+ "name": "collect",
575
+ "outputs": [
576
+ {
577
+ "internalType": "uint128",
578
+ "name": "amount0",
579
+ "type": "uint128"
580
+ },
581
+ {
582
+ "internalType": "uint128",
583
+ "name": "amount1",
584
+ "type": "uint128"
585
+ }
586
+ ],
587
+ "stateMutability": "nonpayable",
588
+ "type": "function"
589
+ },
590
+ {
591
+ "inputs": [
592
+ {
593
+ "internalType": "address",
594
+ "name": "recipient",
595
+ "type": "address"
596
+ },
597
+ {
598
+ "internalType": "uint256",
599
+ "name": "index",
600
+ "type": "uint256"
601
+ },
602
+ {
603
+ "internalType": "int24",
604
+ "name": "tickLower",
605
+ "type": "int24"
606
+ },
607
+ {
608
+ "internalType": "int24",
609
+ "name": "tickUpper",
610
+ "type": "int24"
611
+ },
612
+ {
613
+ "internalType": "uint128",
614
+ "name": "amount0Requested",
615
+ "type": "uint128"
616
+ },
617
+ {
618
+ "internalType": "uint128",
619
+ "name": "amount1Requested",
620
+ "type": "uint128"
621
+ }
622
+ ],
623
+ "name": "collect",
624
+ "outputs": [
625
+ {
626
+ "internalType": "uint128",
627
+ "name": "amount0",
628
+ "type": "uint128"
629
+ },
630
+ {
631
+ "internalType": "uint128",
632
+ "name": "amount1",
633
+ "type": "uint128"
634
+ }
635
+ ],
636
+ "stateMutability": "nonpayable",
637
+ "type": "function"
638
+ },
639
+ {
640
+ "inputs": [
641
+ {
642
+ "internalType": "address",
643
+ "name": "recipient",
644
+ "type": "address"
645
+ },
646
+ {
647
+ "internalType": "uint128",
648
+ "name": "amount0Requested",
649
+ "type": "uint128"
650
+ },
651
+ {
652
+ "internalType": "uint128",
653
+ "name": "amount1Requested",
654
+ "type": "uint128"
655
+ }
656
+ ],
657
+ "name": "collectProtocol",
658
+ "outputs": [
659
+ {
660
+ "internalType": "uint128",
661
+ "name": "amount0",
662
+ "type": "uint128"
663
+ },
664
+ {
665
+ "internalType": "uint128",
666
+ "name": "amount1",
667
+ "type": "uint128"
668
+ }
669
+ ],
670
+ "stateMutability": "nonpayable",
671
+ "type": "function"
672
+ },
673
+ {
674
+ "inputs": [],
675
+ "name": "currentFee",
676
+ "outputs": [
677
+ {
678
+ "internalType": "uint24",
679
+ "name": "",
680
+ "type": "uint24"
681
+ }
682
+ ],
683
+ "stateMutability": "view",
684
+ "type": "function"
685
+ },
686
+ {
687
+ "inputs": [],
688
+ "name": "factory",
689
+ "outputs": [
690
+ {
691
+ "internalType": "address",
692
+ "name": "",
693
+ "type": "address"
694
+ }
695
+ ],
696
+ "stateMutability": "view",
697
+ "type": "function"
698
+ },
699
+ {
700
+ "inputs": [],
701
+ "name": "fee",
702
+ "outputs": [
703
+ {
704
+ "internalType": "uint24",
705
+ "name": "",
706
+ "type": "uint24"
707
+ }
708
+ ],
709
+ "stateMutability": "view",
710
+ "type": "function"
711
+ },
712
+ {
713
+ "inputs": [],
714
+ "name": "feeGrowthGlobal0X128",
715
+ "outputs": [
716
+ {
717
+ "internalType": "uint256",
718
+ "name": "",
719
+ "type": "uint256"
720
+ }
721
+ ],
722
+ "stateMutability": "view",
723
+ "type": "function"
724
+ },
725
+ {
726
+ "inputs": [],
727
+ "name": "feeGrowthGlobal1X128",
728
+ "outputs": [
729
+ {
730
+ "internalType": "uint256",
731
+ "name": "",
732
+ "type": "uint256"
733
+ }
734
+ ],
735
+ "stateMutability": "view",
736
+ "type": "function"
737
+ },
738
+ {
739
+ "inputs": [
740
+ {
741
+ "internalType": "address",
742
+ "name": "recipient",
743
+ "type": "address"
744
+ },
745
+ {
746
+ "internalType": "uint256",
747
+ "name": "amount0",
748
+ "type": "uint256"
749
+ },
750
+ {
751
+ "internalType": "uint256",
752
+ "name": "amount1",
753
+ "type": "uint256"
754
+ },
755
+ {
756
+ "internalType": "bytes",
757
+ "name": "data",
758
+ "type": "bytes"
759
+ }
760
+ ],
761
+ "name": "flash",
762
+ "outputs": [],
763
+ "stateMutability": "nonpayable",
764
+ "type": "function"
765
+ },
766
+ {
767
+ "inputs": [
768
+ {
769
+ "internalType": "uint16",
770
+ "name": "observationCardinalityNext",
771
+ "type": "uint16"
772
+ }
773
+ ],
774
+ "name": "increaseObservationCardinalityNext",
775
+ "outputs": [],
776
+ "stateMutability": "nonpayable",
777
+ "type": "function"
778
+ },
779
+ {
780
+ "inputs": [
781
+ {
782
+ "internalType": "address",
783
+ "name": "_factory",
784
+ "type": "address"
785
+ },
786
+ {
787
+ "internalType": "address",
788
+ "name": "_nfpManager",
789
+ "type": "address"
790
+ },
791
+ {
792
+ "internalType": "address",
793
+ "name": "_veRam",
794
+ "type": "address"
795
+ },
796
+ {
797
+ "internalType": "address",
798
+ "name": "_voter",
799
+ "type": "address"
800
+ },
801
+ {
802
+ "internalType": "address",
803
+ "name": "_token0",
804
+ "type": "address"
805
+ },
806
+ {
807
+ "internalType": "address",
808
+ "name": "_token1",
809
+ "type": "address"
810
+ },
811
+ {
812
+ "internalType": "uint24",
813
+ "name": "_fee",
814
+ "type": "uint24"
815
+ },
816
+ {
817
+ "internalType": "int24",
818
+ "name": "_tickSpacing",
819
+ "type": "int24"
820
+ }
821
+ ],
822
+ "name": "initialize",
823
+ "outputs": [],
824
+ "stateMutability": "nonpayable",
825
+ "type": "function"
826
+ },
827
+ {
828
+ "inputs": [
829
+ {
830
+ "internalType": "uint160",
831
+ "name": "sqrtPriceX96",
832
+ "type": "uint160"
833
+ }
834
+ ],
835
+ "name": "initialize",
836
+ "outputs": [],
837
+ "stateMutability": "nonpayable",
838
+ "type": "function"
839
+ },
840
+ {
841
+ "inputs": [],
842
+ "name": "lastPeriod",
843
+ "outputs": [
844
+ {
845
+ "internalType": "uint256",
846
+ "name": "",
847
+ "type": "uint256"
848
+ }
849
+ ],
850
+ "stateMutability": "view",
851
+ "type": "function"
852
+ },
853
+ {
854
+ "inputs": [],
855
+ "name": "liquidity",
856
+ "outputs": [
857
+ {
858
+ "internalType": "uint128",
859
+ "name": "",
860
+ "type": "uint128"
861
+ }
862
+ ],
863
+ "stateMutability": "view",
864
+ "type": "function"
865
+ },
866
+ {
867
+ "inputs": [],
868
+ "name": "maxLiquidityPerTick",
869
+ "outputs": [
870
+ {
871
+ "internalType": "uint128",
872
+ "name": "",
873
+ "type": "uint128"
874
+ }
875
+ ],
876
+ "stateMutability": "view",
877
+ "type": "function"
878
+ },
879
+ {
880
+ "inputs": [
881
+ {
882
+ "internalType": "address",
883
+ "name": "recipient",
884
+ "type": "address"
885
+ },
886
+ {
887
+ "internalType": "int24",
888
+ "name": "tickLower",
889
+ "type": "int24"
890
+ },
891
+ {
892
+ "internalType": "int24",
893
+ "name": "tickUpper",
894
+ "type": "int24"
895
+ },
896
+ {
897
+ "internalType": "uint128",
898
+ "name": "amount",
899
+ "type": "uint128"
900
+ },
901
+ {
902
+ "internalType": "bytes",
903
+ "name": "data",
904
+ "type": "bytes"
905
+ }
906
+ ],
907
+ "name": "mint",
908
+ "outputs": [
909
+ {
910
+ "internalType": "uint256",
911
+ "name": "amount0",
912
+ "type": "uint256"
913
+ },
914
+ {
915
+ "internalType": "uint256",
916
+ "name": "amount1",
917
+ "type": "uint256"
918
+ }
919
+ ],
920
+ "stateMutability": "nonpayable",
921
+ "type": "function"
922
+ },
923
+ {
924
+ "inputs": [
925
+ {
926
+ "internalType": "address",
927
+ "name": "recipient",
928
+ "type": "address"
929
+ },
930
+ {
931
+ "internalType": "uint256",
932
+ "name": "index",
933
+ "type": "uint256"
934
+ },
935
+ {
936
+ "internalType": "int24",
937
+ "name": "tickLower",
938
+ "type": "int24"
939
+ },
940
+ {
941
+ "internalType": "int24",
942
+ "name": "tickUpper",
943
+ "type": "int24"
944
+ },
945
+ {
946
+ "internalType": "uint128",
947
+ "name": "amount",
948
+ "type": "uint128"
949
+ },
950
+ {
951
+ "internalType": "uint256",
952
+ "name": "veRamTokenId",
953
+ "type": "uint256"
954
+ },
955
+ {
956
+ "internalType": "bytes",
957
+ "name": "data",
958
+ "type": "bytes"
959
+ }
960
+ ],
961
+ "name": "mint",
962
+ "outputs": [
963
+ {
964
+ "internalType": "uint256",
965
+ "name": "amount0",
966
+ "type": "uint256"
967
+ },
968
+ {
969
+ "internalType": "uint256",
970
+ "name": "amount1",
971
+ "type": "uint256"
972
+ }
973
+ ],
974
+ "stateMutability": "nonpayable",
975
+ "type": "function"
976
+ },
977
+ {
978
+ "inputs": [],
979
+ "name": "nfpManager",
980
+ "outputs": [
981
+ {
982
+ "internalType": "address",
983
+ "name": "",
984
+ "type": "address"
985
+ }
986
+ ],
987
+ "stateMutability": "view",
988
+ "type": "function"
989
+ },
990
+ {
991
+ "inputs": [
992
+ {
993
+ "internalType": "uint256",
994
+ "name": "index",
995
+ "type": "uint256"
996
+ }
997
+ ],
998
+ "name": "observations",
999
+ "outputs": [
1000
+ {
1001
+ "internalType": "uint32",
1002
+ "name": "blockTimestamp",
1003
+ "type": "uint32"
1004
+ },
1005
+ {
1006
+ "internalType": "int56",
1007
+ "name": "tickCumulative",
1008
+ "type": "int56"
1009
+ },
1010
+ {
1011
+ "internalType": "uint160",
1012
+ "name": "secondsPerLiquidityCumulativeX128",
1013
+ "type": "uint160"
1014
+ },
1015
+ {
1016
+ "internalType": "bool",
1017
+ "name": "initialized",
1018
+ "type": "bool"
1019
+ },
1020
+ {
1021
+ "internalType": "uint160",
1022
+ "name": "secondsPerBoostedLiquidityPeriodX128",
1023
+ "type": "uint160"
1024
+ }
1025
+ ],
1026
+ "stateMutability": "view",
1027
+ "type": "function"
1028
+ },
1029
+ {
1030
+ "inputs": [
1031
+ {
1032
+ "internalType": "uint32[]",
1033
+ "name": "secondsAgos",
1034
+ "type": "uint32[]"
1035
+ }
1036
+ ],
1037
+ "name": "observe",
1038
+ "outputs": [
1039
+ {
1040
+ "internalType": "int56[]",
1041
+ "name": "tickCumulatives",
1042
+ "type": "int56[]"
1043
+ },
1044
+ {
1045
+ "internalType": "uint160[]",
1046
+ "name": "secondsPerLiquidityCumulativeX128s",
1047
+ "type": "uint160[]"
1048
+ },
1049
+ {
1050
+ "internalType": "uint160[]",
1051
+ "name": "secondsPerBoostedLiquidityPeriodX128s",
1052
+ "type": "uint160[]"
1053
+ }
1054
+ ],
1055
+ "stateMutability": "view",
1056
+ "type": "function"
1057
+ },
1058
+ {
1059
+ "inputs": [
1060
+ {
1061
+ "internalType": "uint32",
1062
+ "name": "period",
1063
+ "type": "uint32"
1064
+ },
1065
+ {
1066
+ "internalType": "int24",
1067
+ "name": "tickLower",
1068
+ "type": "int24"
1069
+ },
1070
+ {
1071
+ "internalType": "int24",
1072
+ "name": "tickUpper",
1073
+ "type": "int24"
1074
+ }
1075
+ ],
1076
+ "name": "periodCumulativesInside",
1077
+ "outputs": [
1078
+ {
1079
+ "internalType": "uint160",
1080
+ "name": "secondsPerLiquidityInsideX128",
1081
+ "type": "uint160"
1082
+ },
1083
+ {
1084
+ "internalType": "uint160",
1085
+ "name": "secondsPerBoostedLiquidityInsideX128",
1086
+ "type": "uint160"
1087
+ }
1088
+ ],
1089
+ "stateMutability": "view",
1090
+ "type": "function"
1091
+ },
1092
+ {
1093
+ "inputs": [
1094
+ {
1095
+ "internalType": "uint256",
1096
+ "name": "period",
1097
+ "type": "uint256"
1098
+ }
1099
+ ],
1100
+ "name": "periods",
1101
+ "outputs": [
1102
+ {
1103
+ "internalType": "uint32",
1104
+ "name": "previousPeriod",
1105
+ "type": "uint32"
1106
+ },
1107
+ {
1108
+ "internalType": "int24",
1109
+ "name": "startTick",
1110
+ "type": "int24"
1111
+ },
1112
+ {
1113
+ "internalType": "int24",
1114
+ "name": "lastTick",
1115
+ "type": "int24"
1116
+ },
1117
+ {
1118
+ "internalType": "uint160",
1119
+ "name": "endSecondsPerLiquidityPeriodX128",
1120
+ "type": "uint160"
1121
+ },
1122
+ {
1123
+ "internalType": "uint160",
1124
+ "name": "endSecondsPerBoostedLiquidityPeriodX128",
1125
+ "type": "uint160"
1126
+ },
1127
+ {
1128
+ "internalType": "uint32",
1129
+ "name": "boostedInRange",
1130
+ "type": "uint32"
1131
+ }
1132
+ ],
1133
+ "stateMutability": "view",
1134
+ "type": "function"
1135
+ },
1136
+ {
1137
+ "inputs": [
1138
+ {
1139
+ "internalType": "uint256",
1140
+ "name": "period",
1141
+ "type": "uint256"
1142
+ },
1143
+ {
1144
+ "internalType": "address",
1145
+ "name": "owner",
1146
+ "type": "address"
1147
+ },
1148
+ {
1149
+ "internalType": "uint256",
1150
+ "name": "index",
1151
+ "type": "uint256"
1152
+ },
1153
+ {
1154
+ "internalType": "int24",
1155
+ "name": "tickLower",
1156
+ "type": "int24"
1157
+ },
1158
+ {
1159
+ "internalType": "int24",
1160
+ "name": "tickUpper",
1161
+ "type": "int24"
1162
+ }
1163
+ ],
1164
+ "name": "positionPeriodDebt",
1165
+ "outputs": [
1166
+ {
1167
+ "internalType": "int256",
1168
+ "name": "secondsDebtX96",
1169
+ "type": "int256"
1170
+ },
1171
+ {
1172
+ "internalType": "int256",
1173
+ "name": "boostedSecondsDebtX96",
1174
+ "type": "int256"
1175
+ }
1176
+ ],
1177
+ "stateMutability": "view",
1178
+ "type": "function"
1179
+ },
1180
+ {
1181
+ "inputs": [
1182
+ {
1183
+ "internalType": "uint256",
1184
+ "name": "period",
1185
+ "type": "uint256"
1186
+ },
1187
+ {
1188
+ "internalType": "address",
1189
+ "name": "owner",
1190
+ "type": "address"
1191
+ },
1192
+ {
1193
+ "internalType": "uint256",
1194
+ "name": "index",
1195
+ "type": "uint256"
1196
+ },
1197
+ {
1198
+ "internalType": "int24",
1199
+ "name": "tickLower",
1200
+ "type": "int24"
1201
+ },
1202
+ {
1203
+ "internalType": "int24",
1204
+ "name": "tickUpper",
1205
+ "type": "int24"
1206
+ }
1207
+ ],
1208
+ "name": "positionPeriodSecondsInRange",
1209
+ "outputs": [
1210
+ {
1211
+ "internalType": "uint256",
1212
+ "name": "periodSecondsInsideX96",
1213
+ "type": "uint256"
1214
+ },
1215
+ {
1216
+ "internalType": "uint256",
1217
+ "name": "periodBoostedSecondsInsideX96",
1218
+ "type": "uint256"
1219
+ }
1220
+ ],
1221
+ "stateMutability": "view",
1222
+ "type": "function"
1223
+ },
1224
+ {
1225
+ "inputs": [
1226
+ {
1227
+ "internalType": "bytes32",
1228
+ "name": "key",
1229
+ "type": "bytes32"
1230
+ }
1231
+ ],
1232
+ "name": "positions",
1233
+ "outputs": [
1234
+ {
1235
+ "internalType": "uint128",
1236
+ "name": "liquidity",
1237
+ "type": "uint128"
1238
+ },
1239
+ {
1240
+ "internalType": "uint256",
1241
+ "name": "feeGrowthInside0LastX128",
1242
+ "type": "uint256"
1243
+ },
1244
+ {
1245
+ "internalType": "uint256",
1246
+ "name": "feeGrowthInside1LastX128",
1247
+ "type": "uint256"
1248
+ },
1249
+ {
1250
+ "internalType": "uint128",
1251
+ "name": "tokensOwed0",
1252
+ "type": "uint128"
1253
+ },
1254
+ {
1255
+ "internalType": "uint128",
1256
+ "name": "tokensOwed1",
1257
+ "type": "uint128"
1258
+ },
1259
+ {
1260
+ "internalType": "uint256",
1261
+ "name": "attachedVeRamId",
1262
+ "type": "uint256"
1263
+ }
1264
+ ],
1265
+ "stateMutability": "view",
1266
+ "type": "function"
1267
+ },
1268
+ {
1269
+ "inputs": [],
1270
+ "name": "protocolFees",
1271
+ "outputs": [
1272
+ {
1273
+ "internalType": "uint128",
1274
+ "name": "token0",
1275
+ "type": "uint128"
1276
+ },
1277
+ {
1278
+ "internalType": "uint128",
1279
+ "name": "token1",
1280
+ "type": "uint128"
1281
+ }
1282
+ ],
1283
+ "stateMutability": "view",
1284
+ "type": "function"
1285
+ },
1286
+ {
1287
+ "inputs": [
1288
+ {
1289
+ "internalType": "bytes32[]",
1290
+ "name": "slots",
1291
+ "type": "bytes32[]"
1292
+ }
1293
+ ],
1294
+ "name": "readStorage",
1295
+ "outputs": [
1296
+ {
1297
+ "internalType": "bytes32[]",
1298
+ "name": "returnData",
1299
+ "type": "bytes32[]"
1300
+ }
1301
+ ],
1302
+ "stateMutability": "view",
1303
+ "type": "function"
1304
+ },
1305
+ {
1306
+ "inputs": [
1307
+ {
1308
+ "internalType": "uint24",
1309
+ "name": "_fee",
1310
+ "type": "uint24"
1311
+ }
1312
+ ],
1313
+ "name": "setFee",
1314
+ "outputs": [],
1315
+ "stateMutability": "nonpayable",
1316
+ "type": "function"
1317
+ },
1318
+ {
1319
+ "inputs": [],
1320
+ "name": "setFeeProtocol",
1321
+ "outputs": [],
1322
+ "stateMutability": "nonpayable",
1323
+ "type": "function"
1324
+ },
1325
+ {
1326
+ "inputs": [],
1327
+ "name": "slot0",
1328
+ "outputs": [
1329
+ {
1330
+ "internalType": "uint160",
1331
+ "name": "sqrtPriceX96",
1332
+ "type": "uint160"
1333
+ },
1334
+ {
1335
+ "internalType": "int24",
1336
+ "name": "tick",
1337
+ "type": "int24"
1338
+ },
1339
+ {
1340
+ "internalType": "uint16",
1341
+ "name": "observationIndex",
1342
+ "type": "uint16"
1343
+ },
1344
+ {
1345
+ "internalType": "uint16",
1346
+ "name": "observationCardinality",
1347
+ "type": "uint16"
1348
+ },
1349
+ {
1350
+ "internalType": "uint16",
1351
+ "name": "observationCardinalityNext",
1352
+ "type": "uint16"
1353
+ },
1354
+ {
1355
+ "internalType": "uint8",
1356
+ "name": "feeProtocol",
1357
+ "type": "uint8"
1358
+ },
1359
+ {
1360
+ "internalType": "bool",
1361
+ "name": "unlocked",
1362
+ "type": "bool"
1363
+ }
1364
+ ],
1365
+ "stateMutability": "view",
1366
+ "type": "function"
1367
+ },
1368
+ {
1369
+ "inputs": [
1370
+ {
1371
+ "internalType": "int24",
1372
+ "name": "tickLower",
1373
+ "type": "int24"
1374
+ },
1375
+ {
1376
+ "internalType": "int24",
1377
+ "name": "tickUpper",
1378
+ "type": "int24"
1379
+ }
1380
+ ],
1381
+ "name": "snapshotCumulativesInside",
1382
+ "outputs": [
1383
+ {
1384
+ "internalType": "int56",
1385
+ "name": "tickCumulativeInside",
1386
+ "type": "int56"
1387
+ },
1388
+ {
1389
+ "internalType": "uint160",
1390
+ "name": "secondsPerLiquidityInsideX128",
1391
+ "type": "uint160"
1392
+ },
1393
+ {
1394
+ "internalType": "uint160",
1395
+ "name": "secondsPerBoostedLiquidityInsideX128",
1396
+ "type": "uint160"
1397
+ },
1398
+ {
1399
+ "internalType": "uint32",
1400
+ "name": "secondsInside",
1401
+ "type": "uint32"
1402
+ }
1403
+ ],
1404
+ "stateMutability": "view",
1405
+ "type": "function"
1406
+ },
1407
+ {
1408
+ "inputs": [
1409
+ {
1410
+ "internalType": "address",
1411
+ "name": "recipient",
1412
+ "type": "address"
1413
+ },
1414
+ {
1415
+ "internalType": "bool",
1416
+ "name": "zeroForOne",
1417
+ "type": "bool"
1418
+ },
1419
+ {
1420
+ "internalType": "int256",
1421
+ "name": "amountSpecified",
1422
+ "type": "int256"
1423
+ },
1424
+ {
1425
+ "internalType": "uint160",
1426
+ "name": "sqrtPriceLimitX96",
1427
+ "type": "uint160"
1428
+ },
1429
+ {
1430
+ "internalType": "bytes",
1431
+ "name": "data",
1432
+ "type": "bytes"
1433
+ }
1434
+ ],
1435
+ "name": "swap",
1436
+ "outputs": [
1437
+ {
1438
+ "internalType": "int256",
1439
+ "name": "amount0",
1440
+ "type": "int256"
1441
+ },
1442
+ {
1443
+ "internalType": "int256",
1444
+ "name": "amount1",
1445
+ "type": "int256"
1446
+ }
1447
+ ],
1448
+ "stateMutability": "nonpayable",
1449
+ "type": "function"
1450
+ },
1451
+ {
1452
+ "inputs": [
1453
+ {
1454
+ "internalType": "int16",
1455
+ "name": "tick",
1456
+ "type": "int16"
1457
+ }
1458
+ ],
1459
+ "name": "tickBitmap",
1460
+ "outputs": [
1461
+ {
1462
+ "internalType": "uint256",
1463
+ "name": "",
1464
+ "type": "uint256"
1465
+ }
1466
+ ],
1467
+ "stateMutability": "view",
1468
+ "type": "function"
1469
+ },
1470
+ {
1471
+ "inputs": [],
1472
+ "name": "tickSpacing",
1473
+ "outputs": [
1474
+ {
1475
+ "internalType": "int24",
1476
+ "name": "",
1477
+ "type": "int24"
1478
+ }
1479
+ ],
1480
+ "stateMutability": "view",
1481
+ "type": "function"
1482
+ },
1483
+ {
1484
+ "inputs": [
1485
+ {
1486
+ "internalType": "int24",
1487
+ "name": "tick",
1488
+ "type": "int24"
1489
+ }
1490
+ ],
1491
+ "name": "ticks",
1492
+ "outputs": [
1493
+ {
1494
+ "internalType": "uint128",
1495
+ "name": "liquidityGross",
1496
+ "type": "uint128"
1497
+ },
1498
+ {
1499
+ "internalType": "int128",
1500
+ "name": "liquidityNet",
1501
+ "type": "int128"
1502
+ },
1503
+ {
1504
+ "internalType": "uint128",
1505
+ "name": "boostedLiquidityGross",
1506
+ "type": "uint128"
1507
+ },
1508
+ {
1509
+ "internalType": "int128",
1510
+ "name": "boostedLiquidityNet",
1511
+ "type": "int128"
1512
+ },
1513
+ {
1514
+ "internalType": "uint256",
1515
+ "name": "feeGrowthOutside0X128",
1516
+ "type": "uint256"
1517
+ },
1518
+ {
1519
+ "internalType": "uint256",
1520
+ "name": "feeGrowthOutside1X128",
1521
+ "type": "uint256"
1522
+ },
1523
+ {
1524
+ "internalType": "int56",
1525
+ "name": "tickCumulativeOutside",
1526
+ "type": "int56"
1527
+ },
1528
+ {
1529
+ "internalType": "uint160",
1530
+ "name": "secondsPerLiquidityOutsideX128",
1531
+ "type": "uint160"
1532
+ },
1533
+ {
1534
+ "internalType": "uint32",
1535
+ "name": "secondsOutside",
1536
+ "type": "uint32"
1537
+ },
1538
+ {
1539
+ "internalType": "bool",
1540
+ "name": "initialized",
1541
+ "type": "bool"
1542
+ }
1543
+ ],
1544
+ "stateMutability": "view",
1545
+ "type": "function"
1546
+ },
1547
+ {
1548
+ "inputs": [],
1549
+ "name": "token0",
1550
+ "outputs": [
1551
+ {
1552
+ "internalType": "address",
1553
+ "name": "",
1554
+ "type": "address"
1555
+ }
1556
+ ],
1557
+ "stateMutability": "view",
1558
+ "type": "function"
1559
+ },
1560
+ {
1561
+ "inputs": [],
1562
+ "name": "token1",
1563
+ "outputs": [
1564
+ {
1565
+ "internalType": "address",
1566
+ "name": "",
1567
+ "type": "address"
1568
+ }
1569
+ ],
1570
+ "stateMutability": "view",
1571
+ "type": "function"
1572
+ },
1573
+ {
1574
+ "inputs": [],
1575
+ "name": "veRam",
1576
+ "outputs": [
1577
+ {
1578
+ "internalType": "address",
1579
+ "name": "",
1580
+ "type": "address"
1581
+ }
1582
+ ],
1583
+ "stateMutability": "view",
1584
+ "type": "function"
1585
+ },
1586
+ {
1587
+ "inputs": [],
1588
+ "name": "voter",
1589
+ "outputs": [
1590
+ {
1591
+ "internalType": "address",
1592
+ "name": "",
1593
+ "type": "address"
1594
+ }
1595
+ ],
1596
+ "stateMutability": "view",
1597
+ "type": "function"
1598
+ }
1599
+ ]