import { ethers } from "hardhat"; async function main() { const Calc = await ethers.getContractFactory("Calc"); const calc = await Calc.deploy(); console.log('deploying...') await calc.deployed(); console.log(`Calc deployed to ${calc.address}`); } // We recommend this pattern to be able to use async/await everywhere // and properly handle errors. main().catch((error) => { console.error(error); process.exitCode = 1; });