Replies: 8 comments 4 replies
-
Could you push your directory to a repo and link it here? Thank you. I will look into it |
Beta Was this translation helpful? Give feedback.
-
Yup got the same error today. |
Beta Was this translation helpful? Give feedback.
-
hardcoded way to pass this issue for now is create interface directory and there make 3 files: AggregatorInterface.sol, AggregatorV3Interface.sol and AggregatorV2V3Interface.sol. copy content of them from https://github.com/smartcontractkit/chainlink/tree/develop/contracts/src/v0.8/interfaces |
Beta Was this translation helpful? Give feedback.
-
I had this same issue. I just kept toying with it and fortunately it worked. |
Beta Was this translation helpful? Give feedback.
-
Well, Patrick is using Chainlink v0.4.0 package and it does not have MockV3Aggregator in v0.8 contracts and that's why you are getting the error that the MockV3Aggregator is not found. If you want to use MockV3Aggregator in v0.8 then you need to upgrade your Chainlink packages to v0.4.2 by |
Beta Was this translation helpful? Give feedback.
-
Change import path to : |
Beta Was this translation helpful? Give feedback.
-
The MockV3Aggregator is a mock contract often used for testing in decentralized finance (DeFi) projects, specifically when working with Chainlink price feeds. It allows developers to simulate price feed data without interacting with the actual Chainlink oracles. In Solidity version 0.8, you can use this mock to test your contracts without relying on live price feeds. Here is a basic example of how to set up the MockV3Aggregator in Solidity 0.8: import "@chainlink/contracts/src/v0.8/tests/MockV3Aggregator.sol"; contract MyContract {
} |
Beta Was this translation helpful? Give feedback.
-
why did not Patrick use mockV3aggregator for version 0.8 of solidity and uses 0.6? there is another file in :
@chainlink/contracts/src/v0.8/tests/MockV3Aggregator.sol
but he uses this:
@chainlink/contracts/src/v0.6/tests/MockV3Aggregator.sol
why not 0.7 ?!
Also:
when I use version 0.8, it returns an error :
Error HH404: File @chainlink/contracts/src/v0.8/tests/MockV3Aggregator.sol, imported from contracts/test/MockV3Aggregator.sol, not found.
why this happens, although the file exists on GitHub?!
thank you!
Beta Was this translation helpful? Give feedback.
All reactions