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

Solidity compilation broken for solc0.8.0 #897

Closed
sinasab opened this issue Dec 18, 2020 · 1 comment · Fixed by #907
Closed

Solidity compilation broken for solc0.8.0 #897

sinasab opened this issue Dec 18, 2020 · 1 comment · Fixed by #907
Labels
bug Something isn't working

Comments

@sinasab
Copy link

sinasab commented Dec 18, 2020

Environment information

  • brownie Version: v1.12.2
  • ganache-cli Version: 6.12.1
  • solc Version: 0.8.0
  • Python Version: 3.8
  • OS: osx/linux/win

What was wrong?

I think brownie's solidity compatibility may be broken for solidity version 0.8.0.

To reproduce, create a solidity contract and try to compile it with solc 0.8.0 via brownie compile. Here's a minimal contract I was able to reproduce with:

pragma solidity 0.8.0;

contract Testy {
    address public testAddress;
    constructor() public {}
}

when I try to run brownie compile --all, I get this error:
image

How can it be fixed?

By changing the solidity version to something else. For example, when I change the solidity version in the file to something like 0.6.0, it appears to compile without issue.

From my brief tinkering, it looks like 0.8.0 is the first version that this breaks (ie. it compiles fine on 0.7.6).

@iamdefinitelyahuman
Copy link
Member

This appears to be the same bug as #890, there is a fix in #895 but the CI is showing other, unrelated issues with 0.8.0 that still need addressing 😬

Thanks for the minimal example, it will be useful for writing some tests around this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants