Lesson 9: Error: cannot find artifact "VRFCoordinatorV2Mock" #1444
-
Hi, when deploying mocks it is showing " Error: cannot find artifact "VRFCoordinatorV2Mock", I have looked into the discussion #1093, but for me artifacts is creating, I have followed instructions there, I have deleted artifacts and cache many times and deployed again and again, but still error is coming. I have even created new project from gitclone(Patrick repo) and deployed it, still same error is coming. I do not know what I missed. Could someone help me? thanks I have created a repo in git of my current code with error, below is my link |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
In your // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@chainlink/contracts/src/v0.8/mocks/VRFCoordinatorV2Mock.sol" ; Run |
Beta Was this translation helpful? Give feedback.
In your
contracts
folder create a folder namedtest
.In thetest
folder create a file namedVRFCoordinatorV2Mock.sol
.Inside this file add this:Run
yarn hardhat deploy
.This is what you are missing.Also next time put the.history
file in.gitignore
.It can take you a very long time to push a project to github