ethereum-optimism / tests

Standard Tests for OP Stack Component Implementations.
https://static.optimism.io/tests
MIT License
16 stars 11 forks source link

chore(opt8n): Refactor `opt8n` into `cmd` modules #65

Closed 0xKitsune closed 2 months ago

0xKitsune commented 2 months ago

This PR refactors opt8n into cmd models, similar to opd8n.


#[derive(Parser, Clone, Debug)]
pub enum Commands {
    Repl(ReplArgs),
    Script(ScriptArgs),
    Server(ServerArgs),
}

#[tokio::main]
async fn main() -> eyre::Result<()> {
    color_eyre::install()?;
    let command = Args::parse().command;

    match command {
        Commands::Repl(cmd) => cmd.run().await?,
        Commands::Script(cmd) => cmd.run().await?,
        Commands::Server(cmd) => cmd.run().await?,
    }

    Ok(())
}