fix: usv4 integration tests and remove selector from swap/strategy encoder

This commit is contained in:
royvardhan
2025-02-24 19:48:25 +05:30
parent 69745b18fd
commit 18efe0305b
6 changed files with 30 additions and 89 deletions

View File

@@ -105,7 +105,7 @@ impl TychoEncoder for EVMTychoEncoder {
for solution in solutions.iter() {
self.validate_solution(solution)?;
let (contract_interaction, target_address, selector) = self
let (contract_interaction, target_address) = self
.strategy_encoder
.encode_strategy(solution.clone())?;
@@ -118,7 +118,7 @@ impl TychoEncoder for EVMTychoEncoder {
value,
data: contract_interaction,
to: target_address,
selector,
selector: None,
});
}
Ok(transactions)
@@ -152,16 +152,12 @@ mod tests {
struct MockStrategy;
impl StrategyEncoder for MockStrategy {
fn encode_strategy(
&self,
_solution: Solution,
) -> Result<(Vec<u8>, Bytes, Option<String>), EncodingError> {
fn encode_strategy(&self, _solution: Solution) -> Result<(Vec<u8>, Bytes), EncodingError> {
Ok((
Bytes::from_str("0x1234")
.unwrap()
.to_vec(),
Bytes::from_str("0xabcd").unwrap(),
None,
))
}