Created
November 30, 2021 01:31
-
-
Save Olanetsoft/5c9d3e8275fcde262dfe17a0508858ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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