Diana Carvalho 50429ad05c feat: Add swap method with tests
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
2025-01-28 16:59:29 +00:00
2025-01-28 16:59:29 +00:00
2025-01-28 09:54:49 -05:00
2025-01-27 20:44:01 +05:30
2025-01-24 17:03:00 +00:00
2025-01-28 15:06:00 +00:00
2025-01-28 15:06:00 +00:00
2025-01-28 15:06:00 +00:00
2025-01-13 11:28:27 +00:00
2025-01-24 17:03:00 +00:00

Tycho Execution

TODO: add banner

Tycho Execution makes it easy to trade on different DEXs by handling the complex encoding for you. Instead of creating custom code for each DEX, you get a simple, ready-to-use tool that generates the necessary data to execute trades. Its designed to be safe, straightforward, and quick to set up, so anyone can start trading without extra effort.

Contract Analysis

We use Slither to detect any potential vulnerabilities in our contracts.

To run locally, simply install Slither in your conda env and run it inside the foundry directory.

conda create --name tycho-execution python=3.10
conda activate tycho-execution

pip install slither-analyzer
cd foundry
slither .
Description
No description provided
Readme 6 MiB
Languages
Rust 90.1%
JavaScript 5.9%
Python 3.6%
Solidity 0.4%