Construct the uniswap v4 specific objects inside the executor
The swap test in the executor alone doesn't work anymore because of the callback data prepended to the rest of he calldata
--- don't change below this line ---
ENG-4222 Took 4 hours 0 minutes
Took 40 seconds
Make TychoRouter inherit from SafeCallback and then delegatecall to the UniswapV4 executor
Add a test for this. I had to update the block of our forked network in the tests. Because of this I had to update all the asserts in previous tests
Had to change the optimizer_runs in foundry.toml because of weird Yul errors when compiling
--- don't change below this line ---
ENG-4223 Took 1 hour 21 minutes
Took 7 seconds
Took 35 seconds
- 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?
Changes:
- If the tokenIn is ETH, skip permit2 approval
- Make executors payable: When using delegatecall the executor inherits the execution context of whoever calls it. Our main swap function can accept ETH, it needs to be payable so by consequence the executors also need to be.
- Set uniswap v2 executor in test router
- Add tests for all possible cases of swap
- Add tests for all cases of splitSwap
- Add test functions to handle permit2 and encode swaps
--- don't change below this line ---
ENG-4041 Took 3 hours 50 minutes
Took 49 seconds
Took 14 seconds