This will be useful for other commands that might want to interact with the network to perform tasks related to DA. One example is the upcoming testnet demo.
23 lines
386 B
Rust
23 lines
386 B
Rust
pub mod cmds;
|
|
pub mod da;
|
|
|
|
use clap::Parser;
|
|
use cmds::Command;
|
|
|
|
#[derive(Parser)]
|
|
#[command(author, version, about, long_about = None)]
|
|
pub struct Cli {
|
|
#[command(subcommand)]
|
|
command: Command,
|
|
}
|
|
|
|
impl Cli {
|
|
pub fn run(self) -> Result<(), Box<dyn std::error::Error>> {
|
|
self.command.run()
|
|
}
|
|
|
|
pub fn command(&self) -> &Command {
|
|
&self.command
|
|
}
|
|
}
|