github.com/gravity-devs/liquidity@v1.5.3/x/liquidity/types/genesis.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: tendermint/liquidity/v1beta1/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  // records the state of each pool after genesis export or import, used to check variables
    27  type PoolRecord struct {
    28  	Pool              Pool               `protobuf:"bytes,1,opt,name=pool,proto3" json:"pool" yaml:"pool"`
    29  	PoolMetadata      PoolMetadata       `protobuf:"bytes,2,opt,name=pool_metadata,json=poolMetadata,proto3" json:"pool_metadata" yaml:"pool_metadata"`
    30  	PoolBatch         PoolBatch          `protobuf:"bytes,3,opt,name=pool_batch,json=poolBatch,proto3" json:"pool_batch" yaml:"pool_batch"`
    31  	DepositMsgStates  []DepositMsgState  `protobuf:"bytes,4,rep,name=deposit_msg_states,json=depositMsgStates,proto3" json:"deposit_msg_states" yaml:"deposit_msg_states"`
    32  	WithdrawMsgStates []WithdrawMsgState `protobuf:"bytes,5,rep,name=withdraw_msg_states,json=withdrawMsgStates,proto3" json:"withdraw_msg_states" yaml:"withdraw_msg_states"`
    33  	SwapMsgStates     []SwapMsgState     `protobuf:"bytes,6,rep,name=swap_msg_states,json=swapMsgStates,proto3" json:"swap_msg_states" yaml:"swap_msg_states"`
    34  }
    35  
    36  func (m *PoolRecord) Reset()         { *m = PoolRecord{} }
    37  func (m *PoolRecord) String() string { return proto.CompactTextString(m) }
    38  func (*PoolRecord) ProtoMessage()    {}
    39  func (*PoolRecord) Descriptor() ([]byte, []int) {
    40  	return fileDescriptor_7dc104913a173687, []int{0}
    41  }
    42  func (m *PoolRecord) XXX_Unmarshal(b []byte) error {
    43  	return m.Unmarshal(b)
    44  }
    45  func (m *PoolRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    46  	if deterministic {
    47  		return xxx_messageInfo_PoolRecord.Marshal(b, m, deterministic)
    48  	} else {
    49  		b = b[:cap(b)]
    50  		n, err := m.MarshalToSizedBuffer(b)
    51  		if err != nil {
    52  			return nil, err
    53  		}
    54  		return b[:n], nil
    55  	}
    56  }
    57  func (m *PoolRecord) XXX_Merge(src proto.Message) {
    58  	xxx_messageInfo_PoolRecord.Merge(m, src)
    59  }
    60  func (m *PoolRecord) XXX_Size() int {
    61  	return m.Size()
    62  }
    63  func (m *PoolRecord) XXX_DiscardUnknown() {
    64  	xxx_messageInfo_PoolRecord.DiscardUnknown(m)
    65  }
    66  
    67  var xxx_messageInfo_PoolRecord proto.InternalMessageInfo
    68  
    69  func (m *PoolRecord) GetPool() Pool {
    70  	if m != nil {
    71  		return m.Pool
    72  	}
    73  	return Pool{}
    74  }
    75  
    76  func (m *PoolRecord) GetPoolMetadata() PoolMetadata {
    77  	if m != nil {
    78  		return m.PoolMetadata
    79  	}
    80  	return PoolMetadata{}
    81  }
    82  
    83  func (m *PoolRecord) GetPoolBatch() PoolBatch {
    84  	if m != nil {
    85  		return m.PoolBatch
    86  	}
    87  	return PoolBatch{}
    88  }
    89  
    90  func (m *PoolRecord) GetDepositMsgStates() []DepositMsgState {
    91  	if m != nil {
    92  		return m.DepositMsgStates
    93  	}
    94  	return nil
    95  }
    96  
    97  func (m *PoolRecord) GetWithdrawMsgStates() []WithdrawMsgState {
    98  	if m != nil {
    99  		return m.WithdrawMsgStates
   100  	}
   101  	return nil
   102  }
   103  
   104  func (m *PoolRecord) GetSwapMsgStates() []SwapMsgState {
   105  	if m != nil {
   106  		return m.SwapMsgStates
   107  	}
   108  	return nil
   109  }
   110  
   111  // GenesisState defines the liquidity module's genesis state.
   112  type GenesisState struct {
   113  	// params defines all the parameters for the liquidity module.
   114  	Params      Params       `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
   115  	PoolRecords []PoolRecord `protobuf:"bytes,2,rep,name=pool_records,json=poolRecords,proto3" json:"pool_records" yaml:"pools"`
   116  }
   117  
   118  func (m *GenesisState) Reset()         { *m = GenesisState{} }
   119  func (m *GenesisState) String() string { return proto.CompactTextString(m) }
   120  func (*GenesisState) ProtoMessage()    {}
   121  func (*GenesisState) Descriptor() ([]byte, []int) {
   122  	return fileDescriptor_7dc104913a173687, []int{1}
   123  }
   124  func (m *GenesisState) XXX_Unmarshal(b []byte) error {
   125  	return m.Unmarshal(b)
   126  }
   127  func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   128  	if deterministic {
   129  		return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic)
   130  	} else {
   131  		b = b[:cap(b)]
   132  		n, err := m.MarshalToSizedBuffer(b)
   133  		if err != nil {
   134  			return nil, err
   135  		}
   136  		return b[:n], nil
   137  	}
   138  }
   139  func (m *GenesisState) XXX_Merge(src proto.Message) {
   140  	xxx_messageInfo_GenesisState.Merge(m, src)
   141  }
   142  func (m *GenesisState) XXX_Size() int {
   143  	return m.Size()
   144  }
   145  func (m *GenesisState) XXX_DiscardUnknown() {
   146  	xxx_messageInfo_GenesisState.DiscardUnknown(m)
   147  }
   148  
   149  var xxx_messageInfo_GenesisState proto.InternalMessageInfo
   150  
   151  func init() {
   152  	proto.RegisterType((*PoolRecord)(nil), "tendermint.liquidity.v1beta1.PoolRecord")
   153  	proto.RegisterType((*GenesisState)(nil), "tendermint.liquidity.v1beta1.GenesisState")
   154  }
   155  
   156  func init() {
   157  	proto.RegisterFile("tendermint/liquidity/v1beta1/genesis.proto", fileDescriptor_7dc104913a173687)
   158  }
   159  
   160  var fileDescriptor_7dc104913a173687 = []byte{
   161  	// 508 bytes of a gzipped FileDescriptorProto
   162  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x31, 0x6f, 0xd3, 0x40,
   163  	0x14, 0xc7, 0xed, 0x36, 0x8d, 0xe0, 0x92, 0x0a, 0x7a, 0x8d, 0x90, 0x1b, 0x55, 0x4e, 0x39, 0x21,
   164  	0x11, 0x55, 0xd4, 0x56, 0xdb, 0xad, 0xa3, 0x85, 0xc4, 0x80, 0x22, 0x21, 0x77, 0x40, 0x62, 0x89,
   165  	0x2e, 0xf1, 0xc9, 0x39, 0x29, 0xce, 0x1d, 0x7e, 0xd7, 0x98, 0x2c, 0x0c, 0x4c, 0x8c, 0x7c, 0x84,
   166  	0x0e, 0x7c, 0x0f, 0xd6, 0x8e, 0x1d, 0x99, 0x2a, 0x94, 0x2c, 0xcc, 0x7c, 0x02, 0xe4, 0xf3, 0xe1,
   167  	0x98, 0x80, 0x92, 0x4e, 0x3e, 0x9d, 0xff, 0xff, 0xff, 0xef, 0x3d, 0xdd, 0x7b, 0xe8, 0x58, 0xb1,
   168  	0x49, 0xc4, 0xd2, 0x84, 0x4f, 0x94, 0x3f, 0xe6, 0xef, 0xaf, 0x78, 0xc4, 0xd5, 0xcc, 0x9f, 0x9e,
   169  	0x0e, 0x98, 0xa2, 0xa7, 0x7e, 0xcc, 0x26, 0x0c, 0x38, 0x78, 0x32, 0x15, 0x4a, 0xe0, 0xc3, 0xa5,
   170  	0xd6, 0x2b, 0xb5, 0x9e, 0xd1, 0xb6, 0x5f, 0xac, 0x4d, 0x5a, 0xea, 0x75, 0x56, 0xbb, 0x15, 0x8b,
   171  	0x58, 0xe8, 0xa3, 0x9f, 0x9f, 0x8a, 0x5b, 0xf2, 0x75, 0x07, 0xa1, 0x37, 0x42, 0x8c, 0x43, 0x36,
   172  	0x14, 0x69, 0x84, 0x5f, 0xa3, 0x9a, 0x14, 0x62, 0xec, 0xd8, 0x47, 0x76, 0xb7, 0x71, 0x46, 0xbc,
   173  	0x75, 0x7c, 0x2f, 0xf7, 0x05, 0xfb, 0x37, 0x77, 0x1d, 0xeb, 0xd7, 0x5d, 0xa7, 0x31, 0xa3, 0xc9,
   174  	0xf8, 0x82, 0xe4, 0x6e, 0x12, 0xea, 0x10, 0x9c, 0xa0, 0xdd, 0xfc, 0xdb, 0x4f, 0x98, 0xa2, 0x11,
   175  	0x55, 0xd4, 0xd9, 0xd2, 0xa9, 0xc7, 0x9b, 0x53, 0x7b, 0xc6, 0x11, 0x1c, 0x9a, 0xf4, 0xd6, 0x32,
   176  	0xbd, 0x8c, 0x23, 0x61, 0x53, 0x56, 0xb4, 0x98, 0x22, 0xa4, 0xff, 0x0f, 0xa8, 0x1a, 0x8e, 0x9c,
   177  	0x6d, 0xcd, 0x7a, 0x7e, 0x8f, 0x0e, 0x72, 0x79, 0x70, 0x60, 0x40, 0x7b, 0x15, 0x90, 0x0e, 0x22,
   178  	0xe1, 0x43, 0xf9, 0x47, 0x85, 0x3f, 0x22, 0x1c, 0x31, 0x29, 0x80, 0xab, 0x7e, 0x02, 0x71, 0x1f,
   179  	0x14, 0x55, 0x0c, 0x9c, 0xda, 0xd1, 0x76, 0xb7, 0x71, 0x76, 0xb2, 0x1e, 0xf5, 0xb2, 0xf0, 0xf5,
   180  	0x20, 0xbe, 0xcc, 0x5d, 0xc1, 0x53, 0x03, 0x3c, 0x28, 0x80, 0xff, 0xc6, 0x92, 0xf0, 0x71, 0xf4,
   181  	0xb7, 0x07, 0xf0, 0x27, 0x1b, 0xed, 0x67, 0x5c, 0x8d, 0xa2, 0x94, 0x66, 0xd5, 0x0a, 0x76, 0x74,
   182  	0x05, 0xde, 0xfa, 0x0a, 0xde, 0x1a, 0x63, 0x59, 0x02, 0x31, 0x25, 0xb4, 0x8b, 0x12, 0xfe, 0x13,
   183  	0x4c, 0xc2, 0xbd, 0x6c, 0xc5, 0x05, 0x38, 0x45, 0x8f, 0x20, 0xa3, 0xb2, 0xca, 0xaf, 0x6b, 0xfe,
   184  	0x86, 0x87, 0xbd, 0xcc, 0xa8, 0x2c, 0xd9, 0xae, 0x61, 0x3f, 0x29, 0xd8, 0x2b, 0x81, 0x24, 0xdc,
   185  	0x85, 0x8a, 0x1a, 0xc8, 0x37, 0x1b, 0x35, 0x5f, 0x15, 0xab, 0xa1, 0x6f, 0x70, 0x80, 0xea, 0x92,
   186  	0xa6, 0x34, 0x01, 0x33, 0xaa, 0xcf, 0x36, 0x3c, 0xb4, 0xd6, 0x06, 0xb5, 0x9c, 0x1a, 0x1a, 0x27,
   187  	0xa6, 0x48, 0x0f, 0x50, 0x3f, 0xd5, 0xb3, 0x0f, 0xce, 0x96, 0xee, 0xa2, 0xbb, 0x79, 0x64, 0x8a,
   188  	0x65, 0x09, 0x5a, 0xa6, 0x87, 0xe6, 0x72, 0x66, 0x80, 0x84, 0x0d, 0x59, 0x2a, 0xe0, 0xe2, 0xc1,
   189  	0xe7, 0xeb, 0x8e, 0xf5, 0xf3, 0xba, 0x63, 0x05, 0xbd, 0x9b, 0xb9, 0x6b, 0xdf, 0xce, 0x5d, 0xfb,
   190  	0xc7, 0xdc, 0xb5, 0xbf, 0x2c, 0x5c, 0xeb, 0x76, 0xe1, 0x5a, 0xdf, 0x17, 0xae, 0xf5, 0xee, 0x3c,
   191  	0xe6, 0x6a, 0x74, 0x35, 0xf0, 0x86, 0x22, 0xf1, 0xe3, 0x94, 0x4e, 0xb9, 0x9a, 0x9d, 0x44, 0x6c,
   192  	0x0a, 0x95, 0x9d, 0xfe, 0x50, 0x39, 0xab, 0x99, 0x64, 0x30, 0xa8, 0xeb, 0xf5, 0x3d, 0xff, 0x1d,
   193  	0x00, 0x00, 0xff, 0xff, 0x59, 0xae, 0xc9, 0xf1, 0x4e, 0x04, 0x00, 0x00,
   194  }
   195  
   196  func (m *PoolRecord) Marshal() (dAtA []byte, err error) {
   197  	size := m.Size()
   198  	dAtA = make([]byte, size)
   199  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   200  	if err != nil {
   201  		return nil, err
   202  	}
   203  	return dAtA[:n], nil
   204  }
   205  
   206  func (m *PoolRecord) MarshalTo(dAtA []byte) (int, error) {
   207  	size := m.Size()
   208  	return m.MarshalToSizedBuffer(dAtA[:size])
   209  }
   210  
   211  func (m *PoolRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   212  	i := len(dAtA)
   213  	_ = i
   214  	var l int
   215  	_ = l
   216  	if len(m.SwapMsgStates) > 0 {
   217  		for iNdEx := len(m.SwapMsgStates) - 1; iNdEx >= 0; iNdEx-- {
   218  			{
   219  				size, err := m.SwapMsgStates[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   220  				if err != nil {
   221  					return 0, err
   222  				}
   223  				i -= size
   224  				i = encodeVarintGenesis(dAtA, i, uint64(size))
   225  			}
   226  			i--
   227  			dAtA[i] = 0x32
   228  		}
   229  	}
   230  	if len(m.WithdrawMsgStates) > 0 {
   231  		for iNdEx := len(m.WithdrawMsgStates) - 1; iNdEx >= 0; iNdEx-- {
   232  			{
   233  				size, err := m.WithdrawMsgStates[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   234  				if err != nil {
   235  					return 0, err
   236  				}
   237  				i -= size
   238  				i = encodeVarintGenesis(dAtA, i, uint64(size))
   239  			}
   240  			i--
   241  			dAtA[i] = 0x2a
   242  		}
   243  	}
   244  	if len(m.DepositMsgStates) > 0 {
   245  		for iNdEx := len(m.DepositMsgStates) - 1; iNdEx >= 0; iNdEx-- {
   246  			{
   247  				size, err := m.DepositMsgStates[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   248  				if err != nil {
   249  					return 0, err
   250  				}
   251  				i -= size
   252  				i = encodeVarintGenesis(dAtA, i, uint64(size))
   253  			}
   254  			i--
   255  			dAtA[i] = 0x22
   256  		}
   257  	}
   258  	{
   259  		size, err := m.PoolBatch.MarshalToSizedBuffer(dAtA[:i])
   260  		if err != nil {
   261  			return 0, err
   262  		}
   263  		i -= size
   264  		i = encodeVarintGenesis(dAtA, i, uint64(size))
   265  	}
   266  	i--
   267  	dAtA[i] = 0x1a
   268  	{
   269  		size, err := m.PoolMetadata.MarshalToSizedBuffer(dAtA[:i])
   270  		if err != nil {
   271  			return 0, err
   272  		}
   273  		i -= size
   274  		i = encodeVarintGenesis(dAtA, i, uint64(size))
   275  	}
   276  	i--
   277  	dAtA[i] = 0x12
   278  	{
   279  		size, err := m.Pool.MarshalToSizedBuffer(dAtA[:i])
   280  		if err != nil {
   281  			return 0, err
   282  		}
   283  		i -= size
   284  		i = encodeVarintGenesis(dAtA, i, uint64(size))
   285  	}
   286  	i--
   287  	dAtA[i] = 0xa
   288  	return len(dAtA) - i, nil
   289  }
   290  
   291  func (m *GenesisState) Marshal() (dAtA []byte, err error) {
   292  	size := m.Size()
   293  	dAtA = make([]byte, size)
   294  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   295  	if err != nil {
   296  		return nil, err
   297  	}
   298  	return dAtA[:n], nil
   299  }
   300  
   301  func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) {
   302  	size := m.Size()
   303  	return m.MarshalToSizedBuffer(dAtA[:size])
   304  }
   305  
   306  func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   307  	i := len(dAtA)
   308  	_ = i
   309  	var l int
   310  	_ = l
   311  	if len(m.PoolRecords) > 0 {
   312  		for iNdEx := len(m.PoolRecords) - 1; iNdEx >= 0; iNdEx-- {
   313  			{
   314  				size, err := m.PoolRecords[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   315  				if err != nil {
   316  					return 0, err
   317  				}
   318  				i -= size
   319  				i = encodeVarintGenesis(dAtA, i, uint64(size))
   320  			}
   321  			i--
   322  			dAtA[i] = 0x12
   323  		}
   324  	}
   325  	{
   326  		size, err := m.Params.MarshalToSizedBuffer(dAtA[:i])
   327  		if err != nil {
   328  			return 0, err
   329  		}
   330  		i -= size
   331  		i = encodeVarintGenesis(dAtA, i, uint64(size))
   332  	}
   333  	i--
   334  	dAtA[i] = 0xa
   335  	return len(dAtA) - i, nil
   336  }
   337  
   338  func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int {
   339  	offset -= sovGenesis(v)
   340  	base := offset
   341  	for v >= 1<<7 {
   342  		dAtA[offset] = uint8(v&0x7f | 0x80)
   343  		v >>= 7
   344  		offset++
   345  	}
   346  	dAtA[offset] = uint8(v)
   347  	return base
   348  }
   349  func (m *PoolRecord) Size() (n int) {
   350  	if m == nil {
   351  		return 0
   352  	}
   353  	var l int
   354  	_ = l
   355  	l = m.Pool.Size()
   356  	n += 1 + l + sovGenesis(uint64(l))
   357  	l = m.PoolMetadata.Size()
   358  	n += 1 + l + sovGenesis(uint64(l))
   359  	l = m.PoolBatch.Size()
   360  	n += 1 + l + sovGenesis(uint64(l))
   361  	if len(m.DepositMsgStates) > 0 {
   362  		for _, e := range m.DepositMsgStates {
   363  			l = e.Size()
   364  			n += 1 + l + sovGenesis(uint64(l))
   365  		}
   366  	}
   367  	if len(m.WithdrawMsgStates) > 0 {
   368  		for _, e := range m.WithdrawMsgStates {
   369  			l = e.Size()
   370  			n += 1 + l + sovGenesis(uint64(l))
   371  		}
   372  	}
   373  	if len(m.SwapMsgStates) > 0 {
   374  		for _, e := range m.SwapMsgStates {
   375  			l = e.Size()
   376  			n += 1 + l + sovGenesis(uint64(l))
   377  		}
   378  	}
   379  	return n
   380  }
   381  
   382  func (m *GenesisState) Size() (n int) {
   383  	if m == nil {
   384  		return 0
   385  	}
   386  	var l int
   387  	_ = l
   388  	l = m.Params.Size()
   389  	n += 1 + l + sovGenesis(uint64(l))
   390  	if len(m.PoolRecords) > 0 {
   391  		for _, e := range m.PoolRecords {
   392  			l = e.Size()
   393  			n += 1 + l + sovGenesis(uint64(l))
   394  		}
   395  	}
   396  	return n
   397  }
   398  
   399  func sovGenesis(x uint64) (n int) {
   400  	return (math_bits.Len64(x|1) + 6) / 7
   401  }
   402  func sozGenesis(x uint64) (n int) {
   403  	return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   404  }
   405  func (m *PoolRecord) Unmarshal(dAtA []byte) error {
   406  	l := len(dAtA)
   407  	iNdEx := 0
   408  	for iNdEx < l {
   409  		preIndex := iNdEx
   410  		var wire uint64
   411  		for shift := uint(0); ; shift += 7 {
   412  			if shift >= 64 {
   413  				return ErrIntOverflowGenesis
   414  			}
   415  			if iNdEx >= l {
   416  				return io.ErrUnexpectedEOF
   417  			}
   418  			b := dAtA[iNdEx]
   419  			iNdEx++
   420  			wire |= uint64(b&0x7F) << shift
   421  			if b < 0x80 {
   422  				break
   423  			}
   424  		}
   425  		fieldNum := int32(wire >> 3)
   426  		wireType := int(wire & 0x7)
   427  		if wireType == 4 {
   428  			return fmt.Errorf("proto: PoolRecord: wiretype end group for non-group")
   429  		}
   430  		if fieldNum <= 0 {
   431  			return fmt.Errorf("proto: PoolRecord: illegal tag %d (wire type %d)", fieldNum, wire)
   432  		}
   433  		switch fieldNum {
   434  		case 1:
   435  			if wireType != 2 {
   436  				return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType)
   437  			}
   438  			var msglen int
   439  			for shift := uint(0); ; shift += 7 {
   440  				if shift >= 64 {
   441  					return ErrIntOverflowGenesis
   442  				}
   443  				if iNdEx >= l {
   444  					return io.ErrUnexpectedEOF
   445  				}
   446  				b := dAtA[iNdEx]
   447  				iNdEx++
   448  				msglen |= int(b&0x7F) << shift
   449  				if b < 0x80 {
   450  					break
   451  				}
   452  			}
   453  			if msglen < 0 {
   454  				return ErrInvalidLengthGenesis
   455  			}
   456  			postIndex := iNdEx + msglen
   457  			if postIndex < 0 {
   458  				return ErrInvalidLengthGenesis
   459  			}
   460  			if postIndex > l {
   461  				return io.ErrUnexpectedEOF
   462  			}
   463  			if err := m.Pool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   464  				return err
   465  			}
   466  			iNdEx = postIndex
   467  		case 2:
   468  			if wireType != 2 {
   469  				return fmt.Errorf("proto: wrong wireType = %d for field PoolMetadata", wireType)
   470  			}
   471  			var msglen int
   472  			for shift := uint(0); ; shift += 7 {
   473  				if shift >= 64 {
   474  					return ErrIntOverflowGenesis
   475  				}
   476  				if iNdEx >= l {
   477  					return io.ErrUnexpectedEOF
   478  				}
   479  				b := dAtA[iNdEx]
   480  				iNdEx++
   481  				msglen |= int(b&0x7F) << shift
   482  				if b < 0x80 {
   483  					break
   484  				}
   485  			}
   486  			if msglen < 0 {
   487  				return ErrInvalidLengthGenesis
   488  			}
   489  			postIndex := iNdEx + msglen
   490  			if postIndex < 0 {
   491  				return ErrInvalidLengthGenesis
   492  			}
   493  			if postIndex > l {
   494  				return io.ErrUnexpectedEOF
   495  			}
   496  			if err := m.PoolMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   497  				return err
   498  			}
   499  			iNdEx = postIndex
   500  		case 3:
   501  			if wireType != 2 {
   502  				return fmt.Errorf("proto: wrong wireType = %d for field PoolBatch", wireType)
   503  			}
   504  			var msglen int
   505  			for shift := uint(0); ; shift += 7 {
   506  				if shift >= 64 {
   507  					return ErrIntOverflowGenesis
   508  				}
   509  				if iNdEx >= l {
   510  					return io.ErrUnexpectedEOF
   511  				}
   512  				b := dAtA[iNdEx]
   513  				iNdEx++
   514  				msglen |= int(b&0x7F) << shift
   515  				if b < 0x80 {
   516  					break
   517  				}
   518  			}
   519  			if msglen < 0 {
   520  				return ErrInvalidLengthGenesis
   521  			}
   522  			postIndex := iNdEx + msglen
   523  			if postIndex < 0 {
   524  				return ErrInvalidLengthGenesis
   525  			}
   526  			if postIndex > l {
   527  				return io.ErrUnexpectedEOF
   528  			}
   529  			if err := m.PoolBatch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   530  				return err
   531  			}
   532  			iNdEx = postIndex
   533  		case 4:
   534  			if wireType != 2 {
   535  				return fmt.Errorf("proto: wrong wireType = %d for field DepositMsgStates", wireType)
   536  			}
   537  			var msglen int
   538  			for shift := uint(0); ; shift += 7 {
   539  				if shift >= 64 {
   540  					return ErrIntOverflowGenesis
   541  				}
   542  				if iNdEx >= l {
   543  					return io.ErrUnexpectedEOF
   544  				}
   545  				b := dAtA[iNdEx]
   546  				iNdEx++
   547  				msglen |= int(b&0x7F) << shift
   548  				if b < 0x80 {
   549  					break
   550  				}
   551  			}
   552  			if msglen < 0 {
   553  				return ErrInvalidLengthGenesis
   554  			}
   555  			postIndex := iNdEx + msglen
   556  			if postIndex < 0 {
   557  				return ErrInvalidLengthGenesis
   558  			}
   559  			if postIndex > l {
   560  				return io.ErrUnexpectedEOF
   561  			}
   562  			m.DepositMsgStates = append(m.DepositMsgStates, DepositMsgState{})
   563  			if err := m.DepositMsgStates[len(m.DepositMsgStates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   564  				return err
   565  			}
   566  			iNdEx = postIndex
   567  		case 5:
   568  			if wireType != 2 {
   569  				return fmt.Errorf("proto: wrong wireType = %d for field WithdrawMsgStates", wireType)
   570  			}
   571  			var msglen int
   572  			for shift := uint(0); ; shift += 7 {
   573  				if shift >= 64 {
   574  					return ErrIntOverflowGenesis
   575  				}
   576  				if iNdEx >= l {
   577  					return io.ErrUnexpectedEOF
   578  				}
   579  				b := dAtA[iNdEx]
   580  				iNdEx++
   581  				msglen |= int(b&0x7F) << shift
   582  				if b < 0x80 {
   583  					break
   584  				}
   585  			}
   586  			if msglen < 0 {
   587  				return ErrInvalidLengthGenesis
   588  			}
   589  			postIndex := iNdEx + msglen
   590  			if postIndex < 0 {
   591  				return ErrInvalidLengthGenesis
   592  			}
   593  			if postIndex > l {
   594  				return io.ErrUnexpectedEOF
   595  			}
   596  			m.WithdrawMsgStates = append(m.WithdrawMsgStates, WithdrawMsgState{})
   597  			if err := m.WithdrawMsgStates[len(m.WithdrawMsgStates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   598  				return err
   599  			}
   600  			iNdEx = postIndex
   601  		case 6:
   602  			if wireType != 2 {
   603  				return fmt.Errorf("proto: wrong wireType = %d for field SwapMsgStates", wireType)
   604  			}
   605  			var msglen int
   606  			for shift := uint(0); ; shift += 7 {
   607  				if shift >= 64 {
   608  					return ErrIntOverflowGenesis
   609  				}
   610  				if iNdEx >= l {
   611  					return io.ErrUnexpectedEOF
   612  				}
   613  				b := dAtA[iNdEx]
   614  				iNdEx++
   615  				msglen |= int(b&0x7F) << shift
   616  				if b < 0x80 {
   617  					break
   618  				}
   619  			}
   620  			if msglen < 0 {
   621  				return ErrInvalidLengthGenesis
   622  			}
   623  			postIndex := iNdEx + msglen
   624  			if postIndex < 0 {
   625  				return ErrInvalidLengthGenesis
   626  			}
   627  			if postIndex > l {
   628  				return io.ErrUnexpectedEOF
   629  			}
   630  			m.SwapMsgStates = append(m.SwapMsgStates, SwapMsgState{})
   631  			if err := m.SwapMsgStates[len(m.SwapMsgStates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   632  				return err
   633  			}
   634  			iNdEx = postIndex
   635  		default:
   636  			iNdEx = preIndex
   637  			skippy, err := skipGenesis(dAtA[iNdEx:])
   638  			if err != nil {
   639  				return err
   640  			}
   641  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   642  				return ErrInvalidLengthGenesis
   643  			}
   644  			if (iNdEx + skippy) > l {
   645  				return io.ErrUnexpectedEOF
   646  			}
   647  			iNdEx += skippy
   648  		}
   649  	}
   650  
   651  	if iNdEx > l {
   652  		return io.ErrUnexpectedEOF
   653  	}
   654  	return nil
   655  }
   656  func (m *GenesisState) Unmarshal(dAtA []byte) error {
   657  	l := len(dAtA)
   658  	iNdEx := 0
   659  	for iNdEx < l {
   660  		preIndex := iNdEx
   661  		var wire uint64
   662  		for shift := uint(0); ; shift += 7 {
   663  			if shift >= 64 {
   664  				return ErrIntOverflowGenesis
   665  			}
   666  			if iNdEx >= l {
   667  				return io.ErrUnexpectedEOF
   668  			}
   669  			b := dAtA[iNdEx]
   670  			iNdEx++
   671  			wire |= uint64(b&0x7F) << shift
   672  			if b < 0x80 {
   673  				break
   674  			}
   675  		}
   676  		fieldNum := int32(wire >> 3)
   677  		wireType := int(wire & 0x7)
   678  		if wireType == 4 {
   679  			return fmt.Errorf("proto: GenesisState: wiretype end group for non-group")
   680  		}
   681  		if fieldNum <= 0 {
   682  			return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire)
   683  		}
   684  		switch fieldNum {
   685  		case 1:
   686  			if wireType != 2 {
   687  				return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType)
   688  			}
   689  			var msglen int
   690  			for shift := uint(0); ; shift += 7 {
   691  				if shift >= 64 {
   692  					return ErrIntOverflowGenesis
   693  				}
   694  				if iNdEx >= l {
   695  					return io.ErrUnexpectedEOF
   696  				}
   697  				b := dAtA[iNdEx]
   698  				iNdEx++
   699  				msglen |= int(b&0x7F) << shift
   700  				if b < 0x80 {
   701  					break
   702  				}
   703  			}
   704  			if msglen < 0 {
   705  				return ErrInvalidLengthGenesis
   706  			}
   707  			postIndex := iNdEx + msglen
   708  			if postIndex < 0 {
   709  				return ErrInvalidLengthGenesis
   710  			}
   711  			if postIndex > l {
   712  				return io.ErrUnexpectedEOF
   713  			}
   714  			if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   715  				return err
   716  			}
   717  			iNdEx = postIndex
   718  		case 2:
   719  			if wireType != 2 {
   720  				return fmt.Errorf("proto: wrong wireType = %d for field PoolRecords", wireType)
   721  			}
   722  			var msglen int
   723  			for shift := uint(0); ; shift += 7 {
   724  				if shift >= 64 {
   725  					return ErrIntOverflowGenesis
   726  				}
   727  				if iNdEx >= l {
   728  					return io.ErrUnexpectedEOF
   729  				}
   730  				b := dAtA[iNdEx]
   731  				iNdEx++
   732  				msglen |= int(b&0x7F) << shift
   733  				if b < 0x80 {
   734  					break
   735  				}
   736  			}
   737  			if msglen < 0 {
   738  				return ErrInvalidLengthGenesis
   739  			}
   740  			postIndex := iNdEx + msglen
   741  			if postIndex < 0 {
   742  				return ErrInvalidLengthGenesis
   743  			}
   744  			if postIndex > l {
   745  				return io.ErrUnexpectedEOF
   746  			}
   747  			m.PoolRecords = append(m.PoolRecords, PoolRecord{})
   748  			if err := m.PoolRecords[len(m.PoolRecords)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   749  				return err
   750  			}
   751  			iNdEx = postIndex
   752  		default:
   753  			iNdEx = preIndex
   754  			skippy, err := skipGenesis(dAtA[iNdEx:])
   755  			if err != nil {
   756  				return err
   757  			}
   758  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   759  				return ErrInvalidLengthGenesis
   760  			}
   761  			if (iNdEx + skippy) > l {
   762  				return io.ErrUnexpectedEOF
   763  			}
   764  			iNdEx += skippy
   765  		}
   766  	}
   767  
   768  	if iNdEx > l {
   769  		return io.ErrUnexpectedEOF
   770  	}
   771  	return nil
   772  }
   773  func skipGenesis(dAtA []byte) (n int, err error) {
   774  	l := len(dAtA)
   775  	iNdEx := 0
   776  	depth := 0
   777  	for iNdEx < l {
   778  		var wire uint64
   779  		for shift := uint(0); ; shift += 7 {
   780  			if shift >= 64 {
   781  				return 0, ErrIntOverflowGenesis
   782  			}
   783  			if iNdEx >= l {
   784  				return 0, io.ErrUnexpectedEOF
   785  			}
   786  			b := dAtA[iNdEx]
   787  			iNdEx++
   788  			wire |= (uint64(b) & 0x7F) << shift
   789  			if b < 0x80 {
   790  				break
   791  			}
   792  		}
   793  		wireType := int(wire & 0x7)
   794  		switch wireType {
   795  		case 0:
   796  			for shift := uint(0); ; shift += 7 {
   797  				if shift >= 64 {
   798  					return 0, ErrIntOverflowGenesis
   799  				}
   800  				if iNdEx >= l {
   801  					return 0, io.ErrUnexpectedEOF
   802  				}
   803  				iNdEx++
   804  				if dAtA[iNdEx-1] < 0x80 {
   805  					break
   806  				}
   807  			}
   808  		case 1:
   809  			iNdEx += 8
   810  		case 2:
   811  			var length int
   812  			for shift := uint(0); ; shift += 7 {
   813  				if shift >= 64 {
   814  					return 0, ErrIntOverflowGenesis
   815  				}
   816  				if iNdEx >= l {
   817  					return 0, io.ErrUnexpectedEOF
   818  				}
   819  				b := dAtA[iNdEx]
   820  				iNdEx++
   821  				length |= (int(b) & 0x7F) << shift
   822  				if b < 0x80 {
   823  					break
   824  				}
   825  			}
   826  			if length < 0 {
   827  				return 0, ErrInvalidLengthGenesis
   828  			}
   829  			iNdEx += length
   830  		case 3:
   831  			depth++
   832  		case 4:
   833  			if depth == 0 {
   834  				return 0, ErrUnexpectedEndOfGroupGenesis
   835  			}
   836  			depth--
   837  		case 5:
   838  			iNdEx += 4
   839  		default:
   840  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   841  		}
   842  		if iNdEx < 0 {
   843  			return 0, ErrInvalidLengthGenesis
   844  		}
   845  		if depth == 0 {
   846  			return iNdEx, nil
   847  		}
   848  	}
   849  	return 0, io.ErrUnexpectedEOF
   850  }
   851  
   852  var (
   853  	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
   854  	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
   855  	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
   856  )