added basic deploy script

This commit is contained in:
pradyuman-verma 2022-03-19 13:28:13 +05:30
parent 2563e7a921
commit ea5e1a9106
No known key found for this signature in database
GPG Key ID: E36FD6BC8923221F

View File

@ -0,0 +1,19 @@
import { Contract } from "@ethersproject/contracts";
import { ethers } from "hardhat";
import { Greeter__factory } from "../../typechain";
async function main(): Promise<void> {
const Greeter: Greeter__factory = await ethers.getContractFactory("Greeter");
const greeter: Contract = await Greeter.deploy("Hello, Buidler!");
await greeter.deployed();
console.log("Greeter deployed to: ", greeter.address);
}
main()
.then(() => process.exit(0))
.catch((error: Error) => {
console.error(error);
process.exit(1);
});