Harmony Guides
How to vote with hmy

Voting from CLI using hmy

hmy Version

Make sure you've installed the most recent hmy file version with the info:

Harmony (C) 2020. hmy, version v1-dbd9901 (runner@harmony.one 2022-08-29T08:51:21+0000)

You can run ./hmy version to see your version, update if you are behind before voting.

Voting String

Here's an example of a string that will work to vote for the HIP-28b (opens in a new tab) string below:

Yes vote:

./hmy governance vote-proposal --proposal 0x5aa26f3aed23ab3ce751cbc885bc8574f4f3e2d65784339401645803d56892b4 --key serviceharmony --choice 1 --passphrase

No vote:

./hmy governance vote-proposal --proposal 0x5aa26f3aed23ab3ce751cbc885bc8574f4f3e2d65784339401645803d56892b4 --key serviceharmony --choice 2 --passphrase

Abstain:

./hmy governance vote-proposal --proposal 0x5aa26f3aed23ab3ce751cbc885bc8574f4f3e2d65784339401645803d56892b4 --key serviceharmony --choice 3 --passphrase

Notes:

  • Update serviceharmony to match your key name when you run ./hmy keys list and enter the password you used to import/create that wallet when prompted.

String Breakdown

  • --proposal The ID at end of the url of the voting page you'd like to vote on.
  • --key This is your wallet name in ./hmy keys list
  • --choice This is your voting choice, current theory is starts at 1 and descends the options. Can send a list if it's a multi option vote.
  • --passphrase Your wallet password you set on your node.

Basic Vote Type

Here's what the choice option translates into so far from our testing:

  • --choice 1 = "Yes"
  • --choice 2 = "No"
  • --choice 3 = "Abstain"