Useful CLI commands
General
Set the default chain for migalood to use:
migalood config chain-id <chain-id>
Set the default RPC for migalood to use:
migalood config node <rpc-endpoint>
Queries
Get native/IBC token balances:
migalood q bank balances <wallet/contract-address> --output json
Query contract:
migalood q wasm contract-state smart <contract-address> <query> --output json
Get contract state:
migalood q wasm contract-state all <contract-address> --output json
Get contract metadata:
migalood q wasm contract <contract-address> --output json
Transactions
Upload a wasm binary on chain:
migalood tx wasm store <wasm_file> --from <from> --chain-id $CHAIN_ID --node $RPC
Instantiate a contract:
migalood tx wasm instantiate <code-id> <instantiate_msg> --label "Contract label" --from <from> --chain-id $CHAIN_ID --node $RPC
Execute a command on a wasm contract:
migalood tx wasm execute <contract_addr> <message> --from <from> --amount <coins,optional> --chain-id $CHAIN_ID --node $RPC
Send native/IBC tokens:
migalood tx bank send <from> <to> <amount> --chain-id $CHAIN_ID --node $RPC --from <from>
Keys
See keys on the current box:
migalood keys list
Add a key:
migalood keys add <name>
Import a key from a mnemonic:
migalood keys add <name> --recover
Delete a key:
migalood keys delete <name>
Staking
Create validator:
migalood tx staking create-validator \
--amount 1000000uwhale \
--commission-max-change-rate "0.05" \
--commission-max-rate "0.10" \
--commission-rate "0.05" \
--min-self-delegation "1" \
--pubkey=$(migalood tendermint show-validator) \
--moniker 'Moby Dick' \
--website "https://migaloo.zone" \
--identity "496BD02G58A7E1O9" \
--details "Validator description." \
--security-contact="[email protected]" \
--chain-id $CHAIN_ID \
--node $RPC \
--from KEY
Delegate tokens:
migalood tx staking delegate <validator> <amount> --from <from> --chain-id $CHAIN_ID --node $RPC
Governance
Query gov proposal:
migalood q gov proposal <proposal-id> --chain-id $CHAIN_ID --node $RPC --output json | jq
Vote on gov proposal:
migalood tx gov vote <proposal-id> <vote_option> --from <from> --chain-id $CHAIN_ID --node $RPC
Validators and Nodes
Check the status of your node:
migalood status
Get your node ID:
migalood tendermint show-node-id
Check if your node is catching up:
# Query via the RPC (default port: 26657)
curl http://localhost:26657/status | jq .result.sync_info.catching_up
Get your valoper address:
migalood keys show <your-key-name> -a --bech val
Last updated