Skip to content

Instantly share code, notes, and snippets.

@KenoLeon
Created April 9, 2022 00:31
Show Gist options
  • Select an option

  • Save KenoLeon/1381836b4ce01f5d6749d74b5bdada1f to your computer and use it in GitHub Desktop.

Select an option

Save KenoLeon/1381836b4ce01f5d6749d74b5bdada1f to your computer and use it in GitHub Desktop.
hardhat dosc async await example
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