Lesson 6: Error when compiling MockV3Aggregator- "TypeError: Interfaces cannot inherit" #875
-
|
I've copied the MockV3Aggregator.sol code as shown but when I try to compile I get hit with the following error. Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
Hello @strudelPie Interfaces are abstract contract and should not be inherit by other contracts, could you please share the whole code in order to check it? |
Beta Was this translation helpful? Give feedback.
-
|
Ok so I have sorted it out for me as follows, in case it helps anyone else. Still not quite sure why only I seem to be getting this issue(?) Replaced the import statement with: and then changed the contract declaration to be:
Compiled fine after that. |
Beta Was this translation helpful? Give feedback.
Ok so I have sorted it out for me as follows, in case it helps anyone else. Still not quite sure why only I seem to be getting this issue(?)
Replaced the import statement with:
and then changed the contract declaration to be:
contract MockV3Aggregator is AggregatorInterface, AggregatorV3InterfaceCompiled fine after that.