deploysentry.js 661 Bytes
Newer Older
Sagar's avatar
Sagar committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
const hre = require("hardhat");
const txargs = { gasLimit: 10000000, gasPrice: 5000000000 }
async function main() {
	const accounts = await hre.ethers.getSigners();
	console.log("use account ", accounts[0].address);

	// We get the contract to deploy
	const Sentry = await hre.ethers.getContractFactory("ConsensusContract");
	const contract = await Sentry.deploy();

	await contract.deployed();

	console.log("sentry deployed to:", contract.address);
}

// We recommend this pattern to be able to use async/await everywhere
// and properly handle errors.
main()
	.then(() => process.exit(0))
	.catch((error) => {
		console.error(error);
		process.exit(1);
	});