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

Put file of verified contract first in the list of sources #3455

Open
fvictorio opened this issue Dec 22, 2022 · 0 comments
Open

Put file of verified contract first in the list of sources #3455

fvictorio opened this issue Dec 22, 2022 · 0 comments
Labels
effort:moderate status:ready This issue is ready to be worked on type:improvement

Comments

@fvictorio
Copy link
Member

When a contract is verified, we build a solc input that is sent to Etherscan. This input includes a list of sources, and Etherscan will show these sources in that order. Ideally the first source should correspond to the file of the contract that is being verified.

This is relatively easy to do, because we already have the file of the verified contract (we use it to compute the minimal input to send).

There are other improvements we could make, but that are not part of this issue. I'm mentioning here for completeness:

  • Sort the sources in reverted topological order, starting from the one of the verified contract, so that each file shown was imported by a file shown previously.
  • Provide some mechanism (like an overridable sub-task) to configure the way the sources are sorted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort:moderate status:ready This issue is ready to be worked on type:improvement
Projects
Status: No status
Development

No branches or pull requests

1 participant