Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Optional] Extension of feat#8 #15

Closed
wants to merge 12 commits into from
Original file line number Diff line number Diff line change
@@ -1 +1 @@
193198
193207
Original file line number Diff line number Diff line change
@@ -1 +1 @@
192654
192663
2 changes: 1 addition & 1 deletion .forge-snapshots/UniversalRouterBytecodeSize.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24160
24220
Original file line number Diff line number Diff line change
@@ -1 +1 @@
559373
559388
Original file line number Diff line number Diff line change
@@ -1 +1 @@
594191
594207
Original file line number Diff line number Diff line change
@@ -1 +1 @@
570028
570044
Original file line number Diff line number Diff line change
@@ -1 +1 @@
583544
583559
17 changes: 5 additions & 12 deletions src/base/Dispatcher.sol
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,8 @@ abstract contract Dispatcher is
}
Payments.payPortion(token, map(recipient), bips);
return (success, output);
} else {
// placeholder area for command 0x07
revert InvalidCommandType(command);
}
// placeholder area for command 0x07
} else {
// 0x08 <= command < 0x10
if (command == Commands.V2_SWAP_EXACT_IN) {
Expand Down Expand Up @@ -256,10 +254,8 @@ abstract contract Dispatcher is
success = (ERC20(token).balanceOf(owner) >= minBalance);
if (!success) output = abi.encodePacked(BalanceTooLow.selector);
return (success, output);
} else {
// placeholder area for command 0x0f
revert InvalidCommandType(command);
}
// placeholder area for command 0x0f
}
} else {
// 0x10 <= command < 0x21
Expand Down Expand Up @@ -314,10 +310,8 @@ abstract contract Dispatcher is
// do not permit or approve this contract over a v4 position or someone could use this command to decrease, burn, or transfer your position
(success, output) = address(V4_BIN_POSITION_MANAGER).call{value: address(this).balance}(inputs);
return (success, output);
} else {
// placeholder area for commands 0x15-0x20
revert InvalidCommandType(command);
}
// placeholder area for commands 0x15-0x20
}
} else {
// 0x21 <= command
Expand Down Expand Up @@ -364,11 +358,10 @@ abstract contract Dispatcher is
uint256 amountIn = stableSwapExactOutputAmountIn(amountOut, amountInMax, path, flag);
stableSwapExactOutput(map(recipient), amountIn, amountOut, path, flag, payer);
return (success, output);
} else {
// placeholder area for commands 0x24-0x3f
revert InvalidCommandType(command);
}
// placeholder area for commands 0x24-0x3f
}
revert InvalidCommandType(command);
}

/// @notice Calculates the recipient address for a command
Expand Down
Loading