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

generating interface ABIs does not respect solc version in brownie-config.yaml #1242

Closed
gosuto-inzasheru opened this issue Sep 9, 2021 · 0 comments

Comments

@gosuto-inzasheru
Copy link
Contributor

Environment information

  • brownie Version: 1.16.2
  • ganache-cli Version: 6.12.2
  • solc Version: 0.6.12
  • Python Version: 3.9.6
  • OS: macos

What was wrong?

when compiling, generating the ABIs does not respect the solc version set in brownie-config.yaml:

compiler:
    solc:
        version: 0.6.12
$ brownie compile --all
Brownie v1.16.2 - Python development framework for Ethereum

Compiling contracts...
  Solc version: 0.6.12
  Optimizer: Enabled  Runs: 200
  EVM Version: Istanbul
Generating build data...
[...]

Generating interface ABIs...
CompilerError: solc returned the following errors:

ParserError: Source file requires different compiler version (current compiler is 0.8.4+commit.c7e474f2.Darwin.appleclang) - note that nightly builds are considered to be strictly less than the released version
 --> interfaces/erc20/IERC20.sol:3:1:
  |
3 | pragma solidity ^0.6.0;
  | ^^^^^^^^^^^^^^^^^^^^^^^

via https://ethereum.stackexchange.com/a/102669/3426

How can it be fixed?

still digging through the code, but i believe .get_abi needs to check the config file or get passed a solc version before setting solc_sources based on the contract_sources dict.

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

2 participants