Skip to content
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

Add a verification flag to skip contract is verified check #6461

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

rimrakhimov
Copy link
Contributor

@rimrakhimov rimrakhimov commented Nov 29, 2023

Motivation

Blockscout allows to re-verify partially verified contracts until they are not fully verified. It may be useful in case if the contract has been already verified by blockscout automatically (via finding a verified contract with similar bytecode). Forge does not allow to re-verify such contracts because of the following check - https://github.com/foundry-rs/foundry/blob/master/crates/forge/bin/cmd/verify/etherscan/mod.rs#L60.

Solution

We suggest to add a new flag that should make verification process to ignore the check. Eventually, if the flag is set, verification process just skips the corresponding if branch and sends the verification request anyway

I've added the flag in this PR, but haven't come up what and where corresponding tests should be added. Would be glad to get any guidance

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reasonable.

ty

Comment on lines +71 to +73
/// Do not check if the contract is already verified before verifying.
#[clap(long)]
pub skip_is_verified_check: bool,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that makes sense, I believe etherscan does not verify partially verified contracts though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants