Closed wesley-lewis closed 1 year ago
Can you add the more details?
Have you tried
ethers.utils.parseEther
If you use console.log to print out ethers
, probably you will get undefined
.
If that is the case, highly likely, in hardhat.config.js, you did not add the following:
require("@nomiclabs/hardhat-ethers")
If it still does not work, I suggest you install ethers and hardhat-ethers (yarn or npm). Then it should work
yarn add --dev hardhat @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers ethers
This will help you
Nothing to compile Local network detected! Deploying mocks deploying "VRFCoordinatorV2Mock" (tx: 0xcc454aa73563f7b97237e5ab1ed0859f0eaeea6abea666542e0455b43d97ace6)...: deployed at 0x5FbDB2315678afecb367f032d93F642f64180aa3 with 2526713 gas Mocks Deployed
An unexpected error occurred:
Error: ERROR processing /home/username/Desktop/hardhat-smartcontract-lottery-fcc/deploy/01-deploy-raffle.js: TypeError: ethers.getContract is not a function at Object.module.exports [as func] (/home/username/Desktop/hardhat-smartcontract-lottery-fcc/deploy/01-deploy-raffle.js:69:41)