feat: Do not use V4Router for uniswap v4
Do our own implementation. In the end this is much cleaner than I expected and I was able to do a few improvements: - we don't need to use actions. using function selectors and delegate call instead - we don't need to convert into V4 Router types - we don't need to check balances to get the amount out, we can just use the returned value --- don't change below this line --- ENG-4437 Took 3 hours 56 minutes Took 3 minutes Took 11 minutes
This commit is contained in:
@@ -786,8 +786,8 @@ contract TychoRouter is AccessControl, Dispatcher, Pausable, ReentrancyGuard {
|
||||
returns (bytes memory)
|
||||
{
|
||||
if (data.length < 24) revert TychoRouter__InvalidDataLength();
|
||||
_handleCallback(data);
|
||||
return "";
|
||||
bytes memory result = _handleCallback(data);
|
||||
return result;
|
||||
}
|
||||
|
||||
function _balanceOf(address token, address owner)
|
||||
|
||||
Reference in New Issue
Block a user