communities-contracts/scripts/deploy_erc721.ts

26 lines
660 B
TypeScript
Raw Normal View History

2023-01-19 11:21:41 +00:00
import { ethers } from "hardhat";
import { pn } from "./utils";
2023-01-19 11:21:41 +00:00
async function main() {
const CollectibleV1 = await ethers.getContractFactory("CollectibleV1");
const contract = await CollectibleV1.deploy(
"Test",
"TEST",
100,
true,
true,
"http://local.dev"
);
2023-01-19 11:21:41 +00:00
const instance = await contract.deployed();
const tx = instance.deployTransaction;
const rec = await tx.wait();
console.log("CollectibleV1 deployed. Gas used:", pn(rec.gasUsed));
2023-01-19 11:21:41 +00:00
}
// 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;
});