const {ethers} = require("hardhat")
async function main(){
const SimpleStorageFactory = await ethers.getContractFactory("SimpleStorage")
console.log("Deploying,....")
const simpleStorage= SimpleStorageFactory.deploy()
await (await simpleStorage).deployed()
}
On this function , I am running into an error:
TypeError: Cannot read properties of undefined (reading 'getContractFactory')
Can someone tell me what's going on?