PatrickAlphaC / brownie_fund_me

26 stars 64 forks source link

TypeError: Interfaces cannot inherit. interface AggregatorV2V3Interface is AggregatorInterface, AggregatorV3Interface #14

Closed themodfunction closed 2 years ago

themodfunction commented 2 years ago

I keep getting this error when i try to compile. I tried shifting versions, but to no use. Please help thanks

themodfunction commented 2 years ago

Hey Guys! I found a solution to remove V2V3 and just put V3. It works.

FCardellino commented 2 years ago

Hello! Can you indicate where or how you remove V2V3? Thanks!

themodfunction commented 2 years ago

Hey @FCardellino In almost all places where V2V3 occurs, replace it by just V3

Swapnamoy45 commented 2 years ago

I was having the same problem and was stuck for over 4 hours with this. I was using pragma solidity ^0.8.0; solidity version and compiling on 0.6.0 version. There are some serious problems with the Aggregators to be honest.

Finally, somehow I found a way to compile the MockV3Aggregator as well......

Just use:

 - '@chainlink=smartcontractkit/chainlink-brownie-contracts@0.2.1'
 - '@chainlink=smartcontractkit/chainlink-brownie-contracts@1.1.1'

Both of these in the Config file....and then you're good to go!

HOPE IT HELPS. Thanks.

PatrickAlphaC commented 2 years ago

That's really odd....

The 0.2.1 should do the trick...

JCDC9919 commented 2 years ago

I got it to compile in the end, but couldn't get the red warning for my import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; line to go away!

cryptony8055 commented 2 years ago

im having this same issue . cant get the mockV3Aggregator to compile . cant get past that section bc of the issue

FCardellino commented 2 years ago

Hi @cryptony8055, I solved the issue in this way . I hope it can help you!

JCDC9919 commented 2 years ago

Hi @cryptony8055, I'm not sure if it's the "correct way" but I found it seemed to work if you widen the scope of the Solidity versions: pragma solidity >=0.6.0 <0.9.0; Using the carrot notation on 0.6.0 seemed to give me further errors This was using 0.3.0 chainlink in the .config file

cryptony8055 commented 2 years ago

hey @JCDC9919 thanks a lot it worked .

PatrickAlphaC commented 2 years ago

Closing, feel free to open back up.