Skip to content

across-protocol/merkle-distributor

Repository files navigation

merkle-distributor

This repository contains scripts to facilitate the Across Protocol airdrop.

Get Started

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.

Scripts

Create Merkle Tree

Usage: yarn create-tree [options]

Options:
  -i, --input <path>  input JSON file location containing a recipients payout
  -h, --help          display help for command

Publish Merkle Tree

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

Set Merkle Root / Window

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published