Tool for distribution of rNat rewards.
Create an environment file (.env
) with the following content (see template):
- PROJECT_ID - ID of the project
- PRIVATE_KEY - Private key of the project's distributor
- NETWORK - Network on which to distribute rewards (flare/songbird/coston/coston2)
- Optionally one can set custom RPC endpoints for each network that will override the public ones (e.g. for Flare network one should set
FLARE_RPC=<private_rpc>
, for others useSONGBIRD_RPC
,COSTON_RPC
,COSTON2_RPC
).
- Clone the repo.
- Install dependencies:
yarn
Create a CSV file named rewards-data.csv
(see example) with the following columns
recipient address
- address of the recipientamount wei
- amount (in wei) of rNat to distribute to the recipient
and put it to the root of the project.
To distribute rewards run the following command:
yarn distribute-rewards --month <month>
where <month>
is the month for which the rewards should be distributed
(e.g. yarn distribute-rewards --month 2
).
One can also set custom path to the CSV file which will override the default one (rewards-data.csv
):
yarn distribute-rewards --month <month> --csvPath <path-to-csv-file>