feat: Add router_address to cli
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
use std::io::{self, Read};
|
use std::io::{self, Read};
|
||||||
|
|
||||||
use clap::{Parser, Subcommand};
|
use clap::{Parser, Subcommand};
|
||||||
use tycho_common::models::Chain;
|
use tycho_common::{hex_bytes::Bytes, models::Chain};
|
||||||
use tycho_execution::encoding::{
|
use tycho_execution::encoding::{
|
||||||
evm::encoder_builder::EVMEncoderBuilder, models::Solution, tycho_encoder::TychoEncoder,
|
evm::encoder_builder::EVMEncoderBuilder, models::Solution, tycho_encoder::TychoEncoder,
|
||||||
};
|
};
|
||||||
@@ -44,6 +44,8 @@ pub struct Cli {
|
|||||||
pub command: Commands,
|
pub command: Commands,
|
||||||
#[arg(short, long)]
|
#[arg(short, long)]
|
||||||
executors_file_path: Option<String>,
|
executors_file_path: Option<String>,
|
||||||
|
#[arg(short, long)]
|
||||||
|
router_address: Option<Bytes>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Subcommand)]
|
#[derive(Subcommand)]
|
||||||
@@ -79,6 +81,9 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
if let Some(config_path) = cli.executors_file_path {
|
if let Some(config_path) = cli.executors_file_path {
|
||||||
builder = builder.executors_file_path(config_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 {
|
builder = match cli.command {
|
||||||
Commands::TychoRouter => builder.initialize_tycho_router()?,
|
Commands::TychoRouter => builder.initialize_tycho_router()?,
|
||||||
|
|||||||
Reference in New Issue
Block a user