Skip to content

Latest commit

 

History

History

generator

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Merkle Airdrop Generator

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.

Setup

  1. Make a copy of the .env.example file and rename it to .env. Update the values accordingly.

    cp .env.example .env
  2. 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.

  3. Install dependencies:

    npm install
  4. Build the project:

    npm run build

Merkle Tree Creation

  1. 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
  2. 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.