Goal:
- Learners should understand how to create and query balances
- Learners should know how to query in general
Query helps you to query information on chain or for debugging
Use "babyd q bank balances --help" to learn more
Useful flags
- --output (-o): Output format (text|json) (default "text")
- --node: : to Tendermint RPC interface for this chain (default "tcp://localhost:26657")
- bank
- babyd q bank balances {} --node tcp://0.0.0.0:2281
- babyd q bank balances {} --node tcp://0.0.0.0:2281 -o json
- tx
- babyd q tx {} --node tcp://0.0.0.0:2281
- babyd q bank balances {} --node tcp://0.0.0.0:2281 -o json | jq ".balances[0]"
- jq is a favourite tool for handling json
- create a new key "test1"
- make a bank send transaction from key "test" to "test1"
- query tx of that bank transaction and get raw_log
- query balances of "test1" to make sure that it has received funds
- query all validators
babyd q staking validators --node tcp://localhost:2281