Skip to content

Commit

Permalink
fix gov v1alpha1
Browse files Browse the repository at this point in the history
  • Loading branch information
zheng-bin committed May 16, 2024
1 parent d802f08 commit 95b65ca
Show file tree
Hide file tree
Showing 3 changed files with 1,162 additions and 78 deletions.
35 changes: 35 additions & 0 deletions proto/shentu/gov/v1alpha1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,46 @@ option go_package = "github.com/shentufoundation/shentu/x/gov/types/v1alpha1";

// Query defines the gRPC querier service for gov module
service Query {
// Proposal queries proposal details based on ProposalID.
rpc Proposal(cosmos.gov.v1beta1.QueryProposalRequest) returns (cosmos.gov.v1beta1.QueryProposalResponse) {
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}";
}

// Proposals queries all proposals based on given status.
rpc Proposals(cosmos.gov.v1beta1.QueryProposalsRequest) returns (cosmos.gov.v1beta1.QueryProposalsResponse) {
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals";
}

// Vote queries voted information based on proposalID, voterAddr.
rpc Vote(cosmos.gov.v1beta1.QueryVoteRequest) returns (cosmos.gov.v1beta1.QueryVoteResponse) {
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}";
}

// Votes queries votes of a given proposal.
rpc Votes(cosmos.gov.v1beta1.QueryVotesRequest) returns (cosmos.gov.v1beta1.QueryVotesResponse) {
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes";
}

// Params queries all parameters of the gov module.
rpc Params(cosmos.gov.v1beta1.QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/cosmos/gov/v1beta1/params/{params_type}";
}

// Deposit queries single deposit information based proposalID, depositAddr.
rpc Deposit(cosmos.gov.v1beta1.QueryDepositRequest) returns (cosmos.gov.v1beta1.QueryDepositResponse) {
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}";
}

// Deposits queries all deposits of a single proposal.
rpc Deposits(cosmos.gov.v1beta1.QueryDepositsRequest) returns (cosmos.gov.v1beta1.QueryDepositsResponse) {
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits";
}

// TallyResult queries the tally of a proposal vote.
rpc TallyResult(cosmos.gov.v1beta1.QueryTallyResultRequest) returns (cosmos.gov.v1beta1.QueryTallyResultResponse) {
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/tally";
}

// Proposal queries proposal details based on ProposalID.
rpc CertVoted(QueryCertVotedRequest) returns (QueryCertVotedResponse) {
option (google.api.http).get = "/shentu/gov/v1alpha1/cert_voted/{proposal_id}";
Expand Down

0 comments on commit 95b65ca

Please sign in to comment.