Cheat Sheet
Wallet
Add New Wallet Key
safrochaind keys add wallet
Recover existing key
safrochaind keys add wallet --recover
List All Keys
safrochaind keys list
Query Wallet Balance
safrochaind q bank balances $(safrochaind keys show wallet -a)
Check sync status
safrochaind status 2>&1 | jq .sync_info.catching_up
Create Validator
Change your info "your_info"
safrochaind tx staking create-validator <(cat <<EOF
{
"pubkey": $(safrochaind tendermint show-validator),
"amount": "1000000usaf",
"moniker": "Your_moniker",
"identity": "YOUR_KEYBASE_ID",
"website": "YOUR_WEBSITE_URL",
"security-contact": "YOUR_SECURITY_EMAIL",
"details": "YOUR_DETAILS",
"commission-rate": "0.05",
"commission-max-rate": "0.20",
"commission-max-change-rate": "0.05",
"min-self-delegation": "1"
}
EOF
) \
--from wallet \
--chain-id safro-testnet-1 \
--fees 5000usaf \
--gas auto \
--gas-adjustment 1.5 \
-y
Edit Existing Validator
safrochaind tx staking edit-validator \
--new-moniker="" \
--identity="" \
--website="" \
--details="" \
--from wallet \
--chain-id safro-testnet-1 \
--fees 5000usaf \
--gas auto \
--gas-adjustment 1.5 \
-y
Delegate Token to your own validator
safrochaind tx staking delegate $(safrochaind keys show wallet --bech val -a) 1000000usaf \
--from wallet \
--chain-id safro-testnet-1 \
--fees 5000usaf \
--gas auto \
--gas-adjustment 1.5 \
-y
Withdraw All
safrochaind tx distribution withdraw-all-rewards --from wallet \
--from wallet \
--chain-id safro-testnet-1 \
--fees 5000usaf \
--gas auto \
--gas-adjustment 1.5 \
-y
Withdraw Rewards with Comission
safrochaind tx distribution withdraw-rewards $(safrochaind keys show wallet --bech val -a) \
--commission \
--from wallet \
--chain-id safro-testnet-1 \
--fees 5000usaf \
--gas auto \
--gas-adjustment 1.5 \
-y
Unjail validator
safrochaind tx slashing unjail \
--from wallet \
--chain-id safro-testnet-1 \
--fees 5000usaf \
--gas auto \
--gas-adjustment 1.5 \
-y
Vote
safrochaind tx gov vote 18 yes \
--from wallet \
--chain-id safro-testnet-1 \
--fees 5000usaf \
--gas auto \
--gas-adjustment 1.5 \
-y
Services Management
# Reload Service
sudo systemctl daemon-reload
# Enable Service
sudo systemctl enable safrochaind
# Disable Service
sudo systemctl disable safrochaind
# Start Service
sudo systemctl start safrochaind
# Stop Service
sudo systemctl stop safrochaind
# Restart Service
sudo systemctl restart safrochaind
# Check Service Status
sudo systemctl status safrochaind
# Check Service Logs
sudo journalctl -u safrochaind -f --no-hostname -o cat
Backup Validator
cat $HOME/.safrochain/config/priv_validator_key.json
Remove node
cd $HOME && sudo systemctl stop safrochaind
sudo systemctl disable safrochaind
sudo rm /etc/systemd/system/safrochaind.service
sudo systemctl daemon-reload
rm -f $(which safrochaind)
rm -rf .safrochain
rm -rf safrochain-node