-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Enforce contract verification #5164
Enforce contract verification #5164
Conversation
🦋 Changeset detectedLatest commit: 425dbf4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
d7381a4
to
b9aada0
Compare
Hi @rimrakhimov, the code looks good. I've updated the error message to include the contract FQN, as other error messages also do this. I'll do some manual testing tomorrow. Regarding adding tests, you could add some integration tests by mocking the block explorer's response in |
…the verification request. Add test cases for '--force' flag verifications.
Hi, @schaable, thank you for the feedback. I added some test cases as you'd suggested. Also, found a bug in the implementation as etherscan returns different "already verified" messages depending on whether the contract has been actually verified by some user (e.g., 0x7b45A6d08F26ecAD9422fb85FbCAb1a0fec806CB), or has been automatically found verified contract with the same deployed bytecode (e.g., 0x9498322CB2193Bc906d2dF94D7C04A17A59790C8) |
Manual testing:
|
That PR adds the
--force
verification flag described in #5122, which allows the re-verification of already verified contracts (for blockscout-based explorers).Notice that sometimes, an underlying explorer may return an error saying that the contract has already been verified. For blockscout-based explorers that happens if the contract is already verified with a full match, while for etherscan that is the only possible option for verified contracts. The PR considers those cases as errors and fails with a corresponding error message. I don't know if that is what is expected, though.
Also I plan to add some test cases, but would be glad to get some suggestions to start with