From 77606bf5decf2b6dfc31997efa8903c2d6e399e4 Mon Sep 17 00:00:00 2001 From: activecoder10 Date: Wed, 9 Jul 2025 11:03:50 +0300 Subject: [PATCH] Added bail to stop execution when we have an error during deployment --- crates/core/src/driver/mod.rs | 17 +++++++++++------ crates/format/src/input.rs | 3 ++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/crates/core/src/driver/mod.rs b/crates/core/src/driver/mod.rs index ee59d4a..12b0a82 100644 --- a/crates/core/src/driver/mod.rs +++ b/crates/core/src/driver/mod.rs @@ -300,20 +300,25 @@ where .insert(contract_name.clone(), parsed_abi); } Err(err) => { - log::debug!( - "Failed to parse ABI from metadata for {contract_name}: {err}" + anyhow::bail!( + "Failed to parse ABI from metadata for contract {}: {}", + contract_name, + err ); } } } else { - log::debug!( - "No ABI found in metadata for contract {contract_name}" + anyhow::bail!( + "No ABI found in metadata for contract {}", + contract_name ); } } Err(err) => { - log::debug!( - "Failed to parse metadata JSON string for contract {contract_name}: {err}" + anyhow::bail!( + "Failed to parse metadata JSON string for contract {}: {}", + contract_name, + err ); } } diff --git a/crates/format/src/input.rs b/crates/format/src/input.rs index 4d04877..bc7b6e5 100644 --- a/crates/format/src/input.rs +++ b/crates/format/src/input.rs @@ -54,7 +54,8 @@ pub enum Calldata { #[serde(untagged)] pub enum CalldataArg { Literal(String), - AddressRef(String), // will be "Contract.address" + /// For example: `Contract.address` + AddressRef(String), } /// Specify how the contract is called.