feat: Add evm feature gate

- 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#>
This commit is contained in:
Diana Carvalho
2025-01-17 12:51:37 +00:00
parent 1d3ac22087
commit 6c6ba21894
22 changed files with 346 additions and 299 deletions

View File

@@ -53,6 +53,7 @@ pub enum NativeAction {
}
#[derive(Clone)]
#[allow(dead_code)]
pub struct Swap {
/// Protocol component from tycho indexer
pub component: ProtocolComponent,
@@ -71,12 +72,14 @@ pub struct Transaction {
pub value: BigUint,
}
#[allow(dead_code)]
pub struct EncodingContext {
pub receiver: Bytes,
pub exact_out: bool,
pub address_for_approvals: Bytes,
}
#[allow(dead_code)]
pub enum ActionType {
SingleExactIn = 1,
SingleExactOut = 2,