- Move all evm code inside evm directory - StrategyEncoder: - Kept StrategyEncoder trait but created a new one: EVMStrategyEncoder to implement encode_protocol_header (that is evm specific). - All StrategyEncoders implement both traits now - Renamed DefaultStrategySelector -> EVMStrategySelector - RouterEncoder: - Created a RouterEncoder trait and a EVMRouterEncoder that implements it - Moved utils inside evm directory as well - Renamed config.json -> executor_addresses.json and moved it to a higher config directory - Make alloy optional and dependent on the evm feature gate --- don't change below this line --- ENG-4075 <#DTT#>
14 lines
444 B
Rust
14 lines
444 B
Rust
use anyhow::Error;
|
|
|
|
use crate::encoding::{
|
|
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<Transaction, Error>;
|
|
fn handle_approvals(&self, solutions: &[Solution]) -> Result<Vec<u8>, Error>;
|
|
}
|