epicNFT/scripts/run.js
2022-04-07 08:01:01 -04:00

25 lines
534 B
JavaScript

const { ethers } = require("hardhat"); // this import is optional
async function main() {
const EpicNFT = await ethers.getContractFactory("EpicNFT");
const contract = await EpicNFT.deploy();
await contract.deployed();
console.log("EpicNFT deployed to:", contract.address);
let txn = await contract.mint();
txn.wait();
txn = await contract.mint();
txn.wait();
}
// run the script
(async () => {
try {
await main();
process.exit(0);
} catch (err) {
console.error(err);
process.exit(1);
}
})();