Files
tycho-execution/src/encoding/swap_encoder.rs
Diana Carvalho a28b54888e fix: Post merge's fixes
Because of the renaming, git couldn't identify the new files and handle the conflicts gracefully.
Copied implementation for ExecutorStrategyEncoder from main

Rollbacked on decision to encode the executor address and selector inside the SwapEncoders. This is only necessary for certain strategies. So it should be done at the strategy level

--- don't change below this line ---
ENG-4081 Took 35 minutes
2025-01-30 19:38:22 +00:00

19 lines
446 B
Rust

use crate::encoding::{
errors::EncodingError,
models::{EncodingContext, Swap},
};
#[allow(dead_code)]
pub trait SwapEncoder: Sync + Send {
fn new(executor_address: String) -> Self
where
Self: Sized;
fn encode_swap(
&self,
swap: Swap,
encoding_context: EncodingContext,
) -> Result<Vec<u8>, EncodingError>;
fn executor_address(&self) -> &str;
fn executor_selector(&self) -> &str;
}