github.com/Finschia/finschia-sdk@v0.48.1/types/coin.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: cosmos/base/v1beta1/coin.proto
     3  
     4  package types
     5  
     6  import (
     7  	fmt "fmt"
     8  	_ "github.com/gogo/protobuf/gogoproto"
     9  	proto "github.com/gogo/protobuf/proto"
    10  	io "io"
    11  	math "math"
    12  	math_bits "math/bits"
    13  )
    14  
    15  // Reference imports to suppress errors if they are not otherwise used.
    16  var _ = proto.Marshal
    17  var _ = fmt.Errorf
    18  var _ = math.Inf
    19  
    20  // This is a compile-time assertion to ensure that this generated file
    21  // is compatible with the proto package it is being compiled against.
    22  // A compilation error at this line likely means your copy of the
    23  // proto package needs to be updated.
    24  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    25  
    26  // Coin defines a token with a denomination and an amount.
    27  //
    28  // NOTE: The amount field is an Int which implements the custom method
    29  // signatures required by gogoproto.
    30  type Coin struct {
    31  	Denom  string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
    32  	Amount Int    `protobuf:"bytes,2,opt,name=amount,proto3,customtype=Int" json:"amount"`
    33  }
    34  
    35  func (m *Coin) Reset()      { *m = Coin{} }
    36  func (*Coin) ProtoMessage() {}
    37  func (*Coin) Descriptor() ([]byte, []int) {
    38  	return fileDescriptor_189a96714eafc2df, []int{0}
    39  }
    40  func (m *Coin) XXX_Unmarshal(b []byte) error {
    41  	return m.Unmarshal(b)
    42  }
    43  func (m *Coin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    44  	if deterministic {
    45  		return xxx_messageInfo_Coin.Marshal(b, m, deterministic)
    46  	} else {
    47  		b = b[:cap(b)]
    48  		n, err := m.MarshalToSizedBuffer(b)
    49  		if err != nil {
    50  			return nil, err
    51  		}
    52  		return b[:n], nil
    53  	}
    54  }
    55  func (m *Coin) XXX_Merge(src proto.Message) {
    56  	xxx_messageInfo_Coin.Merge(m, src)
    57  }
    58  func (m *Coin) XXX_Size() int {
    59  	return m.Size()
    60  }
    61  func (m *Coin) XXX_DiscardUnknown() {
    62  	xxx_messageInfo_Coin.DiscardUnknown(m)
    63  }
    64  
    65  var xxx_messageInfo_Coin proto.InternalMessageInfo
    66  
    67  func (m *Coin) GetDenom() string {
    68  	if m != nil {
    69  		return m.Denom
    70  	}
    71  	return ""
    72  }
    73  
    74  // DecCoin defines a token with a denomination and a decimal amount.
    75  //
    76  // NOTE: The amount field is an Dec which implements the custom method
    77  // signatures required by gogoproto.
    78  type DecCoin struct {
    79  	Denom  string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
    80  	Amount Dec    `protobuf:"bytes,2,opt,name=amount,proto3,customtype=Dec" json:"amount"`
    81  }
    82  
    83  func (m *DecCoin) Reset()      { *m = DecCoin{} }
    84  func (*DecCoin) ProtoMessage() {}
    85  func (*DecCoin) Descriptor() ([]byte, []int) {
    86  	return fileDescriptor_189a96714eafc2df, []int{1}
    87  }
    88  func (m *DecCoin) XXX_Unmarshal(b []byte) error {
    89  	return m.Unmarshal(b)
    90  }
    91  func (m *DecCoin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    92  	if deterministic {
    93  		return xxx_messageInfo_DecCoin.Marshal(b, m, deterministic)
    94  	} else {
    95  		b = b[:cap(b)]
    96  		n, err := m.MarshalToSizedBuffer(b)
    97  		if err != nil {
    98  			return nil, err
    99  		}
   100  		return b[:n], nil
   101  	}
   102  }
   103  func (m *DecCoin) XXX_Merge(src proto.Message) {
   104  	xxx_messageInfo_DecCoin.Merge(m, src)
   105  }
   106  func (m *DecCoin) XXX_Size() int {
   107  	return m.Size()
   108  }
   109  func (m *DecCoin) XXX_DiscardUnknown() {
   110  	xxx_messageInfo_DecCoin.DiscardUnknown(m)
   111  }
   112  
   113  var xxx_messageInfo_DecCoin proto.InternalMessageInfo
   114  
   115  func (m *DecCoin) GetDenom() string {
   116  	if m != nil {
   117  		return m.Denom
   118  	}
   119  	return ""
   120  }
   121  
   122  // IntProto defines a Protobuf wrapper around an Int object.
   123  type IntProto struct {
   124  	Int Int `protobuf:"bytes,1,opt,name=int,proto3,customtype=Int" json:"int"`
   125  }
   126  
   127  func (m *IntProto) Reset()      { *m = IntProto{} }
   128  func (*IntProto) ProtoMessage() {}
   129  func (*IntProto) Descriptor() ([]byte, []int) {
   130  	return fileDescriptor_189a96714eafc2df, []int{2}
   131  }
   132  func (m *IntProto) XXX_Unmarshal(b []byte) error {
   133  	return m.Unmarshal(b)
   134  }
   135  func (m *IntProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   136  	if deterministic {
   137  		return xxx_messageInfo_IntProto.Marshal(b, m, deterministic)
   138  	} else {
   139  		b = b[:cap(b)]
   140  		n, err := m.MarshalToSizedBuffer(b)
   141  		if err != nil {
   142  			return nil, err
   143  		}
   144  		return b[:n], nil
   145  	}
   146  }
   147  func (m *IntProto) XXX_Merge(src proto.Message) {
   148  	xxx_messageInfo_IntProto.Merge(m, src)
   149  }
   150  func (m *IntProto) XXX_Size() int {
   151  	return m.Size()
   152  }
   153  func (m *IntProto) XXX_DiscardUnknown() {
   154  	xxx_messageInfo_IntProto.DiscardUnknown(m)
   155  }
   156  
   157  var xxx_messageInfo_IntProto proto.InternalMessageInfo
   158  
   159  // DecProto defines a Protobuf wrapper around a Dec object.
   160  type DecProto struct {
   161  	Dec Dec `protobuf:"bytes,1,opt,name=dec,proto3,customtype=Dec" json:"dec"`
   162  }
   163  
   164  func (m *DecProto) Reset()      { *m = DecProto{} }
   165  func (*DecProto) ProtoMessage() {}
   166  func (*DecProto) Descriptor() ([]byte, []int) {
   167  	return fileDescriptor_189a96714eafc2df, []int{3}
   168  }
   169  func (m *DecProto) XXX_Unmarshal(b []byte) error {
   170  	return m.Unmarshal(b)
   171  }
   172  func (m *DecProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   173  	if deterministic {
   174  		return xxx_messageInfo_DecProto.Marshal(b, m, deterministic)
   175  	} else {
   176  		b = b[:cap(b)]
   177  		n, err := m.MarshalToSizedBuffer(b)
   178  		if err != nil {
   179  			return nil, err
   180  		}
   181  		return b[:n], nil
   182  	}
   183  }
   184  func (m *DecProto) XXX_Merge(src proto.Message) {
   185  	xxx_messageInfo_DecProto.Merge(m, src)
   186  }
   187  func (m *DecProto) XXX_Size() int {
   188  	return m.Size()
   189  }
   190  func (m *DecProto) XXX_DiscardUnknown() {
   191  	xxx_messageInfo_DecProto.DiscardUnknown(m)
   192  }
   193  
   194  var xxx_messageInfo_DecProto proto.InternalMessageInfo
   195  
   196  func init() {
   197  	proto.RegisterType((*Coin)(nil), "cosmos.base.v1beta1.Coin")
   198  	proto.RegisterType((*DecCoin)(nil), "cosmos.base.v1beta1.DecCoin")
   199  	proto.RegisterType((*IntProto)(nil), "cosmos.base.v1beta1.IntProto")
   200  	proto.RegisterType((*DecProto)(nil), "cosmos.base.v1beta1.DecProto")
   201  }
   202  
   203  func init() { proto.RegisterFile("cosmos/base/v1beta1/coin.proto", fileDescriptor_189a96714eafc2df) }
   204  
   205  var fileDescriptor_189a96714eafc2df = []byte{
   206  	// 269 bytes of a gzipped FileDescriptorProto
   207  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xce, 0x2f, 0xce,
   208  	0xcd, 0x2f, 0xd6, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4,
   209  	0x4f, 0xce, 0xcf, 0xcc, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, 0xc8, 0xeb, 0x81,
   210  	0xe4, 0xf5, 0xa0, 0xf2, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0x79, 0x7d, 0x10, 0x0b, 0xa2,
   211  	0x54, 0xc9, 0x9d, 0x8b, 0xc5, 0x39, 0x3f, 0x33, 0x4f, 0x48, 0x84, 0x8b, 0x35, 0x25, 0x35, 0x2f,
   212  	0x3f, 0x57, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xc2, 0x11, 0x52, 0xe6, 0x62, 0x4b, 0xcc,
   213  	0xcd, 0x2f, 0xcd, 0x2b, 0x91, 0x60, 0x02, 0x09, 0x3b, 0x71, 0x9f, 0xb8, 0x27, 0xcf, 0x70, 0xeb,
   214  	0x9e, 0x3c, 0xb3, 0x67, 0x5e, 0x49, 0x10, 0x54, 0xca, 0x8a, 0xe5, 0xc5, 0x02, 0x79, 0x46, 0x25,
   215  	0x2f, 0x2e, 0x76, 0x97, 0xd4, 0x64, 0x72, 0xcc, 0x72, 0x49, 0x4d, 0x46, 0x33, 0x4b, 0x93, 0x8b,
   216  	0xc3, 0x33, 0xaf, 0x24, 0x00, 0xec, 0x17, 0x59, 0x2e, 0xe6, 0xcc, 0xbc, 0x12, 0x88, 0x51, 0xa8,
   217  	0xf6, 0x83, 0xc4, 0x41, 0x4a, 0x5d, 0x52, 0x93, 0xe1, 0x4a, 0x53, 0x52, 0x93, 0xd1, 0x95, 0x82,
   218  	0x8c, 0x07, 0x89, 0x3b, 0x79, 0xdc, 0x78, 0x28, 0xc7, 0xd0, 0xf0, 0x48, 0x8e, 0xe1, 0xc4, 0x23,
   219  	0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2,
   220  	0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0xd4, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4,
   221  	0x92, 0xf3, 0x73, 0xf5, 0xdd, 0x32, 0xf3, 0x8a, 0x93, 0x33, 0x32, 0x13, 0xf5, 0xd3, 0xa0, 0x0c,
   222  	0xdd, 0xe2, 0x94, 0x6c, 0xfd, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0x70, 0xd8, 0x19, 0x03,
   223  	0x02, 0x00, 0x00, 0xff, 0xff, 0x4e, 0xea, 0x8e, 0xf7, 0x88, 0x01, 0x00, 0x00,
   224  }
   225  
   226  func (this *Coin) Equal(that interface{}) bool {
   227  	if that == nil {
   228  		return this == nil
   229  	}
   230  
   231  	that1, ok := that.(*Coin)
   232  	if !ok {
   233  		that2, ok := that.(Coin)
   234  		if ok {
   235  			that1 = &that2
   236  		} else {
   237  			return false
   238  		}
   239  	}
   240  	if that1 == nil {
   241  		return this == nil
   242  	} else if this == nil {
   243  		return false
   244  	}
   245  	if this.Denom != that1.Denom {
   246  		return false
   247  	}
   248  	if !this.Amount.Equal(that1.Amount) {
   249  		return false
   250  	}
   251  	return true
   252  }
   253  func (this *DecCoin) Equal(that interface{}) bool {
   254  	if that == nil {
   255  		return this == nil
   256  	}
   257  
   258  	that1, ok := that.(*DecCoin)
   259  	if !ok {
   260  		that2, ok := that.(DecCoin)
   261  		if ok {
   262  			that1 = &that2
   263  		} else {
   264  			return false
   265  		}
   266  	}
   267  	if that1 == nil {
   268  		return this == nil
   269  	} else if this == nil {
   270  		return false
   271  	}
   272  	if this.Denom != that1.Denom {
   273  		return false
   274  	}
   275  	if !this.Amount.Equal(that1.Amount) {
   276  		return false
   277  	}
   278  	return true
   279  }
   280  func (m *Coin) Marshal() (dAtA []byte, err error) {
   281  	size := m.Size()
   282  	dAtA = make([]byte, size)
   283  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   284  	if err != nil {
   285  		return nil, err
   286  	}
   287  	return dAtA[:n], nil
   288  }
   289  
   290  func (m *Coin) MarshalTo(dAtA []byte) (int, error) {
   291  	size := m.Size()
   292  	return m.MarshalToSizedBuffer(dAtA[:size])
   293  }
   294  
   295  func (m *Coin) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   296  	i := len(dAtA)
   297  	_ = i
   298  	var l int
   299  	_ = l
   300  	{
   301  		size := m.Amount.Size()
   302  		i -= size
   303  		if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil {
   304  			return 0, err
   305  		}
   306  		i = encodeVarintCoin(dAtA, i, uint64(size))
   307  	}
   308  	i--
   309  	dAtA[i] = 0x12
   310  	if len(m.Denom) > 0 {
   311  		i -= len(m.Denom)
   312  		copy(dAtA[i:], m.Denom)
   313  		i = encodeVarintCoin(dAtA, i, uint64(len(m.Denom)))
   314  		i--
   315  		dAtA[i] = 0xa
   316  	}
   317  	return len(dAtA) - i, nil
   318  }
   319  
   320  func (m *DecCoin) Marshal() (dAtA []byte, err error) {
   321  	size := m.Size()
   322  	dAtA = make([]byte, size)
   323  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   324  	if err != nil {
   325  		return nil, err
   326  	}
   327  	return dAtA[:n], nil
   328  }
   329  
   330  func (m *DecCoin) MarshalTo(dAtA []byte) (int, error) {
   331  	size := m.Size()
   332  	return m.MarshalToSizedBuffer(dAtA[:size])
   333  }
   334  
   335  func (m *DecCoin) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   336  	i := len(dAtA)
   337  	_ = i
   338  	var l int
   339  	_ = l
   340  	{
   341  		size := m.Amount.Size()
   342  		i -= size
   343  		if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil {
   344  			return 0, err
   345  		}
   346  		i = encodeVarintCoin(dAtA, i, uint64(size))
   347  	}
   348  	i--
   349  	dAtA[i] = 0x12
   350  	if len(m.Denom) > 0 {
   351  		i -= len(m.Denom)
   352  		copy(dAtA[i:], m.Denom)
   353  		i = encodeVarintCoin(dAtA, i, uint64(len(m.Denom)))
   354  		i--
   355  		dAtA[i] = 0xa
   356  	}
   357  	return len(dAtA) - i, nil
   358  }
   359  
   360  func (m *IntProto) Marshal() (dAtA []byte, err error) {
   361  	size := m.Size()
   362  	dAtA = make([]byte, size)
   363  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   364  	if err != nil {
   365  		return nil, err
   366  	}
   367  	return dAtA[:n], nil
   368  }
   369  
   370  func (m *IntProto) MarshalTo(dAtA []byte) (int, error) {
   371  	size := m.Size()
   372  	return m.MarshalToSizedBuffer(dAtA[:size])
   373  }
   374  
   375  func (m *IntProto) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   376  	i := len(dAtA)
   377  	_ = i
   378  	var l int
   379  	_ = l
   380  	{
   381  		size := m.Int.Size()
   382  		i -= size
   383  		if _, err := m.Int.MarshalTo(dAtA[i:]); err != nil {
   384  			return 0, err
   385  		}
   386  		i = encodeVarintCoin(dAtA, i, uint64(size))
   387  	}
   388  	i--
   389  	dAtA[i] = 0xa
   390  	return len(dAtA) - i, nil
   391  }
   392  
   393  func (m *DecProto) Marshal() (dAtA []byte, err error) {
   394  	size := m.Size()
   395  	dAtA = make([]byte, size)
   396  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   397  	if err != nil {
   398  		return nil, err
   399  	}
   400  	return dAtA[:n], nil
   401  }
   402  
   403  func (m *DecProto) MarshalTo(dAtA []byte) (int, error) {
   404  	size := m.Size()
   405  	return m.MarshalToSizedBuffer(dAtA[:size])
   406  }
   407  
   408  func (m *DecProto) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   409  	i := len(dAtA)
   410  	_ = i
   411  	var l int
   412  	_ = l
   413  	{
   414  		size := m.Dec.Size()
   415  		i -= size
   416  		if _, err := m.Dec.MarshalTo(dAtA[i:]); err != nil {
   417  			return 0, err
   418  		}
   419  		i = encodeVarintCoin(dAtA, i, uint64(size))
   420  	}
   421  	i--
   422  	dAtA[i] = 0xa
   423  	return len(dAtA) - i, nil
   424  }
   425  
   426  func encodeVarintCoin(dAtA []byte, offset int, v uint64) int {
   427  	offset -= sovCoin(v)
   428  	base := offset
   429  	for v >= 1<<7 {
   430  		dAtA[offset] = uint8(v&0x7f | 0x80)
   431  		v >>= 7
   432  		offset++
   433  	}
   434  	dAtA[offset] = uint8(v)
   435  	return base
   436  }
   437  func (m *Coin) Size() (n int) {
   438  	if m == nil {
   439  		return 0
   440  	}
   441  	var l int
   442  	_ = l
   443  	l = len(m.Denom)
   444  	if l > 0 {
   445  		n += 1 + l + sovCoin(uint64(l))
   446  	}
   447  	l = m.Amount.Size()
   448  	n += 1 + l + sovCoin(uint64(l))
   449  	return n
   450  }
   451  
   452  func (m *DecCoin) Size() (n int) {
   453  	if m == nil {
   454  		return 0
   455  	}
   456  	var l int
   457  	_ = l
   458  	l = len(m.Denom)
   459  	if l > 0 {
   460  		n += 1 + l + sovCoin(uint64(l))
   461  	}
   462  	l = m.Amount.Size()
   463  	n += 1 + l + sovCoin(uint64(l))
   464  	return n
   465  }
   466  
   467  func (m *IntProto) Size() (n int) {
   468  	if m == nil {
   469  		return 0
   470  	}
   471  	var l int
   472  	_ = l
   473  	l = m.Int.Size()
   474  	n += 1 + l + sovCoin(uint64(l))
   475  	return n
   476  }
   477  
   478  func (m *DecProto) Size() (n int) {
   479  	if m == nil {
   480  		return 0
   481  	}
   482  	var l int
   483  	_ = l
   484  	l = m.Dec.Size()
   485  	n += 1 + l + sovCoin(uint64(l))
   486  	return n
   487  }
   488  
   489  func sovCoin(x uint64) (n int) {
   490  	return (math_bits.Len64(x|1) + 6) / 7
   491  }
   492  func sozCoin(x uint64) (n int) {
   493  	return sovCoin(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   494  }
   495  func (m *Coin) Unmarshal(dAtA []byte) error {
   496  	l := len(dAtA)
   497  	iNdEx := 0
   498  	for iNdEx < l {
   499  		preIndex := iNdEx
   500  		var wire uint64
   501  		for shift := uint(0); ; shift += 7 {
   502  			if shift >= 64 {
   503  				return ErrIntOverflowCoin
   504  			}
   505  			if iNdEx >= l {
   506  				return io.ErrUnexpectedEOF
   507  			}
   508  			b := dAtA[iNdEx]
   509  			iNdEx++
   510  			wire |= uint64(b&0x7F) << shift
   511  			if b < 0x80 {
   512  				break
   513  			}
   514  		}
   515  		fieldNum := int32(wire >> 3)
   516  		wireType := int(wire & 0x7)
   517  		if wireType == 4 {
   518  			return fmt.Errorf("proto: Coin: wiretype end group for non-group")
   519  		}
   520  		if fieldNum <= 0 {
   521  			return fmt.Errorf("proto: Coin: illegal tag %d (wire type %d)", fieldNum, wire)
   522  		}
   523  		switch fieldNum {
   524  		case 1:
   525  			if wireType != 2 {
   526  				return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType)
   527  			}
   528  			var stringLen uint64
   529  			for shift := uint(0); ; shift += 7 {
   530  				if shift >= 64 {
   531  					return ErrIntOverflowCoin
   532  				}
   533  				if iNdEx >= l {
   534  					return io.ErrUnexpectedEOF
   535  				}
   536  				b := dAtA[iNdEx]
   537  				iNdEx++
   538  				stringLen |= uint64(b&0x7F) << shift
   539  				if b < 0x80 {
   540  					break
   541  				}
   542  			}
   543  			intStringLen := int(stringLen)
   544  			if intStringLen < 0 {
   545  				return ErrInvalidLengthCoin
   546  			}
   547  			postIndex := iNdEx + intStringLen
   548  			if postIndex < 0 {
   549  				return ErrInvalidLengthCoin
   550  			}
   551  			if postIndex > l {
   552  				return io.ErrUnexpectedEOF
   553  			}
   554  			m.Denom = string(dAtA[iNdEx:postIndex])
   555  			iNdEx = postIndex
   556  		case 2:
   557  			if wireType != 2 {
   558  				return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
   559  			}
   560  			var stringLen uint64
   561  			for shift := uint(0); ; shift += 7 {
   562  				if shift >= 64 {
   563  					return ErrIntOverflowCoin
   564  				}
   565  				if iNdEx >= l {
   566  					return io.ErrUnexpectedEOF
   567  				}
   568  				b := dAtA[iNdEx]
   569  				iNdEx++
   570  				stringLen |= uint64(b&0x7F) << shift
   571  				if b < 0x80 {
   572  					break
   573  				}
   574  			}
   575  			intStringLen := int(stringLen)
   576  			if intStringLen < 0 {
   577  				return ErrInvalidLengthCoin
   578  			}
   579  			postIndex := iNdEx + intStringLen
   580  			if postIndex < 0 {
   581  				return ErrInvalidLengthCoin
   582  			}
   583  			if postIndex > l {
   584  				return io.ErrUnexpectedEOF
   585  			}
   586  			if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   587  				return err
   588  			}
   589  			iNdEx = postIndex
   590  		default:
   591  			iNdEx = preIndex
   592  			skippy, err := skipCoin(dAtA[iNdEx:])
   593  			if err != nil {
   594  				return err
   595  			}
   596  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   597  				return ErrInvalidLengthCoin
   598  			}
   599  			if (iNdEx + skippy) > l {
   600  				return io.ErrUnexpectedEOF
   601  			}
   602  			iNdEx += skippy
   603  		}
   604  	}
   605  
   606  	if iNdEx > l {
   607  		return io.ErrUnexpectedEOF
   608  	}
   609  	return nil
   610  }
   611  func (m *DecCoin) Unmarshal(dAtA []byte) error {
   612  	l := len(dAtA)
   613  	iNdEx := 0
   614  	for iNdEx < l {
   615  		preIndex := iNdEx
   616  		var wire uint64
   617  		for shift := uint(0); ; shift += 7 {
   618  			if shift >= 64 {
   619  				return ErrIntOverflowCoin
   620  			}
   621  			if iNdEx >= l {
   622  				return io.ErrUnexpectedEOF
   623  			}
   624  			b := dAtA[iNdEx]
   625  			iNdEx++
   626  			wire |= uint64(b&0x7F) << shift
   627  			if b < 0x80 {
   628  				break
   629  			}
   630  		}
   631  		fieldNum := int32(wire >> 3)
   632  		wireType := int(wire & 0x7)
   633  		if wireType == 4 {
   634  			return fmt.Errorf("proto: DecCoin: wiretype end group for non-group")
   635  		}
   636  		if fieldNum <= 0 {
   637  			return fmt.Errorf("proto: DecCoin: illegal tag %d (wire type %d)", fieldNum, wire)
   638  		}
   639  		switch fieldNum {
   640  		case 1:
   641  			if wireType != 2 {
   642  				return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType)
   643  			}
   644  			var stringLen uint64
   645  			for shift := uint(0); ; shift += 7 {
   646  				if shift >= 64 {
   647  					return ErrIntOverflowCoin
   648  				}
   649  				if iNdEx >= l {
   650  					return io.ErrUnexpectedEOF
   651  				}
   652  				b := dAtA[iNdEx]
   653  				iNdEx++
   654  				stringLen |= uint64(b&0x7F) << shift
   655  				if b < 0x80 {
   656  					break
   657  				}
   658  			}
   659  			intStringLen := int(stringLen)
   660  			if intStringLen < 0 {
   661  				return ErrInvalidLengthCoin
   662  			}
   663  			postIndex := iNdEx + intStringLen
   664  			if postIndex < 0 {
   665  				return ErrInvalidLengthCoin
   666  			}
   667  			if postIndex > l {
   668  				return io.ErrUnexpectedEOF
   669  			}
   670  			m.Denom = string(dAtA[iNdEx:postIndex])
   671  			iNdEx = postIndex
   672  		case 2:
   673  			if wireType != 2 {
   674  				return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
   675  			}
   676  			var stringLen uint64
   677  			for shift := uint(0); ; shift += 7 {
   678  				if shift >= 64 {
   679  					return ErrIntOverflowCoin
   680  				}
   681  				if iNdEx >= l {
   682  					return io.ErrUnexpectedEOF
   683  				}
   684  				b := dAtA[iNdEx]
   685  				iNdEx++
   686  				stringLen |= uint64(b&0x7F) << shift
   687  				if b < 0x80 {
   688  					break
   689  				}
   690  			}
   691  			intStringLen := int(stringLen)
   692  			if intStringLen < 0 {
   693  				return ErrInvalidLengthCoin
   694  			}
   695  			postIndex := iNdEx + intStringLen
   696  			if postIndex < 0 {
   697  				return ErrInvalidLengthCoin
   698  			}
   699  			if postIndex > l {
   700  				return io.ErrUnexpectedEOF
   701  			}
   702  			if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   703  				return err
   704  			}
   705  			iNdEx = postIndex
   706  		default:
   707  			iNdEx = preIndex
   708  			skippy, err := skipCoin(dAtA[iNdEx:])
   709  			if err != nil {
   710  				return err
   711  			}
   712  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   713  				return ErrInvalidLengthCoin
   714  			}
   715  			if (iNdEx + skippy) > l {
   716  				return io.ErrUnexpectedEOF
   717  			}
   718  			iNdEx += skippy
   719  		}
   720  	}
   721  
   722  	if iNdEx > l {
   723  		return io.ErrUnexpectedEOF
   724  	}
   725  	return nil
   726  }
   727  func (m *IntProto) Unmarshal(dAtA []byte) error {
   728  	l := len(dAtA)
   729  	iNdEx := 0
   730  	for iNdEx < l {
   731  		preIndex := iNdEx
   732  		var wire uint64
   733  		for shift := uint(0); ; shift += 7 {
   734  			if shift >= 64 {
   735  				return ErrIntOverflowCoin
   736  			}
   737  			if iNdEx >= l {
   738  				return io.ErrUnexpectedEOF
   739  			}
   740  			b := dAtA[iNdEx]
   741  			iNdEx++
   742  			wire |= uint64(b&0x7F) << shift
   743  			if b < 0x80 {
   744  				break
   745  			}
   746  		}
   747  		fieldNum := int32(wire >> 3)
   748  		wireType := int(wire & 0x7)
   749  		if wireType == 4 {
   750  			return fmt.Errorf("proto: IntProto: wiretype end group for non-group")
   751  		}
   752  		if fieldNum <= 0 {
   753  			return fmt.Errorf("proto: IntProto: illegal tag %d (wire type %d)", fieldNum, wire)
   754  		}
   755  		switch fieldNum {
   756  		case 1:
   757  			if wireType != 2 {
   758  				return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType)
   759  			}
   760  			var stringLen uint64
   761  			for shift := uint(0); ; shift += 7 {
   762  				if shift >= 64 {
   763  					return ErrIntOverflowCoin
   764  				}
   765  				if iNdEx >= l {
   766  					return io.ErrUnexpectedEOF
   767  				}
   768  				b := dAtA[iNdEx]
   769  				iNdEx++
   770  				stringLen |= uint64(b&0x7F) << shift
   771  				if b < 0x80 {
   772  					break
   773  				}
   774  			}
   775  			intStringLen := int(stringLen)
   776  			if intStringLen < 0 {
   777  				return ErrInvalidLengthCoin
   778  			}
   779  			postIndex := iNdEx + intStringLen
   780  			if postIndex < 0 {
   781  				return ErrInvalidLengthCoin
   782  			}
   783  			if postIndex > l {
   784  				return io.ErrUnexpectedEOF
   785  			}
   786  			if err := m.Int.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   787  				return err
   788  			}
   789  			iNdEx = postIndex
   790  		default:
   791  			iNdEx = preIndex
   792  			skippy, err := skipCoin(dAtA[iNdEx:])
   793  			if err != nil {
   794  				return err
   795  			}
   796  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   797  				return ErrInvalidLengthCoin
   798  			}
   799  			if (iNdEx + skippy) > l {
   800  				return io.ErrUnexpectedEOF
   801  			}
   802  			iNdEx += skippy
   803  		}
   804  	}
   805  
   806  	if iNdEx > l {
   807  		return io.ErrUnexpectedEOF
   808  	}
   809  	return nil
   810  }
   811  func (m *DecProto) Unmarshal(dAtA []byte) error {
   812  	l := len(dAtA)
   813  	iNdEx := 0
   814  	for iNdEx < l {
   815  		preIndex := iNdEx
   816  		var wire uint64
   817  		for shift := uint(0); ; shift += 7 {
   818  			if shift >= 64 {
   819  				return ErrIntOverflowCoin
   820  			}
   821  			if iNdEx >= l {
   822  				return io.ErrUnexpectedEOF
   823  			}
   824  			b := dAtA[iNdEx]
   825  			iNdEx++
   826  			wire |= uint64(b&0x7F) << shift
   827  			if b < 0x80 {
   828  				break
   829  			}
   830  		}
   831  		fieldNum := int32(wire >> 3)
   832  		wireType := int(wire & 0x7)
   833  		if wireType == 4 {
   834  			return fmt.Errorf("proto: DecProto: wiretype end group for non-group")
   835  		}
   836  		if fieldNum <= 0 {
   837  			return fmt.Errorf("proto: DecProto: illegal tag %d (wire type %d)", fieldNum, wire)
   838  		}
   839  		switch fieldNum {
   840  		case 1:
   841  			if wireType != 2 {
   842  				return fmt.Errorf("proto: wrong wireType = %d for field Dec", wireType)
   843  			}
   844  			var stringLen uint64
   845  			for shift := uint(0); ; shift += 7 {
   846  				if shift >= 64 {
   847  					return ErrIntOverflowCoin
   848  				}
   849  				if iNdEx >= l {
   850  					return io.ErrUnexpectedEOF
   851  				}
   852  				b := dAtA[iNdEx]
   853  				iNdEx++
   854  				stringLen |= uint64(b&0x7F) << shift
   855  				if b < 0x80 {
   856  					break
   857  				}
   858  			}
   859  			intStringLen := int(stringLen)
   860  			if intStringLen < 0 {
   861  				return ErrInvalidLengthCoin
   862  			}
   863  			postIndex := iNdEx + intStringLen
   864  			if postIndex < 0 {
   865  				return ErrInvalidLengthCoin
   866  			}
   867  			if postIndex > l {
   868  				return io.ErrUnexpectedEOF
   869  			}
   870  			if err := m.Dec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   871  				return err
   872  			}
   873  			iNdEx = postIndex
   874  		default:
   875  			iNdEx = preIndex
   876  			skippy, err := skipCoin(dAtA[iNdEx:])
   877  			if err != nil {
   878  				return err
   879  			}
   880  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   881  				return ErrInvalidLengthCoin
   882  			}
   883  			if (iNdEx + skippy) > l {
   884  				return io.ErrUnexpectedEOF
   885  			}
   886  			iNdEx += skippy
   887  		}
   888  	}
   889  
   890  	if iNdEx > l {
   891  		return io.ErrUnexpectedEOF
   892  	}
   893  	return nil
   894  }
   895  func skipCoin(dAtA []byte) (n int, err error) {
   896  	l := len(dAtA)
   897  	iNdEx := 0
   898  	depth := 0
   899  	for iNdEx < l {
   900  		var wire uint64
   901  		for shift := uint(0); ; shift += 7 {
   902  			if shift >= 64 {
   903  				return 0, ErrIntOverflowCoin
   904  			}
   905  			if iNdEx >= l {
   906  				return 0, io.ErrUnexpectedEOF
   907  			}
   908  			b := dAtA[iNdEx]
   909  			iNdEx++
   910  			wire |= (uint64(b) & 0x7F) << shift
   911  			if b < 0x80 {
   912  				break
   913  			}
   914  		}
   915  		wireType := int(wire & 0x7)
   916  		switch wireType {
   917  		case 0:
   918  			for shift := uint(0); ; shift += 7 {
   919  				if shift >= 64 {
   920  					return 0, ErrIntOverflowCoin
   921  				}
   922  				if iNdEx >= l {
   923  					return 0, io.ErrUnexpectedEOF
   924  				}
   925  				iNdEx++
   926  				if dAtA[iNdEx-1] < 0x80 {
   927  					break
   928  				}
   929  			}
   930  		case 1:
   931  			iNdEx += 8
   932  		case 2:
   933  			var length int
   934  			for shift := uint(0); ; shift += 7 {
   935  				if shift >= 64 {
   936  					return 0, ErrIntOverflowCoin
   937  				}
   938  				if iNdEx >= l {
   939  					return 0, io.ErrUnexpectedEOF
   940  				}
   941  				b := dAtA[iNdEx]
   942  				iNdEx++
   943  				length |= (int(b) & 0x7F) << shift
   944  				if b < 0x80 {
   945  					break
   946  				}
   947  			}
   948  			if length < 0 {
   949  				return 0, ErrInvalidLengthCoin
   950  			}
   951  			iNdEx += length
   952  		case 3:
   953  			depth++
   954  		case 4:
   955  			if depth == 0 {
   956  				return 0, ErrUnexpectedEndOfGroupCoin
   957  			}
   958  			depth--
   959  		case 5:
   960  			iNdEx += 4
   961  		default:
   962  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   963  		}
   964  		if iNdEx < 0 {
   965  			return 0, ErrInvalidLengthCoin
   966  		}
   967  		if depth == 0 {
   968  			return iNdEx, nil
   969  		}
   970  	}
   971  	return 0, io.ErrUnexpectedEOF
   972  }
   973  
   974  var (
   975  	ErrInvalidLengthCoin        = fmt.Errorf("proto: negative length found during unmarshaling")
   976  	ErrIntOverflowCoin          = fmt.Errorf("proto: integer overflow")
   977  	ErrUnexpectedEndOfGroupCoin = fmt.Errorf("proto: unexpected end of group")
   978  )