feat: add encoder bin

This commit is contained in:
royvardhan
2025-02-05 16:53:20 +05:30
parent c868033072
commit 4f7fe3b96d
4 changed files with 374 additions and 1 deletions

View File

@@ -22,7 +22,11 @@ impl StrategyEncoderRegistry for EVMStrategyEncoderRegistry {
executors_file_path: &str,
signer_pk: Option<String>,
) -> Result<Self, EncodingError> {
let swap_encoder_registry = SwapEncoderRegistry::new(executors_file_path, Chain::Ethereum)?;
let swap_encoder_registry = if executors_file_path.is_empty() {
SwapEncoderRegistry::new_direct_execution()
} else {
SwapEncoderRegistry::new(executors_file_path, Chain::Ethereum)?
};
let mut strategies: HashMap<String, Box<dyn StrategyEncoder>> = HashMap::new();
strategies.insert(