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 w/ new flattener #1283

Merged
merged 22 commits into from
Oct 12, 2021

Conversation

skellet0r
Copy link
Collaborator

@skellet0r skellet0r commented Oct 11, 2021

What I did

Added a new solidity source code flattener.
This one is not as fancy as using the solidity ast, however, it does come with the benefit that it's extremely robust, since it literally just reads in files and uses import statements to read in files.

Long term however, this sucks flattening the source code, we should really push etherscan to support programmatic verification via standard-json-input, which the Flattener class has support for if that day in the future ever arrives.

Fixes: #1192 #1076

How I did it

Just traverse through the tree, use a bit of regex and voila

How to verify it

This should work with all solidity compiler versions. Test on a bunch, I did sample deployments using the oz mocks library.

Checklist

  • I have confirmed that my PR passes all linting checks
  • I have added an entry to the changelog

@skellet0r skellet0r force-pushed the fix/verification branch 2 times, most recently from 891e06b to c1d529a Compare October 12, 2021 15:29
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.

Etherscan Verify Fails
3 participants