-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ad5eb4
commit 39fd78a
Showing
7 changed files
with
45 additions
and
81 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,4 @@ | ||
use crate::cmd::config::Config; | ||
use clap::Args; | ||
use mev_build_rs::reth_builder::Service; | ||
use tracing::info; | ||
use mev_build_rs::reth_builder::ServiceExt; | ||
use reth::cli::Cli; | ||
|
||
#[derive(Debug, Args)] | ||
#[clap(about = "🛠️ building blocks since 2023")] | ||
pub struct Command { | ||
#[clap(env, default_value = "config.toml")] | ||
config_file: String, | ||
} | ||
|
||
impl Command { | ||
pub async fn execute(&self) -> eyre::Result<()> { | ||
let config_file = &self.config_file; | ||
|
||
let config = Config::from_toml_file(config_file)?; | ||
|
||
let network = config.network; | ||
info!("configured for `{network}`"); | ||
|
||
if let Some(config) = config.build { | ||
Service::from(network, config).spawn().await; | ||
Ok(()) | ||
} else { | ||
Err(eyre::eyre!("missing build config from file provided")) | ||
} | ||
} | ||
} | ||
pub type Command = Cli<ServiceExt>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters