This repository contains scripts to facilitate the Across Protocol airdrop.
Checkout the repository and change directory
git clone https://github.com/across-protocol/merkle-distributor.git && cd merkle-distributor
Install dependencies
yarn install
Run one of the scripts below.
Usage: yarn create-tree [options]
Options:
-i, --input <path> input JSON file location containing a recipients payout
-h, --help display help for command
To publish a tree to IPFS and to the Scraper API, you need to set the respective env vars in an .env
file.
Use the example file as a template by running
cp .env.example .env
and set the respective values. Afterward you can run the script below.
Usage: yarn publish-tree [options]
Options:
-i, --input <path> input JSON file location containing output of 'yarn create-tree'
-ss, --skip-scraper optional flag whether to skip scraper api upload (default: true)
-h, --help display help for command
To publish set a new root and window in the MerkleDistributor
, you need to set the respective env vars in an .env
file.
Use the example file as a template by running
cp .env.example .env
and set the respective values. Afterward you can run the script below.
Usage: yarn set-root [options]
Options:
-i, --input <path> input JSON file location containing output of 'yarn publish-tree'
-a, --address <address> contract address of MerkleDistributor contract
-w, --wait <blocks> number of confirmations to wait (default: "1")
-h, --help display help for command