Useful CLI Commands
Get standard debug info from the juno daemon:
1
junod status
Copied!
Check if your node is catching up:
1
# Query via the RPC (default port: 26657)
2
curl http://localhost:26657/status | jq .result.sync_info.catching_up
Copied!
Get your node ID:
1
junod tendermint show-node-id
Copied!
Your peer address will be the result of this plus host and port, i.e. <id>@<host>:26656 if you are using the default port.
Check if you are jailed or tombstoned:
1
junod query slashing signing-info $(junod tendermint show-validator)
Copied!
Set the default chain for commands to use:
1
junod config chain-id juno-1
Copied!
Get your valoper address:
1
junod keys show <your-key-name> -a --bech val
Copied!
See keys on the current box:
1
junod keys list
Copied!
Import a key from a mnemonic:
1
junod keys add <new-key-name> --recover
Copied!
Export a private key (warning: don't do this unless you know what you're doing!)
1
junod keys export <your-key-name> --unsafe --unarmored-hex
Copied!
Withdraw rewards (including validator commission), where junovaloper1... is the validator address:
1
junod tx distribution withdraw-rewards <junovaloper1...> --from <your-key> --commission
Copied!
Stake:
1
junod tx staking delegate <junovaloper1...> <AMOUNT>ujuno --from <your-key>
Copied!
Find out what the JSON for a command would be using --generate-only:
1
junod tx bank send $(junod keys show <your-key-name> -a) <recipient addr> <AMOUNT>ujuno --generate-only
Copied!
Query the results of a gov vote that has ended, from a remote RPC (NB - you have to specify a height before the vote ended):
1
junod q gov votes 1 --height <height-before-vote-ended> --node https://rpc-archive.junonetwork.io:443
Copied!
Query the validator set (and jailed status) via CLI:
1
junod 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 | nl
Copied!
Get contract state:
1
junod q wasm contract-state all <contract-address>
Copied!
Copy link