refactor: x/gov audit changes (#14174)

* make proto changes

* wip

* wip

* wip

* `make lint-fix`

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
Likhita Polavarapu
2022-12-07 00:51:34 +00:00
committed by GitHub
co-authored by Aleksandr Bezobchuk Julien Robert
parent ed5124f932
commit f1062c7f2c
64 changed files with 943 additions and 336 deletions
@@ -500,6 +500,8 @@ type Module struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// max_metadata_len defines the maximum proposal metadata length.
// Defaults to 255 if not explicitly set.
MaxMetadataLen uint64 `protobuf:"varint,1,opt,name=max_metadata_len,json=maxMetadataLen,proto3" json:"max_metadata_len,omitempty"`
// authority defines the custom module authority. If not set, defaults to the governance module.
Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"`
+41 -21
View File
@@ -6178,8 +6178,10 @@ type WeightedVoteOption struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// option defines the valid vote options, it must not contain duplicate vote options.
Option VoteOption `protobuf:"varint,1,opt,name=option,proto3,enum=cosmos.gov.v1.VoteOption" json:"option,omitempty"`
Weight string `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"`
// weight is the vote weight associated with the vote option.
Weight string `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"`
}
func (x *WeightedVoteOption) Reset() {
@@ -6223,9 +6225,12 @@ type Deposit struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"`
Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"`
// proposal_id defines the unique id of the proposal.
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
// depositor defines the deposit addresses from the proposals.
Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"`
// amount to be deposited by depositor.
Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"`
}
func (x *Deposit) Reset() {
@@ -6275,18 +6280,26 @@ type Proposal struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Messages []*anypb.Any `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"`
Status ProposalStatus `protobuf:"varint,3,opt,name=status,proto3,enum=cosmos.gov.v1.ProposalStatus" json:"status,omitempty"`
// id defines the unique id of the proposal.
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// messages are the arbitrary messages to be executed if the proposal passes.
Messages []*anypb.Any `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"`
// status defines the proposal status.
Status ProposalStatus `protobuf:"varint,3,opt,name=status,proto3,enum=cosmos.gov.v1.ProposalStatus" json:"status,omitempty"`
// 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.
FinalTallyResult *TallyResult `protobuf:"bytes,4,opt,name=final_tally_result,json=finalTallyResult,proto3" json:"final_tally_result,omitempty"`
SubmitTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"`
DepositEndTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=deposit_end_time,json=depositEndTime,proto3" json:"deposit_end_time,omitempty"`
TotalDeposit []*v1beta1.Coin `protobuf:"bytes,7,rep,name=total_deposit,json=totalDeposit,proto3" json:"total_deposit,omitempty"`
VotingStartTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=voting_start_time,json=votingStartTime,proto3" json:"voting_start_time,omitempty"`
VotingEndTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=voting_end_time,json=votingEndTime,proto3" json:"voting_end_time,omitempty"`
FinalTallyResult *TallyResult `protobuf:"bytes,4,opt,name=final_tally_result,json=finalTallyResult,proto3" json:"final_tally_result,omitempty"`
// submit_time is the time of proposal submission.
SubmitTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"`
// deposit_end_time is the end time for deposition.
DepositEndTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=deposit_end_time,json=depositEndTime,proto3" json:"deposit_end_time,omitempty"`
// total_deposit is the total deposit on the proposal.
TotalDeposit []*v1beta1.Coin `protobuf:"bytes,7,rep,name=total_deposit,json=totalDeposit,proto3" json:"total_deposit,omitempty"`
// voting_start_time is the starting time to vote on a proposal.
VotingStartTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=voting_start_time,json=votingStartTime,proto3" json:"voting_start_time,omitempty"`
// voting_end_time is the end time of voting on a proposal.
VotingEndTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=voting_end_time,json=votingEndTime,proto3" json:"voting_end_time,omitempty"`
// metadata is any arbitrary metadata attached to the proposal.
Metadata string `protobuf:"bytes,10,opt,name=metadata,proto3" json:"metadata,omitempty"`
}
@@ -6387,9 +6400,13 @@ type TallyResult struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
YesCount string `protobuf:"bytes,1,opt,name=yes_count,json=yesCount,proto3" json:"yes_count,omitempty"`
AbstainCount string `protobuf:"bytes,2,opt,name=abstain_count,json=abstainCount,proto3" json:"abstain_count,omitempty"`
NoCount string `protobuf:"bytes,3,opt,name=no_count,json=noCount,proto3" json:"no_count,omitempty"`
// yes_count is the number of yes votes on a proposal.
YesCount string `protobuf:"bytes,1,opt,name=yes_count,json=yesCount,proto3" json:"yes_count,omitempty"`
// abstain_count is the number of abstain votes on a proposal.
AbstainCount string `protobuf:"bytes,2,opt,name=abstain_count,json=abstainCount,proto3" json:"abstain_count,omitempty"`
// no_count is the number of no votes on a proposal.
NoCount string `protobuf:"bytes,3,opt,name=no_count,json=noCount,proto3" json:"no_count,omitempty"`
// no_with_veto_count is the number of no with veto votes on a proposal.
NoWithVetoCount string `protobuf:"bytes,4,opt,name=no_with_veto_count,json=noWithVetoCount,proto3" json:"no_with_veto_count,omitempty"`
}
@@ -6448,9 +6465,12 @@ type Vote struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
Options []*WeightedVoteOption `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"`
// proposal_id defines the unique id of the proposal.
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
// voter is the voter address of the proposal.
Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
// options is the weighted vote options.
Options []*WeightedVoteOption `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"`
// metadata is any arbitrary metadata to attached to the vote.
Metadata string `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
}
@@ -6556,7 +6576,7 @@ type VotingParams struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Length of the voting period.
// Duration of the voting period.
VotingPeriod *durationpb.Duration `protobuf:"bytes,1,opt,name=voting_period,json=votingPeriod,proto3" json:"voting_period,omitempty"`
}
@@ -6657,7 +6677,7 @@ type Params struct {
// Maximum period for Atom holders to deposit on a proposal. Initial value: 2
// months.
MaxDepositPeriod *durationpb.Duration `protobuf:"bytes,2,opt,name=max_deposit_period,json=maxDepositPeriod,proto3" json:"max_deposit_period,omitempty"`
// Length of the voting period.
// Duration of the voting period.
VotingPeriod *durationpb.Duration `protobuf:"bytes,3,opt,name=voting_period,json=votingPeriod,proto3" json:"voting_period,omitempty"`
// Minimum percentage of total stake needed to vote for a result to be
// considered valid.
+5 -2
View File
@@ -7945,6 +7945,7 @@ type QueryProposalResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// proposal is the requested governance proposal.
Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"`
}
@@ -8046,6 +8047,7 @@ type QueryProposalsResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// proposals defines all the requested governance proposals.
Proposals []*Proposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals,omitempty"`
// pagination defines the pagination in the response.
Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
@@ -8137,7 +8139,7 @@ type QueryVoteResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// vote defined the queried vote.
// vote defines the queried vote.
Vote *Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"`
}
@@ -8220,7 +8222,7 @@ type QueryVotesResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// votes defined the queried votes.
// votes defines the queried votes.
Votes []*Vote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes,omitempty"`
// pagination defines the pagination in the response.
Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
@@ -8511,6 +8513,7 @@ type QueryDepositsResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// deposits defines the requested deposits.
Deposits []*Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits,omitempty"`
// pagination defines the pagination in the response.
Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
+28 -13
View File
@@ -5838,9 +5838,12 @@ type MsgSubmitProposal struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Messages []*anypb.Any `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
// messages are the arbitrary messages to be executed if proposal passes.
Messages []*anypb.Any `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
// initial_deposit is the deposit value that must be paid at proposal submission.
InitialDeposit []*v1beta1.Coin `protobuf:"bytes,2,rep,name=initial_deposit,json=initialDeposit,proto3" json:"initial_deposit,omitempty"`
Proposer string `protobuf:"bytes,3,opt,name=proposer,proto3" json:"proposer,omitempty"`
// proposer is the account address of the proposer.
Proposer string `protobuf:"bytes,3,opt,name=proposer,proto3" json:"proposer,omitempty"`
// metadata is any arbitrary metadata attached to the proposal.
Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
}
@@ -5899,6 +5902,7 @@ type MsgSubmitProposalResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// proposal_id defines the unique id of the proposal.
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
}
@@ -6009,10 +6013,14 @@ type MsgVote struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.gov.v1.VoteOption" json:"option,omitempty"`
Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
// proposal_id defines the unique id of the proposal.
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
// voter is the voter address for the proposal.
Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
// option defines the vote option.
Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.gov.v1.VoteOption" json:"option,omitempty"`
// metadata is any arbitrary metadata attached to the Vote.
Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
}
func (x *MsgVote) Reset() {
@@ -6096,10 +6104,14 @@ type MsgVoteWeighted struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
Options []*WeightedVoteOption `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"`
Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
// proposal_id defines the unique id of the proposal.
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
// voter is the voter address for the proposal.
Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
// options defines the weighted vote options.
Options []*WeightedVoteOption `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"`
// metadata is any arbitrary metadata attached to the VoteWeighted.
Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
}
func (x *MsgVoteWeighted) Reset() {
@@ -6183,9 +6195,12 @@ type MsgDeposit struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"`
Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"`
// proposal_id defines the unique id of the proposal.
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
// depositor defines the deposit addresses from the proposals.
Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"`
// amount to be deposited by depositor.
Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"`
}
func (x *MsgDeposit) Reset() {
+2 -2
View File
@@ -22,7 +22,7 @@ const _ = grpc.SupportPackageIsVersion7
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type MsgClient interface {
// SubmitProposal defines a method to create new proposal given a content.
// SubmitProposal defines a method to create new proposal given the messages.
SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, error)
// ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal
// to execute a legacy content-based proposal.
@@ -106,7 +106,7 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
// All implementations must embed UnimplementedMsgServer
// for forward compatibility
type MsgServer interface {
// SubmitProposal defines a method to create new proposal given a content.
// SubmitProposal defines a method to create new proposal given the messages.
SubmitProposal(context.Context, *MsgSubmitProposal) (*MsgSubmitProposalResponse, error)
// ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal
// to execute a legacy content-based proposal.
+42 -19
View File
@@ -5621,8 +5621,10 @@ type WeightedVoteOption struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// option defines the valid vote options, it must not contain duplicate vote options.
Option VoteOption `protobuf:"varint,1,opt,name=option,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"option,omitempty"`
Weight string `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"`
// weight is the vote weight associated with the vote option.
Weight string `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"`
}
func (x *WeightedVoteOption) Reset() {
@@ -5666,7 +5668,9 @@ type TextProposal struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
// title of the proposal.
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
// description associated with the proposal.
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
}
@@ -5711,9 +5715,12 @@ type Deposit struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"`
Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"`
// proposal_id defines the unique id of the proposal.
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
// depositor defines the deposit addresses from the proposals.
Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"`
// amount to be deposited by depositor.
Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"`
}
func (x *Deposit) Reset() {
@@ -5763,18 +5770,26 @@ type Proposal struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
Content *anypb.Any `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
Status ProposalStatus `protobuf:"varint,3,opt,name=status,proto3,enum=cosmos.gov.v1beta1.ProposalStatus" json:"status,omitempty"`
// proposal_id defines the unique id of the proposal.
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
// content is the proposal's content.
Content *anypb.Any `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
// status defines the proposal status.
Status ProposalStatus `protobuf:"varint,3,opt,name=status,proto3,enum=cosmos.gov.v1beta1.ProposalStatus" json:"status,omitempty"`
// 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.
FinalTallyResult *TallyResult `protobuf:"bytes,4,opt,name=final_tally_result,json=finalTallyResult,proto3" json:"final_tally_result,omitempty"`
SubmitTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"`
DepositEndTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=deposit_end_time,json=depositEndTime,proto3" json:"deposit_end_time,omitempty"`
TotalDeposit []*v1beta1.Coin `protobuf:"bytes,7,rep,name=total_deposit,json=totalDeposit,proto3" json:"total_deposit,omitempty"`
VotingStartTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=voting_start_time,json=votingStartTime,proto3" json:"voting_start_time,omitempty"`
VotingEndTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=voting_end_time,json=votingEndTime,proto3" json:"voting_end_time,omitempty"`
FinalTallyResult *TallyResult `protobuf:"bytes,4,opt,name=final_tally_result,json=finalTallyResult,proto3" json:"final_tally_result,omitempty"`
// submit_time is the time of proposal submission.
SubmitTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"`
// deposit_end_time is the end time for deposition.
DepositEndTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=deposit_end_time,json=depositEndTime,proto3" json:"deposit_end_time,omitempty"`
// total_deposit is the total deposit on the proposal.
TotalDeposit []*v1beta1.Coin `protobuf:"bytes,7,rep,name=total_deposit,json=totalDeposit,proto3" json:"total_deposit,omitempty"`
// voting_start_time is the starting time to vote on a proposal.
VotingStartTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=voting_start_time,json=votingStartTime,proto3" json:"voting_start_time,omitempty"`
// voting_end_time is the end time of voting on a proposal.
VotingEndTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=voting_end_time,json=votingEndTime,proto3" json:"voting_end_time,omitempty"`
}
func (x *Proposal) Reset() {
@@ -5866,9 +5881,13 @@ type TallyResult struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Yes string `protobuf:"bytes,1,opt,name=yes,proto3" json:"yes,omitempty"`
Abstain string `protobuf:"bytes,2,opt,name=abstain,proto3" json:"abstain,omitempty"`
No string `protobuf:"bytes,3,opt,name=no,proto3" json:"no,omitempty"`
// yes is the number of yes votes on a proposal.
Yes string `protobuf:"bytes,1,opt,name=yes,proto3" json:"yes,omitempty"`
// abstain is the number of abstain votes on a proposal.
Abstain string `protobuf:"bytes,2,opt,name=abstain,proto3" json:"abstain,omitempty"`
// no is the number of no votes on a proposal.
No string `protobuf:"bytes,3,opt,name=no,proto3" json:"no,omitempty"`
// no_with_veto is the number of no with veto votes on a proposal.
NoWithVeto string `protobuf:"bytes,4,opt,name=no_with_veto,json=noWithVeto,proto3" json:"no_with_veto,omitempty"`
}
@@ -5927,14 +5946,18 @@ type Vote struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// proposal_id defines the unique id of the proposal.
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
// voter is the voter address of the proposal.
Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
// 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.
//
// Deprecated: Do not use.
Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"option,omitempty"`
// options is the weighted vote options.
//
// Since: cosmos-sdk 0.43
Options []*WeightedVoteOption `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"`
}
@@ -6041,7 +6064,7 @@ type VotingParams struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Length of the voting period.
// Duration of the voting period.
VotingPeriod *durationpb.Duration `protobuf:"bytes,1,opt,name=voting_period,json=votingPeriod,proto3" json:"voting_period,omitempty"`
}
+4 -2
View File
@@ -7967,6 +7967,7 @@ type QueryProposalsResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// proposals defines all the requested governance proposals.
Proposals []*Proposal `protobuf:"bytes,1,rep,name=proposals,proto3" json:"proposals,omitempty"`
// pagination defines the pagination in the response.
Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
@@ -8058,7 +8059,7 @@ type QueryVoteResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// vote defined the queried vote.
// vote defines the queried vote.
Vote *Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"`
}
@@ -8141,7 +8142,7 @@ type QueryVotesResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// votes defined the queried votes.
// votes defines the queried votes.
Votes []*Vote `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes,omitempty"`
// pagination defines the pagination in the response.
Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
@@ -8409,6 +8410,7 @@ type QueryDepositsResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// deposits defines the requested deposits.
Deposits []*Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits,omitempty"`
// pagination defines the pagination in the response.
Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
+24 -11
View File
@@ -3875,9 +3875,12 @@ type MsgSubmitProposal struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Content *anypb.Any `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
// content is the proposal's content.
Content *anypb.Any `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
// initial_deposit is the deposit value that must be paid at proposal submission.
InitialDeposit []*v1beta1.Coin `protobuf:"bytes,2,rep,name=initial_deposit,json=initialDeposit,proto3" json:"initial_deposit,omitempty"`
Proposer string `protobuf:"bytes,3,opt,name=proposer,proto3" json:"proposer,omitempty"`
// proposer is the account address of the proposer.
Proposer string `protobuf:"bytes,3,opt,name=proposer,proto3" json:"proposer,omitempty"`
}
func (x *MsgSubmitProposal) Reset() {
@@ -3927,6 +3930,7 @@ type MsgSubmitProposalResponse struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// proposal_id defines the unique id of the proposal.
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
}
@@ -3963,9 +3967,12 @@ type MsgVote struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"option,omitempty"`
// proposal_id defines the unique id of the proposal.
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
// voter is the voter address for the proposal.
Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
// option defines the vote option.
Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"option,omitempty"`
}
func (x *MsgVote) Reset() {
@@ -4044,9 +4051,12 @@ type MsgVoteWeighted struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
Options []*WeightedVoteOption `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"`
// proposal_id defines the unique id of the proposal.
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
// voter is the voter address for the proposal.
Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
// options defines the weighted vote options.
Options []*WeightedVoteOption `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"`
}
func (x *MsgVoteWeighted) Reset() {
@@ -4125,9 +4135,12 @@ type MsgDeposit struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"`
Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"`
// proposal_id defines the unique id of the proposal.
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"`
// depositor defines the deposit addresses from the proposals.
Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"`
// amount to be deposited by depositor.
Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"`
}
func (x *MsgDeposit) Reset() {