2020-01-28 13:30:28 -08:00
|
|
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
2020-08-11 04:49:45 -07:00
|
|
|
// source: cosmos/gov/v1beta1/gov.proto
|
2020-01-28 13:30:28 -08:00
|
|
|
|
|
|
|
package types
|
|
|
|
|
|
|
|
import (
|
|
|
|
fmt "fmt"
|
2020-08-11 04:49:45 -07:00
|
|
|
types1 "github.com/cosmos/cosmos-sdk/codec/types"
|
2020-01-28 13:30:28 -08:00
|
|
|
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
|
2020-08-11 04:49:45 -07:00
|
|
|
types "github.com/cosmos/cosmos-sdk/types"
|
2020-01-28 13:30:28 -08:00
|
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
|
|
proto "github.com/gogo/protobuf/proto"
|
|
|
|
github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
|
2020-05-19 13:17:29 -07:00
|
|
|
_ "github.com/regen-network/cosmos-proto"
|
2021-03-05 07:23:01 -08:00
|
|
|
_ "google.golang.org/protobuf/types/known/durationpb"
|
|
|
|
_ "google.golang.org/protobuf/types/known/timestamppb"
|
2020-01-28 13:30:28 -08:00
|
|
|
io "io"
|
|
|
|
math "math"
|
|
|
|
math_bits "math/bits"
|
|
|
|
time "time"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ = proto.Marshal
|
|
|
|
var _ = fmt.Errorf
|
|
|
|
var _ = math.Inf
|
|
|
|
var _ = time.Kitchen
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the proto package it is being compiled against.
|
|
|
|
// A compilation error at this line likely means your copy of the
|
|
|
|
// proto package needs to be updated.
|
|
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
|
2020-08-19 00:36:41 -07:00
|
|
|
// VoteOption enumerates the valid vote options for a given governance proposal.
|
2020-01-28 13:30:28 -08:00
|
|
|
type VoteOption int32
|
|
|
|
|
|
|
|
const (
|
2020-03-03 06:59:05 -08:00
|
|
|
// VOTE_OPTION_UNSPECIFIED defines a no-op vote option.
|
|
|
|
OptionEmpty VoteOption = 0
|
|
|
|
// VOTE_OPTION_YES defines a yes vote option.
|
|
|
|
OptionYes VoteOption = 1
|
|
|
|
// VOTE_OPTION_ABSTAIN defines an abstain vote option.
|
|
|
|
OptionAbstain VoteOption = 2
|
|
|
|
// VOTE_OPTION_NO defines a no vote option.
|
|
|
|
OptionNo VoteOption = 3
|
|
|
|
// VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option.
|
2020-01-28 13:30:28 -08:00
|
|
|
OptionNoWithVeto VoteOption = 4
|
|
|
|
)
|
|
|
|
|
|
|
|
var VoteOption_name = map[int32]string{
|
2020-03-03 06:59:05 -08:00
|
|
|
0: "VOTE_OPTION_UNSPECIFIED",
|
|
|
|
1: "VOTE_OPTION_YES",
|
|
|
|
2: "VOTE_OPTION_ABSTAIN",
|
|
|
|
3: "VOTE_OPTION_NO",
|
|
|
|
4: "VOTE_OPTION_NO_WITH_VETO",
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
var VoteOption_value = map[string]int32{
|
2020-03-03 06:59:05 -08:00
|
|
|
"VOTE_OPTION_UNSPECIFIED": 0,
|
|
|
|
"VOTE_OPTION_YES": 1,
|
|
|
|
"VOTE_OPTION_ABSTAIN": 2,
|
|
|
|
"VOTE_OPTION_NO": 3,
|
|
|
|
"VOTE_OPTION_NO_WITH_VETO": 4,
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
|
2020-08-13 06:20:02 -07:00
|
|
|
func (x VoteOption) String() string {
|
|
|
|
return proto.EnumName(VoteOption_name, int32(x))
|
|
|
|
}
|
|
|
|
|
2020-01-28 13:30:28 -08:00
|
|
|
func (VoteOption) EnumDescriptor() ([]byte, []int) {
|
2020-08-11 04:49:45 -07:00
|
|
|
return fileDescriptor_6e82113c1a9a4b7c, []int{0}
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
|
2020-08-19 00:36:41 -07:00
|
|
|
// ProposalStatus enumerates the valid statuses of a proposal.
|
2020-01-28 13:30:28 -08:00
|
|
|
type ProposalStatus int32
|
|
|
|
|
|
|
|
const (
|
2020-03-03 06:59:05 -08:00
|
|
|
// PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status.
|
|
|
|
StatusNil ProposalStatus = 0
|
2020-09-25 03:25:37 -07:00
|
|
|
// PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit
|
|
|
|
// period.
|
2020-01-28 13:30:28 -08:00
|
|
|
StatusDepositPeriod ProposalStatus = 1
|
2020-09-25 03:25:37 -07:00
|
|
|
// PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting
|
|
|
|
// period.
|
2020-03-03 06:59:05 -08:00
|
|
|
StatusVotingPeriod ProposalStatus = 2
|
2020-09-25 03:25:37 -07:00
|
|
|
// PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has
|
|
|
|
// passed.
|
2020-03-03 06:59:05 -08:00
|
|
|
StatusPassed ProposalStatus = 3
|
2020-09-25 03:25:37 -07:00
|
|
|
// PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has
|
|
|
|
// been rejected.
|
2020-03-03 06:59:05 -08:00
|
|
|
StatusRejected ProposalStatus = 4
|
2020-09-25 03:25:37 -07:00
|
|
|
// PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has
|
|
|
|
// failed.
|
2020-03-03 06:59:05 -08:00
|
|
|
StatusFailed ProposalStatus = 5
|
2020-01-28 13:30:28 -08:00
|
|
|
)
|
|
|
|
|
|
|
|
var ProposalStatus_name = map[int32]string{
|
2020-03-03 06:59:05 -08:00
|
|
|
0: "PROPOSAL_STATUS_UNSPECIFIED",
|
|
|
|
1: "PROPOSAL_STATUS_DEPOSIT_PERIOD",
|
|
|
|
2: "PROPOSAL_STATUS_VOTING_PERIOD",
|
|
|
|
3: "PROPOSAL_STATUS_PASSED",
|
|
|
|
4: "PROPOSAL_STATUS_REJECTED",
|
|
|
|
5: "PROPOSAL_STATUS_FAILED",
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
var ProposalStatus_value = map[string]int32{
|
2020-03-03 06:59:05 -08:00
|
|
|
"PROPOSAL_STATUS_UNSPECIFIED": 0,
|
|
|
|
"PROPOSAL_STATUS_DEPOSIT_PERIOD": 1,
|
|
|
|
"PROPOSAL_STATUS_VOTING_PERIOD": 2,
|
|
|
|
"PROPOSAL_STATUS_PASSED": 3,
|
|
|
|
"PROPOSAL_STATUS_REJECTED": 4,
|
|
|
|
"PROPOSAL_STATUS_FAILED": 5,
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
|
2020-08-11 07:22:30 -07:00
|
|
|
func (x ProposalStatus) String() string {
|
|
|
|
return proto.EnumName(ProposalStatus_name, int32(x))
|
|
|
|
}
|
|
|
|
|
2020-01-28 13:30:28 -08:00
|
|
|
func (ProposalStatus) EnumDescriptor() ([]byte, []int) {
|
2020-08-11 04:49:45 -07:00
|
|
|
return fileDescriptor_6e82113c1a9a4b7c, []int{1}
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
|
2020-10-30 06:14:39 -07:00
|
|
|
// WeightedVoteOption defines a unit of vote for vote split.
|
|
|
|
type WeightedVoteOption struct {
|
2020-10-27 04:50:11 -07:00
|
|
|
Option VoteOption `protobuf:"varint,1,opt,name=option,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"option,omitempty"`
|
2020-10-30 06:14:39 -07:00
|
|
|
Weight github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=weight,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"weight" yaml:"weight"`
|
2020-10-27 04:50:11 -07:00
|
|
|
}
|
|
|
|
|
2020-10-30 06:14:39 -07:00
|
|
|
func (m *WeightedVoteOption) Reset() { *m = WeightedVoteOption{} }
|
|
|
|
func (*WeightedVoteOption) ProtoMessage() {}
|
|
|
|
func (*WeightedVoteOption) Descriptor() ([]byte, []int) {
|
2020-10-27 04:50:11 -07:00
|
|
|
return fileDescriptor_6e82113c1a9a4b7c, []int{0}
|
|
|
|
}
|
2020-10-30 06:14:39 -07:00
|
|
|
func (m *WeightedVoteOption) XXX_Unmarshal(b []byte) error {
|
2020-10-27 04:50:11 -07:00
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
2020-10-30 06:14:39 -07:00
|
|
|
func (m *WeightedVoteOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
2020-10-27 04:50:11 -07:00
|
|
|
if deterministic {
|
2020-10-30 06:14:39 -07:00
|
|
|
return xxx_messageInfo_WeightedVoteOption.Marshal(b, m, deterministic)
|
2020-10-27 04:50:11 -07:00
|
|
|
} else {
|
|
|
|
b = b[:cap(b)]
|
|
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return b[:n], nil
|
|
|
|
}
|
|
|
|
}
|
2020-10-30 06:14:39 -07:00
|
|
|
func (m *WeightedVoteOption) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_WeightedVoteOption.Merge(m, src)
|
2020-10-27 04:50:11 -07:00
|
|
|
}
|
2020-10-30 06:14:39 -07:00
|
|
|
func (m *WeightedVoteOption) XXX_Size() int {
|
2020-10-27 04:50:11 -07:00
|
|
|
return m.Size()
|
|
|
|
}
|
2020-10-30 06:14:39 -07:00
|
|
|
func (m *WeightedVoteOption) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_WeightedVoteOption.DiscardUnknown(m)
|
2020-10-27 04:50:11 -07:00
|
|
|
}
|
|
|
|
|
2020-10-30 06:14:39 -07:00
|
|
|
var xxx_messageInfo_WeightedVoteOption proto.InternalMessageInfo
|
2020-10-27 04:50:11 -07:00
|
|
|
|
2020-01-28 13:30:28 -08:00
|
|
|
// TextProposal defines a standard text proposal whose changes need to be
|
2020-08-19 00:36:41 -07:00
|
|
|
// manually updated in case of approval.
|
2020-01-28 13:30:28 -08:00
|
|
|
type TextProposal struct {
|
|
|
|
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
|
|
|
|
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *TextProposal) Reset() { *m = TextProposal{} }
|
|
|
|
func (*TextProposal) ProtoMessage() {}
|
|
|
|
func (*TextProposal) Descriptor() ([]byte, []int) {
|
2020-10-27 04:50:11 -07:00
|
|
|
return fileDescriptor_6e82113c1a9a4b7c, []int{1}
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
func (m *TextProposal) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *TextProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_TextProposal.Marshal(b, m, deterministic)
|
|
|
|
} else {
|
|
|
|
b = b[:cap(b)]
|
|
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return b[:n], nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
func (m *TextProposal) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_TextProposal.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *TextProposal) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *TextProposal) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_TextProposal.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_TextProposal proto.InternalMessageInfo
|
|
|
|
|
2020-09-25 03:25:37 -07:00
|
|
|
// Deposit defines an amount deposited by an account address to an active
|
|
|
|
// proposal.
|
2020-01-28 13:30:28 -08:00
|
|
|
type Deposit struct {
|
2020-09-25 03:25:37 -07:00
|
|
|
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty" yaml:"proposal_id"`
|
|
|
|
Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"`
|
|
|
|
Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Deposit) Reset() { *m = Deposit{} }
|
|
|
|
func (*Deposit) ProtoMessage() {}
|
|
|
|
func (*Deposit) Descriptor() ([]byte, []int) {
|
2020-10-27 04:50:11 -07:00
|
|
|
return fileDescriptor_6e82113c1a9a4b7c, []int{2}
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
func (m *Deposit) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *Deposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_Deposit.Marshal(b, m, deterministic)
|
|
|
|
} else {
|
|
|
|
b = b[:cap(b)]
|
|
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return b[:n], nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
func (m *Deposit) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Deposit.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *Deposit) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *Deposit) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Deposit.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Deposit proto.InternalMessageInfo
|
|
|
|
|
2020-08-19 00:36:41 -07:00
|
|
|
// Proposal defines the core field members of a governance proposal.
|
2020-05-19 13:17:29 -07:00
|
|
|
type Proposal struct {
|
2020-08-14 01:55:54 -07:00
|
|
|
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"id" yaml:"id"`
|
2020-08-11 04:49:45 -07:00
|
|
|
Content *types1.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" yaml:"proposal_status"`
|
2020-05-19 13:17:29 -07:00
|
|
|
FinalTallyResult TallyResult `protobuf:"bytes,4,opt,name=final_tally_result,json=finalTallyResult,proto3" json:"final_tally_result" yaml:"final_tally_result"`
|
|
|
|
SubmitTime time.Time `protobuf:"bytes,5,opt,name=submit_time,json=submitTime,proto3,stdtime" json:"submit_time" yaml:"submit_time"`
|
|
|
|
DepositEndTime time.Time `protobuf:"bytes,6,opt,name=deposit_end_time,json=depositEndTime,proto3,stdtime" json:"deposit_end_time" yaml:"deposit_end_time"`
|
|
|
|
TotalDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,7,rep,name=total_deposit,json=totalDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_deposit" yaml:"total_deposit"`
|
|
|
|
VotingStartTime time.Time `protobuf:"bytes,8,opt,name=voting_start_time,json=votingStartTime,proto3,stdtime" json:"voting_start_time" yaml:"voting_start_time"`
|
|
|
|
VotingEndTime time.Time `protobuf:"bytes,9,opt,name=voting_end_time,json=votingEndTime,proto3,stdtime" json:"voting_end_time" yaml:"voting_end_time"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Proposal) Reset() { *m = Proposal{} }
|
|
|
|
func (*Proposal) ProtoMessage() {}
|
|
|
|
func (*Proposal) Descriptor() ([]byte, []int) {
|
2020-10-27 04:50:11 -07:00
|
|
|
return fileDescriptor_6e82113c1a9a4b7c, []int{3}
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
2020-05-19 13:17:29 -07:00
|
|
|
func (m *Proposal) XXX_Unmarshal(b []byte) error {
|
2020-01-28 13:30:28 -08:00
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
2020-05-19 13:17:29 -07:00
|
|
|
func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
2020-01-28 13:30:28 -08:00
|
|
|
if deterministic {
|
2020-05-19 13:17:29 -07:00
|
|
|
return xxx_messageInfo_Proposal.Marshal(b, m, deterministic)
|
2020-01-28 13:30:28 -08:00
|
|
|
} else {
|
|
|
|
b = b[:cap(b)]
|
|
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return b[:n], nil
|
|
|
|
}
|
|
|
|
}
|
2020-05-19 13:17:29 -07:00
|
|
|
func (m *Proposal) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Proposal.Merge(m, src)
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
2020-05-19 13:17:29 -07:00
|
|
|
func (m *Proposal) XXX_Size() int {
|
2020-01-28 13:30:28 -08:00
|
|
|
return m.Size()
|
|
|
|
}
|
2020-05-19 13:17:29 -07:00
|
|
|
func (m *Proposal) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Proposal.DiscardUnknown(m)
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
|
2020-05-19 13:17:29 -07:00
|
|
|
var xxx_messageInfo_Proposal proto.InternalMessageInfo
|
2020-01-28 13:30:28 -08:00
|
|
|
|
2020-08-19 00:36:41 -07:00
|
|
|
// TallyResult defines a standard tally for a governance proposal.
|
2020-01-28 13:30:28 -08:00
|
|
|
type TallyResult struct {
|
|
|
|
Yes github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=yes,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"yes"`
|
|
|
|
Abstain github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=abstain,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"abstain"`
|
|
|
|
No github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=no,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"no"`
|
|
|
|
NoWithVeto github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=no_with_veto,json=noWithVeto,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"no_with_veto" yaml:"no_with_veto"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *TallyResult) Reset() { *m = TallyResult{} }
|
|
|
|
func (*TallyResult) ProtoMessage() {}
|
|
|
|
func (*TallyResult) Descriptor() ([]byte, []int) {
|
2020-10-27 04:50:11 -07:00
|
|
|
return fileDescriptor_6e82113c1a9a4b7c, []int{4}
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
func (m *TallyResult) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *TallyResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_TallyResult.Marshal(b, m, deterministic)
|
|
|
|
} else {
|
|
|
|
b = b[:cap(b)]
|
|
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return b[:n], nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
func (m *TallyResult) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_TallyResult.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *TallyResult) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *TallyResult) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_TallyResult.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_TallyResult proto.InternalMessageInfo
|
|
|
|
|
2020-08-19 00:36:41 -07:00
|
|
|
// Vote defines a vote on a governance proposal.
|
|
|
|
// A Vote consists of a proposal ID, the voter, and the vote option.
|
2020-01-28 13:30:28 -08:00
|
|
|
type Vote struct {
|
2020-10-30 06:14:39 -07:00
|
|
|
ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty" yaml:"proposal_id"`
|
|
|
|
Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"`
|
2021-01-22 07:37:21 -08:00
|
|
|
Options []WeightedVoteOption `protobuf:"bytes,4,rep,name=options,proto3" json:"options"`
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Vote) Reset() { *m = Vote{} }
|
|
|
|
func (*Vote) ProtoMessage() {}
|
|
|
|
func (*Vote) Descriptor() ([]byte, []int) {
|
2020-10-27 04:50:11 -07:00
|
|
|
return fileDescriptor_6e82113c1a9a4b7c, []int{5}
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
func (m *Vote) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_Vote.Marshal(b, m, deterministic)
|
|
|
|
} else {
|
|
|
|
b = b[:cap(b)]
|
|
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return b[:n], nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
func (m *Vote) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Vote.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *Vote) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *Vote) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Vote.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Vote proto.InternalMessageInfo
|
|
|
|
|
2020-08-19 00:36:41 -07:00
|
|
|
// DepositParams defines the params for deposits on governance proposals.
|
2020-07-16 02:16:23 -07:00
|
|
|
type DepositParams struct {
|
|
|
|
// Minimum deposit for a proposal to enter voting period.
|
|
|
|
MinDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"min_deposit,omitempty" yaml:"min_deposit"`
|
2020-09-25 03:25:37 -07:00
|
|
|
// Maximum period for Atom holders to deposit on a proposal. Initial value: 2
|
|
|
|
// months.
|
2020-07-16 02:16:23 -07:00
|
|
|
MaxDepositPeriod time.Duration `protobuf:"bytes,2,opt,name=max_deposit_period,json=maxDepositPeriod,proto3,stdduration" json:"max_deposit_period,omitempty" yaml:"max_deposit_period"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DepositParams) Reset() { *m = DepositParams{} }
|
|
|
|
func (*DepositParams) ProtoMessage() {}
|
|
|
|
func (*DepositParams) Descriptor() ([]byte, []int) {
|
2020-10-27 04:50:11 -07:00
|
|
|
return fileDescriptor_6e82113c1a9a4b7c, []int{6}
|
2020-07-16 02:16:23 -07:00
|
|
|
}
|
|
|
|
func (m *DepositParams) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *DepositParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_DepositParams.Marshal(b, m, deterministic)
|
|
|
|
} else {
|
|
|
|
b = b[:cap(b)]
|
|
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return b[:n], nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
func (m *DepositParams) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_DepositParams.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *DepositParams) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *DepositParams) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_DepositParams.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_DepositParams proto.InternalMessageInfo
|
|
|
|
|
2020-08-19 00:36:41 -07:00
|
|
|
// VotingParams defines the params for voting on governance proposals.
|
2020-07-16 02:16:23 -07:00
|
|
|
type VotingParams struct {
|
|
|
|
// Length of the voting period.
|
|
|
|
VotingPeriod time.Duration `protobuf:"bytes,1,opt,name=voting_period,json=votingPeriod,proto3,stdduration" json:"voting_period,omitempty" yaml:"voting_period"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *VotingParams) Reset() { *m = VotingParams{} }
|
|
|
|
func (*VotingParams) ProtoMessage() {}
|
|
|
|
func (*VotingParams) Descriptor() ([]byte, []int) {
|
2020-10-27 04:50:11 -07:00
|
|
|
return fileDescriptor_6e82113c1a9a4b7c, []int{7}
|
2020-07-16 02:16:23 -07:00
|
|
|
}
|
|
|
|
func (m *VotingParams) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *VotingParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_VotingParams.Marshal(b, m, deterministic)
|
|
|
|
} else {
|
|
|
|
b = b[:cap(b)]
|
|
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return b[:n], nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
func (m *VotingParams) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_VotingParams.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *VotingParams) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *VotingParams) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_VotingParams.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_VotingParams proto.InternalMessageInfo
|
|
|
|
|
2020-08-19 00:36:41 -07:00
|
|
|
// TallyParams defines the params for tallying votes on governance proposals.
|
2020-07-16 02:16:23 -07:00
|
|
|
type TallyParams struct {
|
2020-09-25 03:25:37 -07:00
|
|
|
// Minimum percentage of total stake needed to vote for a result to be
|
|
|
|
// considered valid.
|
2020-07-16 02:16:23 -07:00
|
|
|
Quorum github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=quorum,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"quorum,omitempty"`
|
2020-08-19 00:36:41 -07:00
|
|
|
// Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.
|
2020-07-16 02:16:23 -07:00
|
|
|
Threshold github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=threshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"threshold,omitempty"`
|
2020-09-25 03:25:37 -07:00
|
|
|
// Minimum value of Veto votes to Total votes ratio for proposal to be
|
|
|
|
// vetoed. Default value: 1/3.
|
2020-08-19 00:36:41 -07:00
|
|
|
VetoThreshold github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=veto_threshold,json=vetoThreshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"veto_threshold,omitempty" yaml:"veto_threshold"`
|
2020-07-16 02:16:23 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *TallyParams) Reset() { *m = TallyParams{} }
|
|
|
|
func (*TallyParams) ProtoMessage() {}
|
|
|
|
func (*TallyParams) Descriptor() ([]byte, []int) {
|
2020-10-27 04:50:11 -07:00
|
|
|
return fileDescriptor_6e82113c1a9a4b7c, []int{8}
|
2020-07-16 02:16:23 -07:00
|
|
|
}
|
|
|
|
func (m *TallyParams) XXX_Unmarshal(b []byte) error {
|
|
|
|
return m.Unmarshal(b)
|
|
|
|
}
|
|
|
|
func (m *TallyParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
if deterministic {
|
|
|
|
return xxx_messageInfo_TallyParams.Marshal(b, m, deterministic)
|
|
|
|
} else {
|
|
|
|
b = b[:cap(b)]
|
|
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return b[:n], nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
func (m *TallyParams) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_TallyParams.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *TallyParams) XXX_Size() int {
|
|
|
|
return m.Size()
|
|
|
|
}
|
|
|
|
func (m *TallyParams) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_TallyParams.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_TallyParams proto.InternalMessageInfo
|
|
|
|
|
2020-01-28 13:30:28 -08:00
|
|
|
func init() {
|
2020-08-11 04:49:45 -07:00
|
|
|
proto.RegisterEnum("cosmos.gov.v1beta1.VoteOption", VoteOption_name, VoteOption_value)
|
|
|
|
proto.RegisterEnum("cosmos.gov.v1beta1.ProposalStatus", ProposalStatus_name, ProposalStatus_value)
|
2020-10-30 06:14:39 -07:00
|
|
|
proto.RegisterType((*WeightedVoteOption)(nil), "cosmos.gov.v1beta1.WeightedVoteOption")
|
2020-08-11 04:49:45 -07:00
|
|
|
proto.RegisterType((*TextProposal)(nil), "cosmos.gov.v1beta1.TextProposal")
|
|
|
|
proto.RegisterType((*Deposit)(nil), "cosmos.gov.v1beta1.Deposit")
|
|
|
|
proto.RegisterType((*Proposal)(nil), "cosmos.gov.v1beta1.Proposal")
|
|
|
|
proto.RegisterType((*TallyResult)(nil), "cosmos.gov.v1beta1.TallyResult")
|
|
|
|
proto.RegisterType((*Vote)(nil), "cosmos.gov.v1beta1.Vote")
|
|
|
|
proto.RegisterType((*DepositParams)(nil), "cosmos.gov.v1beta1.DepositParams")
|
|
|
|
proto.RegisterType((*VotingParams)(nil), "cosmos.gov.v1beta1.VotingParams")
|
|
|
|
proto.RegisterType((*TallyParams)(nil), "cosmos.gov.v1beta1.TallyParams")
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() { proto.RegisterFile("cosmos/gov/v1beta1/gov.proto", fileDescriptor_6e82113c1a9a4b7c) }
|
|
|
|
|
|
|
|
var fileDescriptor_6e82113c1a9a4b7c = []byte{
|
2021-01-22 07:37:21 -08:00
|
|
|
// 1450 bytes of a gzipped FileDescriptorProto
|
2020-10-30 06:14:39 -07:00
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x51, 0x68, 0xdb, 0x56,
|
2021-01-22 07:37:21 -08:00
|
|
|
0x17, 0xb6, 0x6c, 0xc7, 0x89, 0xaf, 0x9d, 0x44, 0xbd, 0x49, 0x13, 0xc7, 0x7f, 0x7f, 0xc9, 0xbf,
|
|
|
|
0xfe, 0x51, 0x42, 0x69, 0x9d, 0x36, 0x1b, 0x1b, 0x4b, 0x61, 0x9b, 0x15, 0x2b, 0xab, 0x4b, 0xb1,
|
|
|
|
0x8d, 0xac, 0x3a, 0xb4, 0x7b, 0x10, 0x8a, 0x7d, 0xeb, 0x68, 0xb3, 0x74, 0x3d, 0xeb, 0x3a, 0x4d,
|
|
|
|
0xd8, 0xcb, 0x1e, 0x8b, 0x07, 0x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0xf7, 0xff, 0x7e, 0x21,
|
|
|
|
0xee, 0x7b, 0xff, 0xd0, 0x79, 0xfd, 0xbc, 0x13, 0xf3, 0x76, 0xc8, 0x9b, 0x7f, 0x05, 0x00, 0x00,
|
|
|
|
0xff, 0xff, 0x51, 0x93, 0x54, 0x90, 0xeb, 0x0d, 0x00, 0x00,
|
2020-03-02 11:13:42 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *TextProposal) Equal(that interface{}) bool {
|
|
|
|
if that == nil {
|
|
|
|
return this == nil
|
|
|
|
}
|
|
|
|
|
|
|
|
that1, ok := that.(*TextProposal)
|
|
|
|
if !ok {
|
|
|
|
that2, ok := that.(TextProposal)
|
|
|
|
if ok {
|
|
|
|
that1 = &that2
|
|
|
|
} else {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if that1 == nil {
|
|
|
|
return this == nil
|
|
|
|
} else if this == nil {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if this.Title != that1.Title {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if this.Description != that1.Description {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
return true
|
|
|
|
}
|
2020-05-19 13:17:29 -07:00
|
|
|
func (this *Proposal) Equal(that interface{}) bool {
|
2020-03-02 13:46:28 -08:00
|
|
|
if that == nil {
|
|
|
|
return this == nil
|
|
|
|
}
|
|
|
|
|
2020-05-19 13:17:29 -07:00
|
|
|
that1, ok := that.(*Proposal)
|
2020-03-02 13:46:28 -08:00
|
|
|
if !ok {
|
2020-05-19 13:17:29 -07:00
|
|
|
that2, ok := that.(Proposal)
|
2020-03-02 13:46:28 -08:00
|
|
|
if ok {
|
|
|
|
that1 = &that2
|
|
|
|
} else {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if that1 == nil {
|
|
|
|
return this == nil
|
|
|
|
} else if this == nil {
|
|
|
|
return false
|
|
|
|
}
|
2020-08-14 01:55:54 -07:00
|
|
|
if this.ProposalId != that1.ProposalId {
|
2020-03-02 13:46:28 -08:00
|
|
|
return false
|
|
|
|
}
|
2020-05-19 13:17:29 -07:00
|
|
|
if !this.Content.Equal(that1.Content) {
|
|
|
|
return false
|
|
|
|
}
|
2020-03-02 13:46:28 -08:00
|
|
|
if this.Status != that1.Status {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if !this.FinalTallyResult.Equal(&that1.FinalTallyResult) {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if !this.SubmitTime.Equal(that1.SubmitTime) {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if !this.DepositEndTime.Equal(that1.DepositEndTime) {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if len(this.TotalDeposit) != len(that1.TotalDeposit) {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
for i := range this.TotalDeposit {
|
|
|
|
if !this.TotalDeposit[i].Equal(&that1.TotalDeposit[i]) {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if !this.VotingStartTime.Equal(that1.VotingStartTime) {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if !this.VotingEndTime.Equal(that1.VotingEndTime) {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
return true
|
|
|
|
}
|
2020-03-02 11:13:42 -08:00
|
|
|
func (this *TallyResult) Equal(that interface{}) bool {
|
|
|
|
if that == nil {
|
|
|
|
return this == nil
|
|
|
|
}
|
|
|
|
|
|
|
|
that1, ok := that.(*TallyResult)
|
|
|
|
if !ok {
|
|
|
|
that2, ok := that.(TallyResult)
|
|
|
|
if ok {
|
|
|
|
that1 = &that2
|
|
|
|
} else {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if that1 == nil {
|
|
|
|
return this == nil
|
|
|
|
} else if this == nil {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if !this.Yes.Equal(that1.Yes) {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if !this.Abstain.Equal(that1.Abstain) {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if !this.No.Equal(that1.No) {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if !this.NoWithVeto.Equal(that1.NoWithVeto) {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
return true
|
|
|
|
}
|
2020-10-30 06:14:39 -07:00
|
|
|
func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) {
|
2020-10-27 04:50:11 -07:00
|
|
|
size := m.Size()
|
|
|
|
dAtA = make([]byte, size)
|
|
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return dAtA[:n], nil
|
|
|
|
}
|
|
|
|
|
2020-10-30 06:14:39 -07:00
|
|
|
func (m *WeightedVoteOption) MarshalTo(dAtA []byte) (int, error) {
|
2020-10-27 04:50:11 -07:00
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
2020-10-30 06:14:39 -07:00
|
|
|
func (m *WeightedVoteOption) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
2020-10-27 04:50:11 -07:00
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
{
|
2020-10-30 06:14:39 -07:00
|
|
|
size := m.Weight.Size()
|
2020-10-27 04:50:11 -07:00
|
|
|
i -= size
|
2020-10-30 06:14:39 -07:00
|
|
|
if _, err := m.Weight.MarshalTo(dAtA[i:]); err != nil {
|
2020-10-27 04:50:11 -07:00
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i = encodeVarintGov(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x12
|
|
|
|
if m.Option != 0 {
|
|
|
|
i = encodeVarintGov(dAtA, i, uint64(m.Option))
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x8
|
|
|
|
}
|
|
|
|
return len(dAtA) - i, nil
|
|
|
|
}
|
|
|
|
|
2020-08-11 04:49:45 -07:00
|
|
|
func (m *TextProposal) Marshal() (dAtA []byte, err error) {
|
2020-01-28 13:30:28 -08:00
|
|
|
size := m.Size()
|
|
|
|
dAtA = make([]byte, size)
|
|
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return dAtA[:n], nil
|
|
|
|
}
|
|
|
|
|
2020-08-11 04:49:45 -07:00
|
|
|
func (m *TextProposal) MarshalTo(dAtA []byte) (int, error) {
|
2020-01-28 13:30:28 -08:00
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
2020-08-11 04:49:45 -07:00
|
|
|
func (m *TextProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
2020-01-28 13:30:28 -08:00
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
2020-08-11 04:49:45 -07:00
|
|
|
if len(m.Description) > 0 {
|
|
|
|
i -= len(m.Description)
|
|
|
|
copy(dAtA[i:], m.Description)
|
|
|
|
i = encodeVarintGov(dAtA, i, uint64(len(m.Description)))
|
2020-01-28 13:30:28 -08:00
|
|
|
i--
|
|
|
|
dAtA[i] = 0x12
|
|
|
|
}
|
2020-08-11 04:49:45 -07:00
|
|
|
if len(m.Title) > 0 {
|
|
|
|
i -= len(m.Title)
|
|
|
|
copy(dAtA[i:], m.Title)
|
|
|
|
i = encodeVarintGov(dAtA, i, uint64(len(m.Title)))
|
2020-01-28 13:30:28 -08:00
|
|
|
i--
|
2020-08-11 04:49:45 -07:00
|
|
|
dAtA[i] = 0xa
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
return len(dAtA) - i, nil
|
|
|
|
}
|
|
|
|
|
2020-08-11 04:49:45 -07:00
|
|
|
func (m *Deposit) Marshal() (dAtA []byte, err error) {
|
2020-01-28 13:30:28 -08:00
|
|
|
size := m.Size()
|
|
|
|
dAtA = make([]byte, size)
|
|
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return dAtA[:n], nil
|
|
|
|
}
|
|
|
|
|
2020-08-11 04:49:45 -07:00
|
|
|
func (m *Deposit) MarshalTo(dAtA []byte) (int, error) {
|
2020-01-28 13:30:28 -08:00
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
2020-08-11 04:49:45 -07:00
|
|
|
func (m *Deposit) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
2020-01-28 13:30:28 -08:00
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
2020-03-02 11:13:42 -08:00
|
|
|
if len(m.Amount) > 0 {
|
|
|
|
for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- {
|
|
|
|
{
|
|
|
|
size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintGov(dAtA, i, uint64(size))
|
2020-03-02 11:13:42 -08:00
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x1a
|
|
|
|
}
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
2020-03-02 11:13:42 -08:00
|
|
|
if len(m.Depositor) > 0 {
|
|
|
|
i -= len(m.Depositor)
|
|
|
|
copy(dAtA[i:], m.Depositor)
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintGov(dAtA, i, uint64(len(m.Depositor)))
|
2020-01-28 13:30:28 -08:00
|
|
|
i--
|
|
|
|
dAtA[i] = 0x12
|
|
|
|
}
|
2020-08-14 01:55:54 -07:00
|
|
|
if m.ProposalId != 0 {
|
|
|
|
i = encodeVarintGov(dAtA, i, uint64(m.ProposalId))
|
2020-01-28 13:30:28 -08:00
|
|
|
i--
|
|
|
|
dAtA[i] = 0x8
|
|
|
|
}
|
|
|
|
return len(dAtA) - i, nil
|
|
|
|
}
|
|
|
|
|
2020-08-11 04:49:45 -07:00
|
|
|
func (m *Proposal) Marshal() (dAtA []byte, err error) {
|
2020-01-28 13:30:28 -08:00
|
|
|
size := m.Size()
|
|
|
|
dAtA = make([]byte, size)
|
|
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return dAtA[:n], nil
|
|
|
|
}
|
|
|
|
|
2020-08-11 04:49:45 -07:00
|
|
|
func (m *Proposal) MarshalTo(dAtA []byte) (int, error) {
|
2020-01-28 13:30:28 -08:00
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
2020-08-11 04:49:45 -07:00
|
|
|
func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
2020-01-28 13:30:28 -08:00
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
2020-08-11 04:49:45 -07:00
|
|
|
n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.VotingEndTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.VotingEndTime):])
|
|
|
|
if err1 != nil {
|
|
|
|
return 0, err1
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
2020-08-11 04:49:45 -07:00
|
|
|
i -= n1
|
|
|
|
i = encodeVarintGov(dAtA, i, uint64(n1))
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x4a
|
|
|
|
n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.VotingStartTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.VotingStartTime):])
|
|
|
|
if err2 != nil {
|
|
|
|
return 0, err2
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
2020-02-17 11:29:24 -08:00
|
|
|
i -= n2
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintGov(dAtA, i, uint64(n2))
|
2020-01-28 13:30:28 -08:00
|
|
|
i--
|
2020-05-19 13:17:29 -07:00
|
|
|
dAtA[i] = 0x42
|
2020-01-28 13:30:28 -08:00
|
|
|
if len(m.TotalDeposit) > 0 {
|
|
|
|
for iNdEx := len(m.TotalDeposit) - 1; iNdEx >= 0; iNdEx-- {
|
|
|
|
{
|
|
|
|
size, err := m.TotalDeposit[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintGov(dAtA, i, uint64(size))
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
i--
|
2020-05-19 13:17:29 -07:00
|
|
|
dAtA[i] = 0x3a
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
}
|
2020-08-11 04:49:45 -07:00
|
|
|
n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.DepositEndTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.DepositEndTime):])
|
|
|
|
if err3 != nil {
|
|
|
|
return 0, err3
|
|
|
|
}
|
|
|
|
i -= n3
|
|
|
|
i = encodeVarintGov(dAtA, i, uint64(n3))
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x32
|
|
|
|
n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.SubmitTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.SubmitTime):])
|
2020-02-17 11:29:24 -08:00
|
|
|
if err4 != nil {
|
|
|
|
return 0, err4
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
2020-02-17 11:29:24 -08:00
|
|
|
i -= n4
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintGov(dAtA, i, uint64(n4))
|
2020-01-28 13:30:28 -08:00
|
|
|
i--
|
2020-05-19 13:17:29 -07:00
|
|
|
dAtA[i] = 0x2a
|
2020-01-28 13:30:28 -08:00
|
|
|
{
|
|
|
|
size, err := m.FinalTallyResult.MarshalToSizedBuffer(dAtA[:i])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintGov(dAtA, i, uint64(size))
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
i--
|
2020-05-19 13:17:29 -07:00
|
|
|
dAtA[i] = 0x22
|
2020-01-28 13:30:28 -08:00
|
|
|
if m.Status != 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintGov(dAtA, i, uint64(m.Status))
|
2020-01-28 13:30:28 -08:00
|
|
|
i--
|
2020-05-19 13:17:29 -07:00
|
|
|
dAtA[i] = 0x18
|
|
|
|
}
|
|
|
|
if m.Content != nil {
|
|
|
|
{
|
|
|
|
size, err := m.Content.MarshalToSizedBuffer(dAtA[:i])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintGov(dAtA, i, uint64(size))
|
2020-05-19 13:17:29 -07:00
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x12
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
2020-08-14 01:55:54 -07:00
|
|
|
if m.ProposalId != 0 {
|
|
|
|
i = encodeVarintGov(dAtA, i, uint64(m.ProposalId))
|
2020-01-28 13:30:28 -08:00
|
|
|
i--
|
|
|
|
dAtA[i] = 0x8
|
|
|
|
}
|
|
|
|
return len(dAtA) - i, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *TallyResult) Marshal() (dAtA []byte, err error) {
|
|
|
|
size := m.Size()
|
|
|
|
dAtA = make([]byte, size)
|
|
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return dAtA[:n], nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *TallyResult) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *TallyResult) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
{
|
|
|
|
size := m.NoWithVeto.Size()
|
|
|
|
i -= size
|
|
|
|
if _, err := m.NoWithVeto.MarshalTo(dAtA[i:]); err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintGov(dAtA, i, uint64(size))
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x22
|
|
|
|
{
|
|
|
|
size := m.No.Size()
|
|
|
|
i -= size
|
|
|
|
if _, err := m.No.MarshalTo(dAtA[i:]); err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintGov(dAtA, i, uint64(size))
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x1a
|
|
|
|
{
|
|
|
|
size := m.Abstain.Size()
|
|
|
|
i -= size
|
|
|
|
if _, err := m.Abstain.MarshalTo(dAtA[i:]); err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintGov(dAtA, i, uint64(size))
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x12
|
|
|
|
{
|
|
|
|
size := m.Yes.Size()
|
|
|
|
i -= size
|
|
|
|
if _, err := m.Yes.MarshalTo(dAtA[i:]); err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintGov(dAtA, i, uint64(size))
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0xa
|
|
|
|
return len(dAtA) - i, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Vote) Marshal() (dAtA []byte, err error) {
|
|
|
|
size := m.Size()
|
|
|
|
dAtA = make([]byte, size)
|
|
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return dAtA[:n], nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Vote) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
2020-10-30 06:14:39 -07:00
|
|
|
if len(m.Options) > 0 {
|
|
|
|
for iNdEx := len(m.Options) - 1; iNdEx >= 0; iNdEx-- {
|
2020-10-27 04:50:11 -07:00
|
|
|
{
|
2020-10-30 06:14:39 -07:00
|
|
|
size, err := m.Options[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
2020-10-27 04:50:11 -07:00
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
|
|
|
i = encodeVarintGov(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
2021-01-22 07:37:21 -08:00
|
|
|
dAtA[i] = 0x22
|
2020-10-27 02:23:15 -07:00
|
|
|
}
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if len(m.Voter) > 0 {
|
|
|
|
i -= len(m.Voter)
|
|
|
|
copy(dAtA[i:], m.Voter)
|
2020-06-18 10:04:26 -07:00
|
|
|
i = encodeVarintGov(dAtA, i, uint64(len(m.Voter)))
|
2020-01-28 13:30:28 -08:00
|
|
|
i--
|
|
|
|
dAtA[i] = 0x12
|
|
|
|
}
|
2020-08-14 01:55:54 -07:00
|
|
|
if m.ProposalId != 0 {
|
|
|
|
i = encodeVarintGov(dAtA, i, uint64(m.ProposalId))
|
2020-01-28 13:30:28 -08:00
|
|
|
i--
|
|
|
|
dAtA[i] = 0x8
|
|
|
|
}
|
|
|
|
return len(dAtA) - i, nil
|
|
|
|
}
|
|
|
|
|
2020-07-16 02:16:23 -07:00
|
|
|
func (m *DepositParams) Marshal() (dAtA []byte, err error) {
|
|
|
|
size := m.Size()
|
|
|
|
dAtA = make([]byte, size)
|
|
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return dAtA[:n], nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DepositParams) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DepositParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
2020-10-27 04:50:11 -07:00
|
|
|
n7, err7 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.MaxDepositPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxDepositPeriod):])
|
|
|
|
if err7 != nil {
|
|
|
|
return 0, err7
|
2020-07-16 02:16:23 -07:00
|
|
|
}
|
2020-10-27 04:50:11 -07:00
|
|
|
i -= n7
|
|
|
|
i = encodeVarintGov(dAtA, i, uint64(n7))
|
2020-07-16 02:16:23 -07:00
|
|
|
i--
|
|
|
|
dAtA[i] = 0x12
|
|
|
|
if len(m.MinDeposit) > 0 {
|
|
|
|
for iNdEx := len(m.MinDeposit) - 1; iNdEx >= 0; iNdEx-- {
|
|
|
|
{
|
|
|
|
size, err := m.MinDeposit[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
|
|
if err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i -= size
|
|
|
|
i = encodeVarintGov(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0xa
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return len(dAtA) - i, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *VotingParams) Marshal() (dAtA []byte, err error) {
|
|
|
|
size := m.Size()
|
|
|
|
dAtA = make([]byte, size)
|
|
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return dAtA[:n], nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *VotingParams) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *VotingParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
2020-10-27 04:50:11 -07:00
|
|
|
n8, err8 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.VotingPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.VotingPeriod):])
|
|
|
|
if err8 != nil {
|
|
|
|
return 0, err8
|
2020-07-16 02:16:23 -07:00
|
|
|
}
|
2020-10-27 04:50:11 -07:00
|
|
|
i -= n8
|
|
|
|
i = encodeVarintGov(dAtA, i, uint64(n8))
|
2020-07-16 02:16:23 -07:00
|
|
|
i--
|
|
|
|
dAtA[i] = 0xa
|
|
|
|
return len(dAtA) - i, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *TallyParams) Marshal() (dAtA []byte, err error) {
|
|
|
|
size := m.Size()
|
|
|
|
dAtA = make([]byte, size)
|
|
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return dAtA[:n], nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *TallyParams) MarshalTo(dAtA []byte) (int, error) {
|
|
|
|
size := m.Size()
|
|
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *TallyParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
|
|
i := len(dAtA)
|
|
|
|
_ = i
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
{
|
2020-08-19 00:36:41 -07:00
|
|
|
size := m.VetoThreshold.Size()
|
2020-07-16 02:16:23 -07:00
|
|
|
i -= size
|
2020-08-19 00:36:41 -07:00
|
|
|
if _, err := m.VetoThreshold.MarshalTo(dAtA[i:]); err != nil {
|
2020-07-16 02:16:23 -07:00
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i = encodeVarintGov(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x1a
|
|
|
|
{
|
|
|
|
size := m.Threshold.Size()
|
|
|
|
i -= size
|
|
|
|
if _, err := m.Threshold.MarshalTo(dAtA[i:]); err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i = encodeVarintGov(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0x12
|
|
|
|
{
|
|
|
|
size := m.Quorum.Size()
|
|
|
|
i -= size
|
|
|
|
if _, err := m.Quorum.MarshalTo(dAtA[i:]); err != nil {
|
|
|
|
return 0, err
|
|
|
|
}
|
|
|
|
i = encodeVarintGov(dAtA, i, uint64(size))
|
|
|
|
}
|
|
|
|
i--
|
|
|
|
dAtA[i] = 0xa
|
|
|
|
return len(dAtA) - i, nil
|
|
|
|
}
|
|
|
|
|
2020-06-18 10:04:26 -07:00
|
|
|
func encodeVarintGov(dAtA []byte, offset int, v uint64) int {
|
|
|
|
offset -= sovGov(v)
|
2020-01-28 13:30:28 -08:00
|
|
|
base := offset
|
|
|
|
for v >= 1<<7 {
|
|
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
|
|
v >>= 7
|
|
|
|
offset++
|
|
|
|
}
|
|
|
|
dAtA[offset] = uint8(v)
|
|
|
|
return base
|
|
|
|
}
|
2020-10-30 06:14:39 -07:00
|
|
|
func (m *WeightedVoteOption) Size() (n int) {
|
2020-10-27 04:50:11 -07:00
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if m.Option != 0 {
|
|
|
|
n += 1 + sovGov(uint64(m.Option))
|
|
|
|
}
|
2020-10-30 06:14:39 -07:00
|
|
|
l = m.Weight.Size()
|
2020-10-27 04:50:11 -07:00
|
|
|
n += 1 + l + sovGov(uint64(l))
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
2020-01-28 13:30:28 -08:00
|
|
|
func (m *TextProposal) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
l = len(m.Title)
|
|
|
|
if l > 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovGov(uint64(l))
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
l = len(m.Description)
|
|
|
|
if l > 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovGov(uint64(l))
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Deposit) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
2020-08-14 01:55:54 -07:00
|
|
|
if m.ProposalId != 0 {
|
|
|
|
n += 1 + sovGov(uint64(m.ProposalId))
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
l = len(m.Depositor)
|
|
|
|
if l > 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovGov(uint64(l))
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if len(m.Amount) > 0 {
|
|
|
|
for _, e := range m.Amount {
|
|
|
|
l = e.Size()
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovGov(uint64(l))
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
2020-05-19 13:17:29 -07:00
|
|
|
func (m *Proposal) Size() (n int) {
|
2020-01-28 13:30:28 -08:00
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
2020-08-14 01:55:54 -07:00
|
|
|
if m.ProposalId != 0 {
|
|
|
|
n += 1 + sovGov(uint64(m.ProposalId))
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
2020-05-19 13:17:29 -07:00
|
|
|
if m.Content != nil {
|
|
|
|
l = m.Content.Size()
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovGov(uint64(l))
|
2020-05-19 13:17:29 -07:00
|
|
|
}
|
2020-01-28 13:30:28 -08:00
|
|
|
if m.Status != 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + sovGov(uint64(m.Status))
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
l = m.FinalTallyResult.Size()
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovGov(uint64(l))
|
2020-01-28 13:30:28 -08:00
|
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.SubmitTime)
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovGov(uint64(l))
|
2020-01-28 13:30:28 -08:00
|
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.DepositEndTime)
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovGov(uint64(l))
|
2020-01-28 13:30:28 -08:00
|
|
|
if len(m.TotalDeposit) > 0 {
|
|
|
|
for _, e := range m.TotalDeposit {
|
|
|
|
l = e.Size()
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovGov(uint64(l))
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.VotingStartTime)
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovGov(uint64(l))
|
2020-01-28 13:30:28 -08:00
|
|
|
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.VotingEndTime)
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovGov(uint64(l))
|
2020-01-28 13:30:28 -08:00
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *TallyResult) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
l = m.Yes.Size()
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovGov(uint64(l))
|
2020-01-28 13:30:28 -08:00
|
|
|
l = m.Abstain.Size()
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovGov(uint64(l))
|
2020-01-28 13:30:28 -08:00
|
|
|
l = m.No.Size()
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovGov(uint64(l))
|
2020-01-28 13:30:28 -08:00
|
|
|
l = m.NoWithVeto.Size()
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovGov(uint64(l))
|
2020-01-28 13:30:28 -08:00
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Vote) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
2020-08-14 01:55:54 -07:00
|
|
|
if m.ProposalId != 0 {
|
|
|
|
n += 1 + sovGov(uint64(m.ProposalId))
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
l = len(m.Voter)
|
|
|
|
if l > 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
n += 1 + l + sovGov(uint64(l))
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
2020-10-30 06:14:39 -07:00
|
|
|
if len(m.Options) > 0 {
|
|
|
|
for _, e := range m.Options {
|
2020-10-27 04:50:11 -07:00
|
|
|
l = e.Size()
|
|
|
|
n += 1 + l + sovGov(uint64(l))
|
2020-10-27 02:23:15 -07:00
|
|
|
}
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
2020-07-16 02:16:23 -07:00
|
|
|
func (m *DepositParams) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
if len(m.MinDeposit) > 0 {
|
|
|
|
for _, e := range m.MinDeposit {
|
|
|
|
l = e.Size()
|
|
|
|
n += 1 + l + sovGov(uint64(l))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxDepositPeriod)
|
|
|
|
n += 1 + l + sovGov(uint64(l))
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *VotingParams) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.VotingPeriod)
|
|
|
|
n += 1 + l + sovGov(uint64(l))
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *TallyParams) Size() (n int) {
|
|
|
|
if m == nil {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
var l int
|
|
|
|
_ = l
|
|
|
|
l = m.Quorum.Size()
|
|
|
|
n += 1 + l + sovGov(uint64(l))
|
|
|
|
l = m.Threshold.Size()
|
|
|
|
n += 1 + l + sovGov(uint64(l))
|
2020-08-19 00:36:41 -07:00
|
|
|
l = m.VetoThreshold.Size()
|
2020-07-16 02:16:23 -07:00
|
|
|
n += 1 + l + sovGov(uint64(l))
|
|
|
|
return n
|
|
|
|
}
|
|
|
|
|
2020-06-18 10:04:26 -07:00
|
|
|
func sovGov(x uint64) (n int) {
|
2020-01-28 13:30:28 -08:00
|
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
|
|
}
|
2020-06-18 10:04:26 -07:00
|
|
|
func sozGov(x uint64) (n int) {
|
|
|
|
return sovGov(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
2020-10-30 06:14:39 -07:00
|
|
|
func (m *WeightedVoteOption) Unmarshal(dAtA []byte) error {
|
2020-10-27 04:50:11 -07:00
|
|
|
l := len(dAtA)
|
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowGov
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
wire |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fieldNum := int32(wire >> 3)
|
|
|
|
wireType := int(wire & 0x7)
|
|
|
|
if wireType == 4 {
|
2020-10-30 06:14:39 -07:00
|
|
|
return fmt.Errorf("proto: WeightedVoteOption: wiretype end group for non-group")
|
2020-10-27 04:50:11 -07:00
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
2020-10-30 06:14:39 -07:00
|
|
|
return fmt.Errorf("proto: WeightedVoteOption: illegal tag %d (wire type %d)", fieldNum, wire)
|
2020-10-27 04:50:11 -07:00
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Option", wireType)
|
|
|
|
}
|
|
|
|
m.Option = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowGov
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
m.Option |= VoteOption(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
2020-10-30 06:14:39 -07:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType)
|
2020-10-27 04:50:11 -07:00
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowGov
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
|
|
|
return ErrInvalidLengthGov
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex < 0 {
|
|
|
|
return ErrInvalidLengthGov
|
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2020-10-30 06:14:39 -07:00
|
|
|
if err := m.Weight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
2020-10-27 04:50:11 -07:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
|
|
|
skippy, err := skipGov(dAtA[iNdEx:])
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2021-01-22 07:37:21 -08:00
|
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
2020-10-27 04:50:11 -07:00
|
|
|
return ErrInvalidLengthGov
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
2020-01-28 13:30:28 -08:00
|
|
|
func (m *TextProposal) Unmarshal(dAtA []byte) error {
|
|
|
|
l := len(dAtA)
|
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
wire |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fieldNum := int32(wire >> 3)
|
|
|
|
wireType := int(wire & 0x7)
|
|
|
|
if wireType == 4 {
|
|
|
|
return fmt.Errorf("proto: TextProposal: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: TextProposal: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Title = string(dAtA[iNdEx:postIndex])
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
|
|
|
|
}
|
|
|
|
var stringLen uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
postIndex := iNdEx + intStringLen
|
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
m.Description = string(dAtA[iNdEx:postIndex])
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
2020-06-18 10:04:26 -07:00
|
|
|
skippy, err := skipGov(dAtA[iNdEx:])
|
2020-01-28 13:30:28 -08:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2021-01-15 11:45:34 -08:00
|
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func (m *Deposit) Unmarshal(dAtA []byte) error {
|
|
|
|
l := len(dAtA)
|
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
wire |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fieldNum := int32(wire >> 3)
|
|
|
|
wireType := int(wire & 0x7)
|
|
|
|
if wireType == 4 {
|
|
|
|
return fmt.Errorf("proto: Deposit: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: Deposit: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 0 {
|
2020-08-14 01:55:54 -07:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType)
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
2020-08-14 01:55:54 -07:00
|
|
|
m.ProposalId = 0
|
2020-01-28 13:30:28 -08:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
2020-08-14 01:55:54 -07:00
|
|
|
m.ProposalId |= uint64(b&0x7F) << shift
|
2020-01-28 13:30:28 -08:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType)
|
|
|
|
}
|
2020-09-25 03:25:37 -07:00
|
|
|
var stringLen uint64
|
2020-01-28 13:30:28 -08:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
2020-09-25 03:25:37 -07:00
|
|
|
stringLen |= uint64(b&0x7F) << shift
|
2020-01-28 13:30:28 -08:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2020-09-25 03:25:37 -07:00
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
2020-09-25 03:25:37 -07:00
|
|
|
postIndex := iNdEx + intStringLen
|
2020-01-28 13:30:28 -08:00
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2020-09-25 03:25:37 -07:00
|
|
|
m.Depositor = string(dAtA[iNdEx:postIndex])
|
2020-01-28 13:30:28 -08:00
|
|
|
iNdEx = postIndex
|
|
|
|
case 3:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
msglen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2020-08-11 04:49:45 -07:00
|
|
|
m.Amount = append(m.Amount, types.Coin{})
|
2020-01-28 13:30:28 -08:00
|
|
|
if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
2020-06-18 10:04:26 -07:00
|
|
|
skippy, err := skipGov(dAtA[iNdEx:])
|
2020-01-28 13:30:28 -08:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2021-01-15 11:45:34 -08:00
|
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
2020-05-19 13:17:29 -07:00
|
|
|
func (m *Proposal) Unmarshal(dAtA []byte) error {
|
2020-01-28 13:30:28 -08:00
|
|
|
l := len(dAtA)
|
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
wire |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fieldNum := int32(wire >> 3)
|
|
|
|
wireType := int(wire & 0x7)
|
|
|
|
if wireType == 4 {
|
2020-05-19 13:17:29 -07:00
|
|
|
return fmt.Errorf("proto: Proposal: wiretype end group for non-group")
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
2020-05-19 13:17:29 -07:00
|
|
|
return fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire)
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 0 {
|
2020-08-14 01:55:54 -07:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType)
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
2020-08-14 01:55:54 -07:00
|
|
|
m.ProposalId = 0
|
2020-01-28 13:30:28 -08:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
2020-08-14 01:55:54 -07:00
|
|
|
m.ProposalId |= uint64(b&0x7F) << shift
|
2020-01-28 13:30:28 -08:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 2:
|
2020-05-19 13:17:29 -07:00
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-05-19 13:17:29 -07:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
msglen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-05-19 13:17:29 -07:00
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-05-19 13:17:29 -07:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if m.Content == nil {
|
2020-08-11 04:49:45 -07:00
|
|
|
m.Content = &types1.Any{}
|
2020-05-19 13:17:29 -07:00
|
|
|
}
|
|
|
|
if err := m.Content.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 3:
|
2020-01-28 13:30:28 -08:00
|
|
|
if wireType != 0 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
|
|
|
|
}
|
|
|
|
m.Status = 0
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
m.Status |= ProposalStatus(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2020-05-19 13:17:29 -07:00
|
|
|
case 4:
|
2020-01-28 13:30:28 -08:00
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field FinalTallyResult", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
msglen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if err := m.FinalTallyResult.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
2020-05-19 13:17:29 -07:00
|
|
|
case 5:
|
2020-01-28 13:30:28 -08:00
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field SubmitTime", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
msglen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.SubmitTime, dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
2020-05-19 13:17:29 -07:00
|
|
|
case 6:
|
2020-01-28 13:30:28 -08:00
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field DepositEndTime", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
msglen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.DepositEndTime, dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
2020-05-19 13:17:29 -07:00
|
|
|
case 7:
|
2020-01-28 13:30:28 -08:00
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field TotalDeposit", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
msglen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2020-08-11 04:49:45 -07:00
|
|
|
m.TotalDeposit = append(m.TotalDeposit, types.Coin{})
|
2020-01-28 13:30:28 -08:00
|
|
|
if err := m.TotalDeposit[len(m.TotalDeposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
2020-05-19 13:17:29 -07:00
|
|
|
case 8:
|
2020-01-28 13:30:28 -08:00
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field VotingStartTime", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
msglen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.VotingStartTime, dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
2020-05-19 13:17:29 -07:00
|
|
|
case 9:
|
2020-01-28 13:30:28 -08:00
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field VotingEndTime", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
msglen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.VotingEndTime, dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
2020-06-18 10:04:26 -07:00
|
|
|
skippy, err := skipGov(dAtA[iNdEx:])
|
2020-01-28 13:30:28 -08:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2021-01-15 11:45:34 -08:00
|
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func (m *TallyResult) Unmarshal(dAtA []byte) error {
|
|
|
|
l := len(dAtA)
|
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
wire |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fieldNum := int32(wire >> 3)
|
|
|
|
wireType := int(wire & 0x7)
|
|
|
|
if wireType == 4 {
|
|
|
|
return fmt.Errorf("proto: TallyResult: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: TallyResult: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Yes", wireType)
|
|
|
|
}
|
2020-03-02 06:14:17 -08:00
|
|
|
var stringLen uint64
|
2020-01-28 13:30:28 -08:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
2020-03-02 06:14:17 -08:00
|
|
|
stringLen |= uint64(b&0x7F) << shift
|
2020-01-28 13:30:28 -08:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2020-03-02 06:14:17 -08:00
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
2020-03-02 06:14:17 -08:00
|
|
|
postIndex := iNdEx + intStringLen
|
2020-01-28 13:30:28 -08:00
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if err := m.Yes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Abstain", wireType)
|
|
|
|
}
|
2020-03-02 06:14:17 -08:00
|
|
|
var stringLen uint64
|
2020-01-28 13:30:28 -08:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
2020-03-02 06:14:17 -08:00
|
|
|
stringLen |= uint64(b&0x7F) << shift
|
2020-01-28 13:30:28 -08:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2020-03-02 06:14:17 -08:00
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
2020-03-02 06:14:17 -08:00
|
|
|
postIndex := iNdEx + intStringLen
|
2020-01-28 13:30:28 -08:00
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if err := m.Abstain.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 3:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field No", wireType)
|
|
|
|
}
|
2020-03-02 06:14:17 -08:00
|
|
|
var stringLen uint64
|
2020-01-28 13:30:28 -08:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
2020-03-02 06:14:17 -08:00
|
|
|
stringLen |= uint64(b&0x7F) << shift
|
2020-01-28 13:30:28 -08:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2020-03-02 06:14:17 -08:00
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
2020-03-02 06:14:17 -08:00
|
|
|
postIndex := iNdEx + intStringLen
|
2020-01-28 13:30:28 -08:00
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if err := m.No.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 4:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field NoWithVeto", wireType)
|
|
|
|
}
|
2020-03-02 06:14:17 -08:00
|
|
|
var stringLen uint64
|
2020-01-28 13:30:28 -08:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
2020-03-02 06:14:17 -08:00
|
|
|
stringLen |= uint64(b&0x7F) << shift
|
2020-01-28 13:30:28 -08:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2020-03-02 06:14:17 -08:00
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
2020-03-02 06:14:17 -08:00
|
|
|
postIndex := iNdEx + intStringLen
|
2020-01-28 13:30:28 -08:00
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if err := m.NoWithVeto.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
2020-06-18 10:04:26 -07:00
|
|
|
skippy, err := skipGov(dAtA[iNdEx:])
|
2020-01-28 13:30:28 -08:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2021-01-15 11:45:34 -08:00
|
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func (m *Vote) Unmarshal(dAtA []byte) error {
|
|
|
|
l := len(dAtA)
|
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
wire |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fieldNum := int32(wire >> 3)
|
|
|
|
wireType := int(wire & 0x7)
|
|
|
|
if wireType == 4 {
|
|
|
|
return fmt.Errorf("proto: Vote: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 0 {
|
2020-08-14 01:55:54 -07:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType)
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
2020-08-14 01:55:54 -07:00
|
|
|
m.ProposalId = 0
|
2020-01-28 13:30:28 -08:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
2020-08-14 01:55:54 -07:00
|
|
|
m.ProposalId |= uint64(b&0x7F) << shift
|
2020-01-28 13:30:28 -08:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType)
|
|
|
|
}
|
2020-09-25 03:25:37 -07:00
|
|
|
var stringLen uint64
|
2020-01-28 13:30:28 -08:00
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
2020-09-25 03:25:37 -07:00
|
|
|
stringLen |= uint64(b&0x7F) << shift
|
2020-01-28 13:30:28 -08:00
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2020-09-25 03:25:37 -07:00
|
|
|
intStringLen := int(stringLen)
|
|
|
|
if intStringLen < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
2020-09-25 03:25:37 -07:00
|
|
|
postIndex := iNdEx + intStringLen
|
2020-01-28 13:30:28 -08:00
|
|
|
if postIndex < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2020-09-25 03:25:37 -07:00
|
|
|
m.Voter = string(dAtA[iNdEx:postIndex])
|
2020-01-28 13:30:28 -08:00
|
|
|
iNdEx = postIndex
|
2021-01-22 07:37:21 -08:00
|
|
|
case 4:
|
2020-10-27 04:50:11 -07:00
|
|
|
if wireType != 2 {
|
2020-10-30 06:14:39 -07:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
|
2020-10-27 04:50:11 -07:00
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowGov
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
2020-01-28 13:30:28 -08:00
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2020-10-27 04:50:11 -07:00
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
msglen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
2020-10-27 04:50:11 -07:00
|
|
|
if msglen < 0 {
|
|
|
|
return ErrInvalidLengthGov
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex < 0 {
|
|
|
|
return ErrInvalidLengthGov
|
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2020-10-30 06:14:39 -07:00
|
|
|
m.Options = append(m.Options, WeightedVoteOption{})
|
|
|
|
if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
2020-10-27 04:50:11 -07:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
2020-01-28 13:30:28 -08:00
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
2020-06-18 10:04:26 -07:00
|
|
|
skippy, err := skipGov(dAtA[iNdEx:])
|
2020-01-28 13:30:28 -08:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2021-01-15 11:45:34 -08:00
|
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
2020-07-16 02:16:23 -07:00
|
|
|
func (m *DepositParams) Unmarshal(dAtA []byte) error {
|
|
|
|
l := len(dAtA)
|
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowGov
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
wire |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fieldNum := int32(wire >> 3)
|
|
|
|
wireType := int(wire & 0x7)
|
|
|
|
if wireType == 4 {
|
|
|
|
return fmt.Errorf("proto: DepositParams: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: DepositParams: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field MinDeposit", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowGov
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
msglen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
|
|
|
return ErrInvalidLengthGov
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex < 0 {
|
|
|
|
return ErrInvalidLengthGov
|
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2020-08-11 04:49:45 -07:00
|
|
|
m.MinDeposit = append(m.MinDeposit, types.Coin{})
|
2020-07-16 02:16:23 -07:00
|
|
|
if err := m.MinDeposit[len(m.MinDeposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field MaxDepositPeriod", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowGov
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
msglen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
|
|
|
return ErrInvalidLengthGov
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex < 0 {
|
|
|
|
return ErrInvalidLengthGov
|
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.MaxDepositPeriod, dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
|
|
|
skippy, err := skipGov(dAtA[iNdEx:])
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2021-01-15 11:45:34 -08:00
|
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
2020-07-16 02:16:23 -07:00
|
|
|
return ErrInvalidLengthGov
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func (m *VotingParams) Unmarshal(dAtA []byte) error {
|
|
|
|
l := len(dAtA)
|
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowGov
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
wire |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fieldNum := int32(wire >> 3)
|
|
|
|
wireType := int(wire & 0x7)
|
|
|
|
if wireType == 4 {
|
|
|
|
return fmt.Errorf("proto: VotingParams: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: VotingParams: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field VotingPeriod", wireType)
|
|
|
|
}
|
|
|
|
var msglen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowGov
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
msglen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if msglen < 0 {
|
|
|
|
return ErrInvalidLengthGov
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + msglen
|
|
|
|
if postIndex < 0 {
|
|
|
|
return ErrInvalidLengthGov
|
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.VotingPeriod, dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
|
|
|
skippy, err := skipGov(dAtA[iNdEx:])
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2021-01-15 11:45:34 -08:00
|
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
2020-07-16 02:16:23 -07:00
|
|
|
return ErrInvalidLengthGov
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func (m *TallyParams) Unmarshal(dAtA []byte) error {
|
|
|
|
l := len(dAtA)
|
|
|
|
iNdEx := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
preIndex := iNdEx
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowGov
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
wire |= uint64(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fieldNum := int32(wire >> 3)
|
|
|
|
wireType := int(wire & 0x7)
|
|
|
|
if wireType == 4 {
|
|
|
|
return fmt.Errorf("proto: TallyParams: wiretype end group for non-group")
|
|
|
|
}
|
|
|
|
if fieldNum <= 0 {
|
|
|
|
return fmt.Errorf("proto: TallyParams: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
|
|
}
|
|
|
|
switch fieldNum {
|
|
|
|
case 1:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Quorum", wireType)
|
|
|
|
}
|
|
|
|
var byteLen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowGov
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
byteLen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if byteLen < 0 {
|
|
|
|
return ErrInvalidLengthGov
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + byteLen
|
|
|
|
if postIndex < 0 {
|
|
|
|
return ErrInvalidLengthGov
|
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if err := m.Quorum.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 2:
|
|
|
|
if wireType != 2 {
|
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType)
|
|
|
|
}
|
|
|
|
var byteLen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowGov
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
byteLen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if byteLen < 0 {
|
|
|
|
return ErrInvalidLengthGov
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + byteLen
|
|
|
|
if postIndex < 0 {
|
|
|
|
return ErrInvalidLengthGov
|
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
if err := m.Threshold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
case 3:
|
|
|
|
if wireType != 2 {
|
2020-08-19 00:36:41 -07:00
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field VetoThreshold", wireType)
|
2020-07-16 02:16:23 -07:00
|
|
|
}
|
|
|
|
var byteLen int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
|
|
|
return ErrIntOverflowGov
|
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
byteLen |= int(b&0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if byteLen < 0 {
|
|
|
|
return ErrInvalidLengthGov
|
|
|
|
}
|
|
|
|
postIndex := iNdEx + byteLen
|
|
|
|
if postIndex < 0 {
|
|
|
|
return ErrInvalidLengthGov
|
|
|
|
}
|
|
|
|
if postIndex > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
2020-08-19 00:36:41 -07:00
|
|
|
if err := m.VetoThreshold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
2020-07-16 02:16:23 -07:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
iNdEx = postIndex
|
|
|
|
default:
|
|
|
|
iNdEx = preIndex
|
|
|
|
skippy, err := skipGov(dAtA[iNdEx:])
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2021-01-15 11:45:34 -08:00
|
|
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
2020-07-16 02:16:23 -07:00
|
|
|
return ErrInvalidLengthGov
|
|
|
|
}
|
|
|
|
if (iNdEx + skippy) > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx += skippy
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if iNdEx > l {
|
|
|
|
return io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
2020-06-18 10:04:26 -07:00
|
|
|
func skipGov(dAtA []byte) (n int, err error) {
|
2020-01-28 13:30:28 -08:00
|
|
|
l := len(dAtA)
|
|
|
|
iNdEx := 0
|
|
|
|
depth := 0
|
|
|
|
for iNdEx < l {
|
|
|
|
var wire uint64
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return 0, ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
wireType := int(wire & 0x7)
|
|
|
|
switch wireType {
|
|
|
|
case 0:
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return 0, ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
iNdEx++
|
|
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case 1:
|
|
|
|
iNdEx += 8
|
|
|
|
case 2:
|
|
|
|
var length int
|
|
|
|
for shift := uint(0); ; shift += 7 {
|
|
|
|
if shift >= 64 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return 0, ErrIntOverflowGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if iNdEx >= l {
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
b := dAtA[iNdEx]
|
|
|
|
iNdEx++
|
|
|
|
length |= (int(b) & 0x7F) << shift
|
|
|
|
if b < 0x80 {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if length < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return 0, ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
iNdEx += length
|
|
|
|
case 3:
|
|
|
|
depth++
|
|
|
|
case 4:
|
|
|
|
if depth == 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return 0, ErrUnexpectedEndOfGroupGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
depth--
|
|
|
|
case 5:
|
|
|
|
iNdEx += 4
|
|
|
|
default:
|
|
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
|
|
}
|
|
|
|
if iNdEx < 0 {
|
2020-06-18 10:04:26 -07:00
|
|
|
return 0, ErrInvalidLengthGov
|
2020-01-28 13:30:28 -08:00
|
|
|
}
|
|
|
|
if depth == 0 {
|
|
|
|
return iNdEx, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0, io.ErrUnexpectedEOF
|
|
|
|
}
|
|
|
|
|
|
|
|
var (
|
2020-06-18 10:04:26 -07:00
|
|
|
ErrInvalidLengthGov = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
|
|
ErrIntOverflowGov = fmt.Errorf("proto: integer overflow")
|
|
|
|
ErrUnexpectedEndOfGroupGov = fmt.Errorf("proto: unexpected end of group")
|
2020-01-28 13:30:28 -08:00
|
|
|
)
|