github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/cosmos-sdk/types/coin.pb.go (about)

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