github.com/Finschia/finschia-sdk@v0.49.1/x/fswap/types/genesis.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: lbm/fswap/v1/genesis.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  // GenesisState defines the fswap module's genesis state.
    27  type GenesisState struct {
    28  	Swaps     []Swap    `protobuf:"bytes,1,rep,name=swaps,proto3" json:"swaps"`
    29  	SwapStats SwapStats `protobuf:"bytes,2,opt,name=swap_stats,json=swapStats,proto3" json:"swap_stats"`
    30  	Swappeds  []Swapped `protobuf:"bytes,3,rep,name=swappeds,proto3" json:"swappeds"`
    31  }
    32  
    33  func (m *GenesisState) Reset()         { *m = GenesisState{} }
    34  func (m *GenesisState) String() string { return proto.CompactTextString(m) }
    35  func (*GenesisState) ProtoMessage()    {}
    36  func (*GenesisState) Descriptor() ([]byte, []int) {
    37  	return fileDescriptor_94e309cb1db27661, []int{0}
    38  }
    39  func (m *GenesisState) XXX_Unmarshal(b []byte) error {
    40  	return m.Unmarshal(b)
    41  }
    42  func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    43  	if deterministic {
    44  		return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic)
    45  	} else {
    46  		b = b[:cap(b)]
    47  		n, err := m.MarshalToSizedBuffer(b)
    48  		if err != nil {
    49  			return nil, err
    50  		}
    51  		return b[:n], nil
    52  	}
    53  }
    54  func (m *GenesisState) XXX_Merge(src proto.Message) {
    55  	xxx_messageInfo_GenesisState.Merge(m, src)
    56  }
    57  func (m *GenesisState) XXX_Size() int {
    58  	return m.Size()
    59  }
    60  func (m *GenesisState) XXX_DiscardUnknown() {
    61  	xxx_messageInfo_GenesisState.DiscardUnknown(m)
    62  }
    63  
    64  var xxx_messageInfo_GenesisState proto.InternalMessageInfo
    65  
    66  func (m *GenesisState) GetSwaps() []Swap {
    67  	if m != nil {
    68  		return m.Swaps
    69  	}
    70  	return nil
    71  }
    72  
    73  func (m *GenesisState) GetSwapStats() SwapStats {
    74  	if m != nil {
    75  		return m.SwapStats
    76  	}
    77  	return SwapStats{}
    78  }
    79  
    80  func (m *GenesisState) GetSwappeds() []Swapped {
    81  	if m != nil {
    82  		return m.Swappeds
    83  	}
    84  	return nil
    85  }
    86  
    87  func init() {
    88  	proto.RegisterType((*GenesisState)(nil), "lbm.fswap.v1.GenesisState")
    89  }
    90  
    91  func init() { proto.RegisterFile("lbm/fswap/v1/genesis.proto", fileDescriptor_94e309cb1db27661) }
    92  
    93  var fileDescriptor_94e309cb1db27661 = []byte{
    94  	// 255 bytes of a gzipped FileDescriptorProto
    95  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xca, 0x49, 0xca, 0xd5,
    96  	0x4f, 0x2b, 0x2e, 0x4f, 0x2c, 0xd0, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c,
    97  	0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xc9, 0x49, 0xca, 0xd5, 0x03, 0xcb, 0xe9, 0x95,
    98  	0x19, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x25, 0xf4, 0x41, 0x2c, 0x88, 0x1a, 0x29, 0x09,
    99  	0x14, 0xfd, 0x10, 0xc5, 0x60, 0x19, 0xa5, 0xad, 0x8c, 0x5c, 0x3c, 0xee, 0x10, 0xf3, 0x82, 0x4b,
   100  	0x12, 0x4b, 0x52, 0x85, 0xf4, 0xb8, 0x58, 0x41, 0xd2, 0xc5, 0x12, 0x8c, 0x0a, 0xcc, 0x1a, 0xdc,
   101  	0x46, 0x42, 0x7a, 0xc8, 0xc6, 0xeb, 0x05, 0x97, 0x27, 0x16, 0x38, 0xb1, 0x9c, 0xb8, 0x27, 0xcf,
   102  	0x10, 0x04, 0x51, 0x26, 0x64, 0xc3, 0xc5, 0x05, 0x62, 0xc4, 0x17, 0x97, 0x24, 0x96, 0x14, 0x4b,
   103  	0x30, 0x29, 0x30, 0x6a, 0x70, 0x1b, 0x89, 0x63, 0x6a, 0x02, 0x19, 0x5e, 0x0c, 0xd5, 0xc9, 0x59,
   104  	0x0c, 0x13, 0x10, 0x32, 0xe7, 0xe2, 0x00, 0x71, 0x0a, 0x52, 0x53, 0x8a, 0x25, 0x98, 0xc1, 0x16,
   105  	0x8a, 0x62, 0xea, 0x2d, 0x48, 0x4d, 0x81, 0xea, 0x84, 0x2b, 0x76, 0xf2, 0x38, 0xf1, 0x48, 0x8e,
   106  	0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58,
   107  	0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xbd, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4,
   108  	0xfc, 0x5c, 0x7d, 0xb7, 0xcc, 0xbc, 0xe2, 0xe4, 0x8c, 0xcc, 0x44, 0xfd, 0x34, 0x28, 0x43, 0xb7,
   109  	0x38, 0x25, 0x5b, 0xbf, 0x02, 0x1a, 0x14, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0xe0, 0x80,
   110  	0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x4f, 0x1a, 0xa2, 0xb3, 0x64, 0x01, 0x00, 0x00,
   111  }
   112  
   113  func (m *GenesisState) Marshal() (dAtA []byte, err error) {
   114  	size := m.Size()
   115  	dAtA = make([]byte, size)
   116  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   117  	if err != nil {
   118  		return nil, err
   119  	}
   120  	return dAtA[:n], nil
   121  }
   122  
   123  func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) {
   124  	size := m.Size()
   125  	return m.MarshalToSizedBuffer(dAtA[:size])
   126  }
   127  
   128  func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   129  	i := len(dAtA)
   130  	_ = i
   131  	var l int
   132  	_ = l
   133  	if len(m.Swappeds) > 0 {
   134  		for iNdEx := len(m.Swappeds) - 1; iNdEx >= 0; iNdEx-- {
   135  			{
   136  				size, err := m.Swappeds[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   137  				if err != nil {
   138  					return 0, err
   139  				}
   140  				i -= size
   141  				i = encodeVarintGenesis(dAtA, i, uint64(size))
   142  			}
   143  			i--
   144  			dAtA[i] = 0x1a
   145  		}
   146  	}
   147  	{
   148  		size, err := m.SwapStats.MarshalToSizedBuffer(dAtA[:i])
   149  		if err != nil {
   150  			return 0, err
   151  		}
   152  		i -= size
   153  		i = encodeVarintGenesis(dAtA, i, uint64(size))
   154  	}
   155  	i--
   156  	dAtA[i] = 0x12
   157  	if len(m.Swaps) > 0 {
   158  		for iNdEx := len(m.Swaps) - 1; iNdEx >= 0; iNdEx-- {
   159  			{
   160  				size, err := m.Swaps[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   161  				if err != nil {
   162  					return 0, err
   163  				}
   164  				i -= size
   165  				i = encodeVarintGenesis(dAtA, i, uint64(size))
   166  			}
   167  			i--
   168  			dAtA[i] = 0xa
   169  		}
   170  	}
   171  	return len(dAtA) - i, nil
   172  }
   173  
   174  func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int {
   175  	offset -= sovGenesis(v)
   176  	base := offset
   177  	for v >= 1<<7 {
   178  		dAtA[offset] = uint8(v&0x7f | 0x80)
   179  		v >>= 7
   180  		offset++
   181  	}
   182  	dAtA[offset] = uint8(v)
   183  	return base
   184  }
   185  func (m *GenesisState) Size() (n int) {
   186  	if m == nil {
   187  		return 0
   188  	}
   189  	var l int
   190  	_ = l
   191  	if len(m.Swaps) > 0 {
   192  		for _, e := range m.Swaps {
   193  			l = e.Size()
   194  			n += 1 + l + sovGenesis(uint64(l))
   195  		}
   196  	}
   197  	l = m.SwapStats.Size()
   198  	n += 1 + l + sovGenesis(uint64(l))
   199  	if len(m.Swappeds) > 0 {
   200  		for _, e := range m.Swappeds {
   201  			l = e.Size()
   202  			n += 1 + l + sovGenesis(uint64(l))
   203  		}
   204  	}
   205  	return n
   206  }
   207  
   208  func sovGenesis(x uint64) (n int) {
   209  	return (math_bits.Len64(x|1) + 6) / 7
   210  }
   211  func sozGenesis(x uint64) (n int) {
   212  	return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   213  }
   214  func (m *GenesisState) Unmarshal(dAtA []byte) error {
   215  	l := len(dAtA)
   216  	iNdEx := 0
   217  	for iNdEx < l {
   218  		preIndex := iNdEx
   219  		var wire uint64
   220  		for shift := uint(0); ; shift += 7 {
   221  			if shift >= 64 {
   222  				return ErrIntOverflowGenesis
   223  			}
   224  			if iNdEx >= l {
   225  				return io.ErrUnexpectedEOF
   226  			}
   227  			b := dAtA[iNdEx]
   228  			iNdEx++
   229  			wire |= uint64(b&0x7F) << shift
   230  			if b < 0x80 {
   231  				break
   232  			}
   233  		}
   234  		fieldNum := int32(wire >> 3)
   235  		wireType := int(wire & 0x7)
   236  		if wireType == 4 {
   237  			return fmt.Errorf("proto: GenesisState: wiretype end group for non-group")
   238  		}
   239  		if fieldNum <= 0 {
   240  			return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire)
   241  		}
   242  		switch fieldNum {
   243  		case 1:
   244  			if wireType != 2 {
   245  				return fmt.Errorf("proto: wrong wireType = %d for field Swaps", wireType)
   246  			}
   247  			var msglen int
   248  			for shift := uint(0); ; shift += 7 {
   249  				if shift >= 64 {
   250  					return ErrIntOverflowGenesis
   251  				}
   252  				if iNdEx >= l {
   253  					return io.ErrUnexpectedEOF
   254  				}
   255  				b := dAtA[iNdEx]
   256  				iNdEx++
   257  				msglen |= int(b&0x7F) << shift
   258  				if b < 0x80 {
   259  					break
   260  				}
   261  			}
   262  			if msglen < 0 {
   263  				return ErrInvalidLengthGenesis
   264  			}
   265  			postIndex := iNdEx + msglen
   266  			if postIndex < 0 {
   267  				return ErrInvalidLengthGenesis
   268  			}
   269  			if postIndex > l {
   270  				return io.ErrUnexpectedEOF
   271  			}
   272  			m.Swaps = append(m.Swaps, Swap{})
   273  			if err := m.Swaps[len(m.Swaps)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   274  				return err
   275  			}
   276  			iNdEx = postIndex
   277  		case 2:
   278  			if wireType != 2 {
   279  				return fmt.Errorf("proto: wrong wireType = %d for field SwapStats", wireType)
   280  			}
   281  			var msglen int
   282  			for shift := uint(0); ; shift += 7 {
   283  				if shift >= 64 {
   284  					return ErrIntOverflowGenesis
   285  				}
   286  				if iNdEx >= l {
   287  					return io.ErrUnexpectedEOF
   288  				}
   289  				b := dAtA[iNdEx]
   290  				iNdEx++
   291  				msglen |= int(b&0x7F) << shift
   292  				if b < 0x80 {
   293  					break
   294  				}
   295  			}
   296  			if msglen < 0 {
   297  				return ErrInvalidLengthGenesis
   298  			}
   299  			postIndex := iNdEx + msglen
   300  			if postIndex < 0 {
   301  				return ErrInvalidLengthGenesis
   302  			}
   303  			if postIndex > l {
   304  				return io.ErrUnexpectedEOF
   305  			}
   306  			if err := m.SwapStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   307  				return err
   308  			}
   309  			iNdEx = postIndex
   310  		case 3:
   311  			if wireType != 2 {
   312  				return fmt.Errorf("proto: wrong wireType = %d for field Swappeds", wireType)
   313  			}
   314  			var msglen int
   315  			for shift := uint(0); ; shift += 7 {
   316  				if shift >= 64 {
   317  					return ErrIntOverflowGenesis
   318  				}
   319  				if iNdEx >= l {
   320  					return io.ErrUnexpectedEOF
   321  				}
   322  				b := dAtA[iNdEx]
   323  				iNdEx++
   324  				msglen |= int(b&0x7F) << shift
   325  				if b < 0x80 {
   326  					break
   327  				}
   328  			}
   329  			if msglen < 0 {
   330  				return ErrInvalidLengthGenesis
   331  			}
   332  			postIndex := iNdEx + msglen
   333  			if postIndex < 0 {
   334  				return ErrInvalidLengthGenesis
   335  			}
   336  			if postIndex > l {
   337  				return io.ErrUnexpectedEOF
   338  			}
   339  			m.Swappeds = append(m.Swappeds, Swapped{})
   340  			if err := m.Swappeds[len(m.Swappeds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   341  				return err
   342  			}
   343  			iNdEx = postIndex
   344  		default:
   345  			iNdEx = preIndex
   346  			skippy, err := skipGenesis(dAtA[iNdEx:])
   347  			if err != nil {
   348  				return err
   349  			}
   350  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   351  				return ErrInvalidLengthGenesis
   352  			}
   353  			if (iNdEx + skippy) > l {
   354  				return io.ErrUnexpectedEOF
   355  			}
   356  			iNdEx += skippy
   357  		}
   358  	}
   359  
   360  	if iNdEx > l {
   361  		return io.ErrUnexpectedEOF
   362  	}
   363  	return nil
   364  }
   365  func skipGenesis(dAtA []byte) (n int, err error) {
   366  	l := len(dAtA)
   367  	iNdEx := 0
   368  	depth := 0
   369  	for iNdEx < l {
   370  		var wire uint64
   371  		for shift := uint(0); ; shift += 7 {
   372  			if shift >= 64 {
   373  				return 0, ErrIntOverflowGenesis
   374  			}
   375  			if iNdEx >= l {
   376  				return 0, io.ErrUnexpectedEOF
   377  			}
   378  			b := dAtA[iNdEx]
   379  			iNdEx++
   380  			wire |= (uint64(b) & 0x7F) << shift
   381  			if b < 0x80 {
   382  				break
   383  			}
   384  		}
   385  		wireType := int(wire & 0x7)
   386  		switch wireType {
   387  		case 0:
   388  			for shift := uint(0); ; shift += 7 {
   389  				if shift >= 64 {
   390  					return 0, ErrIntOverflowGenesis
   391  				}
   392  				if iNdEx >= l {
   393  					return 0, io.ErrUnexpectedEOF
   394  				}
   395  				iNdEx++
   396  				if dAtA[iNdEx-1] < 0x80 {
   397  					break
   398  				}
   399  			}
   400  		case 1:
   401  			iNdEx += 8
   402  		case 2:
   403  			var length int
   404  			for shift := uint(0); ; shift += 7 {
   405  				if shift >= 64 {
   406  					return 0, ErrIntOverflowGenesis
   407  				}
   408  				if iNdEx >= l {
   409  					return 0, io.ErrUnexpectedEOF
   410  				}
   411  				b := dAtA[iNdEx]
   412  				iNdEx++
   413  				length |= (int(b) & 0x7F) << shift
   414  				if b < 0x80 {
   415  					break
   416  				}
   417  			}
   418  			if length < 0 {
   419  				return 0, ErrInvalidLengthGenesis
   420  			}
   421  			iNdEx += length
   422  		case 3:
   423  			depth++
   424  		case 4:
   425  			if depth == 0 {
   426  				return 0, ErrUnexpectedEndOfGroupGenesis
   427  			}
   428  			depth--
   429  		case 5:
   430  			iNdEx += 4
   431  		default:
   432  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   433  		}
   434  		if iNdEx < 0 {
   435  			return 0, ErrInvalidLengthGenesis
   436  		}
   437  		if depth == 0 {
   438  			return iNdEx, nil
   439  		}
   440  	}
   441  	return 0, io.ErrUnexpectedEOF
   442  }
   443  
   444  var (
   445  	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
   446  	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
   447  	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
   448  )