From 1f6f1a4236d577e57f50d063a81e9a1ed801a6dd Mon Sep 17 00:00:00 2001 From: TAMARA LIPOWSKI Date: Wed, 2 Apr 2025 11:56:26 +0200 Subject: [PATCH] feat: Add router_address to cli --- src/bin/tycho-encode.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bin/tycho-encode.rs b/src/bin/tycho-encode.rs index 08d157c..8cc3bd6 100644 --- a/src/bin/tycho-encode.rs +++ b/src/bin/tycho-encode.rs @@ -1,7 +1,7 @@ use std::io::{self, Read}; use clap::{Parser, Subcommand}; -use tycho_common::models::Chain; +use tycho_common::{hex_bytes::Bytes, models::Chain}; use tycho_execution::encoding::{ evm::encoder_builder::EVMEncoderBuilder, models::Solution, tycho_encoder::TychoEncoder, }; @@ -44,6 +44,8 @@ pub struct Cli { pub command: Commands, #[arg(short, long)] executors_file_path: Option, + #[arg(short, long)] + router_address: Option, } #[derive(Subcommand)] @@ -79,6 +81,9 @@ fn main() -> Result<(), Box> { if let Some(config_path) = cli.executors_file_path { builder = builder.executors_file_path(config_path); } + if let Some(router_address) = cli.router_address { + builder = builder.router_address(router_address); + } builder = match cli.command { Commands::TychoRouter => builder.initialize_tycho_router()?,