cosmos-sdk/x/gov/types/tx.pb.go

1026 lines
25 KiB
Go

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: cosmos/gov/v1beta1/tx.proto
package types
import (
bytes "bytes"
fmt "fmt"
types "github.com/cosmos/cosmos-sdk/codec/types"
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
types1 "github.com/cosmos/cosmos-sdk/types"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
_ "github.com/regen-network/cosmos-proto"
io "io"
math "math"
math_bits "math/bits"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// 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
// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary
// proposal Content.
type MsgSubmitProposal struct {
Content *types.Any `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
InitialDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,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,3,opt,name=proposer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"proposer,omitempty"`
}
func (m *MsgSubmitProposal) Reset() { *m = MsgSubmitProposal{} }
func (*MsgSubmitProposal) ProtoMessage() {}
func (*MsgSubmitProposal) Descriptor() ([]byte, []int) {
return fileDescriptor_3c053992595e3dce, []int{0}
}
func (m *MsgSubmitProposal) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *MsgSubmitProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_MsgSubmitProposal.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 *MsgSubmitProposal) XXX_Merge(src proto.Message) {
xxx_messageInfo_MsgSubmitProposal.Merge(m, src)
}
func (m *MsgSubmitProposal) XXX_Size() int {
return m.Size()
}
func (m *MsgSubmitProposal) XXX_DiscardUnknown() {
xxx_messageInfo_MsgSubmitProposal.DiscardUnknown(m)
}
var xxx_messageInfo_MsgSubmitProposal 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.gov.v1beta1.VoteOption" json:"option,omitempty"`
}
func (m *MsgVote) Reset() { *m = MsgVote{} }
func (*MsgVote) ProtoMessage() {}
func (*MsgVote) Descriptor() ([]byte, []int) {
return fileDescriptor_3c053992595e3dce, []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_3c053992595e3dce, []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
func init() {
proto.RegisterType((*MsgSubmitProposal)(nil), "cosmos.gov.v1beta1.MsgSubmitProposal")
proto.RegisterType((*MsgVote)(nil), "cosmos.gov.v1beta1.MsgVote")
proto.RegisterType((*MsgDeposit)(nil), "cosmos.gov.v1beta1.MsgDeposit")
}
func init() { proto.RegisterFile("cosmos/gov/v1beta1/tx.proto", fileDescriptor_3c053992595e3dce) }
var fileDescriptor_3c053992595e3dce = []byte{
// 518 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 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x74, 0x37, 0xc6, 0x77, 0xd0, 0x7f, 0x53,
0x50, 0x6c, 0x5c, 0x2d, 0xfc, 0xe9, 0x94, 0x86, 0x8f, 0x6f, 0xa0, 0x12, 0xa4, 0x4a, 0x40, 0xa2,
0xfd, 0x6e, 0xb6, 0x09, 0xfd, 0x76, 0x09, 0x69, 0x36, 0xfa, 0xbe, 0xee, 0xea, 0xdb, 0x6e, 0x6b,
0xed, 0xb0, 0x80, 0x50, 0x4f, 0xf2, 0x3c, 0xbe, 0x7f, 0xe5, 0x6e, 0x1f, 0x9d, 0xb3, 0xbf, 0x13,
0xfe, 0xc2, 0xe1, 0x17, 0x0d, 0x1c, 0xa1, 0x52, 0x30, 0x82, 0x49, 0xa2, 0xaa, 0xc5, 0x9f, 0xad,
0xd7, 0xb5, 0x6c, 0xbd, 0x7e, 0x6b, 0x89, 0xac, 0xb4, 0x89, 0xa4, 0x7b, 0x7f, 0x7e, 0x4c, 0x9c,
0xc5, 0x31, 0x71, 0x9e, 0xaf, 0x88, 0x33, 0x5f, 0x11, 0xf7, 0x68, 0x45, 0xdc, 0xf7, 0x2b, 0xe2,
0x1e, 0xae, 0x89, 0x73, 0xb4, 0x26, 0xce, 0x62, 0x4d, 0x9c, 0xc7, 0x3f, 0x56, 0x3f, 0xd0, 0xd7,
0x59, 0x7f, 0x23, 0x2c, 0xe9, 0x7b, 0x74, 0xfd, 0x73, 0x00, 0x00, 0x00, 0xff, 0xff, 0x56, 0x71,
0x86, 0xf1, 0x3a, 0x04, 0x00, 0x00,
}
func (this *MsgSubmitProposal) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*MsgSubmitProposal)
if !ok {
that2, ok := that.(MsgSubmitProposal)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if !this.Content.Equal(that1.Content) {
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 (m *MsgSubmitProposal) 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 *MsgSubmitProposal) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *MsgSubmitProposal) 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 = encodeVarintTx(dAtA, i, uint64(len(m.Proposer)))
i--
dAtA[i] = 0x1a
}
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 = encodeVarintTx(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
}
if m.Content != nil {
{
size, err := m.Content.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintTx(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 = encodeVarintTx(dAtA, i, uint64(m.Option))
i--
dAtA[i] = 0x18
}
if len(m.Voter) > 0 {
i -= len(m.Voter)
copy(dAtA[i:], m.Voter)
i = encodeVarintTx(dAtA, i, uint64(len(m.Voter)))
i--
dAtA[i] = 0x12
}
if m.ProposalId != 0 {
i = encodeVarintTx(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 = encodeVarintTx(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
}
if len(m.Depositor) > 0 {
i -= len(m.Depositor)
copy(dAtA[i:], m.Depositor)
i = encodeVarintTx(dAtA, i, uint64(len(m.Depositor)))
i--
dAtA[i] = 0x12
}
if m.ProposalId != 0 {
i = encodeVarintTx(dAtA, i, uint64(m.ProposalId))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
offset -= sovTx(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *MsgSubmitProposal) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Content != nil {
l = m.Content.Size()
n += 1 + l + sovTx(uint64(l))
}
if len(m.InitialDeposit) > 0 {
for _, e := range m.InitialDeposit {
l = e.Size()
n += 1 + l + sovTx(uint64(l))
}
}
l = len(m.Proposer)
if l > 0 {
n += 1 + l + sovTx(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 + sovTx(uint64(m.ProposalId))
}
l = len(m.Voter)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
if m.Option != 0 {
n += 1 + sovTx(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 + sovTx(uint64(m.ProposalId))
}
l = len(m.Depositor)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
if len(m.Amount) > 0 {
for _, e := range m.Amount {
l = e.Size()
n += 1 + l + sovTx(uint64(l))
}
}
return n
}
func sovTx(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozTx(x uint64) (n int) {
return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *MsgSubmitProposal) 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 ErrIntOverflowTx
}
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: MsgSubmitProposal: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MsgSubmitProposal: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
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 ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTx
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthTx
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Content == nil {
m.Content = &types.Any{}
}
if err := m.Content.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
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 ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTx
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthTx
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.InitialDeposit = append(m.InitialDeposit, types1.Coin{})
if err := m.InitialDeposit[len(m.InitialDeposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
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 ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTx
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthTx
}
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 := skipTx(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTx
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthTx
}
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 ErrIntOverflowTx
}
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 ErrIntOverflowTx
}
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 ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTx
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthTx
}
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 ErrIntOverflowTx
}
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 := skipTx(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTx
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthTx
}
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 ErrIntOverflowTx
}
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 ErrIntOverflowTx
}
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 ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthTx
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthTx
}
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 ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTx
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthTx
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Amount = append(m.Amount, types1.Coin{})
if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTx(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthTx
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthTx
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipTx(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, ErrIntOverflowTx
}
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, ErrIntOverflowTx
}
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, ErrIntOverflowTx
}
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, ErrInvalidLengthTx
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupTx
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthTx
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowTx = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)