Skip to content

Instantly share code, notes, and snippets.

@Olanetsoft
Created November 30, 2021 01:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Olanetsoft/5c9d3e8275fcde262dfe17a0508858ae to your computer and use it in GitHub Desktop.
Save Olanetsoft/5c9d3e8275fcde262dfe17a0508858ae to your computer and use it in GitHub Desktop.
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