Client
CLI
A user can query and interact with the gov module using the CLI.
Query
The query commands allow users to query gov state.
simd query gov --helpdeposit
The deposit command allows users to query a deposit for a given proposal from a given depositor.
simd query gov deposit [proposal-id] [depositer-addr] [flags]Example:
simd query gov deposit 1 cosmos1..Example Output:
amount:
- amount: "100"
denom: stake
depositor: cosmos1..
proposal_id: "1"deposits
The deposits command allows users to query all deposits for a given proposal.
Example:
Example Output:
param
The param command allows users to query a given parameter for the gov module.
Example:
Example Output:
params
The params command allows users to query all parameters for the gov module.
Example:
Example output:
proposal
The proposal command allows users to query a given proposal.
Example:
Example Output:
proposals
The proposals command allows users to query all proposals with optional filters.
Example:
Example Output:
proposer
The proposer command allows users to query the proposer for a given proposal.
Example:
Example Output:
tally
The tally command allows users to query the tally of a given proposal vote.
Example:
Example Output:
vote
The vote command allows users to query a vote for a given proposal.
Example:
Example Output:
votes
The votes command allows users to query all votes for a given proposal.
Example:
Example Output:
Transactions
The tx commands allow users to interact with the gov module.
deposit
The deposit command allows users to deposit tokens for a given proposal.
Example:
submit-proposal
The submit-proposal command allows users to submit a governance proposal along with some messages and metadata. Messages, metadata and deposit are defined in a JSON file.
Example:
where proposal.json contains:
submit-legacy-proposal
The submit-legacy-proposal command allows users to submit a governance legacy proposal along with an initial deposit.
Example:
Example (cancel-software-upgrade
Example (community-pool-spend):
Example (param-change):
Example (software-upgrade):
vote
The vote command allows users to submit a vote for a given governance proposal.
Example:
weighted-vote
The weighted-vote command allows users to submit a weighted vote for a given governance proposal.
Example:
gRPC
A user can query the gov module using gRPC endpoints.
Proposal
The Proposal endpoint allows users to query a given proposal.
Using legacy v1beta1:
Example:
Example Output:
Using v1:
Example:
Example Output:
Proposals
The Proposals endpoint allows users to query all proposals with optional filters.
Using legacy v1beta1:
Example:
Example Output:
Using v1:
Example:
Example Output:
Vote
The Vote endpoint allows users to query a vote for a given proposal.
Using legacy v1beta1:
Example:
Example Output:
Using v1:
Example:
Example Output:
Votes
The Votes endpoint allows users to query all votes for a given proposal.
Using legacy v1beta1:
Example:
Example Output:
Using v1:
Example:
Example Output:
Params
The Params endpoint allows users to query all parameters for the gov module.
Using legacy v1beta1:
Example:
Example Output:
Deposit
The Deposit endpoint allows users to query a deposit for a given proposal from a given depositor.
Using legacy v1beta1:
Example:
Example Output:
Using v1:
Example:
Example Output:
deposits
The Deposits endpoint allows users to query all deposits for a given proposal.
Using legacy v1beta1:
Example:
Example Output:
Using v1:
Example:
Example Output:
TallyResult
The TallyResult endpoint allows users to query the tally of a given proposal.
Using legacy v1beta1:
Example:
Example Output:
Using v1:
Example:
Example Output:
REST
A user can query the gov module using REST endpoints.
proposal
The proposals endpoint allows users to query a given proposal.
Using legacy v1beta1:
Example:
Example Output:
Using v1:
Example:
Example Output:
proposals
The proposals endpoint also allows users to query all proposals with optional filters.
Using legacy v1beta1:
Example:
Example Output:
Using v1:
Example:
Example Output:
voter vote
The votes endpoint allows users to query a vote for a given proposal.
Using legacy v1beta1:
Example:
Example Output:
Using v1:
Example:
Example Output:
votes
The votes endpoint allows users to query all votes for a given proposal.
Using legacy v1beta1:
Example:
Example Output:
Using v1:
Example:
Example Output:
params
The params endpoint allows users to query all parameters for the gov module.
Using legacy v1beta1:
Example:
Example Output:
Using v1:
Example:
Example Output:
deposits
The deposits endpoint allows users to query a deposit for a given proposal from a given depositor.
Using legacy v1beta1:
Example:
Example Output:
Using v1:
Example:
Example Output:
proposal deposits
The deposits endpoint allows users to query all deposits for a given proposal.
Using legacy v1beta1:
Example:
Example Output:
Using v1:
Example:
Example Output:
tally
The tally endpoint allows users to query the tally of a given proposal.
Using legacy v1beta1:
Example:
Example Output:
Using v1:
Example:
Example Output: