feat: Add estimated_amount_in to Swap. Add SwapBuilder

Use SwapBuilder everywhere inside crate
Integration tests will be done later

--- don't change below this line ---
ENG-4696 Took 1 hour 56 minutes

Took 4 minutes
This commit is contained in:
Diana Carvalho
2025-08-13 18:00:46 +01:00
parent 616b588fc8
commit 5eb9973dbd
15 changed files with 647 additions and 763 deletions

View File

@@ -34,6 +34,7 @@ fn test_single_swap_strategy_encoder() {
split: 0f64,
user_data: None,
protocol_state: None,
estimated_amount_in: None,
};
let encoder = get_tycho_router_encoder(UserTransferType::TransferFromPermit2);
@@ -121,6 +122,7 @@ fn test_single_swap_strategy_encoder_no_permit2() {
split: 0f64,
user_data: None,
protocol_state: None,
estimated_amount_in: None,
};
let encoder = get_tycho_router_encoder(UserTransferType::TransferFrom);
@@ -204,6 +206,7 @@ fn test_single_swap_strategy_encoder_no_transfer_in() {
split: 0f64,
user_data: None,
protocol_state: None,
estimated_amount_in: None,
};
let encoder = get_tycho_router_encoder(UserTransferType::None);
@@ -288,6 +291,7 @@ fn test_single_swap_strategy_encoder_wrap() {
split: 0f64,
user_data: None,
protocol_state: None,
estimated_amount_in: None,
};
let encoder = get_tycho_router_encoder(UserTransferType::TransferFromPermit2);
@@ -341,6 +345,7 @@ fn test_single_swap_strategy_encoder_unwrap() {
split: 0f64,
user_data: None,
protocol_state: None,
estimated_amount_in: None,
};
let encoder = get_tycho_router_encoder(UserTransferType::TransferFromPermit2);