feat: Don't sign permit2 objects

We don't want to be responsible for holding private keys -> the user is the one that should do this outside of tycho-execution

Done:
- Remove signature from EncodedSolution
- Introduce UserTransferType and pass that everywhere instead of is_permit2_active and token_in_already_in_router
- Remove signing from permit2. Added it to the encoding_utils.rs only
- Mark encode_full_calldata as deprecated
- Backwards compatibility: still accept a signer for the encode_full_calldata case
- Update all tests

Took 2 hours 10 minutes


Took 13 minutes
This commit is contained in:
Diana Carvalho
2025-05-23 18:22:19 +01:00
parent cdb67f742f
commit c62af2f232
11 changed files with 512 additions and 352 deletions

View File

@@ -61,6 +61,7 @@ pub trait TychoEncoder {
///
/// # Returns
/// A vector of fully constructed [`Transaction`]s that can be submitted to a node or bundler.
#[deprecated(note = "Please use `encode_solutions` instead")]
fn encode_full_calldata(
&self,
solutions: Vec<Solution>,