feat: Add selector to Transaction

Return selector in the StrategyEncoder. This is needed for the ExecutorStrategyEncoder

--- don't change below this line ---
ENG-4088 Took 12 minutes


Took 13 seconds
This commit is contained in:
Diana Carvalho
2025-02-11 10:24:04 +00:00
parent 12b6ba0743
commit dd7ecac324
5 changed files with 38 additions and 14 deletions

View File

@@ -4,7 +4,10 @@ use crate::encoding::{errors::EncodingError, models::Solution, swap_encoder::Swa
/// Encodes a solution using a specific strategy.
pub trait StrategyEncoder {
fn encode_strategy(&self, to_encode: Solution) -> Result<(Vec<u8>, Bytes), EncodingError>;
fn encode_strategy(
&self,
to_encode: Solution,
) -> Result<(Vec<u8>, Bytes, Option<String>), EncodingError>;
#[allow(clippy::borrowed_box)]
fn get_swap_encoder(&self, protocol_system: &str) -> Option<&Box<dyn SwapEncoder>>;