Check Docker Image, NPM Package
Docker Image:
Github Repo of ewf-validator-tool
NPM Package ewf-validator-tool
In the Validator Node - get the path of the following two files -
keyfile - UTC--*
In Parity/OpenEthereum Validator Node, the path of keyfile is -
$HOME/docker-stack/chain-data/keys/$CHAINNAME/UTC--*
[CHAINNAME can be Volta
or EnergyWeb
]
secret file - .secret
In Parity/OpenEthereum Validator Node, the path of secret file is -
$HOME/docker-stack/.secret
ewf-validator-tool
Using DockerPut the the value before execution:
KEYFILE_PATH : path of keyfile in old validator node
SECRETFILE_PATH : path of secret file in old validator node
NEW_ADDRESS : Address of wallet or new node address
TOKEN_AMOUNT: Amount of token to be taken out
HTTPS_RPC_URL :
Volta HTTPS_RPC_URL: https://volta-rpc.energyweb.org
EnergyWeb HTTPS_RPC_URL: https://rpc.energyweb.org
Command to transfer token
Before execute take superuser
privilege - sudo -s
or run docker with sudo
docker run -it -v "$KEYFILE_PATH":/keyfile -v $SECRETFILE_PATH:/keypass aznagy/ewf-validator-tool:latest transferto $NEW_ADDRESS $TOKEN_AMOUNT -r $HTTPS_RPC_URL
Example:
Here is an example
(It is Nethermind validator node, that’s why the path of keyfile and secret file are different than Parity validator node)
Transfer token from Volta Validator Node to Hardware Wallet -
KEYFILE_PATH : keyfile path of my Validator Node
/home/ubuntu/docker-stack/keystore/UTC--2020-12-21T16-47-06.412446000Z--5125254ec2e024d8226cf4c389512c43802a76a1
SECRETFILE_PATH : secret file path of my Validator Node
/home/ubuntu/docker-stack/keystore/.secret
NEW_ADDRESS : Address of my wallet 0x4933915c40477Db3a9AccA3Fa12DaA8ba5D4fD35
TOKEN_AMOUNT: 0.01
HTTPS_RPC_URL : Volta HTTPS_RPC_URL: https://volta-rpc.energyweb.org
Command
Transfer Token
Output
URL_Token_out => [Address of Old Validator Node] 0x5125254Ec2E024D8226cf4c389512c43802a76A1
URL Token_In => [Address of wallet] 0x4933915c40477Db3a9AccA3Fa12DaA8ba5D4fD35
payout check
and payout changeto
payout check
command
Example:
Output:
2. payout changeto
command
Example:
Output:
If you want to execute validator tool on host machine or local machine without using docker, follow the following process.
Install node and npm
nodejs v8 or higher and LTS (recommended)
npm comes with nodejs installation.
check nodejs and npm version
node -v
npm -v
Install ewf-validator-tool NPM Package on machine
npm install -g ewf-validator-tool
Check validator-tool is installed
validatortool --version 21.0.3
ewf-validator-tool
From the old (original) Validator Node - get the path or grab the value of the following two files - [If you want to run it on your local machine, just to collect the value of keyfile
and .secret
file.]
keyfile - UTC--*
In Parity/OpenEthereum Validator Node, the path of keyfile is -
$HOME/docker-stack/chain-data/keys/$CHAINNAME/UTC--*
[CHAINNAME can be Volta
or EnergyWeb
]
secret file - .secret
In Parity/OpenEthereum Validator Node, the path of secret file is -
$HOME/docker-stack/.secret
HTTPS_RPC_URL : Volta HTTPS_RPC_URL: https://volta-rpc.energyweb.org
Command
Transfer Token
You can directly give the path of the keyfile
and .secret
file Or
the keyfile value is stored in UTC-keyfile
and value of .secret
is stored in Secretfile
validatortool transferto $NEW_ADDRESS -k "$PATH_OF_KEY_FILE" 0.05 -s $PATH_OF_SECRETFILE -r $HTTPS_RPC_URL
Example
validatortool transferto 0x4933915c40477Db3a9AccA3Fa12DaA8ba5D4fD35 -k "$HOME/docker-stack/chain-data/keys/$CHAINNAME/UTC--*" 0.05 -s $HOME/docker-stack/.secret -r https://volta-rpc.energyweb.org
or
validatortool transferto 0x4933915c40477Db3a9AccA3Fa12DaA8ba5D4fD35 -k "UTC-keyfile" 0.05 -s Secretfile -r https://volta-rpc.energyweb.org
b. payout check
command
validatortool payout check $OLD_VALIDATOR_NODE -r $HTTPS_RPC_URL
Example
validatortool payout check 0x5125254Ec2E024D8226cf4c389512c43802a76A1 -r https://volta-rpc.energyweb.org
c. payout changeto
command
validatortool payout changeto $NEW_ADDRESS -r $HTTPS_RPC_URL
Example
validatortool payout changeto $0x4933915c40477Db3a9AccA3Fa12DaA8ba5D4fD35 -r https://volta-rpc.energyweb.org
You should get similar output if you run the validator-tool using docker. To get a glimpse of output, please check the above section.