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" {