feat: Add interacting_with to EncodedSolution

- Remove encode_full_calldata from the TychoEncoder trait
- Make the TychoExecutorEncoder use encode_solutions instead of encode_full_calldata
- Update tycho-encode.rs accordingly

Took 1 hour 3 minutes


Took 12 seconds
This commit is contained in:
Diana Carvalho
2025-05-21 18:00:19 +01:00
parent 08056c4a6c
commit facdf716bd
8 changed files with 174 additions and 299 deletions

View File

@@ -94,12 +94,15 @@ pub struct Transaction {
///
/// # Fields
/// * `swaps`: Encoded swaps to be executed.
/// * `interacting_with`: Address of the contract to be called.
/// * `selector`: The selector of the function to be called.
/// * `n_tokens`: Number of tokens in the swap.
/// * `permit`: Optional permit for the swap (if permit2 is enabled).
/// * `signature`: Optional signature for the swap (if permit2 is enabled).
#[derive(Clone, Debug)]
pub struct EncodedSolution {
pub swaps: Vec<u8>,
pub interacting_with: Bytes,
pub selector: String,
pub n_tokens: usize,
pub permit: Option<PermitSingle>,