Lesson 9 - 14:14:26: why is it wrong to add 'require("@chainlink/contracts")' to hardhat.config.js? #1601
Replies: 2 comments 3 replies
-
I think you're getting a little bit confused with the imports and the usage of each file. He is not requiring (in reference to the literal word, not the keyword) anything from Inside |
Beta Was this translation helpful? Give feedback.
-
after installing chainlink/contracts now its part of hardhat there is no need to import it from some where. files in node_module kind of servers hardhat so it will automatically used by the hardhat. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This is a general question about installing and using modules.
I am curious why Patrick doesn't add 'require("@chainlink/contracts")' to hardhat.config.js when he is importing VRFConsumerBaseV2.sol to Raffle.sol. Does it have to do with it being used in a solidity file?
Actually it turns out that if you - in addition to the actions in the video - add 'require("@chainlink/contracts")' to hardhat.config.js, then the compile at 14:14:26 fails. why?
Beta Was this translation helpful? Give feedback.
All reactions