2022-01-08 00:39:27 +00:00
|
|
|
syntax = "proto3";
|
2024-05-01 03:56:00 +00:00
|
|
|
package zgc.committee.v1beta1;
|
2022-01-08 00:39:27 +00:00
|
|
|
|
|
|
|
import "cosmos_proto/cosmos.proto";
|
2022-11-22 23:22:07 +00:00
|
|
|
import "gogoproto/gogo.proto";
|
2022-01-08 00:39:27 +00:00
|
|
|
import "google/protobuf/any.proto";
|
2024-05-01 03:56:00 +00:00
|
|
|
import "zgc/committee/v1beta1/genesis.proto";
|
2022-01-08 00:39:27 +00:00
|
|
|
|
2024-05-01 03:17:24 +00:00
|
|
|
option go_package = "github.com/0glabs/0g-chain/x/committee/types";
|
2022-01-08 00:39:27 +00:00
|
|
|
option (gogoproto.goproto_getters_all) = false;
|
|
|
|
|
|
|
|
// Msg defines the committee Msg service
|
|
|
|
service Msg {
|
|
|
|
// SubmitProposal defines a method for submitting a committee proposal
|
|
|
|
rpc SubmitProposal(MsgSubmitProposal) returns (MsgSubmitProposalResponse);
|
|
|
|
// Vote defines a method for voting on a proposal
|
|
|
|
rpc Vote(MsgVote) returns (MsgVoteResponse);
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgSubmitProposal is used by committee members to create a new proposal that they can vote on.
|
|
|
|
message MsgSubmitProposal {
|
|
|
|
google.protobuf.Any pub_proposal = 1 [(cosmos_proto.accepts_interface) = "cosmos.gov.v1beta1.Content"];
|
2022-11-22 23:22:07 +00:00
|
|
|
string proposer = 2;
|
|
|
|
uint64 committee_id = 3 [(gogoproto.customname) = "CommitteeID"];
|
2022-01-08 00:39:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgSubmitProposalResponse defines the SubmitProposal response type
|
|
|
|
message MsgSubmitProposalResponse {
|
|
|
|
uint64 proposal_id = 1 [(gogoproto.customname) = "ProposalID"];
|
|
|
|
}
|
|
|
|
|
|
|
|
// MsgVote is submitted by committee members to vote on proposals.
|
|
|
|
message MsgVote {
|
2022-11-22 23:22:07 +00:00
|
|
|
uint64 proposal_id = 1 [(gogoproto.customname) = "ProposalID"];
|
|
|
|
string voter = 2;
|
|
|
|
VoteType vote_type = 3;
|
2022-01-08 00:39:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// MsgVoteResponse defines the Vote response type
|
|
|
|
message MsgVoteResponse {}
|