deploy.ts 477 B

1234567891011121314151617
  1. import { ethers } from "hardhat";
  2. async function main() {
  3. const [deployer] = await ethers.getSigners();
  4. console.log("Deploying contracts with the account:", deployer.address);
  5. const MyToken = await ethers.getContractFactory("MyRewardToken");
  6. const myToken = await MyToken.deploy();
  7. await myToken.waitForDeployment();
  8. console.log("MyToken deployed to:", await myToken.getAddress());
  9. }
  10. main().catch((error) => {
  11. console.error(error);
  12. process.exitCode = 1;
  13. });