Useful CLI commands

General

Set the default chain for migalood to use:

migalood config chain-id <chain-id>
circle-info

Mainnet chain ID: migaloo-1 Testnet chain ID: narwhal-1

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
circle-info

The query needs to be a JSON object, e.g. {"balance": {"address": "migalood1..."}}

Get contract state:

migalood q wasm contract-state all <contract-address> --output json

Get contract metadata:

Transactions

Upload a wasm binary on chain:

circle-info

Uploading a wasm binary will return a code_id, which you can use to instantiate the contract in a subsequent step.

Instantiate a contract:

circle-info

The instantiate_msg needs to be a JSON object, e.g. {"owner": "migalood1..."}

Execute a command on a wasm contract:

Send native/IBC tokens:

Keys

See keys on the current box:

Add a key:

circle-info

The mnemonic of your key will be displayed on screen only once. Write it down and keep it safe.

Import a key from a mnemonic:

Delete a key:

Staking

Create validator:

Delegate tokens:

Governance

Query gov proposal:

Vote on gov proposal:

circle-info

Vote options are: yes, abstain, no, no_with_veto

Validators and Nodes

Check the status of your node:

Get your node ID:

Check if your node is catching up:

circle-info

Your peer address will be the result of this plus host and port, i.e. @:26656 if you are using the default port.

Get your valoper address:

Last updated