From d7dbb4395d05bc0289068205035d64780e200c31 Mon Sep 17 00:00:00 2001 From: TomAFrench Date: Tue, 7 Mar 2023 11:39:45 +0000 Subject: [PATCH] chore(nargo)!: rename `contract` command to `codegen-verifier` --- .../src/cli/{contract_cmd.rs => codegen_verifier_cmd.rs} | 4 ++-- crates/nargo/src/cli/mod.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) rename crates/nargo/src/cli/{contract_cmd.rs => codegen_verifier_cmd.rs} (88%) diff --git a/crates/nargo/src/cli/contract_cmd.rs b/crates/nargo/src/cli/codegen_verifier_cmd.rs similarity index 88% rename from crates/nargo/src/cli/contract_cmd.rs rename to crates/nargo/src/cli/codegen_verifier_cmd.rs index 35318de2884..21fa42afa71 100644 --- a/crates/nargo/src/cli/contract_cmd.rs +++ b/crates/nargo/src/cli/codegen_verifier_cmd.rs @@ -7,12 +7,12 @@ use noirc_driver::CompileOptions; /// Generates a Solidity verifier smart contract for the program #[derive(Debug, Clone, Args)] -pub(crate) struct ContractCommand { +pub(crate) struct CodegenVerifierCommand { #[clap(flatten)] compile_options: CompileOptions, } -pub(crate) fn run(args: ContractCommand, config: NargoConfig) -> Result<(), CliError> { +pub(crate) fn run(args: CodegenVerifierCommand, config: NargoConfig) -> Result<(), CliError> { let compiled_program = compile_circuit(&config.program_dir, &args.compile_options)?; let backend = crate::backends::ConcreteBackend; diff --git a/crates/nargo/src/cli/mod.rs b/crates/nargo/src/cli/mod.rs index 5b5b2323e09..618830527b8 100644 --- a/crates/nargo/src/cli/mod.rs +++ b/crates/nargo/src/cli/mod.rs @@ -10,8 +10,8 @@ use color_eyre::eyre; mod fs; mod check_cmd; +mod codegen_verifier_cmd; mod compile_cmd; -mod contract_cmd; mod execute_cmd; mod gates_cmd; mod new_cmd; @@ -47,7 +47,7 @@ pub(crate) struct NargoConfig { #[derive(Subcommand, Clone, Debug)] enum NargoCommand { Check(check_cmd::CheckCommand), - Contract(contract_cmd::ContractCommand), + CodegenVerifier(codegen_verifier_cmd::CodegenVerifierCommand), Compile(compile_cmd::CompileCommand), New(new_cmd::NewCommand), Execute(execute_cmd::ExecuteCommand), @@ -69,7 +69,7 @@ pub fn start_cli() -> eyre::Result<()> { NargoCommand::Verify(args) => verify_cmd::run(args, matches.config), NargoCommand::Test(args) => test_cmd::run(args, matches.config), NargoCommand::Gates(args) => gates_cmd::run(args, matches.config), - NargoCommand::Contract(args) => contract_cmd::run(args, matches.config), + NargoCommand::CodegenVerifier(args) => codegen_verifier_cmd::run(args, matches.config), }?; Ok(())