Note that this will require python 3.6 or newer. You can check this with the following command python3 --version.
3) Create your CSV file (with numbers, excel, sheets, etc..), make sure to follow this template.
Note that the follow column names must exist: from, to, amount, from-shard, to-shard, passphrase-file (optional), passphrase-string (optional), gas-price (optional).
4) Save/download the CSV file to your computer. If you are using MacOs and google sheets, your csv file will probably be in ~/Downloads. Note this for later.
Using the Script
MAKE SURE ALL from KEYS ARE IN THE CLI'S KEYSTORE. IMPORT KEYS FIRST IF NEEDED.
Reference docs here on how to import keystores into the CLI.
Basic (slow but safe)
1) Go do where you installed your CLI. If using my example in the install section, do cd ~/bin.
2) Run the script with the following command (for mainnet):
Substitute ~/Downloads/some-file.csv with the path to your CSV file on your computer.
You can also substitute https://api.s0.t.hmny.io/ for whatever endpoint you want.
3) Respond to the prompts and make sure to check the parsed transactions before sending it!
Fast (does not check if a transaction has confirmed)
1) Go do where you installed your CLI. If using my example in the install section, do cd ~/bin.
2) Run the script with the following command (for mainnet):
Substitute ~/Downloads/some-file.csv with the path to your CSV file on your computer.
You can also substitute https://api.s0.t.hmny.io/ for whatever endpoint you want.
3) Respond to the prompts and make sure to check the parsed transactions before sending it!
Automation (for scripting on testnets)
1) Note where you saved the hmy-csv.py file. For me its:
Send transactions using the Harmony CLI from a CSV file
Install
0) (Optional) Open terminal and
cd
to wherever you want to install your CLI. Personally I like~/bin
.1) Get the latest Harmony CLI version
2) Install the CSV parser script in the same directory
Using the Script
MAKE SURE ALL
from
KEYS ARE IN THE CLI'S KEYSTORE. IMPORT KEYS FIRST IF NEEDED.Reference docs here on how to import keystores into the CLI.
Basic (slow but safe)
1) Go do where you installed your CLI. If using my example in the install section, do
cd ~/bin
. 2) Run the script with the following command (for mainnet):Fast (does not check if a transaction has confirmed)
1) Go do where you installed your CLI. If using my example in the install section, do
cd ~/bin
. 2) Run the script with the following command (for mainnet):Automation (for scripting on testnets)
1) Note where you saved the
hmy-csv.py
file. For me its:2) Run the script with the following command:
Help
You can view all of the possible options and what they do with: