From 0cfa9fcc364590633f17d99c16e81af4265e39ec Mon Sep 17 00:00:00 2001 From: crStiv Date: Sat, 19 Jul 2025 19:10:08 +0200 Subject: [PATCH 1/2] Update mod.rs --- crates/verify/src/etherscan/mod.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/crates/verify/src/etherscan/mod.rs b/crates/verify/src/etherscan/mod.rs index 5dbcbf6346963..e9bf3e654831f 100644 --- a/crates/verify/src/etherscan/mod.rs +++ b/crates/verify/src/etherscan/mod.rs @@ -92,7 +92,7 @@ impl VerificationProvider for EtherscanVerificationProvider { .wrap_err_with(|| { // valid json let args = serde_json::to_string(&verify_args).unwrap(); - error!(?args, "Failed to submit verification"); + // Removed error! to avoid duplication - wrap_err_with already provides error context format!("Failed to submit contract verification, payload:\n{args}") })?; @@ -109,14 +109,13 @@ impl VerificationProvider for EtherscanVerificationProvider { if resp.result.starts_with("Unable to locate ContractCode at") || resp.result.starts_with("The address is not a smart contract") { - warn!("{}", resp.result); - return Err(eyre!("Could not detect the deployment.")); + // Removed warn! to avoid duplication - error message already contains the info + return Err(eyre!("Could not detect deployment: {}", resp.result)); } - warn!("Failed verify submission: {:?}", resp); + // Removed warn! to avoid duplication - sh_err! already provides error output sh_err!( - "Encountered an error verifying this contract:\nResponse: `{}`\nDetails: - `{}`", + "Failed to verify contract - Response: `{}`, Details: `{}`", resp.message, resp.result )?; @@ -186,7 +185,7 @@ impl VerificationProvider for EtherscanVerificationProvider { } if resp.status == "0" { - return Err(RetryError::Break(eyre!("Contract failed to verify."))); + return Err(RetryError::Break(eyre!("Contract verification failed - status: {}, result: {}", resp.status, resp.result))); } if resp.result == "Pass - Verified" { From fac907fb33ff7cad759fdd9751d665e580ec67f7 Mon Sep 17 00:00:00 2001 From: crStiv Date: Sat, 26 Jul 2025 17:13:19 +0200 Subject: [PATCH 2/2] Update mod.rs --- crates/verify/src/etherscan/mod.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/crates/verify/src/etherscan/mod.rs b/crates/verify/src/etherscan/mod.rs index e9bf3e654831f..5b151af94fb52 100644 --- a/crates/verify/src/etherscan/mod.rs +++ b/crates/verify/src/etherscan/mod.rs @@ -92,7 +92,6 @@ impl VerificationProvider for EtherscanVerificationProvider { .wrap_err_with(|| { // valid json let args = serde_json::to_string(&verify_args).unwrap(); - // Removed error! to avoid duplication - wrap_err_with already provides error context format!("Failed to submit contract verification, payload:\n{args}") })?; @@ -109,11 +108,9 @@ impl VerificationProvider for EtherscanVerificationProvider { if resp.result.starts_with("Unable to locate ContractCode at") || resp.result.starts_with("The address is not a smart contract") { - // Removed warn! to avoid duplication - error message already contains the info return Err(eyre!("Could not detect deployment: {}", resp.result)); } - // Removed warn! to avoid duplication - sh_err! already provides error output sh_err!( "Failed to verify contract - Response: `{}`, Details: `{}`", resp.message,