diff --git a/stackslib/src/clarity_cli.rs b/stackslib/src/clarity_cli.rs index 7c680f2c66..5aa99f3475 100644 --- a/stackslib/src/clarity_cli.rs +++ b/stackslib/src/clarity_cli.rs @@ -115,7 +115,7 @@ where command is one of: eval_at_chaintip like `eval`, but does not advance to a new block. eval_at_block like `eval_at_chaintip`, but accepts a index-block-hash to evaluate at, must be passed eval string via stdin. - eval_raw to typecheck and evaluate an expression without a contract or database context. + eval_raw to typecheck and evaluate an expression without a contract or database context from stdin. repl to typecheck and evaluate expressions in a stdin/stdout loop. execute to execute a public function of a defined contract. generate_address to generate a random Stacks public address for testing purposes. @@ -807,7 +807,7 @@ impl HeadersDB for CLIHeadersDB { fn get_eval_input(invoked_by: &str, args: &[String]) -> EvalInput { if args.len() < 3 || args.len() > 4 { eprintln!( - "Usage: {} {} [--costs] [contract-identifier] (program.clar) [vm-state.db]", + "Usage: {} {} [--costs] [--epoch E] [--clarity_version N] [contract-identifier] (program.clar) [vm-state.db]", invoked_by, args[0] ); panic_test!(); @@ -1167,6 +1167,10 @@ pub fn invoke_command(invoked_by: &str, args: &[String]) -> (i32, Option { + if args.len() != 1 { + eprintln!("Usage: {} {}", invoked_by, args[0]); + panic_test!(); + } // random 20 bytes let random_bytes = rand::thread_rng().gen::<[u8; 20]>(); // version = 22 @@ -1321,6 +1325,15 @@ pub fn invoke_command(invoked_by: &str, args: &[String]) -> (i32, Option (i32, Option (i32, Option