Files
tycho-execution/src/encoding/router_encoder.rs
Diana Carvalho bab5caa6f8 feat: Add EncodingError
Change method signatures to expect it and raise it where it makes sense

--- don't change below this line ---
ENG-4076 <#DTT#>
2025-01-17 17:00:52 +00:00

16 lines
500 B
Rust

use crate::encoding::{
errors::EncodingError,
models::{Solution, Transaction},
strategy_encoder::StrategySelector,
user_approvals_manager::UserApprovalsManager,
};
#[allow(dead_code)]
pub trait RouterEncoder<S: StrategySelector, A: UserApprovalsManager> {
fn encode_router_calldata(
&self,
solutions: Vec<Solution>,
) -> Result<Vec<Transaction>, EncodingError>;
fn handle_approvals(&self, solutions: &[Solution]) -> Result<Vec<Vec<u8>>, EncodingError>;
}