Skip to content

Commit

Permalink
fix(nargo): give contract artifacts unique names to prevent overwrites (
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench authored Apr 17, 2023
1 parent fba6418 commit 1227b2c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/nargo_cli/src/cli/compile_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ pub(crate) fn run(args: CompileCommand, config: NargoConfig) -> Result<(), CliEr
let preprocessed_contracts =
try_vecmap(compiled_contracts, |contract| preprocess_contract(&backend, contract))?;
for contract in preprocessed_contracts {
save_contract_to_file(&contract, &args.circuit_name, &circuit_dir);
save_contract_to_file(
&contract,
&format!("{}-{}", &args.circuit_name, contract.name),
&circuit_dir,
);
}
} else {
let program = compile_circuit(&backend, &config.program_dir, &args.compile_options)?;
Expand Down

0 comments on commit 1227b2c

Please sign in to comment.