Skip to content

Instantly share code, notes, and snippets.

@Daniel-VDM
Last active August 15, 2020 03:52
Show Gist options
  • Select an option

  • Save Daniel-VDM/bc940f1fe3ce5474b7b97039a8ebde2b to your computer and use it in GitHub Desktop.

Select an option

Save Daniel-VDM/bc940f1fe3ce5474b7b97039a8ebde2b to your computer and use it in GitHub Desktop.
HRC20_fund.md

Funding from a CSV file for HRC20 tokens.

Install

  1. Make sure you have docker installed.
  2. Go to a directory you are comfortable with. For example cd ~/Desktop.
  3. Download the funding script with the following comand:
curl -O https://raw.githubusercontent.com/harmony-one/dapp-curve-contracts/master/scripts/fund.sh && chmod +x fund.sh

Using the script

  1. Create a CSV file of all the accounts you would like to fund. Here is the template.
  2. Download / save the CSV file to somewhere on your machine and note the path/location. For example ~/Downloads/fund.csv.
  3. Go into the directory where you installed the script and run it:
cd ~/Desktop
./fund.sh -t 0x7093acfea31381780cc7038fa8cae477e9b69771 -f ~/Downloads/fund.csv
# Follow the instructions

Note that 0x7093acfea31381780cc7038fa8cae477e9b69771 is the HRC20 token address

If you wish to mint tokens for the given accounts instead of transferring, you can do:

./fund.sh -t 0x7093acfea31381780cc7038fa8cae477e9b69771 -f ~/Downloads/fund.csv -m
@Daniel-VDM
Copy link
Author

Note that there is an assumption that the HRC20 token has 18 decimals of precision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment