cosmos/gov
Table of Contents
- cosmos/gov/module/v1/module.proto
- cosmos/gov/v1beta1/genesis.proto
- cosmos/gov/v1beta1/gov.proto
-
cosmos/gov/v1beta1/query.proto
- MQueryDepositRequest
- MQueryDepositResponse
- MQueryDepositsRequest
- MQueryDepositsResponse
- MQueryParamsRequest
- MQueryParamsResponse
- MQueryProposalRequest
- MQueryProposalResponse
- MQueryProposalsRequest
- MQueryProposalsResponse
- MQueryTallyResultRequest
- MQueryTallyResultResponse
- MQueryVoteRequest
- MQueryVoteResponse
- MQueryVotesRequest
- MQueryVotesResponse
- SQuery
- cosmos/gov/v1beta1/tx.proto
- cosmos/gov/v1/genesis.proto
- cosmos/gov/v1/gov.proto
-
cosmos/gov/v1/query.proto
- MQueryConstitutionRequest
- MQueryConstitutionResponse
- MQueryDepositRequest
- MQueryDepositResponse
- MQueryDepositsRequest
- MQueryDepositsResponse
- MQueryParamsRequest
- MQueryParamsResponse
- MQueryProposalRequest
- MQueryProposalResponse
- MQueryProposalsRequest
- MQueryProposalsResponse
- MQueryTallyResultRequest
- MQueryTallyResultResponse
- MQueryVoteRequest
- MQueryVoteResponse
- MQueryVotesRequest
- MQueryVotesResponse
- SQuery
- cosmos/gov/v1/tx.proto
- Scalar Value Types
cosmos/gov/module/v1/module.proto
TopModule
Module is the config object of the gov module.
| Field | Type | Label | Description |
| max_metadata_len | uint64 | max_metadata_len defines the maximum proposal metadata length. Defaults to 255 if not explicitly set. |
|
| authority | string | authority defines the custom module authority. If not set, defaults to the governance module. |
cosmos/gov/v1beta1/genesis.proto
TopGenesisState
GenesisState defines the gov module's genesis state.
| Field | Type | Label | Description |
| starting_proposal_id | uint64 | starting_proposal_id is the ID of the starting proposal. |
|
| deposits | Deposit | repeated | deposits defines all the deposits present at genesis. |
| votes | Vote | repeated | votes defines all the votes present at genesis. |
| proposals | Proposal | repeated | proposals defines all the proposals present at genesis. |
| deposit_params | DepositParams | deposit_params defines all the parameters related to deposit. |
|
| voting_params | VotingParams | voting_params defines all the parameters related to voting. |
|
| tally_params | TallyParams | tally_params defines all the parameters related to tally. |
cosmos/gov/v1beta1/gov.proto
TopDeposit
Deposit defines an amount deposited by an account address to an active
proposal.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| depositor | string | depositor defines the deposit addresses from the proposals. |
|
| amount | cosmos.base.v1beta1.Coin | repeated | amount to be deposited by depositor. |
DepositParams
DepositParams defines the params for deposits on governance proposals.
| Field | Type | Label | Description |
| min_deposit | cosmos.base.v1beta1.Coin | repeated | Minimum deposit for a proposal to enter voting period. |
| max_deposit_period | google.protobuf.Duration | Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. |
Proposal
Proposal defines the core field members of a governance proposal.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| content | google.protobuf.Any | content is the proposal's content. |
|
| status | ProposalStatus | status defines the proposal status. |
|
| final_tally_result | TallyResult | final_tally_result is the final tally result of the proposal. When querying a proposal via gRPC, this field is not populated until the proposal's voting period has ended. |
|
| submit_time | google.protobuf.Timestamp | submit_time is the time of proposal submission. |
|
| deposit_end_time | google.protobuf.Timestamp | deposit_end_time is the end time for deposition. |
|
| total_deposit | cosmos.base.v1beta1.Coin | repeated | total_deposit is the total deposit on the proposal. |
| voting_start_time | google.protobuf.Timestamp | voting_start_time is the starting time to vote on a proposal. |
|
| voting_end_time | google.protobuf.Timestamp | voting_end_time is the end time of voting on a proposal. |
TallyParams
TallyParams defines the params for tallying votes on governance proposals.
| Field | Type | Label | Description |
| quorum | bytes | Minimum percentage of total stake needed to vote for a result to be considered valid. |
|
| threshold | bytes | Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. |
|
| veto_threshold | bytes | Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. |
TallyResult
TallyResult defines a standard tally for a governance proposal.
| Field | Type | Label | Description |
| yes | string | yes is the number of yes votes on a proposal. |
|
| abstain | string | abstain is the number of abstain votes on a proposal. |
|
| no | string | no is the number of no votes on a proposal. |
|
| no_with_veto | string | no_with_veto is the number of no with veto votes on a proposal. |
TextProposal
TextProposal defines a standard text proposal whose changes need to be
manually updated in case of approval.
| Field | Type | Label | Description |
| title | string | title of the proposal. |
|
| description | string | description associated with the proposal. |
Vote
Vote defines a vote on a governance proposal.
A Vote consists of a proposal ID, the voter, and the vote option.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| voter | string | voter is the voter address of the proposal. |
|
| option | VoteOption | Deprecated. Deprecated: Prefer to use `options` instead. This field is set in queries if and only if `len(options) == 1` and that option has weight 1. In all other cases, this field will default to VOTE_OPTION_UNSPECIFIED. |
|
| options | WeightedVoteOption | repeated | options is the weighted vote options. Since: cosmos-sdk 0.43 |
Fields with deprecated option
| Name | Option |
| option | true |
VotingParams
VotingParams defines the params for voting on governance proposals.
| Field | Type | Label | Description |
| voting_period | google.protobuf.Duration | Duration of the voting period. |
WeightedVoteOption
WeightedVoteOption defines a unit of vote for vote split.
Since: cosmos-sdk 0.43
| Field | Type | Label | Description |
| option | VoteOption | option defines the valid vote options, it must not contain duplicate vote options. |
|
| weight | string | weight is the vote weight associated with the vote option. |
ProposalStatus
ProposalStatus enumerates the valid statuses of a proposal.
| Name | Number | Description |
| PROPOSAL_STATUS_UNSPECIFIED | 0 | PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. |
| PROPOSAL_STATUS_DEPOSIT_PERIOD | 1 | PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit period. |
| PROPOSAL_STATUS_VOTING_PERIOD | 2 | PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting period. |
| PROPOSAL_STATUS_PASSED | 3 | PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has passed. |
| PROPOSAL_STATUS_REJECTED | 4 | PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has been rejected. |
| PROPOSAL_STATUS_FAILED | 5 | PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. |
VoteOption
VoteOption enumerates the valid vote options for a given governance proposal.
| Name | Number | Description |
| VOTE_OPTION_UNSPECIFIED | 0 | VOTE_OPTION_UNSPECIFIED defines a no-op vote option. |
| VOTE_OPTION_YES | 1 | VOTE_OPTION_YES defines a yes vote option. |
| VOTE_OPTION_ABSTAIN | 2 | VOTE_OPTION_ABSTAIN defines an abstain vote option. |
| VOTE_OPTION_NO | 3 | VOTE_OPTION_NO defines a no vote option. |
| VOTE_OPTION_NO_WITH_VETO | 4 | VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. |
cosmos/gov/v1beta1/query.proto
TopQueryDepositRequest
QueryDepositRequest is the request type for the Query/Deposit RPC method.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| depositor | string | depositor defines the deposit addresses from the proposals. |
QueryDepositResponse
QueryDepositResponse is the response type for the Query/Deposit RPC method.
| Field | Type | Label | Description |
| deposit | Deposit | deposit defines the requested deposit. |
QueryDepositsRequest
QueryDepositsRequest is the request type for the Query/Deposits RPC method.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| pagination | cosmos.base.query.v1beta1.PageRequest | pagination defines an optional pagination for the request. |
QueryDepositsResponse
QueryDepositsResponse is the response type for the Query/Deposits RPC method.
| Field | Type | Label | Description |
| deposits | Deposit | repeated | deposits defines the requested deposits. |
| pagination | cosmos.base.query.v1beta1.PageResponse | pagination defines the pagination in the response. |
QueryParamsRequest
QueryParamsRequest is the request type for the Query/Params RPC method.
| Field | Type | Label | Description |
| params_type | string | params_type defines which parameters to query for, can be one of "voting", "tallying" or "deposit". |
QueryParamsResponse
QueryParamsResponse is the response type for the Query/Params RPC method.
| Field | Type | Label | Description |
| voting_params | VotingParams | voting_params defines the parameters related to voting. |
|
| deposit_params | DepositParams | deposit_params defines the parameters related to deposit. |
|
| tally_params | TallyParams | tally_params defines the parameters related to tally. |
QueryProposalRequest
QueryProposalRequest is the request type for the Query/Proposal RPC method.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
QueryProposalResponse
QueryProposalResponse is the response type for the Query/Proposal RPC method.
| Field | Type | Label | Description |
| proposal | Proposal |
|
QueryProposalsRequest
QueryProposalsRequest is the request type for the Query/Proposals RPC method.
| Field | Type | Label | Description |
| proposal_status | ProposalStatus | proposal_status defines the status of the proposals. |
|
| voter | string | voter defines the voter address for the proposals. |
|
| depositor | string | depositor defines the deposit addresses from the proposals. |
|
| pagination | cosmos.base.query.v1beta1.PageRequest | pagination defines an optional pagination for the request. |
QueryProposalsResponse
QueryProposalsResponse is the response type for the Query/Proposals RPC
method.
| Field | Type | Label | Description |
| proposals | Proposal | repeated | proposals defines all the requested governance proposals. |
| pagination | cosmos.base.query.v1beta1.PageResponse | pagination defines the pagination in the response. |
QueryTallyResultRequest
QueryTallyResultRequest is the request type for the Query/Tally RPC method.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
QueryTallyResultResponse
QueryTallyResultResponse is the response type for the Query/Tally RPC method.
| Field | Type | Label | Description |
| tally | TallyResult | tally defines the requested tally. |
QueryVoteRequest
QueryVoteRequest is the request type for the Query/Vote RPC method.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| voter | string | voter defines the voter address for the proposals. |
QueryVoteResponse
QueryVoteResponse is the response type for the Query/Vote RPC method.
| Field | Type | Label | Description |
| vote | Vote | vote defines the queried vote. |
QueryVotesRequest
QueryVotesRequest is the request type for the Query/Votes RPC method.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| pagination | cosmos.base.query.v1beta1.PageRequest | pagination defines an optional pagination for the request. |
QueryVotesResponse
QueryVotesResponse is the response type for the Query/Votes RPC method.
| Field | Type | Label | Description |
| votes | Vote | repeated | votes defines the queried votes. |
| pagination | cosmos.base.query.v1beta1.PageResponse | pagination defines the pagination in the response. |
Query
Query defines the gRPC querier service for gov module
| Method Name | Request Type | Response Type | Description |
| Proposal | QueryProposalRequest | QueryProposalResponse | Proposal queries proposal details based on ProposalID. |
| Proposals | QueryProposalsRequest | QueryProposalsResponse | Proposals queries all proposals based on given status. |
| Vote | QueryVoteRequest | QueryVoteResponse | Vote queries voted information based on proposalID, voterAddr. |
| Votes | QueryVotesRequest | QueryVotesResponse | Votes queries votes of a given proposal. |
| Params | QueryParamsRequest | QueryParamsResponse | Params queries all parameters of the gov module. |
| Deposit | QueryDepositRequest | QueryDepositResponse | Deposit queries single deposit information based on proposalID, depositor address. |
| Deposits | QueryDepositsRequest | QueryDepositsResponse | Deposits queries all deposits of a single proposal. |
| TallyResult | QueryTallyResultRequest | QueryTallyResultResponse | TallyResult queries the tally of a proposal vote. |
Methods with HTTP bindings
| Method Name | Method | Pattern | Body |
| Proposal | GET | /cosmos/gov/v1beta1/proposals/{proposal_id} | |
| Proposals | GET | /cosmos/gov/v1beta1/proposals | |
| Vote | GET | /cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter} | |
| Votes | GET | /cosmos/gov/v1beta1/proposals/{proposal_id}/votes | |
| Params | GET | /cosmos/gov/v1beta1/params/{params_type} | |
| Deposit | GET | /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor} | |
| Deposits | GET | /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits | |
| TallyResult | GET | /cosmos/gov/v1beta1/proposals/{proposal_id}/tally |
cosmos/gov/v1beta1/tx.proto
TopMsgDeposit
MsgDeposit defines a message to submit a deposit to an existing proposal.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| depositor | string | depositor defines the deposit addresses from the proposals. |
|
| amount | cosmos.base.v1beta1.Coin | repeated | amount to be deposited by depositor. |
MsgDepositResponse
MsgDepositResponse defines the Msg/Deposit response type.
MsgSubmitProposal
MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary
proposal Content.
| Field | Type | Label | Description |
| content | google.protobuf.Any | content is the proposal's content. |
|
| initial_deposit | cosmos.base.v1beta1.Coin | repeated | initial_deposit is the deposit value that must be paid at proposal submission. |
| proposer | string | proposer is the account address of the proposer. |
MsgSubmitProposalResponse
MsgSubmitProposalResponse defines the Msg/SubmitProposal response type.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
MsgVote
MsgVote defines a message to cast a vote.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| voter | string | voter is the voter address for the proposal. |
|
| option | VoteOption | option defines the vote option. |
MsgVoteResponse
MsgVoteResponse defines the Msg/Vote response type.
MsgVoteWeighted
MsgVoteWeighted defines a message to cast a vote.
Since: cosmos-sdk 0.43
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| voter | string | voter is the voter address for the proposal. |
|
| options | WeightedVoteOption | repeated | options defines the weighted vote options. |
MsgVoteWeightedResponse
MsgVoteWeightedResponse defines the Msg/VoteWeighted response type.
Since: cosmos-sdk 0.43
Msg
Msg defines the gov Msg service.
| Method Name | Request Type | Response Type | Description |
| SubmitProposal | MsgSubmitProposal | MsgSubmitProposalResponse | SubmitProposal defines a method to create new proposal given a content. |
| Vote | MsgVote | MsgVoteResponse | Vote defines a method to add a vote on a specific proposal. |
| VoteWeighted | MsgVoteWeighted | MsgVoteWeightedResponse | VoteWeighted defines a method to add a weighted vote on a specific proposal. Since: cosmos-sdk 0.43 |
| Deposit | MsgDeposit | MsgDepositResponse | Deposit defines a method to add deposit on a specific proposal. |
cosmos/gov/v1/genesis.proto
TopSince: cosmos-sdk 0.46
GenesisState
GenesisState defines the gov module's genesis state.
| Field | Type | Label | Description |
| starting_proposal_id | uint64 | starting_proposal_id is the ID of the starting proposal. |
|
| deposits | Deposit | repeated | deposits defines all the deposits present at genesis. |
| votes | Vote | repeated | votes defines all the votes present at genesis. |
| proposals | Proposal | repeated | proposals defines all the proposals present at genesis. |
| deposit_params | DepositParams | Deprecated. Deprecated: Prefer to use `params` instead. deposit_params defines all the paramaters of related to deposit. |
|
| voting_params | VotingParams | Deprecated. Deprecated: Prefer to use `params` instead. voting_params defines all the paramaters of related to voting. |
|
| tally_params | TallyParams | Deprecated. Deprecated: Prefer to use `params` instead. tally_params defines all the paramaters of related to tally. |
|
| params | Params | params defines all the paramaters of x/gov module. Since: cosmos-sdk 0.47 |
|
| constitution | string | The constitution allows builders to lay a foundation and define purpose. This is an immutable string set in genesis. There are no amendments, to go outside of scope, just fork. constitution is an immutable string in genesis for a chain builder to lay out their vision, ideas and ideals. Since: cosmos-sdk 0.50 |
Fields with deprecated option
| Name | Option |
| deposit_params | true |
| voting_params | true |
| tally_params | true |
cosmos/gov/v1/gov.proto
TopSince: cosmos-sdk 0.46
Deposit
Deposit defines an amount deposited by an account address to an active
proposal.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| depositor | string | depositor defines the deposit addresses from the proposals. |
|
| amount | cosmos.base.v1beta1.Coin | repeated | amount to be deposited by depositor. |
DepositParams
DepositParams defines the params for deposits on governance proposals.
| Field | Type | Label | Description |
| min_deposit | cosmos.base.v1beta1.Coin | repeated | Minimum deposit for a proposal to enter voting period. |
| max_deposit_period | google.protobuf.Duration | Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. |
Params
Params defines the parameters for the x/gov module.
Since: cosmos-sdk 0.47
| Field | Type | Label | Description |
| min_deposit | cosmos.base.v1beta1.Coin | repeated | Minimum deposit for a proposal to enter voting period. |
| max_deposit_period | google.protobuf.Duration | Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. |
|
| voting_period | google.protobuf.Duration | Duration of the voting period. |
|
| quorum | string | Minimum percentage of total stake needed to vote for a result to be considered valid. |
|
| threshold | string | Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. |
|
| veto_threshold | string | Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. |
|
| min_initial_deposit_ratio | string | The ratio representing the proportion of the deposit value that must be paid at proposal submission. |
|
| proposal_cancel_ratio | string | The cancel ratio which will not be returned back to the depositors when a proposal is cancelled. Since: cosmos-sdk 0.50 |
|
| proposal_cancel_dest | string | The address which will receive (proposal_cancel_ratio * deposit) proposal deposits. If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned. Since: cosmos-sdk 0.50 |
|
| expedited_voting_period | google.protobuf.Duration | Duration of the voting period of an expedited proposal. Since: cosmos-sdk 0.50 |
|
| expedited_threshold | string | Minimum proportion of Yes votes for proposal to pass. Default value: 0.67. Since: cosmos-sdk 0.50 |
|
| expedited_min_deposit | cosmos.base.v1beta1.Coin | repeated | Minimum expedited deposit for a proposal to enter voting period. |
| burn_vote_quorum | bool | burn deposits if a proposal does not meet quorum |
|
| burn_proposal_deposit_prevote | bool | burn deposits if the proposal does not enter voting period |
|
| burn_vote_veto | bool | burn deposits if quorum with vote type no_veto is met |
|
| min_deposit_ratio | string | The ratio representing the proportion of the deposit value minimum that must be met when making a deposit. Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be required. Since: cosmos-sdk 0.50 |
Proposal
Proposal defines the core field members of a governance proposal.
| Field | Type | Label | Description |
| id | uint64 | id defines the unique id of the proposal. |
|
| messages | google.protobuf.Any | repeated | messages are the arbitrary messages to be executed if the proposal passes. |
| status | ProposalStatus | status defines the proposal status. |
|
| final_tally_result | TallyResult | final_tally_result is the final tally result of the proposal. When querying a proposal via gRPC, this field is not populated until the proposal's voting period has ended. |
|
| submit_time | google.protobuf.Timestamp | submit_time is the time of proposal submission. |
|
| deposit_end_time | google.protobuf.Timestamp | deposit_end_time is the end time for deposition. |
|
| total_deposit | cosmos.base.v1beta1.Coin | repeated | total_deposit is the total deposit on the proposal. |
| voting_start_time | google.protobuf.Timestamp | voting_start_time is the starting time to vote on a proposal. |
|
| voting_end_time | google.protobuf.Timestamp | voting_end_time is the end time of voting on a proposal. |
|
| metadata | string | metadata is any arbitrary metadata attached to the proposal. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#proposal-3 |
|
| title | string | title is the title of the proposal Since: cosmos-sdk 0.47 |
|
| summary | string | summary is a short summary of the proposal Since: cosmos-sdk 0.47 |
|
| proposer | string | proposer is the address of the proposal sumbitter Since: cosmos-sdk 0.47 |
|
| expedited | bool | expedited defines if the proposal is expedited Since: cosmos-sdk 0.50 |
|
| failed_reason | string | failed_reason defines the reason why the proposal failed Since: cosmos-sdk 0.50 |
TallyParams
TallyParams defines the params for tallying votes on governance proposals.
| Field | Type | Label | Description |
| quorum | string | Minimum percentage of total stake needed to vote for a result to be considered valid. |
|
| threshold | string | Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. |
|
| veto_threshold | string | Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. |
TallyResult
TallyResult defines a standard tally for a governance proposal.
| Field | Type | Label | Description |
| yes_count | string | yes_count is the number of yes votes on a proposal. |
|
| abstain_count | string | abstain_count is the number of abstain votes on a proposal. |
|
| no_count | string | no_count is the number of no votes on a proposal. |
|
| no_with_veto_count | string | no_with_veto_count is the number of no with veto votes on a proposal. |
Vote
Vote defines a vote on a governance proposal.
A Vote consists of a proposal ID, the voter, and the vote option.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| voter | string | voter is the voter address of the proposal. |
|
| options | WeightedVoteOption | repeated | options is the weighted vote options. |
| metadata | string | metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5 |
VotingParams
VotingParams defines the params for voting on governance proposals.
| Field | Type | Label | Description |
| voting_period | google.protobuf.Duration | Duration of the voting period. |
WeightedVoteOption
WeightedVoteOption defines a unit of vote for vote split.
| Field | Type | Label | Description |
| option | VoteOption | option defines the valid vote options, it must not contain duplicate vote options. |
|
| weight | string | weight is the vote weight associated with the vote option. |
ProposalStatus
ProposalStatus enumerates the valid statuses of a proposal.
| Name | Number | Description |
| PROPOSAL_STATUS_UNSPECIFIED | 0 | PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. |
| PROPOSAL_STATUS_DEPOSIT_PERIOD | 1 | PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit period. |
| PROPOSAL_STATUS_VOTING_PERIOD | 2 | PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting period. |
| PROPOSAL_STATUS_PASSED | 3 | PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has passed. |
| PROPOSAL_STATUS_REJECTED | 4 | PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has been rejected. |
| PROPOSAL_STATUS_FAILED | 5 | PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has failed. |
VoteOption
VoteOption enumerates the valid vote options for a given governance proposal.
| Name | Number | Description |
| VOTE_OPTION_UNSPECIFIED | 0 | VOTE_OPTION_UNSPECIFIED defines a no-op vote option. |
| VOTE_OPTION_YES | 1 | VOTE_OPTION_YES defines a yes vote option. |
| VOTE_OPTION_ABSTAIN | 2 | VOTE_OPTION_ABSTAIN defines an abstain vote option. |
| VOTE_OPTION_NO | 3 | VOTE_OPTION_NO defines a no vote option. |
| VOTE_OPTION_NO_WITH_VETO | 4 | VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. |
cosmos/gov/v1/query.proto
TopSince: cosmos-sdk 0.46
QueryConstitutionRequest
QueryConstitutionRequest is the request type for the Query/Constitution RPC method
QueryConstitutionResponse
QueryConstitutionResponse is the response type for the Query/Constitution RPC method
| Field | Type | Label | Description |
| constitution | string |
|
QueryDepositRequest
QueryDepositRequest is the request type for the Query/Deposit RPC method.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| depositor | string | depositor defines the deposit addresses from the proposals. |
QueryDepositResponse
QueryDepositResponse is the response type for the Query/Deposit RPC method.
| Field | Type | Label | Description |
| deposit | Deposit | deposit defines the requested deposit. |
QueryDepositsRequest
QueryDepositsRequest is the request type for the Query/Deposits RPC method.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| pagination | cosmos.base.query.v1beta1.PageRequest | pagination defines an optional pagination for the request. |
QueryDepositsResponse
QueryDepositsResponse is the response type for the Query/Deposits RPC method.
| Field | Type | Label | Description |
| deposits | Deposit | repeated | deposits defines the requested deposits. |
| pagination | cosmos.base.query.v1beta1.PageResponse | pagination defines the pagination in the response. |
QueryParamsRequest
QueryParamsRequest is the request type for the Query/Params RPC method.
| Field | Type | Label | Description |
| params_type | string | params_type defines which parameters to query for, can be one of "voting", "tallying" or "deposit". |
QueryParamsResponse
QueryParamsResponse is the response type for the Query/Params RPC method.
| Field | Type | Label | Description |
| voting_params | VotingParams | Deprecated. Deprecated: Prefer to use `params` instead. voting_params defines the parameters related to voting. |
|
| deposit_params | DepositParams | Deprecated. Deprecated: Prefer to use `params` instead. deposit_params defines the parameters related to deposit. |
|
| tally_params | TallyParams | Deprecated. Deprecated: Prefer to use `params` instead. tally_params defines the parameters related to tally. |
|
| params | Params | params defines all the paramaters of x/gov module. Since: cosmos-sdk 0.47 |
Fields with deprecated option
| Name | Option |
| voting_params | true |
| deposit_params | true |
| tally_params | true |
QueryProposalRequest
QueryProposalRequest is the request type for the Query/Proposal RPC method.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
QueryProposalResponse
QueryProposalResponse is the response type for the Query/Proposal RPC method.
| Field | Type | Label | Description |
| proposal | Proposal | proposal is the requested governance proposal. |
QueryProposalsRequest
QueryProposalsRequest is the request type for the Query/Proposals RPC method.
| Field | Type | Label | Description |
| proposal_status | ProposalStatus | proposal_status defines the status of the proposals. |
|
| voter | string | voter defines the voter address for the proposals. |
|
| depositor | string | depositor defines the deposit addresses from the proposals. |
|
| pagination | cosmos.base.query.v1beta1.PageRequest | pagination defines an optional pagination for the request. |
QueryProposalsResponse
QueryProposalsResponse is the response type for the Query/Proposals RPC
method.
| Field | Type | Label | Description |
| proposals | Proposal | repeated | proposals defines all the requested governance proposals. |
| pagination | cosmos.base.query.v1beta1.PageResponse | pagination defines the pagination in the response. |
QueryTallyResultRequest
QueryTallyResultRequest is the request type for the Query/Tally RPC method.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
QueryTallyResultResponse
QueryTallyResultResponse is the response type for the Query/Tally RPC method.
| Field | Type | Label | Description |
| tally | TallyResult | tally defines the requested tally. |
QueryVoteRequest
QueryVoteRequest is the request type for the Query/Vote RPC method.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| voter | string | voter defines the voter address for the proposals. |
QueryVoteResponse
QueryVoteResponse is the response type for the Query/Vote RPC method.
| Field | Type | Label | Description |
| vote | Vote | vote defines the queried vote. |
QueryVotesRequest
QueryVotesRequest is the request type for the Query/Votes RPC method.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| pagination | cosmos.base.query.v1beta1.PageRequest | pagination defines an optional pagination for the request. |
QueryVotesResponse
QueryVotesResponse is the response type for the Query/Votes RPC method.
| Field | Type | Label | Description |
| votes | Vote | repeated | votes defines the queried votes. |
| pagination | cosmos.base.query.v1beta1.PageResponse | pagination defines the pagination in the response. |
Query
Query defines the gRPC querier service for gov module
| Method Name | Request Type | Response Type | Description |
| Constitution | QueryConstitutionRequest | QueryConstitutionResponse | Constitution queries the chain's constitution. |
| Proposal | QueryProposalRequest | QueryProposalResponse | Proposal queries proposal details based on ProposalID. |
| Proposals | QueryProposalsRequest | QueryProposalsResponse | Proposals queries all proposals based on given status. |
| Vote | QueryVoteRequest | QueryVoteResponse | Vote queries voted information based on proposalID, voterAddr. |
| Votes | QueryVotesRequest | QueryVotesResponse | Votes queries votes of a given proposal. |
| Params | QueryParamsRequest | QueryParamsResponse | Params queries all parameters of the gov module. |
| Deposit | QueryDepositRequest | QueryDepositResponse | Deposit queries single deposit information based on proposalID, depositAddr. |
| Deposits | QueryDepositsRequest | QueryDepositsResponse | Deposits queries all deposits of a single proposal. |
| TallyResult | QueryTallyResultRequest | QueryTallyResultResponse | TallyResult queries the tally of a proposal vote. |
Methods with HTTP bindings
| Method Name | Method | Pattern | Body |
| Constitution | GET | /cosmos/gov/v1/constitution | |
| Proposal | GET | /cosmos/gov/v1/proposals/{proposal_id} | |
| Proposals | GET | /cosmos/gov/v1/proposals | |
| Vote | GET | /cosmos/gov/v1/proposals/{proposal_id}/votes/{voter} | |
| Votes | GET | /cosmos/gov/v1/proposals/{proposal_id}/votes | |
| Params | GET | /cosmos/gov/v1/params/{params_type} | |
| Deposit | GET | /cosmos/gov/v1/proposals/{proposal_id}/deposits/{depositor} | |
| Deposits | GET | /cosmos/gov/v1/proposals/{proposal_id}/deposits | |
| TallyResult | GET | /cosmos/gov/v1/proposals/{proposal_id}/tally |
cosmos/gov/v1/tx.proto
TopSince: cosmos-sdk 0.46
MsgCancelProposal
MsgCancelProposal is the Msg/CancelProposal request type.
Since: cosmos-sdk 0.50
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| proposer | string | proposer is the account address of the proposer. |
MsgCancelProposalResponse
MsgCancelProposalResponse defines the response structure for executing a
MsgCancelProposal message.
Since: cosmos-sdk 0.50
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| canceled_time | google.protobuf.Timestamp | canceled_time is the time when proposal is canceled. |
|
| canceled_height | uint64 | canceled_height defines the block height at which the proposal is canceled. |
MsgDeposit
MsgDeposit defines a message to submit a deposit to an existing proposal.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| depositor | string | depositor defines the deposit addresses from the proposals. |
|
| amount | cosmos.base.v1beta1.Coin | repeated | amount to be deposited by depositor. |
MsgDepositResponse
MsgDepositResponse defines the Msg/Deposit response type.
MsgExecLegacyContent
MsgExecLegacyContent is used to wrap the legacy content field into a message.
This ensures backwards compatibility with v1beta1.MsgSubmitProposal.
| Field | Type | Label | Description |
| content | google.protobuf.Any | content is the proposal's content. |
|
| authority | string | authority must be the gov module address. |
MsgExecLegacyContentResponse
MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type.
MsgSubmitProposal
MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary
proposal Content.
| Field | Type | Label | Description |
| messages | google.protobuf.Any | repeated | messages are the arbitrary messages to be executed if proposal passes. |
| initial_deposit | cosmos.base.v1beta1.Coin | repeated | initial_deposit is the deposit value that must be paid at proposal submission. |
| proposer | string | proposer is the account address of the proposer. |
|
| metadata | string | metadata is any arbitrary metadata attached to the proposal. |
|
| title | string | title is the title of the proposal. Since: cosmos-sdk 0.47 |
|
| summary | string | summary is the summary of the proposal Since: cosmos-sdk 0.47 |
|
| expedited | bool | expedited defines if the proposal is expedited or not Since: cosmos-sdk 0.50 |
MsgSubmitProposalResponse
MsgSubmitProposalResponse defines the Msg/SubmitProposal response type.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
MsgUpdateParams
MsgUpdateParams is the Msg/UpdateParams request type.
Since: cosmos-sdk 0.47
| Field | Type | Label | Description |
| authority | string | authority is the address that controls the module (defaults to x/gov unless overwritten). |
|
| params | Params | params defines the x/gov parameters to update. NOTE: All parameters must be supplied. |
MsgUpdateParamsResponse
MsgUpdateParamsResponse defines the response structure for executing a
MsgUpdateParams message.
Since: cosmos-sdk 0.47
MsgVote
MsgVote defines a message to cast a vote.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| voter | string | voter is the voter address for the proposal. |
|
| option | VoteOption | option defines the vote option. |
|
| metadata | string | metadata is any arbitrary metadata attached to the Vote. |
MsgVoteResponse
MsgVoteResponse defines the Msg/Vote response type.
MsgVoteWeighted
MsgVoteWeighted defines a message to cast a vote.
| Field | Type | Label | Description |
| proposal_id | uint64 | proposal_id defines the unique id of the proposal. |
|
| voter | string | voter is the voter address for the proposal. |
|
| options | WeightedVoteOption | repeated | options defines the weighted vote options. |
| metadata | string | metadata is any arbitrary metadata attached to the VoteWeighted. |
MsgVoteWeightedResponse
MsgVoteWeightedResponse defines the Msg/VoteWeighted response type.
Msg
Msg defines the gov Msg service.
| Method Name | Request Type | Response Type | Description |
| SubmitProposal | MsgSubmitProposal | MsgSubmitProposalResponse | SubmitProposal defines a method to create new proposal given the messages. |
| ExecLegacyContent | MsgExecLegacyContent | MsgExecLegacyContentResponse | ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal to execute a legacy content-based proposal. |
| Vote | MsgVote | MsgVoteResponse | Vote defines a method to add a vote on a specific proposal. |
| VoteWeighted | MsgVoteWeighted | MsgVoteWeightedResponse | VoteWeighted defines a method to add a weighted vote on a specific proposal. |
| Deposit | MsgDeposit | MsgDepositResponse | Deposit defines a method to add deposit on a specific proposal. |
| UpdateParams | MsgUpdateParams | MsgUpdateParamsResponse | UpdateParams defines a governance operation for updating the x/gov module parameters. The authority is defined in the keeper. Since: cosmos-sdk 0.47 |
| CancelProposal | MsgCancelProposal | MsgCancelProposalResponse | CancelProposal defines a method to cancel governance proposal Since: cosmos-sdk 0.50 |
Scalar Value Types
| .proto Type | Notes | Python Type |
| double | float | |
| float | float | |
| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int |
| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int/long |
| uint32 | Uses variable-length encoding. | int/long |
| uint64 | Uses variable-length encoding. | int/long |
| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int |
| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int/long |
| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | int |
| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | int/long |
| sfixed32 | Always four bytes. | int |
| sfixed64 | Always eight bytes. | int/long |
| bool | boolean | |
| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | str/unicode |
| bytes | May contain any arbitrary sequence of bytes. | str |