@@ -13,6 +13,12 @@ interface IV4Router is IImmutableState {
1313 error V4TooLittleReceived (uint256 minAmountOutReceived , uint256 amountReceived );
1414 /// @notice Emitted when an exactOutput is asked for more than its maxAmountIn
1515 error V4TooMuchRequested (uint256 maxAmountInRequested , uint256 amountRequested );
16+ /// @notice Emitted when an exactInput swap does not receive its relative minAmountOut per hop (max price)
17+ error V4TooLittleReceivedPerHop (uint256 hopIndex , uint256 maxPrice , uint256 price );
18+ /// @notice Emitted when an exactOutput is asked for more than its relative maxAmountIn per hop (max price)
19+ error V4TooMuchRequestedPerHop (uint256 hopIndex , uint256 maxPrice , uint256 price );
20+ /// @notice Emitted when the length of the maxHopSlippage array is not zero and not equal to the path length
21+ error InvalidHopSlippageLength ();
1622
1723 /// @notice Parameters for a single-hop exact-input swap
1824 struct ExactInputSingleParams {
@@ -27,6 +33,7 @@ interface IV4Router is IImmutableState {
2733 struct ExactInputParams {
2834 Currency currencyIn;
2935 PathKey[] path;
36+ uint256 [] maxHopSlippage;
3037 uint128 amountIn;
3138 uint128 amountOutMinimum;
3239 }
@@ -44,6 +51,7 @@ interface IV4Router is IImmutableState {
4451 struct ExactOutputParams {
4552 Currency currencyOut;
4653 PathKey[] path;
54+ uint256 [] maxHopSlippage;
4755 uint128 amountOut;
4856 uint128 amountInMaximum;
4957 }
0 commit comments