Lesson 6: error when compiling MockV3Aggregator #78
-
Hi guys, I'm getting an error when trying to compile the MockV3Aggregator.sol contract. The error looks like this: The only thing I did was copy the code from https://github.com/smartcontractkit/chainlink-mix/blob/master/contracts/test/MockV3Aggregator.sol as instructed. Any reason why this might be occurring? Appreciate the help and really enjoying the course so far :) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 16 replies
-
Good question! It looks like you’re trying to have an interface inherit an interface. What if you make this a contract instead of an interface? |
Beta Was this translation helpful? Give feedback.
-
Hey, I'm having the exact same issue on lesson 6 after copy/pasting the MockV3Aggregator.sol code from the chainlink-mix github. This contract inherits from AggregatorV2V3Interface.sol which in turn is trying to inherit from AggregatorInterface and AggregatorV3Interace.
I tried changing this file to a contract rather than an interface as suggested but it then threw an error saying it needed to be marked as abstract - tried adding a few keyword combinations including abstract and public but to no avail! I've just checked and all my code is using solidity ^0.6.0 so there doesn't seem to be any conflict there. Any help would be much appreciated! (fyi not sure how to comment in here but didn't want to create a duplicate thread... this is obviously not an answer!) |
Beta Was this translation helpful? Give feedback.
-
I was having the same issue i fixed it by changing solidity version from ^0.6.0 to ^0.7.0. I also tried with ^0.8.0 but it started to give me another error So i guess just change it to ^0.7.0 and it should work |
Beta Was this translation helpful? Give feedback.
Good question!
It looks like you’re trying to have an interface inherit an interface. What if you make this a contract instead of an interface?