This project is a Merkle Airdrop generator for the referral program of the Overlay Protocol. It's based on our fork of this other repository. Check the original repository for more information and context.
-
Make a copy of the
.env.example
file and rename it to.env
. Update the values accordingly.cp .env.example .env
-
Make sure the Airdropper account set in the
.env
already gave a token approval to the referrals contract beforehand. In the future, this could be added to these scripts so it's done automatically. -
Install dependencies:
npm install
-
Build the project:
npm run build
-
Create a
config.json
file with all the wallets and rewards for the current epoch. These rewards will also be pushed to our database through the Rewards API.npm run generate:config
-
Create the merkle tree and push the root to the referrals contract.
npm run generate:merkle
This will also save the merkle tree to a file in the
./trees
directory.