-
when running "yarn hardhat deploy" in the terminal, got this error in the terminal: this my 00-deploy-mocks.js code:
` |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 11 replies
-
I guess you did a wrong import const { getNamedAccounts, deployments } = require("hardhat") This is the required import statement: const { network } = require("hardhat") |
Beta Was this translation helpful? Give feedback.
-
change my code into: `const { developmentsChains } = require("../helper-hardhat-config.js") const BASE_FEE = ethers.utils.parseEther("0.25") //cost 0.25LINK token per VRF request module.exports = async function ({ getNamedAccounts, deployments }) {
} still have the same errors |
Beta Was this translation helpful? Give feedback.
-
This should fix it: const { developmentsChains } = require("../helper-hardhat-config.js")
-const { network } = require("hardhat")
+const { getNamedAccounts, deployments, network, ethers } = require("hardhat") // Remove for redundancy |
Beta Was this translation helpful? Give feedback.
-
@leung100 Hey can you give your helper-hardhat-config.js file for 9th lesson, please.. |
Beta Was this translation helpful? Give feedback.
This should fix it: