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

Explore integration of Sourcify for Contract Verification #9

Closed
saimeunt opened this issue Jun 20, 2024 · 4 comments
Closed

Explore integration of Sourcify for Contract Verification #9

saimeunt opened this issue Jun 20, 2024 · 4 comments
Assignees
Labels

Comments

@saimeunt
Copy link
Collaborator

saimeunt commented Jun 20, 2024

Explore integration of Sourcify for Contract Verification

⚠️ Reading contributors guidelines to get assigned is MANDATORY!

Read contributors guidelines

In the future, we plan to add contract verification into the explorer.

What we want to achieve ideally:

  • On a Contract page, it will query sourcify to check if it has the source code. If yes it downloads it and presents it
  • On a Contract page, new flow is created for verifying contracts. The contracts will be uploaded to Sourcify's public database

The goal of this task is to try to implement a POC (quick&dirty) integration with Sourcify (https://github.com/ethereum/sourcify) to see if it's a good solution for our needs. Mainly:

  • Is it possible to leverage Sourcify's publicly hosted service to query code and also upload code for verification?
  • Any roadblocks / problems / issues?
@saimeunt saimeunt converted this from a draft issue Jun 20, 2024
@matthieuauger
Copy link
Contributor

Hi, I'd like to pick this one. I already made some contributions on https://github.com/walnuthq/cairovm.codes

From my understanding, in the future, we will add the contract section on the address page when it is developed, but from now, we want to technically validate Sourcify integration.

I need to dig into Sourcify but output of this issue would be:

  • a functional POC to read source code & validate
  • ideally, leverage sourcify infrastructure to avoid extra code and infra dependencies for op-scan
  • if that doesn't work, propose new options to provide contract verification in op-scan

@saimeunt
Copy link
Collaborator Author

@matthieuauger you're right, when the address page is further developed, at some point we will need a Contract tab just like Etherscan and we plan on using sourcify to both display the Contract source code and let users verify their contract on op-scan.
Once the contract is verified and we have access to the ABI, we will leverage this info in other parts of the explorer such as decoding transaction calldata to display human readable function name and arguments.
We will also be able to develop the read contract / write contract functionality.
Assigning to you as you provided a clear understanding of the expected output.

@mazurroman
Copy link
Contributor

glad to see you here @matthieuauger

I want to note, with regard to your comment on infrastructure, that we want this explorer to stay lightweight so that anyone can run it locally when building a new chain on the OP Stack. Please keep that in mind while exploring this issue.

@matthieuauger
Copy link
Contributor

Yeah I definitely got that in mind, setup should be as simple and light as possible

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

No branches or pull requests

3 participants