deployCalc.ts 411 B

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