Lesson 7 Getting TypeError when I try to compile the Mock file #4951
-
Here's my Mock file content // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
import "@chainlink/contracts/src/v0.6/tests/MockV3Aggregator.sol"; and this is the error I am getting when I try to compile it
Can anyone please tell me what's happening |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hello |
Beta Was this translation helpful? Give feedback.
-
Sorry for the trouble. The problem is solved. I updated chainlink to // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@chainlink/contracts/src/v0.8/tests/MockV3Aggregator.sol"; Instead of importing from |
Beta Was this translation helpful? Give feedback.
Sorry for the trouble. The problem is solved. I updated chainlink to
"@chainlink/contracts": "^0.6.1"
and also changed my mock like this
Instead of importing from
v0.6
, I am importing fromv0.8