@paraswap/dex-lib 4.1.4 → 4.1.5-bal-v3-hooks.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) 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/balancer-v3/directionalFeeHook.json +684 -0
  10. package/build/abi/{BalancerV2.json → balancer-v3/stableSurgeHook.json} +529 -732
  11. package/build/abi/integral/factory.json +333 -0
  12. package/build/abi/{angle-transmuter/ChainlinkEACAggregatorProxy.json → integral/oracle.json} +239 -247
  13. package/build/abi/{curve-v1/StableSwapUSDN.json → integral/pool.json} +487 -450
  14. package/build/abi/{RamsesV2Pool.abi.json → integral/relayer.json} +833 -851
  15. package/build/dex/aave-v1/aave-v1.d.ts +1 -2
  16. package/build/dex/aave-v1/aave-v1.js +0 -22
  17. package/build/dex/aave-v1/aave-v1.js.map +1 -1
  18. package/build/dex/bProtocol.d.ts +18 -0
  19. package/build/dex/bProtocol.js +39 -0
  20. package/build/dex/bProtocol.js.map +1 -0
  21. package/build/dex/balancer-v3/balancer-test-helpers.d.ts +5 -0
  22. package/build/dex/balancer-v3/balancer-test-helpers.js +122 -0
  23. package/build/dex/balancer-v3/balancer-test-helpers.js.map +1 -0
  24. package/build/dex/balancer-v3/balancer-v3-pool.d.ts +4 -1
  25. package/build/dex/balancer-v3/balancer-v3-pool.js +25 -13
  26. package/build/dex/balancer-v3/balancer-v3-pool.js.map +1 -1
  27. package/build/dex/balancer-v3/balancer-v3.d.ts +4 -0
  28. package/build/dex/balancer-v3/balancer-v3.js +29 -3
  29. package/build/dex/balancer-v3/balancer-v3.js.map +1 -1
  30. package/build/dex/balancer-v3/config.js +39 -0
  31. package/build/dex/balancer-v3/config.js.map +1 -1
  32. package/build/dex/balancer-v3/getOnChainState.d.ts +1 -2
  33. package/build/dex/balancer-v3/getOnChainState.js +0 -2
  34. package/build/dex/balancer-v3/getOnChainState.js.map +1 -1
  35. package/build/dex/balancer-v3/getPoolsApi.d.ts +2 -1
  36. package/build/dex/balancer-v3/getPoolsApi.js +17 -10
  37. package/build/dex/balancer-v3/getPoolsApi.js.map +1 -1
  38. package/build/dex/balancer-v3/getTopPoolsApi.d.ts +5 -1
  39. package/build/dex/balancer-v3/getTopPoolsApi.js +6 -3
  40. package/build/dex/balancer-v3/getTopPoolsApi.js.map +1 -1
  41. package/build/dex/balancer-v3/hooks/balancer-hook-event-subscriber.d.ts +54 -0
  42. package/build/dex/balancer-v3/hooks/balancer-hook-event-subscriber.js +139 -0
  43. package/build/dex/balancer-v3/hooks/balancer-hook-event-subscriber.js.map +1 -0
  44. package/build/dex/balancer-v3/hooks/directionalFeeHook.d.ts +26 -0
  45. package/build/dex/balancer-v3/hooks/directionalFeeHook.js +41 -0
  46. package/build/dex/balancer-v3/hooks/directionalFeeHook.js.map +1 -0
  47. package/build/dex/balancer-v3/hooks/loadHooksConfig.d.ts +2 -0
  48. package/build/dex/balancer-v3/hooks/loadHooksConfig.js +11 -0
  49. package/build/dex/balancer-v3/hooks/loadHooksConfig.js.map +1 -0
  50. package/build/dex/balancer-v3/hooks/stableSurgeHook.d.ts +40 -0
  51. package/build/dex/balancer-v3/hooks/stableSurgeHook.js +116 -0
  52. package/build/dex/balancer-v3/hooks/stableSurgeHook.js.map +1 -0
  53. package/build/dex/balancer-v3/types.d.ts +4 -1
  54. package/build/dex/bancor.d.ts +26 -0
  55. package/build/dex/bancor.js +58 -0
  56. package/build/dex/bancor.js.map +1 -0
  57. package/build/dex/compound.d.ts +18 -0
  58. package/build/dex/compound.js +46 -0
  59. package/build/dex/compound.js.map +1 -0
  60. package/build/dex/curve-v2.d.ts +58 -0
  61. package/build/dex/curve-v2.js +180 -0
  62. package/build/dex/curve-v2.js.map +1 -0
  63. package/build/dex/dodo-v1.d.ts +33 -0
  64. package/build/dex/dodo-v1.js +63 -0
  65. package/build/dex/dodo-v1.js.map +1 -0
  66. package/build/dex/fluid-dex/fluid-dex-generate-pool.d.ts +49 -0
  67. package/build/dex/fluid-dex/fluid-dex-generate-pool.js +104 -0
  68. package/build/dex/fluid-dex/fluid-dex-generate-pool.js.map +1 -0
  69. package/build/dex/integral/config.d.ts +4 -0
  70. package/build/dex/integral/config.js +20 -0
  71. package/build/dex/integral/config.js.map +1 -0
  72. package/build/dex/integral/context.d.ts +40 -0
  73. package/build/dex/integral/context.js +158 -0
  74. package/build/dex/integral/context.js.map +1 -0
  75. package/build/dex/integral/integral-factory.d.ts +24 -0
  76. package/build/dex/integral/integral-factory.js +95 -0
  77. package/build/dex/integral/integral-factory.js.map +1 -0
  78. package/build/dex/integral/integral-pool.d.ts +50 -0
  79. package/build/dex/integral/integral-pool.js +149 -0
  80. package/build/dex/integral/integral-pool.js.map +1 -0
  81. package/build/dex/integral/integral-pricing.d.ts +18 -0
  82. package/build/dex/integral/integral-pricing.js +114 -0
  83. package/build/dex/integral/integral-pricing.js.map +1 -0
  84. package/build/dex/integral/integral-relayer.d.ts +42 -0
  85. package/build/dex/integral/integral-relayer.js +192 -0
  86. package/build/dex/integral/integral-relayer.js.map +1 -0
  87. package/build/dex/integral/integral-token.d.ts +27 -0
  88. package/build/dex/integral/integral-token.js +59 -0
  89. package/build/dex/integral/integral-token.js.map +1 -0
  90. package/build/dex/{inception/inception-native.d.ts → integral/integral.d.ts} +19 -21
  91. package/build/dex/integral/integral.js +376 -0
  92. package/build/dex/integral/integral.js.map +1 -0
  93. package/build/dex/integral/types.d.ts +85 -0
  94. package/build/dex/integral/types.js +9 -0
  95. package/build/dex/integral/types.js.map +1 -0
  96. package/build/dex/integral/utils-e2e.d.ts +9 -0
  97. package/build/dex/integral/utils-e2e.js +131 -0
  98. package/build/dex/integral/utils-e2e.js.map +1 -0
  99. package/build/dex/integral/utils.d.ts +17 -0
  100. package/build/dex/integral/utils.js +94 -0
  101. package/build/dex/integral/utils.js.map +1 -0
  102. package/build/dex/jarvis.d.ts +1 -2
  103. package/build/dex/jarvis.js +0 -58
  104. package/build/dex/jarvis.js.map +1 -1
  105. package/build/dex/lido.d.ts +19 -0
  106. package/build/dex/lido.js +42 -0
  107. package/build/dex/lido.js.map +1 -0
  108. package/build/dex/onebit.d.ts +25 -0
  109. package/build/dex/onebit.js +42 -0
  110. package/build/dex/onebit.js.map +1 -0
  111. package/build/dex/platypus/platypus.d.ts +1 -2
  112. package/build/dex/platypus/platypus.js +0 -31
  113. package/build/dex/platypus/platypus.js.map +1 -1
  114. package/build/dex/smoothy.d.ts +26 -0
  115. package/build/dex/smoothy.js +48 -0
  116. package/build/dex/smoothy.js.map +1 -0
  117. package/build/dex/stable-pool.d.ts +28 -0
  118. package/build/dex/stable-pool.js +62 -0
  119. package/build/dex/stable-pool.js.map +1 -0
  120. package/build/dex/swaap-v1/swaap-v1.d.ts +1 -2
  121. package/build/dex/swaap-v1/swaap-v1.js +0 -10
  122. package/build/dex/swaap-v1/swaap-v1.js.map +1 -1
  123. package/build/dex/trader-joe-v2.1/optimizer.d.ts +2 -0
  124. package/build/dex/trader-joe-v2.1/optimizer.js +47 -0
  125. package/build/dex/trader-joe-v2.1/optimizer.js.map +1 -0
  126. package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.d.ts +7 -0
  127. package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.js +20 -0
  128. package/build/dex/trader-joe-v2.1/trader-joe-v2.1-new.js.map +1 -0
  129. package/build/dex/trader-joe-v2.1.d.ts +43 -0
  130. package/build/dex/trader-joe-v2.1.js +79 -0
  131. package/build/dex/trader-joe-v2.1.js.map +1 -0
  132. package/build/dex/zerox/index.d.ts +26 -4
  133. package/build/dex/zerox/index.js +42 -50
  134. package/build/dex/zerox/index.js.map +1 -1
  135. package/build/dex/zerox/types.d.ts +0 -29
  136. package/build/dex/zerox/types.js +1 -8
  137. package/build/dex/zerox/types.js.map +1 -1
  138. package/package.json +1 -1
  139. package/scripts/run-dex-integration-v3.ts +4 -4
  140. package/src/abi/balancer-v3/directionalFeeHook.json +684 -0
  141. package/src/abi/balancer-v3/stableSurgeHook.json +976 -0
  142. package/src/dex/balancer-v3/balancer-hooks-events.test.ts +166 -0
  143. package/src/dex/balancer-v3/balancer-stableSurge.test.ts +110 -0
  144. package/src/dex/balancer-v3/balancer-test-helpers.ts +199 -0
  145. package/src/dex/balancer-v3/balancer-v3-e2e.test.ts +20 -0
  146. package/src/dex/balancer-v3/balancer-v3-integration.test.ts +2 -197
  147. package/src/dex/balancer-v3/balancer-v3-pool.ts +44 -13
  148. package/src/dex/balancer-v3/balancer-v3.ts +42 -1
  149. package/src/dex/balancer-v3/config.ts +39 -0
  150. package/src/dex/balancer-v3/getOnChainState.ts +1 -4
  151. package/src/dex/balancer-v3/getPoolsApi.ts +42 -23
  152. package/src/dex/balancer-v3/getTopPoolsApi.ts +13 -2
  153. package/src/dex/balancer-v3/hooks/balancer-hook-event-subscriber.ts +212 -0
  154. package/src/dex/balancer-v3/hooks/directionalFeeHook.ts +51 -0
  155. package/src/dex/balancer-v3/hooks/loadHooksConfig.ts +12 -0
  156. package/src/dex/balancer-v3/hooks/stableSurgeHook.ts +198 -0
  157. package/src/dex/balancer-v3/types.ts +4 -2
  158. package/tests/constants-e2e.ts +6 -1
  159. package/build/abi/Aave_GSM.json +0 -751
  160. package/build/abi/Balancer.json +0 -257
  161. package/build/abi/RamsesV2Quoter.abi.json +0 -274
  162. package/build/abi/USDM.json +0 -807
  163. package/build/abi/UniswapV2Router.json +0 -397
  164. package/build/abi/angle-transmuter/ChainlinkAccessControlledOffchainAggregator.json +0 -1246
  165. package/build/abi/curve-v1/CurveBUSDv2.abi.json +0 -1356
  166. package/build/abi/curve-v1/CurveTokenV1.json +0 -305
  167. package/build/abi/curve-v1/CurveTokenV2.json +0 -318
  168. package/build/abi/curve-v1/CurveV1StableNg.json +0 -1452
  169. package/build/abi/curve-v1/CurveV2Swap.json +0 -700
  170. package/build/abi/curve-v1/FactoryCryptoRegistry.json +0 -316
  171. package/build/abi/curve-v1/FactoryRegistry.json +0 -508
  172. package/build/abi/curve-v1/StableSwapAave.json +0 -1152
  173. package/build/abi/curve-v1/StableSwapBUSD.json +0 -814
  174. package/build/abi/curve-v1/StableSwapCompound.json +0 -814
  175. package/build/abi/curve-v1/StableSwapIDLE.json +0 -1253
  176. package/build/abi/curve-v1/StableSwapPax.json +0 -865
  177. package/build/abi/curve-v1/StableSwapSnow.json +0 -900
  178. package/build/abi/curve-v1/StableSwapUSDT.json +0 -814
  179. package/build/abi/curve-v1/StableSwapY.json +0 -814
  180. package/build/abi/inception/inception-ineth-pool.json +0 -1062
  181. package/build/abi/inception/inception-ineth.json +0 -609
  182. package/build/abi/inception/inception-ratio-feed.json +0 -329
  183. package/build/abi/inception/inception-vault.json +0 -991
  184. package/build/abi/kyberdmm/kyber-storage.abi.json +0 -824
  185. package/build/abi/kyberdmm.abi.json +0 -1148
  186. package/build/abi/maverick-v2/MaverickV2Quoter.json +0 -278
  187. package/build/abi/nerve/nerve-metapool.json +0 -790
  188. package/build/abi/uniswap-v3/UniswapV3Quoter.abi.json +0 -193
  189. package/build/abi/velodrome-slipstream/VelodromeSlipstreamQuoterV2.abi.json +0 -267
  190. package/build/dex/balancer-v1/balancer-pools.json +0 -33333
  191. package/build/dex/bebop/websocket-fetcher.d.ts +0 -35
  192. package/build/dex/bebop/websocket-fetcher.js +0 -87
  193. package/build/dex/bebop/websocket-fetcher.js.map +0 -1
  194. package/build/dex/idle-dao/idle-dao-pool.d.ts +0 -56
  195. package/build/dex/idle-dao/idle-dao-pool.js +0 -176
  196. package/build/dex/idle-dao/idle-dao-pool.js.map +0 -1
  197. package/build/dex/idle-dao/idle-dao-pooling-pool.d.ts +0 -16
  198. package/build/dex/idle-dao/idle-dao-pooling-pool.js +0 -57
  199. package/build/dex/idle-dao/idle-dao-pooling-pool.js.map +0 -1
  200. package/build/dex/idle-dao/scripts.d.ts +0 -9
  201. package/build/dex/idle-dao/scripts.js +0 -552
  202. package/build/dex/idle-dao/scripts.js.map +0 -1
  203. package/build/dex/inception/config.d.ts +0 -4
  204. package/build/dex/inception/config.js +0 -109
  205. package/build/dex/inception/config.js.map +0 -1
  206. package/build/dex/inception/inception-event-pool.d.ts +0 -16
  207. package/build/dex/inception/inception-event-pool.js +0 -51
  208. package/build/dex/inception/inception-event-pool.js.map +0 -1
  209. package/build/dex/inception/inception-native.js +0 -131
  210. package/build/dex/inception/inception-native.js.map +0 -1
  211. package/build/dex/inception/inception-pool.d.ts +0 -18
  212. package/build/dex/inception/inception-pool.js +0 -32
  213. package/build/dex/inception/inception-pool.js.map +0 -1
  214. package/build/dex/inception/inception-price-feed.d.ts +0 -19
  215. package/build/dex/inception/inception-price-feed.js +0 -51
  216. package/build/dex/inception/inception-price-feed.js.map +0 -1
  217. package/build/dex/inception/inception.d.ts +0 -43
  218. package/build/dex/inception/inception.js +0 -204
  219. package/build/dex/inception/inception.js.map +0 -1
  220. package/build/dex/inception/tokens.d.ts +0 -9
  221. package/build/dex/inception/tokens.js +0 -28
  222. package/build/dex/inception/tokens.js.map +0 -1
  223. package/build/dex/inception/types.d.ts +0 -22
  224. package/build/dex/inception/types.js +0 -3
  225. package/build/dex/inception/types.js.map +0 -1
  226. package/build/dex/inception/utils.d.ts +0 -6
  227. package/build/dex/inception/utils.js +0 -37
  228. package/build/dex/inception/utils.js.map +0 -1
  229. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-balancerv1-curvev1-eth-usdc-gusd.json +0 -16
  230. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +0 -16
  231. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +0 -16
  232. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +0 -16
  233. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-dai-usdc-eth.json +0 -16
  234. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-eth-usdc-dai.json +0 -16
  235. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +0 -16
  236. package/build/executor/fixtures/executor01/exchange-params/price-route-multiswap-sushiv3-usdt-usdc-dai.json +0 -16
  237. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-eth-usdc.json +0 -9
  238. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-usdc-eth.json +0 -9
  239. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-balancerv1-usdc-wbtc.json +0 -9
  240. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-eth-steth.json +0 -9
  241. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-steth-eth.json +0 -9
  242. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-curvev1-usdc-usdt.json +0 -9
  243. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-eth-usdc.json +0 -9
  244. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-usdc-eth.json +0 -9
  245. package/build/executor/fixtures/executor01/exchange-params/price-route-simpleSwap-univ3-usdc-usdt.json +0 -9
  246. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +0 -12
  247. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +0 -7
  248. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +0 -7
  249. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-dai-usdc-eth.json +0 -7
  250. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-eth-usdc-dai.json +0 -7
  251. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +0 -12
  252. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-simpleSwap-univ3-eth-usdc.json +0 -7
  253. package/build/executor/fixtures/executor01/maybe-weth-calldata/price-route-simpleSwap-univ3-usdc-eth.json +0 -7
  254. package/build/executor/fixtures/executor01/routes/price-route-multiswap-balancerv1-curvev1-eth-usdc-gusd.json +0 -78
  255. package/build/executor/fixtures/executor01/routes/price-route-multiswap-balancerv1-sushiv3-wbtc-eth-sushi.json +0 -81
  256. package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-curvev1-eth-usdc-gusd.json +0 -78
  257. package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-curvev1-gusd-usdc-eth.json +0 -78
  258. package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-dai-usdc-eth.json +0 -81
  259. package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-eth-usdc-dai.json +0 -81
  260. package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-usdc-eth-wbtc.json +0 -81
  261. package/build/executor/fixtures/executor01/routes/price-route-multiswap-sushiv3-usdt-usdc-dai.json +0 -81
  262. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-eth-usdc.json +0 -64
  263. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-usdc-eth.json +0 -85
  264. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-balancerv1-usdc-wbtc.json +0 -64
  265. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-eth-steth.json +0 -52
  266. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-steth-eth.json +0 -52
  267. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-curvev1-usdc-usdt.json +0 -52
  268. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-eth-usdc.json +0 -55
  269. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-usdc-eth.json +0 -55
  270. package/build/executor/fixtures/executor01/routes/price-route-simpleSwap-univ3-usdc-usdt.json +0 -55
  271. package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +0 -23
  272. package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +0 -37
  273. package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +0 -23
  274. package/build/executor/fixtures/executor02/exchange-params/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +0 -23
  275. package/build/executor/fixtures/executor02/exchange-params/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +0 -51
  276. package/build/executor/fixtures/executor02/exchange-params/price-route-multiswap-univ3-usdt-dai-eth.json +0 -58
  277. package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +0 -23
  278. package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +0 -23
  279. package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +0 -9
  280. package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +0 -16
  281. package/build/executor/fixtures/executor02/exchange-params/price-route-simpleSwap-univ3-curvev1-usdt-dai.json +0 -23
  282. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +0 -12
  283. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +0 -7
  284. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +0 -12
  285. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +0 -12
  286. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +0 -7
  287. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-multiswap-univ3-usdt-dai-eth.json +0 -7
  288. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +0 -7
  289. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +0 -7
  290. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +0 -7
  291. package/build/executor/fixtures/executor02/maybe-weth-calldata/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +0 -7
  292. package/build/executor/fixtures/executor02/routes/price-route-multiSwap-balancerv1-sushiv3-univ3-bal-eth-sushi.json +0 -130
  293. package/build/executor/fixtures/executor02/routes/price-route-multiSwap-maverickv1-sushiv3-univ3-eth-usdc-mav.json +0 -136
  294. package/build/executor/fixtures/executor02/routes/price-route-multiSwap-univ3-sushiv3-sushi-eth-wbtc.json +0 -100
  295. package/build/executor/fixtures/executor02/routes/price-route-multiSwap-univ3-sushiv3-wbtc-eth-sushi.json +0 -100
  296. package/build/executor/fixtures/executor02/routes/price-route-multiswap-curvev1-univ3-dai-usdc-eth.json +0 -166
  297. package/build/executor/fixtures/executor02/routes/price-route-multiswap-univ3-usdt-dai-eth.json +0 -190
  298. package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-balancerv1-eth-usdc.json +0 -114
  299. package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-balancerv1-usdc-eth.json +0 -114
  300. package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-univ3-eth-sushi.json +0 -55
  301. package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-sushiv3-univ3-sushi-eth.json +0 -73
  302. package/build/executor/fixtures/executor02/routes/price-route-simpleSwap-univ3-curvev1-usdt-dai.json +0 -82
@@ -2,23 +2,18 @@
2
2
  {
3
3
  "inputs": [
4
4
  {
5
- "internalType": "contract IAuthorizer",
6
- "name": "authorizer",
7
- "type": "address"
8
- },
9
- {
10
- "internalType": "contract IWETH",
11
- "name": "weth",
5
+ "internalType": "contract IVault",
6
+ "name": "vault",
12
7
  "type": "address"
13
8
  },
14
9
  {
15
10
  "internalType": "uint256",
16
- "name": "pauseWindowDuration",
11
+ "name": "defaultMaxSurgeFeePercentage",
17
12
  "type": "uint256"
18
13
  },
19
14
  {
20
15
  "internalType": "uint256",
21
- "name": "bufferPeriodDuration",
16
+ "name": "defaultSurgeThresholdPercentage",
22
17
  "type": "uint256"
23
18
  }
24
19
  ],
@@ -26,539 +21,339 @@
26
21
  "type": "constructor"
27
22
  },
28
23
  {
29
- "anonymous": false,
30
- "inputs": [
31
- {
32
- "indexed": true,
33
- "internalType": "contract IAuthorizer",
34
- "name": "newAuthorizer",
35
- "type": "address"
36
- }
37
- ],
38
- "name": "AuthorizerChanged",
39
- "type": "event"
24
+ "inputs": [],
25
+ "name": "InputLengthMismatch",
26
+ "type": "error"
40
27
  },
41
28
  {
42
- "anonymous": false,
43
- "inputs": [
44
- {
45
- "indexed": true,
46
- "internalType": "contract IERC20",
47
- "name": "token",
48
- "type": "address"
49
- },
50
- {
51
- "indexed": true,
52
- "internalType": "address",
53
- "name": "sender",
54
- "type": "address"
55
- },
56
- {
57
- "indexed": false,
58
- "internalType": "address",
59
- "name": "recipient",
60
- "type": "address"
61
- },
62
- {
63
- "indexed": false,
64
- "internalType": "uint256",
65
- "name": "amount",
66
- "type": "uint256"
67
- }
68
- ],
69
- "name": "ExternalBalanceTransfer",
70
- "type": "event"
29
+ "inputs": [],
30
+ "name": "InvalidPercentage",
31
+ "type": "error"
71
32
  },
72
33
  {
73
- "anonymous": false,
74
34
  "inputs": [
75
35
  {
76
- "indexed": true,
77
- "internalType": "contract IFlashLoanRecipient",
78
- "name": "recipient",
79
- "type": "address"
80
- },
81
- {
82
- "indexed": true,
83
- "internalType": "contract IERC20",
84
- "name": "token",
85
- "type": "address"
86
- },
87
- {
88
- "indexed": false,
89
- "internalType": "uint256",
90
- "name": "amount",
91
- "type": "uint256"
36
+ "internalType": "uint8",
37
+ "name": "bits",
38
+ "type": "uint8"
92
39
  },
93
40
  {
94
- "indexed": false,
95
41
  "internalType": "uint256",
96
- "name": "feeAmount",
42
+ "name": "value",
97
43
  "type": "uint256"
98
44
  }
99
45
  ],
100
- "name": "FlashLoan",
101
- "type": "event"
46
+ "name": "SafeCastOverflowedUintDowncast",
47
+ "type": "error"
102
48
  },
103
49
  {
104
- "anonymous": false,
105
50
  "inputs": [
106
51
  {
107
- "indexed": true,
108
52
  "internalType": "address",
109
- "name": "user",
110
- "type": "address"
111
- },
112
- {
113
- "indexed": true,
114
- "internalType": "contract IERC20",
115
- "name": "token",
53
+ "name": "sender",
116
54
  "type": "address"
117
- },
118
- {
119
- "indexed": false,
120
- "internalType": "int256",
121
- "name": "delta",
122
- "type": "int256"
123
55
  }
124
56
  ],
125
- "name": "InternalBalanceChanged",
126
- "type": "event"
57
+ "name": "SenderIsNotVault",
58
+ "type": "error"
127
59
  },
128
60
  {
129
- "anonymous": false,
130
- "inputs": [
131
- {
132
- "indexed": false,
133
- "internalType": "bool",
134
- "name": "paused",
135
- "type": "bool"
136
- }
137
- ],
138
- "name": "PausedStateChanged",
139
- "type": "event"
61
+ "inputs": [],
62
+ "name": "SenderNotAllowed",
63
+ "type": "error"
140
64
  },
141
65
  {
142
66
  "anonymous": false,
143
67
  "inputs": [
144
- {
145
- "indexed": true,
146
- "internalType": "bytes32",
147
- "name": "poolId",
148
- "type": "bytes32"
149
- },
150
68
  {
151
69
  "indexed": true,
152
70
  "internalType": "address",
153
- "name": "liquidityProvider",
71
+ "name": "pool",
154
72
  "type": "address"
155
73
  },
156
74
  {
157
75
  "indexed": false,
158
- "internalType": "contract IERC20[]",
159
- "name": "tokens",
160
- "type": "address[]"
161
- },
162
- {
163
- "indexed": false,
164
- "internalType": "int256[]",
165
- "name": "deltas",
166
- "type": "int256[]"
167
- },
168
- {
169
- "indexed": false,
170
- "internalType": "uint256[]",
171
- "name": "protocolFeeAmounts",
172
- "type": "uint256[]"
76
+ "internalType": "uint256",
77
+ "name": "newMaxSurgeFeePercentage",
78
+ "type": "uint256"
173
79
  }
174
80
  ],
175
- "name": "PoolBalanceChanged",
81
+ "name": "MaxSurgeFeePercentageChanged",
176
82
  "type": "event"
177
83
  },
178
84
  {
179
85
  "anonymous": false,
180
86
  "inputs": [
181
- {
182
- "indexed": true,
183
- "internalType": "bytes32",
184
- "name": "poolId",
185
- "type": "bytes32"
186
- },
187
87
  {
188
88
  "indexed": true,
189
89
  "internalType": "address",
190
- "name": "assetManager",
90
+ "name": "pool",
191
91
  "type": "address"
192
92
  },
193
93
  {
194
94
  "indexed": true,
195
- "internalType": "contract IERC20",
196
- "name": "token",
95
+ "internalType": "address",
96
+ "name": "factory",
197
97
  "type": "address"
198
- },
199
- {
200
- "indexed": false,
201
- "internalType": "int256",
202
- "name": "cashDelta",
203
- "type": "int256"
204
- },
205
- {
206
- "indexed": false,
207
- "internalType": "int256",
208
- "name": "managedDelta",
209
- "type": "int256"
210
98
  }
211
99
  ],
212
- "name": "PoolBalanceManaged",
100
+ "name": "StableSurgeHookRegistered",
213
101
  "type": "event"
214
102
  },
215
103
  {
216
104
  "anonymous": false,
217
105
  "inputs": [
218
- {
219
- "indexed": true,
220
- "internalType": "bytes32",
221
- "name": "poolId",
222
- "type": "bytes32"
223
- },
224
106
  {
225
107
  "indexed": true,
226
108
  "internalType": "address",
227
- "name": "poolAddress",
109
+ "name": "pool",
228
110
  "type": "address"
229
111
  },
230
112
  {
231
113
  "indexed": false,
232
- "internalType": "enum IVault.PoolSpecialization",
233
- "name": "specialization",
234
- "type": "uint8"
114
+ "internalType": "uint256",
115
+ "name": "newSurgeThresholdPercentage",
116
+ "type": "uint256"
235
117
  }
236
118
  ],
237
- "name": "PoolRegistered",
119
+ "name": "ThresholdSurgePercentageChanged",
238
120
  "type": "event"
239
121
  },
240
122
  {
241
- "anonymous": false,
242
123
  "inputs": [
243
124
  {
244
- "indexed": true,
245
- "internalType": "address",
246
- "name": "relayer",
247
- "type": "address"
248
- },
249
- {
250
- "indexed": true,
251
- "internalType": "address",
252
- "name": "sender",
253
- "type": "address"
254
- },
255
- {
256
- "indexed": false,
257
- "internalType": "bool",
258
- "name": "approved",
259
- "type": "bool"
125
+ "internalType": "bytes4",
126
+ "name": "selector",
127
+ "type": "bytes4"
260
128
  }
261
129
  ],
262
- "name": "RelayerApprovalChanged",
263
- "type": "event"
264
- },
265
- {
266
- "anonymous": false,
267
- "inputs": [
130
+ "name": "getActionId",
131
+ "outputs": [
268
132
  {
269
- "indexed": true,
270
133
  "internalType": "bytes32",
271
- "name": "poolId",
134
+ "name": "",
272
135
  "type": "bytes32"
273
- },
274
- {
275
- "indexed": true,
276
- "internalType": "contract IERC20",
277
- "name": "tokenIn",
278
- "type": "address"
279
- },
136
+ }
137
+ ],
138
+ "stateMutability": "view",
139
+ "type": "function"
140
+ },
141
+ {
142
+ "inputs": [],
143
+ "name": "getAllowedPoolFactory",
144
+ "outputs": [
280
145
  {
281
- "indexed": true,
282
- "internalType": "contract IERC20",
283
- "name": "tokenOut",
146
+ "internalType": "address",
147
+ "name": "",
284
148
  "type": "address"
285
- },
286
- {
287
- "indexed": false,
288
- "internalType": "uint256",
289
- "name": "amountIn",
290
- "type": "uint256"
291
- },
292
- {
293
- "indexed": false,
294
- "internalType": "uint256",
295
- "name": "amountOut",
296
- "type": "uint256"
297
149
  }
298
150
  ],
299
- "name": "Swap",
300
- "type": "event"
151
+ "stateMutability": "view",
152
+ "type": "function"
301
153
  },
302
154
  {
303
- "anonymous": false,
304
- "inputs": [
305
- {
306
- "indexed": true,
307
- "internalType": "bytes32",
308
- "name": "poolId",
309
- "type": "bytes32"
310
- },
155
+ "inputs": [],
156
+ "name": "getAuthorizer",
157
+ "outputs": [
311
158
  {
312
- "indexed": false,
313
- "internalType": "contract IERC20[]",
314
- "name": "tokens",
315
- "type": "address[]"
159
+ "internalType": "contract IAuthorizer",
160
+ "name": "",
161
+ "type": "address"
316
162
  }
317
163
  ],
318
- "name": "TokensDeregistered",
319
- "type": "event"
164
+ "stateMutability": "view",
165
+ "type": "function"
320
166
  },
321
167
  {
322
- "anonymous": false,
323
- "inputs": [
324
- {
325
- "indexed": true,
326
- "internalType": "bytes32",
327
- "name": "poolId",
328
- "type": "bytes32"
329
- },
330
- {
331
- "indexed": false,
332
- "internalType": "contract IERC20[]",
333
- "name": "tokens",
334
- "type": "address[]"
335
- },
168
+ "inputs": [],
169
+ "name": "getDefaultMaxSurgeFeePercentage",
170
+ "outputs": [
336
171
  {
337
- "indexed": false,
338
- "internalType": "address[]",
339
- "name": "assetManagers",
340
- "type": "address[]"
172
+ "internalType": "uint256",
173
+ "name": "",
174
+ "type": "uint256"
341
175
  }
342
176
  ],
343
- "name": "TokensRegistered",
344
- "type": "event"
177
+ "stateMutability": "view",
178
+ "type": "function"
345
179
  },
346
180
  {
347
181
  "inputs": [],
348
- "name": "WETH",
182
+ "name": "getDefaultSurgeThresholdPercentage",
349
183
  "outputs": [
350
184
  {
351
- "internalType": "contract IWETH",
185
+ "internalType": "uint256",
352
186
  "name": "",
353
- "type": "address"
187
+ "type": "uint256"
354
188
  }
355
189
  ],
356
190
  "stateMutability": "view",
357
191
  "type": "function"
358
192
  },
359
193
  {
360
- "inputs": [
361
- {
362
- "internalType": "enum IVault.SwapKind",
363
- "name": "kind",
364
- "type": "uint8"
365
- },
194
+ "inputs": [],
195
+ "name": "getHookFlags",
196
+ "outputs": [
366
197
  {
367
198
  "components": [
368
199
  {
369
- "internalType": "bytes32",
370
- "name": "poolId",
371
- "type": "bytes32"
200
+ "internalType": "bool",
201
+ "name": "enableHookAdjustedAmounts",
202
+ "type": "bool"
372
203
  },
373
204
  {
374
- "internalType": "uint256",
375
- "name": "assetInIndex",
376
- "type": "uint256"
205
+ "internalType": "bool",
206
+ "name": "shouldCallBeforeInitialize",
207
+ "type": "bool"
377
208
  },
378
209
  {
379
- "internalType": "uint256",
380
- "name": "assetOutIndex",
381
- "type": "uint256"
210
+ "internalType": "bool",
211
+ "name": "shouldCallAfterInitialize",
212
+ "type": "bool"
382
213
  },
383
214
  {
384
- "internalType": "uint256",
385
- "name": "amount",
386
- "type": "uint256"
215
+ "internalType": "bool",
216
+ "name": "shouldCallComputeDynamicSwapFee",
217
+ "type": "bool"
387
218
  },
388
219
  {
389
- "internalType": "bytes",
390
- "name": "userData",
391
- "type": "bytes"
392
- }
393
- ],
394
- "internalType": "struct IVault.BatchSwapStep[]",
395
- "name": "swaps",
396
- "type": "tuple[]"
397
- },
398
- {
399
- "internalType": "contract IAsset[]",
400
- "name": "assets",
401
- "type": "address[]"
402
- },
403
- {
404
- "components": [
220
+ "internalType": "bool",
221
+ "name": "shouldCallBeforeSwap",
222
+ "type": "bool"
223
+ },
405
224
  {
406
- "internalType": "address",
407
- "name": "sender",
408
- "type": "address"
225
+ "internalType": "bool",
226
+ "name": "shouldCallAfterSwap",
227
+ "type": "bool"
409
228
  },
410
229
  {
411
230
  "internalType": "bool",
412
- "name": "fromInternalBalance",
231
+ "name": "shouldCallBeforeAddLiquidity",
413
232
  "type": "bool"
414
233
  },
415
234
  {
416
- "internalType": "address payable",
417
- "name": "recipient",
418
- "type": "address"
235
+ "internalType": "bool",
236
+ "name": "shouldCallAfterAddLiquidity",
237
+ "type": "bool"
238
+ },
239
+ {
240
+ "internalType": "bool",
241
+ "name": "shouldCallBeforeRemoveLiquidity",
242
+ "type": "bool"
419
243
  },
420
244
  {
421
245
  "internalType": "bool",
422
- "name": "toInternalBalance",
246
+ "name": "shouldCallAfterRemoveLiquidity",
423
247
  "type": "bool"
424
248
  }
425
249
  ],
426
- "internalType": "struct IVault.FundManagement",
427
- "name": "funds",
250
+ "internalType": "struct HookFlags",
251
+ "name": "hookFlags",
428
252
  "type": "tuple"
429
- },
430
- {
431
- "internalType": "int256[]",
432
- "name": "limits",
433
- "type": "int256[]"
434
- },
435
- {
436
- "internalType": "uint256",
437
- "name": "deadline",
438
- "type": "uint256"
439
253
  }
440
254
  ],
441
- "name": "batchSwap",
442
- "outputs": [
443
- {
444
- "internalType": "int256[]",
445
- "name": "assetDeltas",
446
- "type": "int256[]"
447
- }
448
- ],
449
- "stateMutability": "payable",
255
+ "stateMutability": "pure",
450
256
  "type": "function"
451
257
  },
452
258
  {
453
259
  "inputs": [
454
260
  {
455
- "internalType": "bytes32",
456
- "name": "poolId",
457
- "type": "bytes32"
458
- },
261
+ "internalType": "address",
262
+ "name": "pool",
263
+ "type": "address"
264
+ }
265
+ ],
266
+ "name": "getMaxSurgeFeePercentage",
267
+ "outputs": [
459
268
  {
460
- "internalType": "contract IERC20[]",
461
- "name": "tokens",
462
- "type": "address[]"
269
+ "internalType": "uint256",
270
+ "name": "",
271
+ "type": "uint256"
463
272
  }
464
273
  ],
465
- "name": "deregisterTokens",
466
- "outputs": [],
467
- "stateMutability": "nonpayable",
274
+ "stateMutability": "view",
468
275
  "type": "function"
469
276
  },
470
277
  {
471
278
  "inputs": [
472
- {
473
- "internalType": "bytes32",
474
- "name": "poolId",
475
- "type": "bytes32"
476
- },
477
- {
478
- "internalType": "address",
479
- "name": "sender",
480
- "type": "address"
481
- },
482
- {
483
- "internalType": "address payable",
484
- "name": "recipient",
485
- "type": "address"
486
- },
487
279
  {
488
280
  "components": [
489
281
  {
490
- "internalType": "contract IAsset[]",
491
- "name": "assets",
492
- "type": "address[]"
282
+ "internalType": "enum SwapKind",
283
+ "name": "kind",
284
+ "type": "uint8"
285
+ },
286
+ {
287
+ "internalType": "uint256",
288
+ "name": "amountGivenScaled18",
289
+ "type": "uint256"
493
290
  },
494
291
  {
495
292
  "internalType": "uint256[]",
496
- "name": "minAmountsOut",
293
+ "name": "balancesScaled18",
497
294
  "type": "uint256[]"
498
295
  },
296
+ {
297
+ "internalType": "uint256",
298
+ "name": "indexIn",
299
+ "type": "uint256"
300
+ },
301
+ {
302
+ "internalType": "uint256",
303
+ "name": "indexOut",
304
+ "type": "uint256"
305
+ },
306
+ {
307
+ "internalType": "address",
308
+ "name": "router",
309
+ "type": "address"
310
+ },
499
311
  {
500
312
  "internalType": "bytes",
501
313
  "name": "userData",
502
314
  "type": "bytes"
503
- },
504
- {
505
- "internalType": "bool",
506
- "name": "toInternalBalance",
507
- "type": "bool"
508
315
  }
509
316
  ],
510
- "internalType": "struct IVault.ExitPoolRequest",
511
- "name": "request",
317
+ "internalType": "struct PoolSwapParams",
318
+ "name": "params",
512
319
  "type": "tuple"
513
- }
514
- ],
515
- "name": "exitPool",
516
- "outputs": [],
517
- "stateMutability": "nonpayable",
518
- "type": "function"
519
- },
520
- {
521
- "inputs": [
522
- {
523
- "internalType": "contract IFlashLoanRecipient",
524
- "name": "recipient",
525
- "type": "address"
526
320
  },
527
321
  {
528
- "internalType": "contract IERC20[]",
529
- "name": "tokens",
530
- "type": "address[]"
322
+ "internalType": "address",
323
+ "name": "pool",
324
+ "type": "address"
531
325
  },
532
326
  {
533
- "internalType": "uint256[]",
534
- "name": "amounts",
535
- "type": "uint256[]"
536
- },
327
+ "internalType": "uint256",
328
+ "name": "staticFeePercentage",
329
+ "type": "uint256"
330
+ }
331
+ ],
332
+ "name": "getSurgeFeePercentage",
333
+ "outputs": [
537
334
  {
538
- "internalType": "bytes",
539
- "name": "userData",
540
- "type": "bytes"
335
+ "internalType": "uint256",
336
+ "name": "",
337
+ "type": "uint256"
541
338
  }
542
339
  ],
543
- "name": "flashLoan",
544
- "outputs": [],
545
- "stateMutability": "nonpayable",
340
+ "stateMutability": "view",
546
341
  "type": "function"
547
342
  },
548
343
  {
549
344
  "inputs": [
550
345
  {
551
- "internalType": "bytes4",
552
- "name": "selector",
553
- "type": "bytes4"
346
+ "internalType": "address",
347
+ "name": "pool",
348
+ "type": "address"
554
349
  }
555
350
  ],
556
- "name": "getActionId",
351
+ "name": "getSurgeThresholdPercentage",
557
352
  "outputs": [
558
353
  {
559
- "internalType": "bytes32",
354
+ "internalType": "uint256",
560
355
  "name": "",
561
- "type": "bytes32"
356
+ "type": "uint256"
562
357
  }
563
358
  ],
564
359
  "stateMutability": "view",
@@ -566,10 +361,10 @@
566
361
  },
567
362
  {
568
363
  "inputs": [],
569
- "name": "getAuthorizer",
364
+ "name": "getVault",
570
365
  "outputs": [
571
366
  {
572
- "internalType": "contract IAuthorizer",
367
+ "internalType": "contract IVault",
573
368
  "name": "",
574
369
  "type": "address"
575
370
  }
@@ -578,416 +373,233 @@
578
373
  "type": "function"
579
374
  },
580
375
  {
581
- "inputs": [],
582
- "name": "getDomainSeparator",
583
- "outputs": [
376
+ "inputs": [
584
377
  {
585
- "internalType": "bytes32",
378
+ "internalType": "address",
586
379
  "name": "",
587
- "type": "bytes32"
588
- }
589
- ],
590
- "stateMutability": "view",
591
- "type": "function"
592
- },
593
- {
594
- "inputs": [
380
+ "type": "address"
381
+ },
595
382
  {
596
383
  "internalType": "address",
597
- "name": "user",
384
+ "name": "",
598
385
  "type": "address"
599
386
  },
600
387
  {
601
- "internalType": "contract IERC20[]",
602
- "name": "tokens",
603
- "type": "address[]"
604
- }
605
- ],
606
- "name": "getInternalBalance",
607
- "outputs": [
388
+ "internalType": "enum AddLiquidityKind",
389
+ "name": "",
390
+ "type": "uint8"
391
+ },
608
392
  {
609
393
  "internalType": "uint256[]",
610
- "name": "balances",
394
+ "name": "",
611
395
  "type": "uint256[]"
612
- }
613
- ],
614
- "stateMutability": "view",
615
- "type": "function"
616
- },
617
- {
618
- "inputs": [
396
+ },
619
397
  {
620
- "internalType": "address",
621
- "name": "user",
622
- "type": "address"
623
- }
624
- ],
625
- "name": "getNextNonce",
626
- "outputs": [
398
+ "internalType": "uint256[]",
399
+ "name": "amountsInRaw",
400
+ "type": "uint256[]"
401
+ },
627
402
  {
628
403
  "internalType": "uint256",
629
404
  "name": "",
630
405
  "type": "uint256"
406
+ },
407
+ {
408
+ "internalType": "uint256[]",
409
+ "name": "",
410
+ "type": "uint256[]"
411
+ },
412
+ {
413
+ "internalType": "bytes",
414
+ "name": "",
415
+ "type": "bytes"
631
416
  }
632
417
  ],
633
- "stateMutability": "view",
634
- "type": "function"
635
- },
636
- {
637
- "inputs": [],
638
- "name": "getPausedState",
418
+ "name": "onAfterAddLiquidity",
639
419
  "outputs": [
640
420
  {
641
421
  "internalType": "bool",
642
- "name": "paused",
422
+ "name": "",
643
423
  "type": "bool"
644
424
  },
645
425
  {
646
- "internalType": "uint256",
647
- "name": "pauseWindowEndTime",
648
- "type": "uint256"
649
- },
650
- {
651
- "internalType": "uint256",
652
- "name": "bufferPeriodEndTime",
653
- "type": "uint256"
426
+ "internalType": "uint256[]",
427
+ "name": "",
428
+ "type": "uint256[]"
654
429
  }
655
430
  ],
656
- "stateMutability": "view",
431
+ "stateMutability": "nonpayable",
657
432
  "type": "function"
658
433
  },
659
434
  {
660
435
  "inputs": [
661
436
  {
662
- "internalType": "bytes32",
663
- "name": "poolId",
664
- "type": "bytes32"
665
- }
666
- ],
667
- "name": "getPool",
668
- "outputs": [
437
+ "internalType": "uint256[]",
438
+ "name": "",
439
+ "type": "uint256[]"
440
+ },
669
441
  {
670
- "internalType": "address",
442
+ "internalType": "uint256",
671
443
  "name": "",
672
- "type": "address"
444
+ "type": "uint256"
673
445
  },
674
446
  {
675
- "internalType": "enum IVault.PoolSpecialization",
447
+ "internalType": "bytes",
676
448
  "name": "",
677
- "type": "uint8"
449
+ "type": "bytes"
678
450
  }
679
451
  ],
680
- "stateMutability": "view",
452
+ "name": "onAfterInitialize",
453
+ "outputs": [
454
+ {
455
+ "internalType": "bool",
456
+ "name": "",
457
+ "type": "bool"
458
+ }
459
+ ],
460
+ "stateMutability": "nonpayable",
681
461
  "type": "function"
682
462
  },
683
463
  {
684
464
  "inputs": [
685
465
  {
686
- "internalType": "bytes32",
687
- "name": "poolId",
688
- "type": "bytes32"
466
+ "internalType": "address",
467
+ "name": "",
468
+ "type": "address"
689
469
  },
690
470
  {
691
- "internalType": "contract IERC20",
692
- "name": "token",
471
+ "internalType": "address",
472
+ "name": "",
693
473
  "type": "address"
694
- }
695
- ],
696
- "name": "getPoolTokenInfo",
697
- "outputs": [
698
- {
699
- "internalType": "uint256",
700
- "name": "cash",
701
- "type": "uint256"
702
474
  },
703
475
  {
704
- "internalType": "uint256",
705
- "name": "managed",
706
- "type": "uint256"
476
+ "internalType": "enum RemoveLiquidityKind",
477
+ "name": "",
478
+ "type": "uint8"
707
479
  },
708
480
  {
709
481
  "internalType": "uint256",
710
- "name": "lastChangeBlock",
482
+ "name": "",
711
483
  "type": "uint256"
712
484
  },
713
485
  {
714
- "internalType": "address",
715
- "name": "assetManager",
716
- "type": "address"
717
- }
718
- ],
719
- "stateMutability": "view",
720
- "type": "function"
721
- },
722
- {
723
- "inputs": [
724
- {
725
- "internalType": "bytes32",
726
- "name": "poolId",
727
- "type": "bytes32"
728
- }
729
- ],
730
- "name": "getPoolTokens",
731
- "outputs": [
732
- {
733
- "internalType": "contract IERC20[]",
734
- "name": "tokens",
735
- "type": "address[]"
486
+ "internalType": "uint256[]",
487
+ "name": "",
488
+ "type": "uint256[]"
736
489
  },
737
490
  {
738
491
  "internalType": "uint256[]",
739
- "name": "balances",
492
+ "name": "amountsOutRaw",
740
493
  "type": "uint256[]"
741
494
  },
742
495
  {
743
- "internalType": "uint256",
744
- "name": "lastChangeBlock",
745
- "type": "uint256"
746
- }
747
- ],
748
- "stateMutability": "view",
749
- "type": "function"
750
- },
751
- {
752
- "inputs": [],
753
- "name": "getProtocolFeesCollector",
754
- "outputs": [
755
- {
756
- "internalType": "contract ProtocolFeesCollector",
496
+ "internalType": "uint256[]",
757
497
  "name": "",
758
- "type": "address"
759
- }
760
- ],
761
- "stateMutability": "view",
762
- "type": "function"
763
- },
764
- {
765
- "inputs": [
766
- {
767
- "internalType": "address",
768
- "name": "user",
769
- "type": "address"
498
+ "type": "uint256[]"
770
499
  },
771
500
  {
772
- "internalType": "address",
773
- "name": "relayer",
774
- "type": "address"
501
+ "internalType": "bytes",
502
+ "name": "",
503
+ "type": "bytes"
775
504
  }
776
505
  ],
777
- "name": "hasApprovedRelayer",
506
+ "name": "onAfterRemoveLiquidity",
778
507
  "outputs": [
779
508
  {
780
509
  "internalType": "bool",
781
510
  "name": "",
782
511
  "type": "bool"
512
+ },
513
+ {
514
+ "internalType": "uint256[]",
515
+ "name": "",
516
+ "type": "uint256[]"
783
517
  }
784
518
  ],
785
- "stateMutability": "view",
519
+ "stateMutability": "nonpayable",
786
520
  "type": "function"
787
521
  },
788
522
  {
789
523
  "inputs": [
790
- {
791
- "internalType": "bytes32",
792
- "name": "poolId",
793
- "type": "bytes32"
794
- },
795
- {
796
- "internalType": "address",
797
- "name": "sender",
798
- "type": "address"
799
- },
800
- {
801
- "internalType": "address",
802
- "name": "recipient",
803
- "type": "address"
804
- },
805
524
  {
806
525
  "components": [
807
526
  {
808
- "internalType": "contract IAsset[]",
809
- "name": "assets",
810
- "type": "address[]"
811
- },
812
- {
813
- "internalType": "uint256[]",
814
- "name": "maxAmountsIn",
815
- "type": "uint256[]"
816
- },
817
- {
818
- "internalType": "bytes",
819
- "name": "userData",
820
- "type": "bytes"
821
- },
822
- {
823
- "internalType": "bool",
824
- "name": "fromInternalBalance",
825
- "type": "bool"
826
- }
827
- ],
828
- "internalType": "struct IVault.JoinPoolRequest",
829
- "name": "request",
830
- "type": "tuple"
831
- }
832
- ],
833
- "name": "joinPool",
834
- "outputs": [],
835
- "stateMutability": "payable",
836
- "type": "function"
837
- },
838
- {
839
- "inputs": [
840
- {
841
- "components": [
842
- {
843
- "internalType": "enum IVault.PoolBalanceOpKind",
527
+ "internalType": "enum SwapKind",
844
528
  "name": "kind",
845
529
  "type": "uint8"
846
530
  },
847
531
  {
848
- "internalType": "bytes32",
849
- "name": "poolId",
850
- "type": "bytes32"
532
+ "internalType": "contract IERC20",
533
+ "name": "tokenIn",
534
+ "type": "address"
851
535
  },
852
536
  {
853
537
  "internalType": "contract IERC20",
854
- "name": "token",
538
+ "name": "tokenOut",
855
539
  "type": "address"
856
540
  },
857
541
  {
858
542
  "internalType": "uint256",
859
- "name": "amount",
543
+ "name": "amountInScaled18",
860
544
  "type": "uint256"
861
- }
862
- ],
863
- "internalType": "struct IVault.PoolBalanceOp[]",
864
- "name": "ops",
865
- "type": "tuple[]"
866
- }
867
- ],
868
- "name": "managePoolBalance",
869
- "outputs": [],
870
- "stateMutability": "nonpayable",
871
- "type": "function"
872
- },
873
- {
874
- "inputs": [
875
- {
876
- "components": [
877
- {
878
- "internalType": "enum IVault.UserBalanceOpKind",
879
- "name": "kind",
880
- "type": "uint8"
881
- },
882
- {
883
- "internalType": "contract IAsset",
884
- "name": "asset",
885
- "type": "address"
886
545
  },
887
546
  {
888
547
  "internalType": "uint256",
889
- "name": "amount",
548
+ "name": "amountOutScaled18",
890
549
  "type": "uint256"
891
550
  },
892
551
  {
893
- "internalType": "address",
894
- "name": "sender",
895
- "type": "address"
896
- },
897
- {
898
- "internalType": "address payable",
899
- "name": "recipient",
900
- "type": "address"
901
- }
902
- ],
903
- "internalType": "struct IVault.UserBalanceOp[]",
904
- "name": "ops",
905
- "type": "tuple[]"
906
- }
907
- ],
908
- "name": "manageUserBalance",
909
- "outputs": [],
910
- "stateMutability": "payable",
911
- "type": "function"
912
- },
913
- {
914
- "inputs": [
915
- {
916
- "internalType": "enum IVault.SwapKind",
917
- "name": "kind",
918
- "type": "uint8"
919
- },
920
- {
921
- "components": [
922
- {
923
- "internalType": "bytes32",
924
- "name": "poolId",
925
- "type": "bytes32"
552
+ "internalType": "uint256",
553
+ "name": "tokenInBalanceScaled18",
554
+ "type": "uint256"
926
555
  },
927
556
  {
928
557
  "internalType": "uint256",
929
- "name": "assetInIndex",
558
+ "name": "tokenOutBalanceScaled18",
930
559
  "type": "uint256"
931
560
  },
932
561
  {
933
562
  "internalType": "uint256",
934
- "name": "assetOutIndex",
563
+ "name": "amountCalculatedScaled18",
935
564
  "type": "uint256"
936
565
  },
937
566
  {
938
567
  "internalType": "uint256",
939
- "name": "amount",
568
+ "name": "amountCalculatedRaw",
940
569
  "type": "uint256"
941
570
  },
942
- {
943
- "internalType": "bytes",
944
- "name": "userData",
945
- "type": "bytes"
946
- }
947
- ],
948
- "internalType": "struct IVault.BatchSwapStep[]",
949
- "name": "swaps",
950
- "type": "tuple[]"
951
- },
952
- {
953
- "internalType": "contract IAsset[]",
954
- "name": "assets",
955
- "type": "address[]"
956
- },
957
- {
958
- "components": [
959
571
  {
960
572
  "internalType": "address",
961
- "name": "sender",
573
+ "name": "router",
962
574
  "type": "address"
963
575
  },
964
576
  {
965
- "internalType": "bool",
966
- "name": "fromInternalBalance",
967
- "type": "bool"
968
- },
969
- {
970
- "internalType": "address payable",
971
- "name": "recipient",
577
+ "internalType": "address",
578
+ "name": "pool",
972
579
  "type": "address"
973
580
  },
974
581
  {
975
- "internalType": "bool",
976
- "name": "toInternalBalance",
977
- "type": "bool"
582
+ "internalType": "bytes",
583
+ "name": "userData",
584
+ "type": "bytes"
978
585
  }
979
586
  ],
980
- "internalType": "struct IVault.FundManagement",
981
- "name": "funds",
587
+ "internalType": "struct AfterSwapParams",
588
+ "name": "",
982
589
  "type": "tuple"
983
590
  }
984
591
  ],
985
- "name": "queryBatchSwap",
592
+ "name": "onAfterSwap",
986
593
  "outputs": [
987
594
  {
988
- "internalType": "int256[]",
595
+ "internalType": "bool",
596
+ "name": "",
597
+ "type": "bool"
598
+ },
599
+ {
600
+ "internalType": "uint256",
989
601
  "name": "",
990
- "type": "int256[]"
602
+ "type": "uint256"
991
603
  }
992
604
  ],
993
605
  "stateMutability": "nonpayable",
@@ -996,17 +608,47 @@
996
608
  {
997
609
  "inputs": [
998
610
  {
999
- "internalType": "enum IVault.PoolSpecialization",
1000
- "name": "specialization",
611
+ "internalType": "address",
612
+ "name": "",
613
+ "type": "address"
614
+ },
615
+ {
616
+ "internalType": "address",
617
+ "name": "",
618
+ "type": "address"
619
+ },
620
+ {
621
+ "internalType": "enum AddLiquidityKind",
622
+ "name": "",
1001
623
  "type": "uint8"
624
+ },
625
+ {
626
+ "internalType": "uint256[]",
627
+ "name": "",
628
+ "type": "uint256[]"
629
+ },
630
+ {
631
+ "internalType": "uint256",
632
+ "name": "",
633
+ "type": "uint256"
634
+ },
635
+ {
636
+ "internalType": "uint256[]",
637
+ "name": "",
638
+ "type": "uint256[]"
639
+ },
640
+ {
641
+ "internalType": "bytes",
642
+ "name": "",
643
+ "type": "bytes"
1002
644
  }
1003
645
  ],
1004
- "name": "registerPool",
646
+ "name": "onBeforeAddLiquidity",
1005
647
  "outputs": [
1006
648
  {
1007
- "internalType": "bytes32",
649
+ "internalType": "bool",
1008
650
  "name": "",
1009
- "type": "bytes32"
651
+ "type": "bool"
1010
652
  }
1011
653
  ],
1012
654
  "stateMutability": "nonpayable",
@@ -1015,72 +657,134 @@
1015
657
  {
1016
658
  "inputs": [
1017
659
  {
1018
- "internalType": "bytes32",
1019
- "name": "poolId",
1020
- "type": "bytes32"
660
+ "internalType": "uint256[]",
661
+ "name": "",
662
+ "type": "uint256[]"
1021
663
  },
1022
664
  {
1023
- "internalType": "contract IERC20[]",
1024
- "name": "tokens",
1025
- "type": "address[]"
1026
- },
665
+ "internalType": "bytes",
666
+ "name": "",
667
+ "type": "bytes"
668
+ }
669
+ ],
670
+ "name": "onBeforeInitialize",
671
+ "outputs": [
1027
672
  {
1028
- "internalType": "address[]",
1029
- "name": "assetManagers",
1030
- "type": "address[]"
673
+ "internalType": "bool",
674
+ "name": "",
675
+ "type": "bool"
1031
676
  }
1032
677
  ],
1033
- "name": "registerTokens",
1034
- "outputs": [],
1035
678
  "stateMutability": "nonpayable",
1036
679
  "type": "function"
1037
680
  },
1038
681
  {
1039
682
  "inputs": [
1040
683
  {
1041
- "internalType": "contract IAuthorizer",
1042
- "name": "newAuthorizer",
684
+ "internalType": "address",
685
+ "name": "",
686
+ "type": "address"
687
+ },
688
+ {
689
+ "internalType": "address",
690
+ "name": "",
1043
691
  "type": "address"
692
+ },
693
+ {
694
+ "internalType": "enum RemoveLiquidityKind",
695
+ "name": "",
696
+ "type": "uint8"
697
+ },
698
+ {
699
+ "internalType": "uint256",
700
+ "name": "",
701
+ "type": "uint256"
702
+ },
703
+ {
704
+ "internalType": "uint256[]",
705
+ "name": "",
706
+ "type": "uint256[]"
707
+ },
708
+ {
709
+ "internalType": "uint256[]",
710
+ "name": "",
711
+ "type": "uint256[]"
712
+ },
713
+ {
714
+ "internalType": "bytes",
715
+ "name": "",
716
+ "type": "bytes"
1044
717
  }
1045
718
  ],
1046
- "name": "setAuthorizer",
1047
- "outputs": [],
1048
- "stateMutability": "nonpayable",
1049
- "type": "function"
1050
- },
1051
- {
1052
- "inputs": [
719
+ "name": "onBeforeRemoveLiquidity",
720
+ "outputs": [
1053
721
  {
1054
722
  "internalType": "bool",
1055
- "name": "paused",
723
+ "name": "",
1056
724
  "type": "bool"
1057
725
  }
1058
726
  ],
1059
- "name": "setPaused",
1060
- "outputs": [],
1061
727
  "stateMutability": "nonpayable",
1062
728
  "type": "function"
1063
729
  },
1064
730
  {
1065
731
  "inputs": [
1066
732
  {
1067
- "internalType": "address",
1068
- "name": "sender",
1069
- "type": "address"
733
+ "components": [
734
+ {
735
+ "internalType": "enum SwapKind",
736
+ "name": "kind",
737
+ "type": "uint8"
738
+ },
739
+ {
740
+ "internalType": "uint256",
741
+ "name": "amountGivenScaled18",
742
+ "type": "uint256"
743
+ },
744
+ {
745
+ "internalType": "uint256[]",
746
+ "name": "balancesScaled18",
747
+ "type": "uint256[]"
748
+ },
749
+ {
750
+ "internalType": "uint256",
751
+ "name": "indexIn",
752
+ "type": "uint256"
753
+ },
754
+ {
755
+ "internalType": "uint256",
756
+ "name": "indexOut",
757
+ "type": "uint256"
758
+ },
759
+ {
760
+ "internalType": "address",
761
+ "name": "router",
762
+ "type": "address"
763
+ },
764
+ {
765
+ "internalType": "bytes",
766
+ "name": "userData",
767
+ "type": "bytes"
768
+ }
769
+ ],
770
+ "internalType": "struct PoolSwapParams",
771
+ "name": "",
772
+ "type": "tuple"
1070
773
  },
1071
774
  {
1072
775
  "internalType": "address",
1073
- "name": "relayer",
776
+ "name": "",
1074
777
  "type": "address"
1075
- },
778
+ }
779
+ ],
780
+ "name": "onBeforeSwap",
781
+ "outputs": [
1076
782
  {
1077
783
  "internalType": "bool",
1078
- "name": "approved",
784
+ "name": "",
1079
785
  "type": "bool"
1080
786
  }
1081
787
  ],
1082
- "name": "setRelayerApproval",
1083
- "outputs": [],
1084
788
  "stateMutability": "nonpayable",
1085
789
  "type": "function"
1086
790
  },
@@ -1089,91 +793,184 @@
1089
793
  {
1090
794
  "components": [
1091
795
  {
1092
- "internalType": "bytes32",
1093
- "name": "poolId",
1094
- "type": "bytes32"
1095
- },
1096
- {
1097
- "internalType": "enum IVault.SwapKind",
796
+ "internalType": "enum SwapKind",
1098
797
  "name": "kind",
1099
798
  "type": "uint8"
1100
799
  },
1101
800
  {
1102
- "internalType": "contract IAsset",
1103
- "name": "assetIn",
1104
- "type": "address"
801
+ "internalType": "uint256",
802
+ "name": "amountGivenScaled18",
803
+ "type": "uint256"
1105
804
  },
1106
805
  {
1107
- "internalType": "contract IAsset",
1108
- "name": "assetOut",
1109
- "type": "address"
806
+ "internalType": "uint256[]",
807
+ "name": "balancesScaled18",
808
+ "type": "uint256[]"
809
+ },
810
+ {
811
+ "internalType": "uint256",
812
+ "name": "indexIn",
813
+ "type": "uint256"
1110
814
  },
1111
815
  {
1112
816
  "internalType": "uint256",
1113
- "name": "amount",
817
+ "name": "indexOut",
1114
818
  "type": "uint256"
1115
819
  },
820
+ {
821
+ "internalType": "address",
822
+ "name": "router",
823
+ "type": "address"
824
+ },
1116
825
  {
1117
826
  "internalType": "bytes",
1118
827
  "name": "userData",
1119
828
  "type": "bytes"
1120
829
  }
1121
830
  ],
1122
- "internalType": "struct IVault.SingleSwap",
1123
- "name": "singleSwap",
831
+ "internalType": "struct PoolSwapParams",
832
+ "name": "params",
1124
833
  "type": "tuple"
1125
834
  },
835
+ {
836
+ "internalType": "address",
837
+ "name": "pool",
838
+ "type": "address"
839
+ },
840
+ {
841
+ "internalType": "uint256",
842
+ "name": "staticSwapFeePercentage",
843
+ "type": "uint256"
844
+ }
845
+ ],
846
+ "name": "onComputeDynamicSwapFeePercentage",
847
+ "outputs": [
848
+ {
849
+ "internalType": "bool",
850
+ "name": "",
851
+ "type": "bool"
852
+ },
853
+ {
854
+ "internalType": "uint256",
855
+ "name": "",
856
+ "type": "uint256"
857
+ }
858
+ ],
859
+ "stateMutability": "view",
860
+ "type": "function"
861
+ },
862
+ {
863
+ "inputs": [
864
+ {
865
+ "internalType": "address",
866
+ "name": "factory",
867
+ "type": "address"
868
+ },
869
+ {
870
+ "internalType": "address",
871
+ "name": "pool",
872
+ "type": "address"
873
+ },
1126
874
  {
1127
875
  "components": [
1128
876
  {
1129
- "internalType": "address",
1130
- "name": "sender",
877
+ "internalType": "contract IERC20",
878
+ "name": "token",
879
+ "type": "address"
880
+ },
881
+ {
882
+ "internalType": "enum TokenType",
883
+ "name": "tokenType",
884
+ "type": "uint8"
885
+ },
886
+ {
887
+ "internalType": "contract IRateProvider",
888
+ "name": "rateProvider",
1131
889
  "type": "address"
1132
890
  },
1133
891
  {
1134
892
  "internalType": "bool",
1135
- "name": "fromInternalBalance",
893
+ "name": "paysYieldFees",
894
+ "type": "bool"
895
+ }
896
+ ],
897
+ "internalType": "struct TokenConfig[]",
898
+ "name": "",
899
+ "type": "tuple[]"
900
+ },
901
+ {
902
+ "components": [
903
+ {
904
+ "internalType": "bool",
905
+ "name": "disableUnbalancedLiquidity",
906
+ "type": "bool"
907
+ },
908
+ {
909
+ "internalType": "bool",
910
+ "name": "enableAddLiquidityCustom",
1136
911
  "type": "bool"
1137
912
  },
1138
913
  {
1139
- "internalType": "address payable",
1140
- "name": "recipient",
1141
- "type": "address"
914
+ "internalType": "bool",
915
+ "name": "enableRemoveLiquidityCustom",
916
+ "type": "bool"
1142
917
  },
1143
918
  {
1144
919
  "internalType": "bool",
1145
- "name": "toInternalBalance",
920
+ "name": "enableDonation",
1146
921
  "type": "bool"
1147
922
  }
1148
923
  ],
1149
- "internalType": "struct IVault.FundManagement",
1150
- "name": "funds",
924
+ "internalType": "struct LiquidityManagement",
925
+ "name": "",
1151
926
  "type": "tuple"
1152
- },
927
+ }
928
+ ],
929
+ "name": "onRegister",
930
+ "outputs": [
1153
931
  {
1154
- "internalType": "uint256",
1155
- "name": "limit",
1156
- "type": "uint256"
932
+ "internalType": "bool",
933
+ "name": "",
934
+ "type": "bool"
935
+ }
936
+ ],
937
+ "stateMutability": "nonpayable",
938
+ "type": "function"
939
+ },
940
+ {
941
+ "inputs": [
942
+ {
943
+ "internalType": "address",
944
+ "name": "pool",
945
+ "type": "address"
1157
946
  },
1158
947
  {
1159
948
  "internalType": "uint256",
1160
- "name": "deadline",
949
+ "name": "newMaxSurgeSurgeFeePercentage",
1161
950
  "type": "uint256"
1162
951
  }
1163
952
  ],
1164
- "name": "swap",
1165
- "outputs": [
953
+ "name": "setMaxSurgeFeePercentage",
954
+ "outputs": [],
955
+ "stateMutability": "nonpayable",
956
+ "type": "function"
957
+ },
958
+ {
959
+ "inputs": [
960
+ {
961
+ "internalType": "address",
962
+ "name": "pool",
963
+ "type": "address"
964
+ },
1166
965
  {
1167
966
  "internalType": "uint256",
1168
- "name": "amountCalculated",
967
+ "name": "newSurgeThresholdPercentage",
1169
968
  "type": "uint256"
1170
969
  }
1171
970
  ],
1172
- "stateMutability": "payable",
971
+ "name": "setSurgeThresholdPercentage",
972
+ "outputs": [],
973
+ "stateMutability": "nonpayable",
1173
974
  "type": "function"
1174
- },
1175
- {
1176
- "stateMutability": "payable",
1177
- "type": "receive"
1178
975
  }
1179
976
  ]