Skip to content

Instantly share code, notes, and snippets.

@kevinjanada
Created July 22, 2022 04:49
Show Gist options
  • Save kevinjanada/e1392f4a1fc7d036df78d288d230892b to your computer and use it in GitHub Desktop.
Save kevinjanada/e1392f4a1fc7d036df78d288d230892b to your computer and use it in GitHub Desktop.
hardhat-tasks-tutorial
// tasks/deploy-verify-airdrop.ts
import { task } from "hardhat/config";
task("deploy-verify-airdrop", "Deploys NFT, Verify on etherscan, and send airdrop")
.addParam("airdropAddress", "The address that the airdrop will be transferred to")
.setAction(async ({ airdropAddress}: { airdropAddress: string }, { run }) => {
const contractAddress = await run("deploy")
await run("verify-etherscan", { contractAddress })
await run("airdrop", {contractAddress, airdropAddress })
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment