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