Mainnet
Union
- Chain ID
Run these after the install guide, which sets $WALLET, $MONIKER and the chain variables.
Keys and wallet
Add a new key
uniond keys add $WALLETRecover a key
uniond keys add $WALLET --recoverList keys
uniond keys listWallet balance
uniond q bank balances $(uniond keys show $WALLET -a)
Validator
Create a validator
cat > $HOME/validator.json << EOF { "pubkey": $(uniond comet show-validator), "amount": "1000000000000000000au", "moniker": "$MONIKER", "identity": "", "website": "", "security": "", "details": "", "commission-rate": "0.05", "commission-max-rate": "0.20", "commission-max-change-rate": "0.05", "min-self-delegation": "1" } EOF uniond tx staking create-validator $HOME/validator.json --from $WALLET --chain-id $UNION_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 100000000au -yEdit the validator
uniond tx staking edit-validator --new-moniker "$MONIKER" --identity "" --website "" --details "" --from $WALLET --chain-id $UNION_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 100000000au -yUnjail
uniond tx slashing unjail --from $WALLET --chain-id $UNION_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 100000000au -yValidator details
uniond q staking validator $(uniond keys show $WALLET --bech val -a)
Tokens
Withdraw all rewards
uniond tx distribution withdraw-all-rewards --from $WALLET --chain-id $UNION_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 100000000au -yWithdraw commission and rewards
uniond tx distribution withdraw-rewards $(uniond keys show $WALLET --bech val -a) --commission --from $WALLET --chain-id $UNION_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 100000000au -yDelegate to yourself
uniond tx staking delegate $(uniond keys show $WALLET --bech val -a) 1000000000000000000au --from $WALLET --chain-id $UNION_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 100000000au -yRedelegate
uniond tx staking redelegate $(uniond keys show $WALLET --bech val -a) <TO_VALOPER> 1000000000000000000au --from $WALLET --chain-id $UNION_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 100000000au -yUnbond
uniond tx staking unbond $(uniond keys show $WALLET --bech val -a) 1000000000000000000au --from $WALLET --chain-id $UNION_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 100000000au -ySend tokens
uniond tx bank send $WALLET <TO_ADDRESS> 1000000000000000000au --chain-id $UNION_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 100000000au -y
Governance
List proposals
uniond q gov proposalsView a proposal
uniond q gov proposal <ID>Vote
uniond tx gov vote <ID> yes --from $WALLET --chain-id $UNION_CHAIN_ID --gas auto --gas-adjustment 1.5 --gas-prices 100000000au -y # yes | no | abstain | no_with_veto
Maintenance
Node status
uniond status 2>&1 | jqNode peer address
echo $(uniond comet show-node-id)@$(wget -qO- eth0.me):$UNION_PORT656Live peers
curl -s localhost:$UNION_PORT657/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr | split(":") | last)"' | paste -sd,Check the validator key
[[ $(uniond q staking validator $(uniond keys show $WALLET --bech val -a) -o json | jq -r .validator.consensus_pubkey.value) = $(uniond comet show-validator | jq -r .key) ]] && echo "match" || echo "MISMATCH"Reset chain data
uniond comet unsafe-reset-all --keep-addr-book --home $HOME/.unionRemove the node
sudo systemctl stop uniond sudo systemctl disable uniond sudo rm /etc/systemd/system/uniond.service sudo systemctl daemon-reload rm -rf $HOME/.union $(which uniond)
Service
Service status
sudo systemctl status uniondFollow logs
sudo journalctl -fu uniond -o catRestart
sudo systemctl restart uniondStop
sudo systemctl stop uniond