-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(blockifier_reexecution): add main for tests via cli commands (#…
- Loading branch information
1 parent
3dbef1c
commit ea50d56
Showing
3 changed files
with
41 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
use clap::{Args, Parser, Subcommand}; | ||
|
||
/// BlockifierReexecution CLI. | ||
#[derive(Debug, Parser)] | ||
#[clap(name = "blockifier-reexecution-cli", version)] | ||
pub struct BlockifierReexecutionCliArgs { | ||
#[clap(flatten)] | ||
global_options: GlobalOptions, | ||
|
||
#[clap(subcommand)] | ||
command: Command, | ||
} | ||
|
||
#[derive(Debug, Subcommand)] | ||
enum Command { | ||
/// Runs the RPC test. | ||
RpcTest { | ||
/// Node url. | ||
/// Default: https://free-rpc.nethermind.io/mainnet-juno/. Won't work for big tests. | ||
#[clap(long, short = 'n', default_value = "https://free-rpc.nethermind.io/mainnet-juno/")] | ||
node_url: String, | ||
|
||
/// Block number. | ||
#[clap(long, short = 'b')] | ||
block_number: u64, | ||
}, | ||
} | ||
|
||
#[derive(Debug, Args)] | ||
struct GlobalOptions {} | ||
|
||
/// Main entry point of the blockifier reexecution CLI. | ||
fn main() { | ||
let args = BlockifierReexecutionCliArgs::parse(); | ||
|
||
match args.command { | ||
Command::RpcTest { .. } => todo!(), // TODO(Aner): Move the RPC test logic here. | ||
} | ||
} |