mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-14 12:05:18 +00:00
d5dcfe73b2
* start makefile refactor to smaller units; break out proto-dep updating; add check-proto-deps target for use in CI in order to determine if depdencies have diverged * add proto check workflow * download go modules before checking proto deps * clean up -- hide output and add error message for check target * add error message for check-rsync * update any type, and ibc-go protos for v3.4.0 * add buf generate files for gogo, docs, and swagger * update swagger dirs and run with latest swagger gen * ignore new build directories * refactor proto makefile logic -- use buf instead of scripts * remove old protobuf scripts * run all proto checks on push * remove moved file * set default value for protoc machine * install build deps seperately * fetch master for buf check breaking * checkout from https url in CI for buf breaking * fix rsync file permissions on darwin * ignore build dirs * fix issue with apple provided make; clean up build deps; switch to buf format * remove clang format file -- using buf format now * run make proto-format (buf format changes) * update generated files for proto format changes
182 lines
6.8 KiB
Protocol Buffer
182 lines
6.8 KiB
Protocol Buffer
syntax = "proto3";
|
|
package kava.committee.v1beta1;
|
|
|
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
|
import "cosmos_proto/cosmos.proto";
|
|
import "gogoproto/gogo.proto";
|
|
import "google/api/annotations.proto";
|
|
import "google/protobuf/any.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
import "kava/committee/v1beta1/genesis.proto";
|
|
|
|
option go_package = "github.com/kava-labs/kava/x/committee/types";
|
|
option (gogoproto.goproto_getters_all) = false;
|
|
|
|
// Query defines the gRPC querier service for committee module
|
|
service Query {
|
|
// Committees queries all committess of the committee module.
|
|
rpc Committees(QueryCommitteesRequest) returns (QueryCommitteesResponse) {
|
|
option (google.api.http).get = "/kava/committee/v1beta1/committees";
|
|
}
|
|
// Committee queries a committee based on committee ID.
|
|
rpc Committee(QueryCommitteeRequest) returns (QueryCommitteeResponse) {
|
|
option (google.api.http).get = "/kava/committee/v1beta1/committees/{committee_id}";
|
|
}
|
|
// Proposals queries proposals based on committee ID.
|
|
rpc Proposals(QueryProposalsRequest) returns (QueryProposalsResponse) {
|
|
option (google.api.http).get = "/kava/committee/v1beta1/proposals";
|
|
}
|
|
// Deposits queries a proposal based on proposal ID.
|
|
rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse) {
|
|
option (google.api.http).get = "/kava/committee/v1beta1/proposals/{proposal_id}";
|
|
}
|
|
// NextProposalID queries the next proposal ID of the committee module.
|
|
rpc NextProposalID(QueryNextProposalIDRequest) returns (QueryNextProposalIDResponse) {
|
|
option (google.api.http).get = "/kava/committee/v1beta1/next-proposal-id";
|
|
}
|
|
// Votes queries all votes for a single proposal ID.
|
|
rpc Votes(QueryVotesRequest) returns (QueryVotesResponse) {
|
|
option (google.api.http).get = "/kava/committee/v1beta1/proposals/{proposal_id}/votes";
|
|
}
|
|
// Vote queries the vote of a single voter for a single proposal ID.
|
|
rpc Vote(QueryVoteRequest) returns (QueryVoteResponse) {
|
|
option (google.api.http).get = "/kava/committee/v1beta1/proposals/{proposal_id}/votes/{voter}";
|
|
}
|
|
// Tally queries the tally of a single proposal ID.
|
|
rpc Tally(QueryTallyRequest) returns (QueryTallyResponse) {
|
|
option (google.api.http).get = "/kava/committee/v1beta1/proposals/{proposal_id}/tally";
|
|
}
|
|
// RawParams queries the raw params data of any subspace and key.
|
|
rpc RawParams(QueryRawParamsRequest) returns (QueryRawParamsResponse) {
|
|
option (google.api.http).get = "/kava/committee/v1beta1/raw-params";
|
|
}
|
|
}
|
|
|
|
// QueryCommitteesRequest defines the request type for querying x/committee committees.
|
|
message QueryCommitteesRequest {}
|
|
|
|
// QueryCommitteesResponse defines the response type for querying x/committee committees.
|
|
message QueryCommitteesResponse {
|
|
repeated google.protobuf.Any committees = 1 [(cosmos_proto.accepts_interface) = "Committee"];
|
|
}
|
|
|
|
// QueryCommitteeRequest defines the request type for querying x/committee committee.
|
|
message QueryCommitteeRequest {
|
|
uint64 committee_id = 1;
|
|
}
|
|
|
|
// QueryCommitteeResponse defines the response type for querying x/committee committee.
|
|
message QueryCommitteeResponse {
|
|
google.protobuf.Any committee = 1 [(cosmos_proto.accepts_interface) = "Committee"];
|
|
}
|
|
|
|
// QueryProposalsRequest defines the request type for querying x/committee proposals.
|
|
message QueryProposalsRequest {
|
|
uint64 committee_id = 1;
|
|
}
|
|
|
|
// QueryProposalsResponse defines the response type for querying x/committee proposals.
|
|
message QueryProposalsResponse {
|
|
repeated QueryProposalResponse proposals = 1 [(gogoproto.nullable) = false];
|
|
}
|
|
|
|
// QueryProposalRequest defines the request type for querying x/committee proposal.
|
|
message QueryProposalRequest {
|
|
uint64 proposal_id = 1;
|
|
}
|
|
|
|
// QueryProposalResponse defines the response type for querying x/committee proposal.
|
|
message QueryProposalResponse {
|
|
google.protobuf.Any pub_proposal = 1 [
|
|
(cosmos_proto.accepts_interface) = "cosmos.gov.v1beta1.Content",
|
|
(gogoproto.customname) = "PubProposal"
|
|
];
|
|
uint64 id = 2 [(gogoproto.customname) = "ID"];
|
|
uint64 committee_id = 3 [(gogoproto.customname) = "CommitteeID"];
|
|
google.protobuf.Timestamp deadline = 4 [
|
|
(gogoproto.nullable) = false,
|
|
(gogoproto.stdtime) = true
|
|
];
|
|
}
|
|
|
|
// QueryNextProposalIDRequest defines the request type for querying x/committee NextProposalID.
|
|
message QueryNextProposalIDRequest {}
|
|
|
|
// QueryNextProposalIDRequest defines the response type for querying x/committee NextProposalID.
|
|
message QueryNextProposalIDResponse {
|
|
uint64 next_proposal_id = 1 [(gogoproto.customname) = "NextProposalID"];
|
|
}
|
|
|
|
// QueryVotesRequest defines the request type for querying x/committee votes.
|
|
message QueryVotesRequest {
|
|
uint64 proposal_id = 1;
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
|
}
|
|
|
|
// QueryVotesResponse defines the response type for querying x/committee votes.
|
|
message QueryVotesResponse {
|
|
// votes defined the queried votes.
|
|
repeated QueryVoteResponse votes = 1 [(gogoproto.nullable) = false];
|
|
|
|
// pagination defines the pagination in the response.
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
}
|
|
|
|
// QueryVoteRequest defines the request type for querying x/committee vote.
|
|
message QueryVoteRequest {
|
|
uint64 proposal_id = 1;
|
|
string voter = 2;
|
|
}
|
|
|
|
// QueryVoteResponse defines the response type for querying x/committee vote.
|
|
message QueryVoteResponse {
|
|
uint64 proposal_id = 1 [(gogoproto.customname) = "ProposalID"];
|
|
string voter = 2;
|
|
VoteType vote_type = 3;
|
|
}
|
|
|
|
// QueryTallyRequest defines the request type for querying x/committee tally.
|
|
message QueryTallyRequest {
|
|
uint64 proposal_id = 1;
|
|
}
|
|
|
|
// QueryTallyResponse defines the response type for querying x/committee tally.
|
|
message QueryTallyResponse {
|
|
uint64 proposal_id = 1 [(gogoproto.customname) = "ProposalID"];
|
|
string yes_votes = 2 [
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
string no_votes = 3 [
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
string current_votes = 4 [
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
string possible_votes = 5 [
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
string vote_threshold = 6 [
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
string quorum = 7 [
|
|
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
|
(gogoproto.nullable) = false
|
|
];
|
|
}
|
|
|
|
// QueryRawParamsRequest defines the request type for querying x/committee raw params.
|
|
message QueryRawParamsRequest {
|
|
string subspace = 1;
|
|
string key = 2;
|
|
}
|
|
|
|
// QueryRawParamsResponse defines the response type for querying x/committee raw params.
|
|
message QueryRawParamsResponse {
|
|
string raw_data = 1;
|
|
}
|