chore: use Bytes

This commit is contained in:
royvardhan
2025-01-30 18:13:47 +05:30
parent 1b8bf56c75
commit 4ef9b0b82f

View File

@@ -71,9 +71,9 @@ impl StrategyEncoder for ExecutorStrategyEncoder {
router_address,
};
let protocol_data = swap_encoder.encode_swap(swap.clone(), encoding_context)?;
let executor_address = Address::from_str(swap_encoder.executor_address())
let executor_address = Bytes::from_str(swap_encoder.executor_address())
.map_err(|_| EncodingError::FatalError("Invalid executor address".to_string()))?;
Ok((protocol_data, Bytes::from(executor_address.as_slice())))
Ok((protocol_data, executor_address))
}
fn selector(&self, _exact_out: bool) -> &str {
"swap(uint256, bytes)"