iotex-hermes

command module
v0.0.0-...-188077f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

README

iotex-hermes

The automatic reward distribution service for IoTeX delegates

Get started

Minimum requirements
Components Version Description
Golang ≥ 1.11.5 Go programming language

Run as a service

  1. If you put the project code under your $GOPATH/src, you will need to set up an environment variable:
export GO111MODULE=on
set GO111MODULE=on (for windows)
  1. Specify distributor's account information by setting up the password for the keystore file and the IoTeX address for keystore verification:
export VAULT_PASSWORD=password_for_distributor's_keystore_file
export VAULT_ADDRESS=distributor's_IoTeX_address

Note that you need to set up a distributor account and generate the corresponding keystore file beforehand.

  1. Specify IoTeX Public API address:
export IO_ENDPOINT=Full_Node_IP:API_Port

If the distrbution happens on IoTeX mainnet, you can use the MainNet secure endpoint:

api.iotex.one:443

If the distribution happens on IoTeX testnet, you can use the TestNet secure endpoint:

api.testnet.iotex.one:443
  1. Specify smart contract addresses:
export MULTISEND_CONTRACT_ADDRESS=multisend_contract_address
export HERMES_CONTRACT_ADDRESS=hermes_contract_address

Note that it is required that you have deployed both contracts before starting the distribution service. Please refer to the instruction if you want to know how to deploy a smart contract with ioctl command line tool.

  1. You may need to distribute rewards in batches due to the gas limit constraint. To set how many distributions in a batch:
export CHUNK_SIZE=distribution_batch_size
  1. Build service:
make build
  1. Before distributing rewards, you may need to claim rewards first by executing the following command:
./bin/hermes claim DELEGATE
  1. Distribute rewards to voters by executing the following command:
./bin/hermes distribute DELEGATE

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
dao
key

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL