PatrickAlphaC/brownie_fund_me

Unable to Compile With MockV3Aggregator after changing chainlink-brownie-contracts version to 0.2.2

Closed this issue · 1 comments

Hello everybody! I'm having a little trouble compiling MockV3Aggregator.sol file. I changed the chainlink-brownie-contracts version to 0.2.2, as it is recommended in this issue, but it still does not work.
Any other suggestion, will be grate.

The error is the following:

`Brownie v1.17.2 - Python development framework for Ethereum

New compatible solc version available: 0.6.0
Compiling contracts...
Solc version: 0.6.0
Optimizer: Enabled Runs: 200
EVM Version: Istanbul
CompilerError: solc returned the following errors:

/home/username/.brownie/packages/smartcontractkit/chainlink-brownie-contracts@0.2.2/contracts/src/v0.6/interfaces/AggregatorV2V3Interface.sol:7:38: TypeError: Interfaces cannot inherit.
interface AggregatorV2V3Interface is AggregatorInterface, AggregatorV3Interface
^-----------------^

/home/username/.brownie/packages/smartcontractkit/chainlink-brownie-contracts@0.2.2/contracts/src/v0.6/interfaces/AggregatorV2V3Interface.sol:7:59: TypeError: Interfaces cannot inherit.
interface AggregatorV2V3Interface is AggregatorInterface, AggregatorV3Interface
^-------------------^`

Also, I'm changing the version in the config file, both in the "dependencies" and "remapping" sections. I don't know if maybe I'm changing this in the wrong section?

Thanks in advance!

Well, I was able to find a solution.

As it is shown in the video, I change the global compiler version to 0.6.6, and in the .sol file wrote "pragma solidity ^0.6.6;" at the beginning of the file. Then, in the brownie-config.yaml file, in the "dependencies" and "compiler/solc/remappings" sections, I changed the version to 0.2.2 (like this: smartcontractkit/chainlink-brownie-contracts@0.2.2) as it is stated in this issue