// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: x/gov/types/types.proto package types import ( bytes "bytes" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" _ "github.com/golang/protobuf/ptypes/timestamp" 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 // VoteOption defines a vote option type VoteOption int32 const ( OptionEmpty VoteOption = 0 OptionYes VoteOption = 1 OptionAbstain VoteOption = 2 OptionNo VoteOption = 3 OptionNoWithVeto VoteOption = 4 ) var VoteOption_name = map[int32]string{ 0: "EMPTY", 1: "YES", 2: "ABSTAIN", 3: "NO", 4: "NO_WITH_VETO", } var VoteOption_value = map[string]int32{ "EMPTY": 0, "YES": 1, "ABSTAIN": 2, "NO": 3, "NO_WITH_VETO": 4, } func (VoteOption) EnumDescriptor() ([]byte, []int) { return fileDescriptor_a5ae5e91b5b3fb03, []int{0} } // ProposalStatus is a type alias that represents a proposal status as a byte type ProposalStatus int32 const ( StatusNil ProposalStatus = 0 StatusDepositPeriod ProposalStatus = 1 StatusVotingPeriod ProposalStatus = 2 StatusPassed ProposalStatus = 3 StatusRejected ProposalStatus = 4 StatusFailed ProposalStatus = 5 ) var ProposalStatus_name = map[int32]string{ 0: "NIL", 1: "DEPOSIT_PERIOD", 2: "VOTING_PERIOD", 3: "PASSED", 4: "REJECTED", 5: "FAILED", } var ProposalStatus_value = map[string]int32{ "NIL": 0, "DEPOSIT_PERIOD": 1, "VOTING_PERIOD": 2, "PASSED": 3, "REJECTED": 4, "FAILED": 5, } func (ProposalStatus) EnumDescriptor() ([]byte, []int) { return fileDescriptor_a5ae5e91b5b3fb03, []int{1} } // MsgSubmitProposalBase defines an sdk.Msg type that supports submitting arbitrary // proposal Content. // // Note, this message type provides the basis for which a true MsgSubmitProposal // can be constructed. Since the Content submitted in the message can be arbitrary, // assuming it fulfills the Content interface, it must be defined at the // application-level and extend MsgSubmitProposalBase. type MsgSubmitProposalBase struct { InitialDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=initial_deposit,json=initialDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"initial_deposit" yaml:"initial_deposit"` Proposer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=proposer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"proposer,omitempty"` } func (m *MsgSubmitProposalBase) Reset() { *m = MsgSubmitProposalBase{} } func (*MsgSubmitProposalBase) ProtoMessage() {} func (*MsgSubmitProposalBase) Descriptor() ([]byte, []int) { return fileDescriptor_a5ae5e91b5b3fb03, []int{0} } func (m *MsgSubmitProposalBase) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgSubmitProposalBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgSubmitProposalBase.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 *MsgSubmitProposalBase) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgSubmitProposalBase.Merge(m, src) } func (m *MsgSubmitProposalBase) XXX_Size() int { return m.Size() } func (m *MsgSubmitProposalBase) XXX_DiscardUnknown() { xxx_messageInfo_MsgSubmitProposalBase.DiscardUnknown(m) } var xxx_messageInfo_MsgSubmitProposalBase proto.InternalMessageInfo // MsgVote defines a message to cast a vote type MsgVote struct { ProposalID uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id" yaml:"proposal_id"` Voter github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=voter,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"voter,omitempty"` Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos_sdk.x.gov.v1.VoteOption" json:"option,omitempty"` } func (m *MsgVote) Reset() { *m = MsgVote{} } func (*MsgVote) ProtoMessage() {} func (*MsgVote) Descriptor() ([]byte, []int) { return fileDescriptor_a5ae5e91b5b3fb03, []int{1} } func (m *MsgVote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgVote.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 *MsgVote) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgVote.Merge(m, src) } func (m *MsgVote) XXX_Size() int { return m.Size() } func (m *MsgVote) XXX_DiscardUnknown() { xxx_messageInfo_MsgVote.DiscardUnknown(m) } var xxx_messageInfo_MsgVote proto.InternalMessageInfo // MsgDeposit defines a message to submit a deposit to an existing proposal type MsgDeposit struct { ProposalID uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id" yaml:"proposal_id"` Depositor github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=depositor,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" 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"` } func (m *MsgDeposit) Reset() { *m = MsgDeposit{} } func (*MsgDeposit) ProtoMessage() {} func (*MsgDeposit) Descriptor() ([]byte, []int) { return fileDescriptor_a5ae5e91b5b3fb03, []int{2} } func (m *MsgDeposit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MsgDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgDeposit.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 *MsgDeposit) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgDeposit.Merge(m, src) } func (m *MsgDeposit) XXX_Size() int { return m.Size() } func (m *MsgDeposit) XXX_DiscardUnknown() { xxx_messageInfo_MsgDeposit.DiscardUnknown(m) } var xxx_messageInfo_MsgDeposit proto.InternalMessageInfo // TextProposal defines a standard text proposal whose changes need to be // manually updated in case of approval 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) { return fileDescriptor_a5ae5e91b5b3fb03, []int{3} } 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 // Deposit defines an amount deposited by an account address to an active proposal type Deposit struct { ProposalID uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty" yaml:"proposal_id"` Depositor github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=depositor,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" 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"` } func (m *Deposit) Reset() { *m = Deposit{} } func (*Deposit) ProtoMessage() {} func (*Deposit) Descriptor() ([]byte, []int) { return fileDescriptor_a5ae5e91b5b3fb03, []int{4} } 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 // ProposalBase defines the core field members of a governance proposal. It includes // all static fields (i.e fields excluding the dynamic Content). A full proposal // extends the ProposalBase with Content. type ProposalBase struct { ProposalID uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"id" yaml:"id"` Status ProposalStatus `protobuf:"varint,2,opt,name=status,proto3,enum=cosmos_sdk.x.gov.v1.ProposalStatus" json:"status,omitempty" yaml:"proposal_status"` FinalTallyResult TallyResult `protobuf:"bytes,3,opt,name=final_tally_result,json=finalTallyResult,proto3" json:"final_tally_result" yaml:"final_tally_result"` SubmitTime time.Time `protobuf:"bytes,4,opt,name=submit_time,json=submitTime,proto3,stdtime" json:"submit_time" yaml:"submit_time"` DepositEndTime time.Time `protobuf:"bytes,5,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,6,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,7,opt,name=voting_start_time,json=votingStartTime,proto3,stdtime" json:"voting_start_time" yaml:"voting_start_time"` VotingEndTime time.Time `protobuf:"bytes,8,opt,name=voting_end_time,json=votingEndTime,proto3,stdtime" json:"voting_end_time" yaml:"voting_end_time"` } func (m *ProposalBase) Reset() { *m = ProposalBase{} } func (m *ProposalBase) String() string { return proto.CompactTextString(m) } func (*ProposalBase) ProtoMessage() {} func (*ProposalBase) Descriptor() ([]byte, []int) { return fileDescriptor_a5ae5e91b5b3fb03, []int{5} } func (m *ProposalBase) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ProposalBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ProposalBase.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 *ProposalBase) XXX_Merge(src proto.Message) { xxx_messageInfo_ProposalBase.Merge(m, src) } func (m *ProposalBase) XXX_Size() int { return m.Size() } func (m *ProposalBase) XXX_DiscardUnknown() { xxx_messageInfo_ProposalBase.DiscardUnknown(m) } var xxx_messageInfo_ProposalBase proto.InternalMessageInfo // TallyResult defines a standard tally for a proposal 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) { return fileDescriptor_a5ae5e91b5b3fb03, []int{6} } 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 // Vote defines a vote on a governance proposal. A vote corresponds to a proposal // ID, the voter, and the vote option. type Vote struct { ProposalID uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty" yaml:"proposal_id"` Voter github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=voter,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"voter,omitempty"` Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos_sdk.x.gov.v1.VoteOption" json:"option,omitempty"` } func (m *Vote) Reset() { *m = Vote{} } func (*Vote) ProtoMessage() {} func (*Vote) Descriptor() ([]byte, []int) { return fileDescriptor_a5ae5e91b5b3fb03, []int{7} } 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 func init() { proto.RegisterEnum("cosmos_sdk.x.gov.v1.VoteOption", VoteOption_name, VoteOption_value) proto.RegisterEnum("cosmos_sdk.x.gov.v1.ProposalStatus", ProposalStatus_name, ProposalStatus_value) proto.RegisterType((*MsgSubmitProposalBase)(nil), "cosmos_sdk.x.gov.v1.MsgSubmitProposalBase") proto.RegisterType((*MsgVote)(nil), "cosmos_sdk.x.gov.v1.MsgVote") proto.RegisterType((*MsgDeposit)(nil), "cosmos_sdk.x.gov.v1.MsgDeposit") proto.RegisterType((*TextProposal)(nil), "cosmos_sdk.x.gov.v1.TextProposal") proto.RegisterType((*Deposit)(nil), "cosmos_sdk.x.gov.v1.Deposit") proto.RegisterType((*ProposalBase)(nil), "cosmos_sdk.x.gov.v1.ProposalBase") proto.RegisterType((*TallyResult)(nil), "cosmos_sdk.x.gov.v1.TallyResult") proto.RegisterType((*Vote)(nil), "cosmos_sdk.x.gov.v1.Vote") } func init() { proto.RegisterFile("x/gov/types/types.proto", fileDescriptor_a5ae5e91b5b3fb03) } var fileDescriptor_a5ae5e91b5b3fb03 = []byte{ // 1185 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0xc1, 0x6b, 0xdb, 0x56, 0x18, 0x97, 0x6c, 0xc7, 0x49, 0x9e, 0x1d, 0x57, 0x7d, 0xc9, 0x5a, 0x4f, 0x0c, 0x49, 0x75, 0x4b, 0xc9, 0x3a, 0x2a, 0xaf, 0x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, 0xb6, 0x24, 0xfe, 0xe7, 0x2d, 0x89, 0x7f, 0xb8, 0x2d, 0x71, 0xcf, 0xb6, 0x25, 0xee, 0xf9, 0xb6, 0xc4, 0x7d, 0xfc, 0xf7, 0xf6, 0x37, 0xf1, 0x1f, 0xc3, 0x7a, 0x3a, 0x72, 0x98, 0xcb, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x41, 0x42, 0x32, 0xc2, 0x47, 0x0c, 0x00, 0x00, } func (this *MsgSubmitProposalBase) Equal(that interface{}) bool { if that == nil { return this == nil } that1, ok := that.(*MsgSubmitProposalBase) if !ok { that2, ok := that.(MsgSubmitProposalBase) if ok { that1 = &that2 } else { return false } } if that1 == nil { return this == nil } else if this == nil { return false } if len(this.InitialDeposit) != len(that1.InitialDeposit) { return false } for i := range this.InitialDeposit { if !this.InitialDeposit[i].Equal(&that1.InitialDeposit[i]) { return false } } if !bytes.Equal(this.Proposer, that1.Proposer) { return false } return true } func (this *MsgVote) Equal(that interface{}) bool { if that == nil { return this == nil } that1, ok := that.(*MsgVote) if !ok { that2, ok := that.(MsgVote) if ok { that1 = &that2 } else { return false } } if that1 == nil { return this == nil } else if this == nil { return false } if this.ProposalID != that1.ProposalID { return false } if !bytes.Equal(this.Voter, that1.Voter) { return false } if this.Option != that1.Option { return false } return true } func (this *MsgDeposit) Equal(that interface{}) bool { if that == nil { return this == nil } that1, ok := that.(*MsgDeposit) if !ok { that2, ok := that.(MsgDeposit) if ok { that1 = &that2 } else { return false } } if that1 == nil { return this == nil } else if this == nil { return false } if this.ProposalID != that1.ProposalID { return false } if !bytes.Equal(this.Depositor, that1.Depositor) { return false } if len(this.Amount) != len(that1.Amount) { return false } for i := range this.Amount { if !this.Amount[i].Equal(&that1.Amount[i]) { return false } } return true } 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 } func (this *Deposit) Equal(that interface{}) bool { if that == nil { return this == nil } that1, ok := that.(*Deposit) if !ok { that2, ok := that.(Deposit) if ok { that1 = &that2 } else { return false } } if that1 == nil { return this == nil } else if this == nil { return false } if this.ProposalID != that1.ProposalID { return false } if !bytes.Equal(this.Depositor, that1.Depositor) { return false } if len(this.Amount) != len(that1.Amount) { return false } for i := range this.Amount { if !this.Amount[i].Equal(&that1.Amount[i]) { return false } } return true } 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 } func (this *Vote) Equal(that interface{}) bool { if that == nil { return this == nil } that1, ok := that.(*Vote) if !ok { that2, ok := that.(Vote) if ok { that1 = &that2 } else { return false } } if that1 == nil { return this == nil } else if this == nil { return false } if this.ProposalID != that1.ProposalID { return false } if !bytes.Equal(this.Voter, that1.Voter) { return false } if this.Option != that1.Option { return false } return true } type ProposalBaseFace interface { Proto() github_com_gogo_protobuf_proto.Message GetProposalID() uint64 GetStatus() ProposalStatus GetFinalTallyResult() TallyResult GetSubmitTime() time.Time GetDepositEndTime() time.Time GetTotalDeposit() github_com_cosmos_cosmos_sdk_types.Coins GetVotingStartTime() time.Time GetVotingEndTime() time.Time } func (this *ProposalBase) Proto() github_com_gogo_protobuf_proto.Message { return this } func (this *ProposalBase) TestProto() github_com_gogo_protobuf_proto.Message { return NewProposalBaseFromFace(this) } func (this *ProposalBase) GetProposalID() uint64 { return this.ProposalID } func (this *ProposalBase) GetStatus() ProposalStatus { return this.Status } func (this *ProposalBase) GetFinalTallyResult() TallyResult { return this.FinalTallyResult } func (this *ProposalBase) GetSubmitTime() time.Time { return this.SubmitTime } func (this *ProposalBase) GetDepositEndTime() time.Time { return this.DepositEndTime } func (this *ProposalBase) GetTotalDeposit() github_com_cosmos_cosmos_sdk_types.Coins { return this.TotalDeposit } func (this *ProposalBase) GetVotingStartTime() time.Time { return this.VotingStartTime } func (this *ProposalBase) GetVotingEndTime() time.Time { return this.VotingEndTime } func NewProposalBaseFromFace(that ProposalBaseFace) *ProposalBase { this := &ProposalBase{} this.ProposalID = that.GetProposalID() this.Status = that.GetStatus() this.FinalTallyResult = that.GetFinalTallyResult() this.SubmitTime = that.GetSubmitTime() this.DepositEndTime = that.GetDepositEndTime() this.TotalDeposit = that.GetTotalDeposit() this.VotingStartTime = that.GetVotingStartTime() this.VotingEndTime = that.GetVotingEndTime() return this } func (m *MsgSubmitProposalBase) 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 *MsgSubmitProposalBase) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgSubmitProposalBase) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Proposer) > 0 { i -= len(m.Proposer) copy(dAtA[i:], m.Proposer) i = encodeVarintTypes(dAtA, i, uint64(len(m.Proposer))) i-- dAtA[i] = 0x12 } if len(m.InitialDeposit) > 0 { for iNdEx := len(m.InitialDeposit) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.InitialDeposit[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func (m *MsgVote) 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 *MsgVote) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Option != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Option)) i-- dAtA[i] = 0x18 } if len(m.Voter) > 0 { i -= len(m.Voter) copy(dAtA[i:], m.Voter) i = encodeVarintTypes(dAtA, i, uint64(len(m.Voter))) i-- dAtA[i] = 0x12 } if m.ProposalID != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.ProposalID)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *MsgDeposit) 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 *MsgDeposit) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MsgDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l 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 i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } } if len(m.Depositor) > 0 { i -= len(m.Depositor) copy(dAtA[i:], m.Depositor) i = encodeVarintTypes(dAtA, i, uint64(len(m.Depositor))) i-- dAtA[i] = 0x12 } if m.ProposalID != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.ProposalID)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *TextProposal) 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 *TextProposal) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *TextProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Description) > 0 { i -= len(m.Description) copy(dAtA[i:], m.Description) i = encodeVarintTypes(dAtA, i, uint64(len(m.Description))) i-- dAtA[i] = 0x12 } if len(m.Title) > 0 { i -= len(m.Title) copy(dAtA[i:], m.Title) i = encodeVarintTypes(dAtA, i, uint64(len(m.Title))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *Deposit) 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 *Deposit) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Deposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l 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 i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } } if len(m.Depositor) > 0 { i -= len(m.Depositor) copy(dAtA[i:], m.Depositor) i = encodeVarintTypes(dAtA, i, uint64(len(m.Depositor))) i-- dAtA[i] = 0x12 } if m.ProposalID != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.ProposalID)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *ProposalBase) 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 *ProposalBase) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ProposalBase) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l 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 } i -= n1 i = encodeVarintTypes(dAtA, i, uint64(n1)) i-- dAtA[i] = 0x42 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 } i -= n2 i = encodeVarintTypes(dAtA, i, uint64(n2)) i-- dAtA[i] = 0x3a 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 i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x32 } } 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 = encodeVarintTypes(dAtA, i, uint64(n3)) i-- dAtA[i] = 0x2a n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.SubmitTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.SubmitTime):]) if err4 != nil { return 0, err4 } i -= n4 i = encodeVarintTypes(dAtA, i, uint64(n4)) i-- dAtA[i] = 0x22 { size, err := m.FinalTallyResult.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a if m.Status != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Status)) i-- dAtA[i] = 0x10 } if m.ProposalID != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.ProposalID)) 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 } i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 { size := m.No.Size() i -= size if _, err := m.No.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a { size := m.Abstain.Size() i -= size if _, err := m.Abstain.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 { size := m.Yes.Size() i -= size if _, err := m.Yes.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintTypes(dAtA, i, uint64(size)) } 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 if m.Option != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Option)) i-- dAtA[i] = 0x18 } if len(m.Voter) > 0 { i -= len(m.Voter) copy(dAtA[i:], m.Voter) i = encodeVarintTypes(dAtA, i, uint64(len(m.Voter))) i-- dAtA[i] = 0x12 } if m.ProposalID != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.ProposalID)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { offset -= sovTypes(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *MsgSubmitProposalBase) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.InitialDeposit) > 0 { for _, e := range m.InitialDeposit { l = e.Size() n += 1 + l + sovTypes(uint64(l)) } } l = len(m.Proposer) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } return n } func (m *MsgVote) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.ProposalID != 0 { n += 1 + sovTypes(uint64(m.ProposalID)) } l = len(m.Voter) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } if m.Option != 0 { n += 1 + sovTypes(uint64(m.Option)) } return n } func (m *MsgDeposit) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.ProposalID != 0 { n += 1 + sovTypes(uint64(m.ProposalID)) } l = len(m.Depositor) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } if len(m.Amount) > 0 { for _, e := range m.Amount { l = e.Size() n += 1 + l + sovTypes(uint64(l)) } } return n } func (m *TextProposal) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Title) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } l = len(m.Description) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } return n } func (m *Deposit) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.ProposalID != 0 { n += 1 + sovTypes(uint64(m.ProposalID)) } l = len(m.Depositor) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } if len(m.Amount) > 0 { for _, e := range m.Amount { l = e.Size() n += 1 + l + sovTypes(uint64(l)) } } return n } func (m *ProposalBase) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.ProposalID != 0 { n += 1 + sovTypes(uint64(m.ProposalID)) } if m.Status != 0 { n += 1 + sovTypes(uint64(m.Status)) } l = m.FinalTallyResult.Size() n += 1 + l + sovTypes(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.SubmitTime) n += 1 + l + sovTypes(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.DepositEndTime) n += 1 + l + sovTypes(uint64(l)) if len(m.TotalDeposit) > 0 { for _, e := range m.TotalDeposit { l = e.Size() n += 1 + l + sovTypes(uint64(l)) } } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.VotingStartTime) n += 1 + l + sovTypes(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.VotingEndTime) n += 1 + l + sovTypes(uint64(l)) return n } func (m *TallyResult) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.Yes.Size() n += 1 + l + sovTypes(uint64(l)) l = m.Abstain.Size() n += 1 + l + sovTypes(uint64(l)) l = m.No.Size() n += 1 + l + sovTypes(uint64(l)) l = m.NoWithVeto.Size() n += 1 + l + sovTypes(uint64(l)) return n } func (m *Vote) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.ProposalID != 0 { n += 1 + sovTypes(uint64(m.ProposalID)) } l = len(m.Voter) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } if m.Option != 0 { n += 1 + sovTypes(uint64(m.Option)) } return n } func sovTypes(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozTypes(x uint64) (n int) { return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *MsgSubmitProposalBase) 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 ErrIntOverflowTypes } 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: MsgSubmitProposalBase: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgSubmitProposalBase: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field InitialDeposit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.InitialDeposit = append(m.InitialDeposit, types.Coin{}) if err := m.InitialDeposit[len(m.InitialDeposit)-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 Proposer", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Proposer = append(m.Proposer[:0], dAtA[iNdEx:postIndex]...) if m.Proposer == nil { m.Proposer = []byte{} } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *MsgVote) 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 ErrIntOverflowTypes } 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: MsgVote: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgVote: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ProposalID", wireType) } m.ProposalID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ProposalID |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Voter = append(m.Voter[:0], dAtA[iNdEx:postIndex]...) if m.Voter == nil { m.Voter = []byte{} } iNdEx = postIndex case 3: 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 ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Option |= VoteOption(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *MsgDeposit) 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 ErrIntOverflowTypes } 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: MsgDeposit: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MsgDeposit: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ProposalID", wireType) } m.ProposalID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ProposalID |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Depositor = append(m.Depositor[:0], dAtA[iNdEx:postIndex]...) if m.Depositor == nil { m.Depositor = []byte{} } 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 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Amount = append(m.Amount, types.Coin{}) if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } 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 { return ErrIntOverflowTypes } 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 { return ErrIntOverflowTypes } 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 ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } 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 { return ErrIntOverflowTypes } 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 ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Description = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } 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 { return ErrIntOverflowTypes } 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 { return fmt.Errorf("proto: wrong wireType = %d for field ProposalID", wireType) } m.ProposalID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ProposalID |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Depositor = append(m.Depositor[:0], dAtA[iNdEx:postIndex]...) if m.Depositor == nil { m.Depositor = []byte{} } 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 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Amount = append(m.Amount, types.Coin{}) if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *ProposalBase) 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 ErrIntOverflowTypes } 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: ProposalBase: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ProposalBase: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ProposalID", wireType) } m.ProposalID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ProposalID |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: 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 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Status |= ProposalStatus(b&0x7F) << shift if b < 0x80 { break } } case 3: 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 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.FinalTallyResult.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: 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 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } 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 case 5: 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 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } 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 case 6: 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 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.TotalDeposit = append(m.TotalDeposit, types.Coin{}) if err := m.TotalDeposit[len(m.TotalDeposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 7: 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 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } 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 case 8: 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 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTypes } 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 skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } 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 { return ErrIntOverflowTypes } 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) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } 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 ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } 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) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } 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 ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } 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) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } 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 ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } 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) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } 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 ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.NoWithVeto.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } 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 { return ErrIntOverflowTypes } 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 { return fmt.Errorf("proto: wrong wireType = %d for field ProposalID", wireType) } m.ProposalID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ProposalID |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthTypes } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF } m.Voter = append(m.Voter[:0], dAtA[iNdEx:postIndex]...) if m.Voter == nil { m.Voter = []byte{} } iNdEx = postIndex case 3: 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 ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Option |= VoteOption(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) < 0 { return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowTypes } 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 { return 0, ErrIntOverflowTypes } 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 { return 0, ErrIntOverflowTypes } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if length < 0 { return 0, ErrInvalidLengthTypes } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupTypes } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthTypes } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") )