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
This commit is contained in:
Diana Carvalho
2025-02-20 17:14:49 +00:00
parent 30a7d5bbe4
commit 20e6419a20
6 changed files with 213 additions and 92 deletions

View File

@@ -23,7 +23,7 @@ fn main() {
// Initialize the encoder
let encoder = EVMEncoderBuilder::new()
.chain(TychoCoreChain::Ethereum)
.tycho_router(swapper_pk, None)
.tycho_router_with_permit2(None, swapper_pk)
.expect("Failed to create encoder builder")
.build()
.expect("Failed to build encoder");