// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: x/gov/types/types.proto package types import ( 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" _ "github.com/regen-network/cosmos-proto" io "io" math "math" math_bits "math/bits" reflect "reflect" strings "strings" 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} } type MsgSubmitProposalBase struct { IntialDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=intial_deposit,json=intialDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"intial_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 // 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{1} } 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 // 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{2} } 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 // 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 type ProposalBase struct { ProposalID uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty" yaml:"proposal_id"` Status ProposalStatus `protobuf:"varint,2,opt,name=status,proto3,enum=cosmos_sdk.x.gov.v1.ProposalStatus" json:"status,omitempty"` FinalTallyResult TallyResult `protobuf:"bytes,3,opt,name=final_tally_result,json=finalTallyResult,proto3" json:"final_tally_result"` SubmitTime time.Time `protobuf:"bytes,4,opt,name=submit_time,json=submitTime,proto3,stdtime" json:"submit_time"` DepositEndTime time.Time `protobuf:"bytes,5,opt,name=deposit_end_time,json=depositEndTime,proto3,stdtime" json:"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"` VotingStartTime time.Time `protobuf:"bytes,7,opt,name=voting_start_time,json=votingStartTime,proto3,stdtime" json:"voting_start_time"` VotingEndTime time.Time `protobuf:"bytes,8,opt,name=voting_end_time,json=votingEndTime,proto3,stdtime" json:"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 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 type BasicProposal struct { *ProposalBase `protobuf:"bytes,1,opt,name=base,proto3,embedded=base" json:"base,omitempty"` Content *BasicContent `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` } func (m *BasicProposal) Reset() { *m = BasicProposal{} } func (*BasicProposal) ProtoMessage() {} func (*BasicProposal) Descriptor() ([]byte, []int) { return fileDescriptor_a5ae5e91b5b3fb03, []int{8} } func (m *BasicProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *BasicProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_BasicProposal.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 *BasicProposal) XXX_Merge(src proto.Message) { xxx_messageInfo_BasicProposal.Merge(m, src) } func (m *BasicProposal) XXX_Size() int { return m.Size() } func (m *BasicProposal) XXX_DiscardUnknown() { xxx_messageInfo_BasicProposal.DiscardUnknown(m) } var xxx_messageInfo_BasicProposal proto.InternalMessageInfo type BasicContent struct { // Types that are valid to be assigned to Sum: // *BasicContent_Text Sum isBasicContent_Sum `protobuf_oneof:"sum"` } func (m *BasicContent) Reset() { *m = BasicContent{} } func (*BasicContent) ProtoMessage() {} func (*BasicContent) Descriptor() ([]byte, []int) { return fileDescriptor_a5ae5e91b5b3fb03, []int{9} } func (m *BasicContent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *BasicContent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_BasicContent.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 *BasicContent) XXX_Merge(src proto.Message) { xxx_messageInfo_BasicContent.Merge(m, src) } func (m *BasicContent) XXX_Size() int { return m.Size() } func (m *BasicContent) XXX_DiscardUnknown() { xxx_messageInfo_BasicContent.DiscardUnknown(m) } var xxx_messageInfo_BasicContent proto.InternalMessageInfo type isBasicContent_Sum interface { isBasicContent_Sum() MarshalTo([]byte) (int, error) Size() int } type BasicContent_Text struct { Text *TextProposal `protobuf:"bytes,1,opt,name=text,proto3,oneof" json:"text,omitempty"` } func (*BasicContent_Text) isBasicContent_Sum() {} func (m *BasicContent) GetSum() isBasicContent_Sum { if m != nil { return m.Sum } return nil } func (m *BasicContent) GetText() *TextProposal { if x, ok := m.GetSum().(*BasicContent_Text); ok { return x.Text } return nil } // XXX_OneofWrappers is for the internal use of the proto package. func (*BasicContent) XXX_OneofWrappers() []interface{} { return []interface{}{ (*BasicContent_Text)(nil), } } 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((*MsgDeposit)(nil), "cosmos_sdk.x.gov.v1.MsgDeposit") proto.RegisterType((*MsgVote)(nil), "cosmos_sdk.x.gov.v1.MsgVote") 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") proto.RegisterType((*BasicProposal)(nil), "cosmos_sdk.x.gov.v1.BasicProposal") proto.RegisterType((*BasicContent)(nil), "cosmos_sdk.x.gov.v1.BasicContent") } func init() { proto.RegisterFile("x/gov/types/types.proto", fileDescriptor_a5ae5e91b5b3fb03) } var fileDescriptor_a5ae5e91b5b3fb03 = []byte{ // 1208 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0xcf, 0x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 0x23, 0xa3, 0xf1, 0x44, 0x2b, 0x46, 0x1f, 0x1e, 0xef, 0xa6, 0xd7, 0xa6, 0x1e, 0xe3, 0x5f, 0x2c, 0x57, 0xaf, 0x9a, 0x15, 0x69, 0x2e, 0xc9, 0xbf, 0xe8, 0xf8, 0x5d, 0xcf, 0xdd, 0xdf, 0xae, 0x51, 0x7b, 0xf0, 0x44, 0x11, 0x1e, 0x3d, 0x51, 0x84, 0xdb, 0xbb, 0x8a, 0xf0, 0x60, 0x57, 0x11, 0x1f, 0xee, 0x2a, 0xe2, 0x6f, 0xbb, 0x8a, 0x78, 0xe7, 0xa9, 0x22, 0x3c, 0x7c, 0xaa, 0x08, 0x8f, 0x9e, 0x2a, 0xc2, 0xc7, 0xaf, 0x4e, 0xea, 0xc4, 0xff, 0x1b, 0x9b, 0xf3, 0x2c, 0x28, 0xcf, 0xfe, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xaa, 0x0c, 0xd1, 0xcc, 0x85, 0x0c, 0x00, 0x00, } 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 (this *BasicContent) GetContent() Content { if x := this.GetText(); x != nil { return x } return nil } func (this *BasicContent) SetContent(value Content) error { if value == nil { this.Sum = nil return nil } switch vt := value.(type) { case *TextProposal: this.Sum = &BasicContent_Text{vt} return nil case TextProposal: this.Sum = &BasicContent_Text{&vt} return nil } return fmt.Errorf("can't encode value of type %T as message BasicContent", value) } 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.IntialDeposit) > 0 { for iNdEx := len(m.IntialDeposit) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.IntialDeposit[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 *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 *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 *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 (m *BasicProposal) 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 *BasicProposal) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *BasicProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Content != nil { { size, err := m.Content.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.ProposalBase != nil { { size, err := m.ProposalBase.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 *BasicContent) 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 *BasicContent) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *BasicContent) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.Sum != nil { { size := m.Sum.Size() i -= size if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { return 0, err } } } return len(dAtA) - i, nil } func (m *BasicContent_Text) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *BasicContent_Text) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.Text != nil { { size, err := m.Text.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 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.IntialDeposit) > 0 { for _, e := range m.IntialDeposit { 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 *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 *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 *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 (m *BasicProposal) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.ProposalBase != nil { l = m.ProposalBase.Size() n += 1 + l + sovTypes(uint64(l)) } if m.Content != nil { l = m.Content.Size() n += 1 + l + sovTypes(uint64(l)) } return n } func (m *BasicContent) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Sum != nil { n += m.Sum.Size() } return n } func (m *BasicContent_Text) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Text != nil { l = m.Text.Size() n += 1 + l + sovTypes(uint64(l)) } 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 (this *MsgSubmitProposalBase) String() string { if this == nil { return "nil" } repeatedStringForIntialDeposit := "[]Coin{" for _, f := range this.IntialDeposit { repeatedStringForIntialDeposit += fmt.Sprintf("%v", f) + "," } repeatedStringForIntialDeposit += "}" s := strings.Join([]string{`&MsgSubmitProposalBase{`, `IntialDeposit:` + repeatedStringForIntialDeposit + `,`, `Proposer:` + fmt.Sprintf("%v", this.Proposer) + `,`, `}`, }, "") return s } func (this *BasicContent) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&BasicContent{`, `Sum:` + fmt.Sprintf("%v", this.Sum) + `,`, `}`, }, "") return s } func (this *BasicContent_Text) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&BasicContent_Text{`, `Text:` + strings.Replace(fmt.Sprintf("%v", this.Text), "TextProposal", "TextProposal", 1) + `,`, `}`, }, "") return s } func valueToStringTypes(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } 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 IntialDeposit", 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.IntialDeposit = append(m.IntialDeposit, types.Coin{}) if err := m.IntialDeposit[len(m.IntialDeposit)-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 *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 *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 *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 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 } 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 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 } 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 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 } 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 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 } 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 (m *BasicProposal) 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: BasicProposal: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: BasicProposal: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ProposalBase", 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 m.ProposalBase == nil { m.ProposalBase = &ProposalBase{} } if err := m.ProposalBase.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: 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 { 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 m.Content == nil { m.Content = &BasicContent{} } if err := m.Content.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 *BasicContent) 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: BasicContent: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: BasicContent: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Text", 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 } v := &TextProposal{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } m.Sum = &BasicContent_Text{v} 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 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") )