This commit is contained in:
evan-schott 2024-06-07 17:53:13 -07:00
parent 96eeaf5aab
commit b63c8e39b1
2 changed files with 6 additions and 4 deletions

View File

@ -183,10 +183,9 @@ fn handle_deploy<A: Aleo<Network = N, BaseField = N::Field>, N: Network>(
// Generate the deployment transaction.
let transaction = Transaction::from_deployment(owner, deployment, fee)?;
println!("✅ Created deployment transaction for '{}'", name.bold());
// Determine if the transaction should be broadcast, stored, or displayed to the user.
if !command.fee_options.dry_run {
println!("✅ Created deployment transaction for '{}'", name.bold());
handle_broadcast(
&format!("{}/{}/transaction/broadcast", command.options.endpoint, command.options.network),
transaction,
@ -196,6 +195,8 @@ fn handle_deploy<A: Aleo<Network = N, BaseField = N::Field>, N: Network>(
if index < all_paths.len() - 1 {
std::thread::sleep(std::time::Duration::from_secs(command.wait));
}
} else {
println!("✅ Successful dry run deployment for '{}'", name.bold());
}
}

View File

@ -213,10 +213,9 @@ fn handle_execute<A: Aleo>(command: Execute, context: Context) -> Result<<Execut
)?;
}
println!("✅ Created execution transaction for '{}'", program_id.to_string().bold());
// Broadcast the execution transaction.
if !command.fee_options.dry_run {
println!("✅ Created execution transaction for '{}'", program_id.to_string().bold());
handle_broadcast(
&format!(
"{}/{}/transaction/broadcast",
@ -225,6 +224,8 @@ fn handle_execute<A: Aleo>(command: Execute, context: Context) -> Result<<Execut
transaction,
&program_name,
)?;
} else {
println!("✅ Successful dry run execution for '{}'", program_id.to_string().bold());
}
return Ok(());