-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this makes sense, but there's no need to put changes as docs
tnx for the review, does it make sense now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lsh9
@@ -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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually we should log this because this usually provides useful context for debugging
} | ||
|
||
warn!("Failed verify submission: {:?}", resp); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
@@ -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))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe adding this to the actual error is better @grandizzy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense, anything that helps figuring out why verification failed is good to have
Removed redundant warn!/error! calls to reduce log noise and improve clarity