use clap::{Parser, Subcommand};
use reth_cli_runner::CliContext;
mod build_block;
mod execution;
mod in_memory_merkle;
mod merkle;
mod replay_engine;
#[derive(Debug, Parser)]
pub struct Command {
#[command(subcommand)]
command: Subcommands,
}
#[derive(Subcommand, Debug)]
pub enum Subcommands {
Execution(execution::Command),
Merkle(merkle::Command),
InMemoryMerkle(in_memory_merkle::Command),
BuildBlock(build_block::Command),
ReplayEngine(replay_engine::Command),
}
impl Command {
pub async fn execute(self, ctx: CliContext) -> eyre::Result<()> {
match self.command {
Subcommands::Execution(command) => command.execute(ctx).await,
Subcommands::Merkle(command) => command.execute(ctx).await,
Subcommands::InMemoryMerkle(command) => command.execute(ctx).await,
Subcommands::BuildBlock(command) => command.execute(ctx).await,
Subcommands::ReplayEngine(command) => command.execute(ctx).await,
}
}
}