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

fix/etherscan verification #828

Merged
merged 1 commit into from
Feb 4, 2022
Merged

Conversation

rkrasiuk
Copy link
Contributor

Motivation

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

@rkrasiuk rkrasiuk marked this pull request as draft January 25, 2022 11:52
@mattsse
Copy link
Collaborator

mattsse commented Jan 25, 2022

what could be nice to have is some roundtrip test:

  1. get contract source code for a specific address
  2. get metadata (hopefully compiler version and constructor arguments are included)
  3. call verify

@gakonst
Copy link
Owner

gakonst commented Feb 2, 2022

@rkrasiuk FYI #809 got rolled in #802 so if you'd want to unblock yourself from it you could use that as the base for this PR. Otherwise, will ping again when 802 is merged and we can then move forward with it (+ add a roundtrip test)?

@rkrasiuk
Copy link
Contributor Author

rkrasiuk commented Feb 2, 2022

@gakonst what do you think about the following - I add a roundtrip test and we merge as it is. then, in foundry, we require to provide the compiler version and num of optimizations for now. then, after #802 is merged, we just improve on top of this PR. that would solve a lot of current complaints about verification that users have

@gakonst
Copy link
Owner

gakonst commented Feb 2, 2022

agreed - sgtm

@rkrasiuk
Copy link
Contributor Author

rkrasiuk commented Feb 2, 2022

@gakonst perfect, will take care of this tmrw morning

@rkrasiuk
Copy link
Contributor Author

rkrasiuk commented Feb 3, 2022

@mattsse so, the metadata is all there in the response. the problem with the roundtrip test is that etherscan would error out on trying to verify the contract that was already verified. i guess we can redeploy the contract each time on goerli for verification, but we'd have to set up some dummy wallet with goerli eth

@mattsse
Copy link
Collaborator

mattsse commented Feb 3, 2022

oh I see, I don't think that's worth it.
looking good!

@rkrasiuk rkrasiuk marked this pull request as ready for review February 3, 2022 19:58
Copy link
Owner

@gakonst gakonst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Let's maybe look into how we can expand flattening to support multiple contracts In the same file?

@gakonst gakonst merged commit d39c024 into gakonst:master Feb 4, 2022
@rkrasiuk rkrasiuk deleted the fix/etherscan-verify branch February 4, 2022 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants