Useful CLI Commands
Get standard debug info from the source daemon:
sourced statusCheck if your node is catching up:
# Query via the RPC (default port: 26657)
curl http://localhost:26657/status | jq .result.sync_info.catching_upGet your node ID:
sourced tendermint show-node-idCheck if you are jailed or tombstoned:
sourced query slashing signing-info $(sourced tendermint show-validator)Set the default chain for commands to use:
sourced config chain-id source-1Get your valoper address:
sourced keys show <your-key-name> -a --bech valSee keys on the current box:
sourced keys listImport a key from a mnemonic:
sourced keys add <new-key-name> --recoverExport a private key (warning: don't do this unless you know what you're doing!)
sourced keys export <your-key-name> --unsafe --unarmored-hexWithdraw rewards (including validator commission), where sourcevaloper1... is the validator address:
sourced tx distribution withdraw-rewards <sourcevaloper1...> --from <your-key> --commissionStake:
sourced tx staking delegate <sourcevaloper1...> <AMOUNT>usource --from <your-key>Find out what the JSON for a command would be using --generate-only:
sourced tx bank send $(sourced keys show <your-key-name> -a) <recipient addr> <AMOUNT>usource --generate-onlyAdd Funds to Community Pool
sourced tx distribution fund-community-pool <AMOUNT>usource --from $(sourced keys show <your-key-name> -a) --chain-id source-1Delegate to Gov proposal
sourced query gov deposit <proposal-id> <AMOUNT>usource --from <your-key> --chain-id source-1Vote on Proposal
sourced tx gov vote <proposal-id> <Option,yes/no/etc> --from <your-key> --chain-id source-1Query the results of a gov vote that has ended, from a remote RPC (NB - you have to specify a height before the vote ended):
sourced q gov votes 1 --height <height-before-vote-ended> --node https://testnet.sourceprotocol.io:26657/Query the validator set (and jailed status) via CLI:
sourced query staking validators --limit 1000 -o json | jq -r '.validators[] | [.operator_address, (.tokens|tonumber / pow(10; 6)), .description.moniker, .jail, .status] | @csv' | column -t -s"," | sort -k2 -n -r | nlQuery Staking Delegations
sourced query staking delegations-to <sourcevaloper1...> --chain-id source-1Unjail Validator
sourced tx slashing unjail --from=source-user --chain-id=source-1Get contract state:
sourced q wasm contract-state all <contract-address>Last updated
