diff --git a/src/bin/tycho-encode.rs b/src/bin/tycho-encode.rs index a8ad374..449f223 100644 --- a/src/bin/tycho-encode.rs +++ b/src/bin/tycho-encode.rs @@ -29,8 +29,6 @@ use tycho_execution::encoding::{ /// "given_amount": "123...", /// "checked_token": "0x...", /// "exact_out": false, -/// "slippage": 0.01, -/// "expected_amount": "123...", /// "checked_amount": "123...", /// "swaps": [{ /// "component": { @@ -59,8 +57,6 @@ pub struct Cli { #[arg(short, long)] router_address: Option, #[arg(short, long)] - swapper_pk: Option, - #[arg(short, long)] user_transfer_type: Option, } @@ -95,10 +91,6 @@ fn main() -> Result<(), Box> { if let Some(router_address) = cli.router_address { builder = builder.router_address(router_address); } - if let Some(swapper_pk) = cli.swapper_pk { - let pk = B256::from_str(&swapper_pk)?; - builder = builder.signer(PrivateKeySigner::from_bytes(&pk)?); - } if let Some(user_transfer_type) = cli.user_transfer_type { builder = builder.user_transfer_type(user_transfer_type); } diff --git a/src/encoding/evm/approvals/permit2.rs b/src/encoding/evm/approvals/permit2.rs index efd1c90..f9c7cac 100644 --- a/src/encoding/evm/approvals/permit2.rs +++ b/src/encoding/evm/approvals/permit2.rs @@ -149,7 +149,7 @@ impl Permit2 { ))), } } - /// Creates permit single and signature + /// Creates permit single pub fn get_permit( &self, spender: &Bytes, diff --git a/src/encoding/evm/encoder_builders.rs b/src/encoding/evm/encoder_builders.rs index d8de3b0..84caae7 100644 --- a/src/encoding/evm/encoder_builders.rs +++ b/src/encoding/evm/encoder_builders.rs @@ -65,6 +65,9 @@ impl TychoRouterEncoderBuilder { self } + /// Sets the `signer` for the encoder. This is used to sign permit2 objects. This is only needed + /// if you intend to get the full calldata for the transfer. We do not recommend using this + /// option, you should sign and create the function calldata entirely on your own. pub fn signer(mut self, signer: PrivateKeySigner) -> Self { self.signer = Some(signer); self diff --git a/src/encoding/evm/tycho_encoders.rs b/src/encoding/evm/tycho_encoders.rs index fb89fb6..496ef76 100644 --- a/src/encoding/evm/tycho_encoders.rs +++ b/src/encoding/evm/tycho_encoders.rs @@ -271,7 +271,6 @@ impl TychoEncoder for TychoRouterEncoder { /// /// # Fields /// * `swap_encoder_registry`: Registry of swap encoders -/// * `native_address`: Address of the chain's native token #[derive(Clone)] pub struct TychoExecutorEncoder { swap_encoder_registry: SwapEncoderRegistry,