deployCalc.ts 441 B

123456789101112131415161718
  1. import { ethers } from "hardhat";
  2. async function main() {
  3. const Calc = await ethers.getContractFactory("Calc");
  4. const calc = await Calc.deploy();
  5. console.log('deploying...')
  6. await calc.deployed();
  7. console.log(`Calc deployed to ${calc.address}`);
  8. }
  9. // We recommend this pattern to be able to use async/await everywhere
  10. // and properly handle errors.
  11. main().catch((error) => {
  12. console.error(error);
  13. process.exitCode = 1;
  14. });