Skip to content

Commit c5a16ee

Browse files
authored
chore: add cli version (#270)
1 parent 2ca412c commit c5a16ee

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

bin/pbs.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use cb_common::{
33
utils::{initialize_pbs_tracing_log, wait_for_signal},
44
};
55
use cb_pbs::{DefaultBuilderApi, PbsService, PbsState};
6+
use clap::Parser;
67
use eyre::Result;
78
use tracing::{error, info};
89

@@ -16,6 +17,8 @@ async fn main() -> Result<()> {
1617
}
1718
let _guard = initialize_pbs_tracing_log();
1819

20+
let _args = cb_cli::PbsArgs::parse();
21+
1922
let pbs_config = load_pbs_config().await?;
2023

2124
PbsService::init_metrics(pbs_config.chain)?;

bin/signer.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use cb_common::{
33
utils::{initialize_tracing_log, wait_for_signal},
44
};
55
use cb_signer::service::SigningService;
6+
use clap::Parser;
67
use eyre::Result;
78
use tracing::{error, info};
89

@@ -16,6 +17,8 @@ async fn main() -> Result<()> {
1617
}
1718
let _guard = initialize_tracing_log(SIGNER_MODULE_NAME);
1819

20+
let _args = cb_cli::SignerArgs::parse();
21+
1922
let config = StartSignerConfig::load_from_env()?;
2023
let server = SigningService::run(config);
2124

crates/cli/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,11 @@ impl Args {
9090
}
9191

9292
const LONG_ABOUT: &str = "Commit-Boost allows Ethereum validators to safely run MEV-Boost and community-built commitment protocols";
93+
94+
#[derive(Parser, Debug)]
95+
#[command(version, about, long_about = LONG_ABOUT, name = "commit-boost-pbs")]
96+
pub struct PbsArgs;
97+
98+
#[derive(Parser, Debug)]
99+
#[command(version, about, long_about = LONG_ABOUT, name = "commit-boost-signer")]
100+
pub struct SignerArgs;

0 commit comments

Comments
 (0)