Skip to content

refactor(verify): remove redundant logging in Etherscan provider #11048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions crates/verify/src/etherscan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ impl VerificationProvider for EtherscanVerificationProvider {
.wrap_err_with(|| {
// valid json
let args = serde_json::to_string(&verify_args).unwrap();
error!(?args, "Failed to submit verification");
format!("Failed to submit contract verification, payload:\n{args}")
})?;

Expand All @@ -109,14 +108,11 @@ 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."));
return Err(eyre!("Could not detect deployment: {}", resp.result));
}

warn!("Failed verify submission: {:?}", resp);
sh_err!(
"Encountered an error verifying this contract:\nResponse: `{}`\nDetails:
`{}`",
"Failed to verify contract - Response: `{}`, Details: `{}`",
resp.message,
resp.result
)?;
Expand Down Expand Up @@ -186,7 +182,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" {
Expand Down