Commit Graph

7 Commits

Author SHA1 Message Date
Diana Carvalho
20e6419a20 feat: Adapt SplitSwapStrategyEncoder to have optional permit2 logic
- If the signer_pk is not passed -> use the swap method that expects the tokens to be already in the Router
- If it is passed -> compute permit2 and use swap method that does the token in transfer
- Extend builder to have another shortcut
- Add integration test with contract
- Update bin (and simplified it) and quickstart

--- don't change below this line ---
ENG-4255 Took 1 hour 51 minutes

Took 2 minutes

Took 7 seconds
2025-02-20 18:29:11 +00:00
royvardhan
29bc662ba9 refactor: use chain and protocol component from tycho_core::models 2025-02-20 22:36:50 +05:30
Diana Carvalho
359bb806f7 docs: Add docstrings to EVMEncoderBuilder
--- don't change below this line ---
ENG-4246 Took 41 minutes
2025-02-19 17:03:25 +00:00
Diana Carvalho
684de4fa60 feat: Add methods to builder to set chain and strategy independently
--- don't change below this line ---
ENG-4246 Took 15 minutes
2025-02-19 17:03:25 +00:00
Diana Carvalho
d9d56e7a8c chore: Rename signer_pk to swapper_pk
--- don't change below this line ---
ENG-4246 Took 15 minutes
2025-02-19 17:03:25 +00:00
Diana Carvalho
30b5ab9025 fix: After rebase fixes
Put the strategy_encoders.rs back inside the strategy_encoder directory

--- don't change below this line ---
ENG-4246 Took 3 minutes

Took 12 seconds
2025-02-19 17:03:22 +00:00
Diana Carvalho
03506fabe9 feat: Create a EVMEncoderBuilder
- It has two three methods to be created:
  - new: where the user can pass any custom StrategyEncoder
  - tycho_router: where the default SplitSwapStrategyEncoder with Tycho Router will be used
  - direct_execution: where the user can encode only the execution data and integrate this into their workflow.
- This replaces StrategyEncoderRegistry
- EVMTychoEncoder holds directly the StrategyEncoder and not the registry (per one init of the EVMTychoEncoder there is only one possible StrategyEncoder)
- Update quickstart
- Update bin (add subcommands to bin to create a different instance of EVMEncoderBuilder)

--- don't change below this line ---
ENG-4246 Took 33 minutes

Took 38 seconds

Took 38 seconds
2025-02-19 17:03:10 +00:00