Skip to content

Instantly share code, notes, and snippets.

@Olanetsoft
Created Nov 30, 2021
Embed
What would you like to do?
const main = async () => {
const [deployer] = await hre.ethers.getSigners();
const accountBalance = await deployer.getBalance();
console.log("Deploying contracts with account: ", deployer.address);
console.log("Account balance: ", accountBalance.toString());
const Token = await hre.ethers.getContractFactory("CoffeePortal");
const portal = await Token.deploy({
value: hre.ethers.utils.parseEther("0.1"),
});
await portal.deployed();
console.log("CoffeePortal address: ", portal.address);
};
const runMain = async () => {
try {
await main();
process.exit(0);
} catch (error) {
console.error(error);
process.exit(1);
}
};
runMain();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment