The following assumes the use of node@>=10
.
yarn
yarn compile
yarn test
npx ts-node scripts/generate-merkle-root.ts -i "input-json-file"
First, set-up the configuration variables using Hardhat:
npx hardhat vars set XXX_PRIVATE_KEY
npx hardhat vars set XXX_RPC_URL
Note: Replace XXX
above with either TENDERLY
or ETH
depending on where you want to deploy. This is done in order to be explicit and to avoid mixing keys.
If using Tenderly Virtual Testnets, provide the corresponding chain-id:
npx hardhat vars set TENDERLY_CHAIN_ID
Deploy the MerkleDistributor
contract:
- 1st param: the address of the token to be airdropped
- 2nd param: the merkleRoot hash
- --network param: can be either
tenderly
ormainnet
npx hardhat deployMerkleDistributor 'tokenAddress' 'merkleRoot' --network 'targetNetwork'