Skip to content

Support partial matches in contract verifier #3190

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

Closed
perekopskiy opened this issue Oct 29, 2024 · 0 comments · Fixed by #3527
Closed

Support partial matches in contract verifier #3190

perekopskiy opened this issue Oct 29, 2024 · 0 comments · Fixed by #3527
Milestone

Comments

@perekopskiy
Copy link
Contributor

🌟 Feature Request

📝 Description

Please first read about full vs partial matches for contract verification here. Currently contract verifier support only full matches. This request is for supporting partial matches. Verification logic should be updated so that if a full match wasn't found but there is a partial one then the request is persisted and API exposes its data. Also, if a contract is partially verified it should be possible to replace its verification info if some full match request comes in, but not vice versa.

🤔 Rationale

Partial match is useful when the original source code was lost after deployment but developer managed to replicate it apart from metadata. Also, etherscan performs only partial match so devs get used to it. There are cases when only partial match verification is possible without adding a new feature to contract verifier, e.g. when contract's libraries are linked dynamically.

📋 Additional Context

After it's done on backend side it would be nice to display verification type on frontend

@popzxc popzxc moved this to Todo in DevEx squad Oct 29, 2024
@dutterbutter dutterbutter added this to the Q1 2025 milestone Jan 15, 2025
github-merge-queue bot pushed a commit that referenced this issue Jan 30, 2025
…3527)

Fixes #3190
Fixes #3309

I still have to test the migration logic (want to make sure that Era
mainnet data can be migrated correctly & quickly), but the PR is
reviewable otherwise.

This one is much bigger than I indended it to be, sorry 🥲 

- Changes `zksolc` used in contract verifier tests to 1.5.10 (old one
didn't have `ipfs` metadata hash support).
- Fixes problems that occured with newer compilers (e.g. `Yul` bytecode
extraction).
- Makes it easier to run contract verifier tests locally (pins compiler
versions, so that if you have a lot of compilers locally, tests don't
crash).
- Introduces partial matching for contracts
- Reworks the schema so that contracts with matching bytecode can be
"automatically" verified.
- Adds a migration to the new table.
@github-project-automation github-project-automation bot moved this from Todo to Done in DevEx squad Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants