PatrickAlphaC / hardhat-fund-me-fcc

82 stars 184 forks source link

[Update]: smartcontractkit/chainlink no longer supports MockV3Aggregator for v0.6 #141

Closed geeky01adarsh closed 1 year ago

geeky01adarsh commented 1 year ago

Hi, I was trying to create the mock contract using this line of code

import "@chainlink/contracts/src/v0.6/tests/MockV3Aggregator.sol";

but it threw an error

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

@chainlink/contracts/src/v0.6/interfaces/AggregatorV2V3Interface.sol:7:59: TypeError: Interfaces cannot inherit.
interface AggregatorV2V3Interface is AggregatorInterface, AggregatorV3Interface
                                                          ^-------------------^

Error HH600: Compilation failed

And after debugging and going through the GitHub repo, I found that the above lines in MockV3Aggregator.sol must be replaced with the following lines

import "@chainlink/contracts/src/v0.7/tests/MockV3Aggregator.sol";

Please update it.

PatrickAlphaC commented 1 year ago

Thanks for this suggestion! It looks like you're using a different package than what's in this repo. If you could help update the versions that would be awesome! Otherwise we are going to leave it as is.