feat: UniswapV3Executor and integration tests

- Note: I think we can get the fee straight from the pool... why did we always encode this and send it from the solver? Is this bound to change sometimes?
This commit is contained in:
TAMARA LIPOWSKI
2025-01-29 19:51:17 -05:00
parent d8b44f623b
commit ca32446a9e
6 changed files with 231 additions and 9 deletions

View File

@@ -369,8 +369,8 @@ contract TychoRouter is
int256 amount0Delta,
int256 amount1Delta,
bytes calldata data
) internal view returns (uint256 amountOwed, address tokenOwed) {
address tokenIn = address(bytes20(data[0:20]));
) internal view returns (uint256 amountOwed, address tokenIn) {
tokenIn = address(bytes20(data[0:20]));
address tokenOut = address(bytes20(data[20:40]));
uint24 poolFee = uint24(bytes3(data[40:43]));
@@ -382,6 +382,6 @@ contract TychoRouter is
amountOwed =
amount0Delta > 0 ? uint256(amount0Delta) : uint256(amount1Delta);
return (amountOwed, tokenOwed);
return (amountOwed, tokenIn);
}
}