feat: Refactor TychoEncoder

We have a trait TychoEncoder and then two implementations: TychoRouterEncoder and TychoExecutorEncoder.
This way we go a level above with the decision if it is a direct execution or if it should use the tycho router.

- Created two builders: one for each tycho encoder
- Delete ExecutorStrategyEncoder and move code straight into the TychoExecutorEncoder
- Add validate_solution to trait TychoEncoder
- Move group_swaps.rs a level up
- Update tests and usage cases

Doing this we get rid of all that weird stuff we were doing before

--- don't change below this line ---
ENG-4306 Took 2 hours 6 minutes


Took 12 seconds
This commit is contained in:
Diana Carvalho
2025-04-07 18:41:14 +01:00
parent 899f0efeff
commit 8b4b79b353
11 changed files with 1217 additions and 1178 deletions

View File

@@ -1,7 +1,8 @@
pub mod approvals;
mod constants;
pub mod encoder_builder;
pub mod encoder_builders;
mod group_swaps;
pub mod strategy_encoder;
mod swap_encoder;
pub mod tycho_encoder;
pub mod tycho_encoders;
pub mod utils;