diff --git a/scripts/deploy_erc20.ts b/scripts/deploy_erc20.ts new file mode 100644 index 0000000..d5d12a6 --- /dev/null +++ b/scripts/deploy_erc20.ts @@ -0,0 +1,18 @@ +import { ethers } from "hardhat"; +import { pn } from "./utils"; + +async function main() { + const CommunityERC20 = await ethers.getContractFactory("CommunityERC20"); + const contract = await CommunityERC20.deploy("Test", "TEST", 100); + + const instance = await contract.deployed(); + const tx = instance.deployTransaction; + const rec = await tx.wait(); + console.log("CommunityERC20 deployed. Gas used:", pn(rec.gasUsed)); +} +// 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; +}); diff --git a/scripts/deploy.ts b/scripts/deploy_erc721.ts similarity index 100% rename from scripts/deploy.ts rename to scripts/deploy_erc721.ts