Created
April 9, 2022 00:31
-
-
Save KenoLeon/1381836b4ce01f5d6749d74b5bdada1f to your computer and use it in GitHub Desktop.
hardhat dosc async await example
This file contains hidden or 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
| async function main() { | |
| // We get the contract to deploy | |
| const Greeter = await ethers.getContractFactory("Greeter"); | |
| const greeter = await Greeter.deploy("Hello, Hardhat!"); | |
| await greeter.deployed(); | |
| console.log("Greeter deployed to:", greeter.address); | |
| } | |
| main() | |
| .then(() => process.exit(0)) | |
| .catch((error) => { | |
| console.error(error); | |
| process.exit(1); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment