Merge branch 'main' into feat/maverick-v2-executor

This commit is contained in:
Tamara
2025-04-29 12:01:20 -04:00
committed by GitHub
57 changed files with 9339 additions and 5667 deletions

View File

@@ -20,16 +20,11 @@ pub struct SwapEncoderRegistry {
impl SwapEncoderRegistry {
/// Populates the registry with the `SwapEncoders` for the given blockchain by parsing the
/// executors' addresses in the file at the given path.
pub fn new(
executors_file_path: Option<String>,
blockchain: tycho_common::models::Chain,
) -> Result<Self, EncodingError> {
let chain = Chain::from(blockchain);
pub fn new(executors_file_path: Option<String>, chain: Chain) -> Result<Self, EncodingError> {
let config_str = if let Some(ref path) = executors_file_path {
fs::read_to_string(path).map_err(|e| {
EncodingError::FatalError(format!(
"Error reading executors file from {:?}: {}",
executors_file_path, e
"Error reading executors file from {executors_file_path:?}: {e}",
))
})?
} else {

File diff suppressed because it is too large Load Diff