Command Band This is command about CLI Band Protocol
Key Management
we assume, variable name_your_wallet is name of your own wallet.
Install jq package for management json format
Ubuntu
apt install jq
CentOS
yum install jq
Arch Linux
pacman -S jq
Running in user (Assume) : salinem
We never use this username in our production!
Add New Key
Copy bandd keys add mywallet --home ${HOME} /.band
Recover Key
With Passphrase
Copy bandd keys add mywallet --recover --home ${HOME} /.band
With Keyring
Copy bandd keys add mywallet --recover --keyring-backend os --home ${HOME} /.band
List Key
Copy bandd keys list --home ${HOME} /.band
Delete Key
Copy bandd keys delete mywallet --home ${HOME} /.band
Export Key
Copy bandd keys export mywallet --home ${HOME} /.band
Import Key
Copy bandd keys import mywallet mywallet_file.backup --home ${HOME}/.band
Show All Balances Address
Copy for mywallet in ` bandd keys list --home ${HOME} /.band--output json | jq -r ".[] .address"`
do
CHAIN_ID = "laozi-mainnet"
RPC = "tcp://localhost:16700"
bandd q bank balances ${mywallet} --home ${HOME} /.band --chain-id ${CHAIN_ID} --node ${RPC}
done
Show Balance Address
Copy bandd q bank balances mywallet_public_address --home ${HOME}/.band --chain-id laozi-mainnet --node tcp://localhost:16700
Validator Management
We assume,You have complete identities. Moniker, Website, Security and Details Your Validator
Install jq package for management json format
Ubuntu
apt install jq
CentOS
yum install jq
Arch Linux
pacman -S jq
Create New Validator
Copy MONIKER = "NAME_OF_YOUR_VALIDATOR"
PROFILE = "PGP_KEY_OF_KEYBASE"
DETAILS = "Describes Your Validator"
WEBSITE = "https://yourwebsite.com"
bandd tx staking create-validator \
--amount=1000000uband \
--pubkey=$(bandd tendermint show-validator --home ${HOME} /.band ) \
--moniker = "${MONIKER}" \
--identity= "${PROFILE}" \
--details= "${DETAILS}" \
--website= "${WEBSITE}" \
--chain-id=laozi-mainnet \
--commission-rate=0.05 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1 \
--from=mywallet \
--gas-adjustment=1.4 \
--gas=auto \
--node tcp://localhost:16700 \
--home ${HOME} /.band \
-y
Edit Validator Identities Informations
Copy MONIKER = "NAME_OF_YOUR_VALIDATOR"
PROFILE = "PGP_KEY_OF_KEYBASE"
DETAILS = "Describes Your Validator"
WEBSITE = "https://yourwebsite.com"
bandd tx staking edit-validator \
--moniker= "${MONIKER}" \
--identity= "${PROFILE}" \
--details= "${DETAILS}" \
--website= "${WEBSITE}" \
--chain-id=laozi-mainnet \
--commission-rate=0.05 \
--from=mywallet \
--gas-adjustment=1.4 \
--gas=auto \
--node tcp://localhost:16700 \
--home ${HOME} /.band \
-y
Get Validator Info
Copy bandd status 2>&1 | jq .ValidatorInfo
Get Syncing Block
Copy bandd status 2>&1 | jq .SyncInfo
Get Peer Own Node
Copy echo $(bandd tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.band/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
Get Peer Node
Copy curl -sS http://localhost:16701/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}'
Unjail Validator
Copy bandd tx slashing unjail \
--from mywallet \
--chain-id laozi-mainnet \
--home ${HOME} /.band \
--node tcp://localhost:16700 \
--gas auto \
--gas-adjustment 1.4 \
-y
Jail Reason
Copy bandd query slashing signing-info $( bandd tendermint show-validator ) \
--node tcp://localhost:16700 \
--home ${HOME} /.band
List All Active Validator
Copy bandd q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl
List All Inactive Validator
Copy bandd q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_UNBONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl
Show Validator Details
Copy bandd \
query staking validator \
$(bandd keys show \
$(bandd keys list --home ${HOME}/.band--output json| jq -r ".[] .address" | tail -n1) \
--bech val -a) \
--chain-id laozi-mainnet \
--node tcp://localhost:16700
Token Management
Withdraw All Reward From Validator
Copy bandd tx distribution withdraw-all-rewards \
--from mywallet \
--chain-id laozi-mainnet \
--node tcp://localhost:16700 \
--home ${HOME} /.band \
--gas-adjustment 1.4 \
--gas auto \
-y
Withdraw Commision Reward From Validator
Copy bandd tx distribution withdraw-rewards $( bandd keys show mywallet --bech val -a ) \
--commission \
--from mywallet \
--gas-adjustment 1.4 \
--gas auto \
--chain-id laozi-mainnet \
--node tcp://localhost:16700 \
--home ${HOME} /.band \
-y
Delegate My Token to Own Validator
Copy bandd tx staking delegate $( bandd keys show wallet --bech val -a ) 1000000uband \
--from mywallet \
--gas-adjustment 1.4 \
--home ${HOME} /.band \
--node tcp://localhost:16700 \
--chain-id laozi-mainnet \
--gas auto \
-y
Delegate Your Token To Our Validator
Copy bandd tx staking delegate bandvaloper13tf84rkc9yflru6kty4xj8jtkuzl6fd66f3q3z 1000000uband \
--from mywallet \
--gas-adjustment 1.4 \
--gas auto \
--home ${HOME} /.band \
--node tcp://localhost:16700 \
--chain-id laozi-mainnet \
-y
Redelegate Tokens to Another Validator
Copy bandd tx staking redelegate $( bandd keys show wallet --bech val -a ) < TO_VALOPER_ADDRES S > 1000000uband \
--from mywallet
--gas-adjustment 1.4 \
--gas auto \
--home ${HOME} /.band \
--node tcp://localhost:16700 \
--chain-id laozi-mainnet \
-y
Unbound or Unstake Your Tokens
Copy bandd tx staking unbond $( bandd keys show wallet --bech val -a ) 1000000uband \
--from mywallet \
--gas-adjustment 1.4 \
--gas auto \
--home ${HOME} /.band \
--node tcp://localhost:16700 \
--chain-id laozi-mainnet \
-y
Send tokens to the wallet
Copy bandd tx bank send wallet <TO_WALLET_ADDRESS> 1000000uband \
--from mywallet \
--gas-adjustment 1.4 \
--gas auto \
--home ${HOME}/.band\
--node tcp://localhost:16700 \
--chain-id laozi-mainnet \
-y
Governance
Install jq package for management json format
Ubuntu
apt install jq
CentOS
yum install jq
Arch Linux
pacman -S jq
List All Proposal
Copy bandd query gov proposals
How to Vote
Copy ### vote yes
bandd tx gov vote 1 yes \
--from mywallet \
--gas-adjustment 1.4 \
--gas auto \
--home ${HOME} /.band \
--node tcp://localhost:16700 \
--chain-id laozi-mainnet \
-y
### vote no
bandd tx gov vote 1 no \
--from mywallet \
--gas-adjustment 1.4 \
--gas auto \
--home ${HOME} /.band \
--node tcp://localhost:16700 \
--chain-id laozi-mainnet \
-y
### vote abstain
bandd tx gov vote 1 abstain \
--from mywallet \
--gas-adjustment 1.4 \
--gas auto \
--home ${HOME} /.band \
--node tcp://localhost:16700 \
--chain-id laozi-mainnet \
-y
### vote No With Veto
bandd tx gov vote 1 nowithveto \
--from mywallet \
--gas-adjustment 1.4 \
--gas auto \
--home ${HOME} /.band \
--node tcp://localhost:16700 \
--chain-id laozi-mainnet \
-y
Oracle
Send Band to Report Wallet
Copy bandd tx multi-send 1uband $( yoda keys list -a ) --gas=1000000 --gas-prices=0.0025uband --gas-adjustment=1.15 \
--from mywallet --node http://localhost:16700 \
--chain-id laozi-mainnet
Add Report wallet to oracle
Copy bandcli tx oracle add-reporters $( yoda keys list -a ) --gas=1000000 --gas-prices=0.0025uband --gas-adjustment=1.15 \
--from mywallet \
---chain-id laozi-mainnet
Activing Oracle
Copy bandd tx oracle activate --gas=1000000 --gas-prices=0.0025uband --gas-adjustment=1.15 \
--from mywallet --node http://localhost:16700 \
--chain-id laozi-mainnet
Check Oracle Active
Copy bandd query oracle validator $(bandd keys show -a mywallet --bech val) --chain-id laozi-mainnet --node http://localhost:16700
Last updated 11 months ago