21 lines
537 B
JavaScript
21 lines
537 B
JavaScript
// imports
|
|
const { ethers } = require("hardhat");
|
|
|
|
// async main
|
|
async function main() {
|
|
const simpleStorageFactory =
|
|
await ethers.getContractFactory("SimpleStorage");
|
|
console.log("Deploying contract...");
|
|
const simpleStorage = await simpleStorageFactory.deploy();
|
|
await simpleStorage.deployed();
|
|
console.log("Deployed contract to: " + simpleStorage.address);
|
|
}
|
|
|
|
// main
|
|
main()
|
|
.then(() => process.getMaxListeners(0))
|
|
.catch((error) => {
|
|
console.error(error);
|
|
process.exit(1);
|
|
});
|