Before to run set infura mainnet (goerli in case of dev and stage) RPC address:
export ETH_RPC_URL=https://mainnet.infura.io/v3/xxxyyy
staker --help
Usage:
[command]
Available Commands:
delegate delegate operations
fund fund native account with specified erc-20 videocoin tokens amount
help Help about any command
stake stake operations
Flags:
-h, --help help for this command
-k, --key string utc key file json content
-l, --loglevel string (default "INFO")
-s, --secret string password to decrypt key file
Use " [command] --help" for more information about a command.
Print stake amount:
staker stake --help
stake operations
Usage:
stake [flags]
stake [command]
Available Commands:
add add stake of specified erc-20 videocoin tokens amount
withdraw withdraw stake of specified erc-20 videocoin tokens amount
Flags:
-h, --help help for stake
Global Flags:
-k, --key string utc key file json content
-l, --loglevel string (default "INFO")
-s, --secret string password to decrypt key file
Use " stake [command] --help" for more information about a command.
staker -k key.json -s secret
{"level":"info","msg":"worker is staking 40 tokens and state is StateBonded","time":"2020-05-20T14:04:34.534947-07:00"}
Add stake:
staker stake add --help
add stake of specified erc-20 videocoin tokens amount
Usage:
stake add <amount> [flags]
Flags:
-h, --help help for add
Global Flags:
-k, --key string utc key file json content
-l, --loglevel string (default "INFO")
-s, --secret string password to decrypt key file
staker stake add 300000 -k key.json -s secret
{"level":"info","msg":"stake of amount 300000 tokens has been successfully added","time":"2020-05-20T13:39:35.867012-07:00"}
Withdraw stake:
staker stake withdraw --help
withdraw stake of specified erc-20 videocoin tokens amount
Usage:
stake withdraw <amount> [flags]
stake withdraw [command]
Available Commands:
complete complete pending withdraw after bonding period finish
Flags:
-h, --help help for withdraw
Global Flags:
-k, --key string utc key file json content
-l, --loglevel string (default "INFO")
-s, --secret string password to decrypt key file
staker stake withdraw 100000 -k key.json -s secret
{"level":"info","msg":"stake withdraw of amount 100000 tokens has been successfully submitted and be available to complete after 10 periods","time":"2020-05-20T13:40:08.195746-07:00"}
{"level":"info","msg":"finish withdraw with `stake withdraw complete` command","time":"2020-05-20T13:40:08.195814-07:00"}
Complete withdraw after waiting for specified periods:
staker stake withdraw complete -k key.json -s secret
{"level":"info","msg":"stake withdraw of amount 100000 tokens have been successfully completed","time":"2020-05-20T13:44:38.081402-07:00"}
Print delegate amount to specific address:
staker delegate --help
delegate operations
Usage:
delegate <address> [flags]
delegate [command]
Available Commands:
add delegate stake of specified erc-20 videocoin token amount to worker address
withdraw withdraw delegate stake of specified erc-20 videocoin token amount from worker
Flags:
-h, --help help for delegate
Global Flags:
-k, --key string utc key file json content
-l, --loglevel string (default "INFO")
-s, --secret string password to decrypt key file
Use " delegate [command] --help" for more information about a command.
staker delegate 7bd5ee00a271dbd99f1897768e02e04110a111d6 -k key.json -s secret
{"level":"info","msg":"delegator is staking 40 tokens","time":"2020-05-20T14:09:14.795341-07:00"}
Delegate stake to worker:
staker delegate add --help
delegate stake of specified erc-20 videocoin token amount to worker address
Usage:
delegate add <address> <amount> [flags]
Flags:
-h, --help help for add
Global Flags:
-k, --key string utc key file json content
-l, --loglevel string (default "INFO")
-s, --secret string password to decrypt key file
staker delegate add 7bd5ee00a271dbd99f1897768e02e04110a111d6 80 -k key.json -s secret
{"level":"info","msg":"stake of amount 80 tokens has been successfully delegated","time":"2020-05-20T14:10:47.8167-07:00"}
Withdraw stake:
staker delegate withdraw --help
withdraw delegate stake of specified erc-20 videocoin token amount from worker
Usage:
delegate withdraw <address> <amount> [flags]
delegate withdraw [command]
Available Commands:
complete complete pending withdraw after bonding period finish
Flags:
-h, --help help for withdraw
Global Flags:
-k, --key string utc key file json content
-l, --loglevel string (default "INFO")
-s, --secret string password to decrypt key file
staker delegate withdraw 7bd5ee00a271dbd99f1897768e02e04110a111d6 50 -k key.json -s secret
{"level":"info","msg":"stake withdraw of amount 50 tokens has been successfully submitted and be available to complete after 10 unbonding periods","time":"2020-05-20T14:12:59.656852-07:00"}
{"level":"info","msg":"finish withdraw with `stake withdraw complete` command","time":"2020-05-20T13:40:08.195814-07:00"}
Complete withdraw after waiting for specified periods:
staker delegate withdraw complete -k key.json -s secret
{"level":"info","msg":"stake withdraw of amount 50 tokens have been successfully completed","time":"2020-05-20T13:44:38.081402-07:00"}
docker pull videocoinnetwork/staker:latest