[go: up one dir, main page]

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

Brownie is unable to verify contracts deployed other smart contracts #1661

Open
yzhuang opened this issue Jan 20, 2023 · 0 comments
Open

Brownie is unable to verify contracts deployed other smart contracts #1661

yzhuang opened this issue Jan 20, 2023 · 0 comments

Comments

@yzhuang
Copy link
yzhuang commented Jan 20, 2023

Environment information

  • brownie Version: 1.19.1
  • solc Version: 0.8.7
  • Python Version: 3.10.5
  • OS: osx

What was wrong?

Contract.publish_source fails to verify contracts deployed by other smart contracts.
No error message is given by brownie.
Investigation showed that Brownie failed at the constructor_arguments lookup step.

How can it be fixed?

Brownie is not smart enough to look up the constructor parameters for contracts deployed by other contracts.
For example, see this contract deployed by an internal transaction:

I put together a diff to show a potential workaround that we currently use, but I am not sure if that’s the best fix to adopt in Brownie. The workaround involves skipping the constructor_arguments lookup if supplied directly.
See https://github.com/eth-brownie/brownie/pull/1662/files

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

No branches or pull requests

1 participant