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

Adds logic for forcing through verification when is verified check fails #5504

Merged
merged 4 commits into from
Jul 10, 2024

Conversation

3commascapital
Copy link
Contributor

@3commascapital 3commascapital commented Jul 9, 2024

  • Because this PR includes a bug fix, relevant tests have been included.
  • Because this PR includes a new feature, the change was previously discussed on an Issue or with someone from the team.
  • I didn't do anything of this.

There is a bug in blockscout's latest releases. It has been around for quite a while. Unfortunately it only happens in certain situations. The issue is that an isVerified check will fail if the backend is put into a certain state. The easy way around this would simply be to include that set of errors / states to be ignored when provided a force flag.

I do not think that hardhat verify should cover all of the quirks of the many backends that are bound to emerge into eternity, however, I think that the force flag being more comprehensive (less narrowly applied) than it currently is could be a reasonable middle ground, provided that it does not run afoul of any eip's.

Copy link

changeset-bot bot commented Jul 9, 2024

🦋 Changeset detected

Latest commit: 2f8ec7b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@nomicfoundation/hardhat-verify Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jul 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 9, 2024 10:09pm

@3commascapital
Copy link
Contributor Author

3commascapital commented Jul 9, 2024

before this fix:

hardhat-verify found one or more errors during the verification process:

Etherscan:
Failed to send contract verification request.
Endpoint URL: https://api.scan.pulsechain.com/api?apikey=abc&module=contract&action=getsourcecode&address=0x...
The HTTP server response is not ok. Status code: 500 Response text: {"message":"Something went wrong.","result":null,"status":"0"}

after this fix:

Successfully submitted source code for contract
... at ...
for verification on the block explorer. Waiting for verification result...

Successfully verified contract ... on the block explorer.
https://...

@alcuadrado
Copy link
Member

I do not think that hardhat verify should cover all of the quirks of the many backends that are bound to emerge into eternity, however, I think that the force flag being more comprehensive (less narrowly applied) than it currently is could be a reasonable middle ground, provided that it does not run afoul of any eip's.

Agreed. I think this is a reasonable exception.

Thanks for the PR!

@3commascapital
Copy link
Contributor Author

Looks great. Thank you!

@alcuadrado alcuadrado merged commit 1f43da8 into NomicFoundation:main Jul 10, 2024
16 checks passed
Copy link

gitpoap-bot bot commented Jul 10, 2024

Congrats, your important contribution to this open-source project has earned you a GitPOAP!

GitPOAP: 2024 Hardhat Contributor:

GitPOAP: 2024 Hardhat Contributor GitPOAP Badge

Head to gitpoap.io & connect your GitHub account to mint!

Learn more about GitPOAPs here.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants