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

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: lbm/token/v1/genesis.proto
     3  
     4  package token
     5  
     6  import (
     7  	fmt "fmt"
     8  	github_com_Finschia_finschia_sdk_types "github.com/Finschia/finschia-sdk/types"
     9  	_ "github.com/gogo/protobuf/gogoproto"
    10  	proto "github.com/gogo/protobuf/proto"
    11  	io "io"
    12  	math "math"
    13  	math_bits "math/bits"
    14  )
    15  
    16  // Reference imports to suppress errors if they are not otherwise used.
    17  var _ = proto.Marshal
    18  var _ = fmt.Errorf
    19  var _ = math.Inf
    20  
    21  // This is a compile-time assertion to ensure that this generated file
    22  // is compatible with the proto package it is being compiled against.
    23  // A compilation error at this line likely means your copy of the
    24  // proto package needs to be updated.
    25  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    26  
    27  // GenesisState defines the token module's genesis state.
    28  //
    29  // Deprecated: Do not use.
    30  type GenesisState struct {
    31  	// params defines all the paramaters of the module.
    32  	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
    33  	// class_state is the class keeper's genesis state.
    34  	ClassState *ClassGenesisState `protobuf:"bytes,2,opt,name=class_state,json=classState,proto3" json:"class_state,omitempty"`
    35  	// balances is an array containing the balances of all the accounts.
    36  	Balances []ContractBalances `protobuf:"bytes,3,rep,name=balances,proto3" json:"balances"`
    37  	// classes defines the metadata of the differents tokens.
    38  	Classes []Contract `protobuf:"bytes,4,rep,name=classes,proto3" json:"classes"`
    39  	// grants defines the grant information.
    40  	Grants []ContractGrants `protobuf:"bytes,5,rep,name=grants,proto3" json:"grants"`
    41  	// authorizations defines the approve information.
    42  	Authorizations []ContractAuthorizations `protobuf:"bytes,6,rep,name=authorizations,proto3" json:"authorizations"`
    43  	// supplies represents the total supplies of tokens.
    44  	Supplies []ContractCoin `protobuf:"bytes,7,rep,name=supplies,proto3" json:"supplies"`
    45  	// mints represents the total mints of tokens.
    46  	Mints []ContractCoin `protobuf:"bytes,8,rep,name=mints,proto3" json:"mints"`
    47  	// burns represents the total burns of tokens.
    48  	Burns []ContractCoin `protobuf:"bytes,9,rep,name=burns,proto3" json:"burns"`
    49  }
    50  
    51  func (m *GenesisState) Reset()         { *m = GenesisState{} }
    52  func (m *GenesisState) String() string { return proto.CompactTextString(m) }
    53  func (*GenesisState) ProtoMessage()    {}
    54  func (*GenesisState) Descriptor() ([]byte, []int) {
    55  	return fileDescriptor_4528f1ba25ef9938, []int{0}
    56  }
    57  func (m *GenesisState) XXX_Unmarshal(b []byte) error {
    58  	return m.Unmarshal(b)
    59  }
    60  func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    61  	if deterministic {
    62  		return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic)
    63  	} else {
    64  		b = b[:cap(b)]
    65  		n, err := m.MarshalToSizedBuffer(b)
    66  		if err != nil {
    67  			return nil, err
    68  		}
    69  		return b[:n], nil
    70  	}
    71  }
    72  func (m *GenesisState) XXX_Merge(src proto.Message) {
    73  	xxx_messageInfo_GenesisState.Merge(m, src)
    74  }
    75  func (m *GenesisState) XXX_Size() int {
    76  	return m.Size()
    77  }
    78  func (m *GenesisState) XXX_DiscardUnknown() {
    79  	xxx_messageInfo_GenesisState.DiscardUnknown(m)
    80  }
    81  
    82  var xxx_messageInfo_GenesisState proto.InternalMessageInfo
    83  
    84  func (m *GenesisState) GetParams() Params {
    85  	if m != nil {
    86  		return m.Params
    87  	}
    88  	return Params{}
    89  }
    90  
    91  func (m *GenesisState) GetClassState() *ClassGenesisState {
    92  	if m != nil {
    93  		return m.ClassState
    94  	}
    95  	return nil
    96  }
    97  
    98  func (m *GenesisState) GetBalances() []ContractBalances {
    99  	if m != nil {
   100  		return m.Balances
   101  	}
   102  	return nil
   103  }
   104  
   105  func (m *GenesisState) GetClasses() []Contract {
   106  	if m != nil {
   107  		return m.Classes
   108  	}
   109  	return nil
   110  }
   111  
   112  func (m *GenesisState) GetGrants() []ContractGrants {
   113  	if m != nil {
   114  		return m.Grants
   115  	}
   116  	return nil
   117  }
   118  
   119  func (m *GenesisState) GetAuthorizations() []ContractAuthorizations {
   120  	if m != nil {
   121  		return m.Authorizations
   122  	}
   123  	return nil
   124  }
   125  
   126  func (m *GenesisState) GetSupplies() []ContractCoin {
   127  	if m != nil {
   128  		return m.Supplies
   129  	}
   130  	return nil
   131  }
   132  
   133  func (m *GenesisState) GetMints() []ContractCoin {
   134  	if m != nil {
   135  		return m.Mints
   136  	}
   137  	return nil
   138  }
   139  
   140  func (m *GenesisState) GetBurns() []ContractCoin {
   141  	if m != nil {
   142  		return m.Burns
   143  	}
   144  	return nil
   145  }
   146  
   147  // ClassGenesisState defines the classs keeper's genesis state.
   148  //
   149  // Deprecated: Do not use.
   150  type ClassGenesisState struct {
   151  	// nonce is the next class nonce to issue.
   152  	Nonce github_com_Finschia_finschia_sdk_types.Uint `protobuf:"bytes,1,opt,name=nonce,proto3,customtype=github.com/Finschia/finschia-sdk/types.Uint" json:"nonce"`
   153  	// ids represents the issued ids.
   154  	Ids []string `protobuf:"bytes,2,rep,name=ids,proto3" json:"ids,omitempty"`
   155  }
   156  
   157  func (m *ClassGenesisState) Reset()         { *m = ClassGenesisState{} }
   158  func (m *ClassGenesisState) String() string { return proto.CompactTextString(m) }
   159  func (*ClassGenesisState) ProtoMessage()    {}
   160  func (*ClassGenesisState) Descriptor() ([]byte, []int) {
   161  	return fileDescriptor_4528f1ba25ef9938, []int{1}
   162  }
   163  func (m *ClassGenesisState) XXX_Unmarshal(b []byte) error {
   164  	return m.Unmarshal(b)
   165  }
   166  func (m *ClassGenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   167  	if deterministic {
   168  		return xxx_messageInfo_ClassGenesisState.Marshal(b, m, deterministic)
   169  	} else {
   170  		b = b[:cap(b)]
   171  		n, err := m.MarshalToSizedBuffer(b)
   172  		if err != nil {
   173  			return nil, err
   174  		}
   175  		return b[:n], nil
   176  	}
   177  }
   178  func (m *ClassGenesisState) XXX_Merge(src proto.Message) {
   179  	xxx_messageInfo_ClassGenesisState.Merge(m, src)
   180  }
   181  func (m *ClassGenesisState) XXX_Size() int {
   182  	return m.Size()
   183  }
   184  func (m *ClassGenesisState) XXX_DiscardUnknown() {
   185  	xxx_messageInfo_ClassGenesisState.DiscardUnknown(m)
   186  }
   187  
   188  var xxx_messageInfo_ClassGenesisState proto.InternalMessageInfo
   189  
   190  func (m *ClassGenesisState) GetIds() []string {
   191  	if m != nil {
   192  		return m.Ids
   193  	}
   194  	return nil
   195  }
   196  
   197  // ContractBalances defines balances belong to a contract.
   198  // genesis state.
   199  //
   200  // Deprecated: Do not use.
   201  type ContractBalances struct {
   202  	// contract id associated with the token class.
   203  	ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"`
   204  	// balances of the contract.
   205  	Balances []Balance `protobuf:"bytes,2,rep,name=balances,proto3" json:"balances"`
   206  }
   207  
   208  func (m *ContractBalances) Reset()         { *m = ContractBalances{} }
   209  func (m *ContractBalances) String() string { return proto.CompactTextString(m) }
   210  func (*ContractBalances) ProtoMessage()    {}
   211  func (*ContractBalances) Descriptor() ([]byte, []int) {
   212  	return fileDescriptor_4528f1ba25ef9938, []int{2}
   213  }
   214  func (m *ContractBalances) XXX_Unmarshal(b []byte) error {
   215  	return m.Unmarshal(b)
   216  }
   217  func (m *ContractBalances) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   218  	if deterministic {
   219  		return xxx_messageInfo_ContractBalances.Marshal(b, m, deterministic)
   220  	} else {
   221  		b = b[:cap(b)]
   222  		n, err := m.MarshalToSizedBuffer(b)
   223  		if err != nil {
   224  			return nil, err
   225  		}
   226  		return b[:n], nil
   227  	}
   228  }
   229  func (m *ContractBalances) XXX_Merge(src proto.Message) {
   230  	xxx_messageInfo_ContractBalances.Merge(m, src)
   231  }
   232  func (m *ContractBalances) XXX_Size() int {
   233  	return m.Size()
   234  }
   235  func (m *ContractBalances) XXX_DiscardUnknown() {
   236  	xxx_messageInfo_ContractBalances.DiscardUnknown(m)
   237  }
   238  
   239  var xxx_messageInfo_ContractBalances proto.InternalMessageInfo
   240  
   241  func (m *ContractBalances) GetContractId() string {
   242  	if m != nil {
   243  		return m.ContractId
   244  	}
   245  	return ""
   246  }
   247  
   248  func (m *ContractBalances) GetBalances() []Balance {
   249  	if m != nil {
   250  		return m.Balances
   251  	}
   252  	return nil
   253  }
   254  
   255  // Balance defines a balance of an address.
   256  //
   257  // Deprecated: Do not use.
   258  type Balance struct {
   259  	// address of the holder.
   260  	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
   261  	// amount of the balance.
   262  	Amount github_com_Finschia_finschia_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/Finschia/finschia-sdk/types.Int" json:"amount"`
   263  }
   264  
   265  func (m *Balance) Reset()         { *m = Balance{} }
   266  func (m *Balance) String() string { return proto.CompactTextString(m) }
   267  func (*Balance) ProtoMessage()    {}
   268  func (*Balance) Descriptor() ([]byte, []int) {
   269  	return fileDescriptor_4528f1ba25ef9938, []int{3}
   270  }
   271  func (m *Balance) XXX_Unmarshal(b []byte) error {
   272  	return m.Unmarshal(b)
   273  }
   274  func (m *Balance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   275  	if deterministic {
   276  		return xxx_messageInfo_Balance.Marshal(b, m, deterministic)
   277  	} else {
   278  		b = b[:cap(b)]
   279  		n, err := m.MarshalToSizedBuffer(b)
   280  		if err != nil {
   281  			return nil, err
   282  		}
   283  		return b[:n], nil
   284  	}
   285  }
   286  func (m *Balance) XXX_Merge(src proto.Message) {
   287  	xxx_messageInfo_Balance.Merge(m, src)
   288  }
   289  func (m *Balance) XXX_Size() int {
   290  	return m.Size()
   291  }
   292  func (m *Balance) XXX_DiscardUnknown() {
   293  	xxx_messageInfo_Balance.DiscardUnknown(m)
   294  }
   295  
   296  var xxx_messageInfo_Balance proto.InternalMessageInfo
   297  
   298  func (m *Balance) GetAddress() string {
   299  	if m != nil {
   300  		return m.Address
   301  	}
   302  	return ""
   303  }
   304  
   305  // ContractAuthorizations defines authorizations belong to a contract.
   306  //
   307  // Deprecated: Do not use.
   308  type ContractAuthorizations struct {
   309  	// contract id associated with the token class.
   310  	ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"`
   311  	// authorizations of the contract.
   312  	Authorizations []Authorization `protobuf:"bytes,2,rep,name=authorizations,proto3" json:"authorizations"`
   313  }
   314  
   315  func (m *ContractAuthorizations) Reset()         { *m = ContractAuthorizations{} }
   316  func (m *ContractAuthorizations) String() string { return proto.CompactTextString(m) }
   317  func (*ContractAuthorizations) ProtoMessage()    {}
   318  func (*ContractAuthorizations) Descriptor() ([]byte, []int) {
   319  	return fileDescriptor_4528f1ba25ef9938, []int{4}
   320  }
   321  func (m *ContractAuthorizations) XXX_Unmarshal(b []byte) error {
   322  	return m.Unmarshal(b)
   323  }
   324  func (m *ContractAuthorizations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   325  	if deterministic {
   326  		return xxx_messageInfo_ContractAuthorizations.Marshal(b, m, deterministic)
   327  	} else {
   328  		b = b[:cap(b)]
   329  		n, err := m.MarshalToSizedBuffer(b)
   330  		if err != nil {
   331  			return nil, err
   332  		}
   333  		return b[:n], nil
   334  	}
   335  }
   336  func (m *ContractAuthorizations) XXX_Merge(src proto.Message) {
   337  	xxx_messageInfo_ContractAuthorizations.Merge(m, src)
   338  }
   339  func (m *ContractAuthorizations) XXX_Size() int {
   340  	return m.Size()
   341  }
   342  func (m *ContractAuthorizations) XXX_DiscardUnknown() {
   343  	xxx_messageInfo_ContractAuthorizations.DiscardUnknown(m)
   344  }
   345  
   346  var xxx_messageInfo_ContractAuthorizations proto.InternalMessageInfo
   347  
   348  func (m *ContractAuthorizations) GetContractId() string {
   349  	if m != nil {
   350  		return m.ContractId
   351  	}
   352  	return ""
   353  }
   354  
   355  func (m *ContractAuthorizations) GetAuthorizations() []Authorization {
   356  	if m != nil {
   357  		return m.Authorizations
   358  	}
   359  	return nil
   360  }
   361  
   362  // ContractGrant defines grants belong to a contract.
   363  //
   364  // Deprecated: Do not use.
   365  type ContractGrants struct {
   366  	// contract id associated with the token class.
   367  	ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"`
   368  	// grants of the contract.
   369  	Grants []Grant `protobuf:"bytes,2,rep,name=grants,proto3" json:"grants"`
   370  }
   371  
   372  func (m *ContractGrants) Reset()         { *m = ContractGrants{} }
   373  func (m *ContractGrants) String() string { return proto.CompactTextString(m) }
   374  func (*ContractGrants) ProtoMessage()    {}
   375  func (*ContractGrants) Descriptor() ([]byte, []int) {
   376  	return fileDescriptor_4528f1ba25ef9938, []int{5}
   377  }
   378  func (m *ContractGrants) XXX_Unmarshal(b []byte) error {
   379  	return m.Unmarshal(b)
   380  }
   381  func (m *ContractGrants) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   382  	if deterministic {
   383  		return xxx_messageInfo_ContractGrants.Marshal(b, m, deterministic)
   384  	} else {
   385  		b = b[:cap(b)]
   386  		n, err := m.MarshalToSizedBuffer(b)
   387  		if err != nil {
   388  			return nil, err
   389  		}
   390  		return b[:n], nil
   391  	}
   392  }
   393  func (m *ContractGrants) XXX_Merge(src proto.Message) {
   394  	xxx_messageInfo_ContractGrants.Merge(m, src)
   395  }
   396  func (m *ContractGrants) XXX_Size() int {
   397  	return m.Size()
   398  }
   399  func (m *ContractGrants) XXX_DiscardUnknown() {
   400  	xxx_messageInfo_ContractGrants.DiscardUnknown(m)
   401  }
   402  
   403  var xxx_messageInfo_ContractGrants proto.InternalMessageInfo
   404  
   405  func (m *ContractGrants) GetContractId() string {
   406  	if m != nil {
   407  		return m.ContractId
   408  	}
   409  	return ""
   410  }
   411  
   412  func (m *ContractGrants) GetGrants() []Grant {
   413  	if m != nil {
   414  		return m.Grants
   415  	}
   416  	return nil
   417  }
   418  
   419  // Deprecated: Do not use.
   420  type ContractCoin struct {
   421  	// contract id associated with the token class.
   422  	ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"`
   423  	// amount of the token.
   424  	Amount github_com_Finschia_finschia_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/Finschia/finschia-sdk/types.Int" json:"amount"`
   425  }
   426  
   427  func (m *ContractCoin) Reset()         { *m = ContractCoin{} }
   428  func (m *ContractCoin) String() string { return proto.CompactTextString(m) }
   429  func (*ContractCoin) ProtoMessage()    {}
   430  func (*ContractCoin) Descriptor() ([]byte, []int) {
   431  	return fileDescriptor_4528f1ba25ef9938, []int{6}
   432  }
   433  func (m *ContractCoin) XXX_Unmarshal(b []byte) error {
   434  	return m.Unmarshal(b)
   435  }
   436  func (m *ContractCoin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   437  	if deterministic {
   438  		return xxx_messageInfo_ContractCoin.Marshal(b, m, deterministic)
   439  	} else {
   440  		b = b[:cap(b)]
   441  		n, err := m.MarshalToSizedBuffer(b)
   442  		if err != nil {
   443  			return nil, err
   444  		}
   445  		return b[:n], nil
   446  	}
   447  }
   448  func (m *ContractCoin) XXX_Merge(src proto.Message) {
   449  	xxx_messageInfo_ContractCoin.Merge(m, src)
   450  }
   451  func (m *ContractCoin) XXX_Size() int {
   452  	return m.Size()
   453  }
   454  func (m *ContractCoin) XXX_DiscardUnknown() {
   455  	xxx_messageInfo_ContractCoin.DiscardUnknown(m)
   456  }
   457  
   458  var xxx_messageInfo_ContractCoin proto.InternalMessageInfo
   459  
   460  func (m *ContractCoin) GetContractId() string {
   461  	if m != nil {
   462  		return m.ContractId
   463  	}
   464  	return ""
   465  }
   466  
   467  func init() {
   468  	proto.RegisterType((*GenesisState)(nil), "lbm.token.v1.GenesisState")
   469  	proto.RegisterType((*ClassGenesisState)(nil), "lbm.token.v1.ClassGenesisState")
   470  	proto.RegisterType((*ContractBalances)(nil), "lbm.token.v1.ContractBalances")
   471  	proto.RegisterType((*Balance)(nil), "lbm.token.v1.Balance")
   472  	proto.RegisterType((*ContractAuthorizations)(nil), "lbm.token.v1.ContractAuthorizations")
   473  	proto.RegisterType((*ContractGrants)(nil), "lbm.token.v1.ContractGrants")
   474  	proto.RegisterType((*ContractCoin)(nil), "lbm.token.v1.ContractCoin")
   475  }
   476  
   477  func init() { proto.RegisterFile("lbm/token/v1/genesis.proto", fileDescriptor_4528f1ba25ef9938) }
   478  
   479  var fileDescriptor_4528f1ba25ef9938 = []byte{
   480  	// 592 bytes of a gzipped FileDescriptorProto
   481  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x3f, 0x6f, 0xd3, 0x4e,
   482  	0x1c, 0xc6, 0xe3, 0xa4, 0x75, 0x9a, 0x6f, 0xaa, 0xaa, 0xbf, 0xfb, 0x95, 0xea, 0x14, 0x90, 0x53,
   483  	0x55, 0x0c, 0x11, 0x08, 0x5b, 0x49, 0xa5, 0x22, 0x45, 0x0c, 0xc5, 0x95, 0xa8, 0xc2, 0x84, 0x8c,
   484  	0x58, 0x58, 0xaa, 0xf3, 0x1f, 0x92, 0x53, 0xe3, 0x3b, 0xcb, 0x77, 0x29, 0x7f, 0x16, 0x56, 0x46,
   485  	0x5e, 0x02, 0x2f, 0x85, 0xb1, 0x63, 0x47, 0xc4, 0x50, 0xa1, 0x64, 0xe1, 0x65, 0x20, 0xdf, 0xd9,
   486  	0x55, 0x9c, 0x06, 0x25, 0x03, 0xdb, 0xc5, 0xf7, 0x3c, 0x9f, 0xc7, 0xcf, 0xe5, 0x7b, 0x86, 0xd6,
   487  	0xd8, 0x8f, 0x1d, 0xc9, 0x2f, 0x22, 0xe6, 0x5c, 0x76, 0x9d, 0x61, 0xc4, 0x22, 0x41, 0x85, 0x9d,
   488  	0xa4, 0x5c, 0x72, 0xb4, 0x3d, 0xf6, 0x63, 0x5b, 0xed, 0xd9, 0x97, 0xdd, 0xd6, 0xde, 0x90, 0x0f,
   489  	0xb9, 0xda, 0x70, 0xb2, 0x95, 0xd6, 0xb4, 0x70, 0xc9, 0xaf, 0xc5, 0x6a, 0xe7, 0xf0, 0xfb, 0x06,
   490  	0x6c, 0x9f, 0x69, 0xde, 0x6b, 0x49, 0x64, 0x84, 0x7a, 0x60, 0x26, 0x24, 0x25, 0xb1, 0xc0, 0xc6,
   491  	0x81, 0xd1, 0x69, 0xf6, 0xf6, 0xec, 0x79, 0xbe, 0xfd, 0x4a, 0xed, 0xb9, 0x1b, 0x57, 0x37, 0xed,
   492  	0x8a, 0x97, 0x2b, 0xd1, 0x09, 0x34, 0x83, 0x31, 0x11, 0xe2, 0x5c, 0x64, 0x08, 0x5c, 0x55, 0xc6,
   493  	0x76, 0xd9, 0x78, 0x9a, 0x09, 0xe6, 0x93, 0x3c, 0x50, 0x1e, 0x9d, 0x7a, 0x02, 0x5b, 0x3e, 0x19,
   494  	0x13, 0x16, 0x44, 0x02, 0xd7, 0x0e, 0x6a, 0x9d, 0x66, 0xcf, 0x5a, 0xb0, 0x73, 0x26, 0x53, 0x12,
   495  	0x48, 0x37, 0x57, 0xe5, 0x6f, 0x70, 0xeb, 0x42, 0xc7, 0x50, 0x57, 0xbc, 0x48, 0xe0, 0x0d, 0x05,
   496  	0xd8, 0xff, 0x0b, 0x40, 0x1b, 0x0b, 0x31, 0xea, 0x83, 0x39, 0x4c, 0x09, 0x93, 0x02, 0x6f, 0x2a,
   497  	0xdb, 0x83, 0xe5, 0xb6, 0x33, 0xa5, 0x29, 0x7a, 0x6b, 0x07, 0xf2, 0x60, 0x87, 0x4c, 0xe4, 0x88,
   498  	0xa7, 0xf4, 0x13, 0x91, 0x94, 0x33, 0x81, 0x4d, 0xc5, 0x78, 0xb8, 0x9c, 0xf1, 0xbc, 0xa4, 0xcd,
   499  	0x59, 0x0b, 0x04, 0xf4, 0x0c, 0xb6, 0xc4, 0x24, 0x49, 0xc6, 0x34, 0x12, 0xb8, 0xae, 0x68, 0xad,
   500  	0xe5, 0xb4, 0x53, 0x4e, 0x59, 0x71, 0x0a, 0x85, 0x03, 0x1d, 0xc3, 0x66, 0x4c, 0xb3, 0x32, 0x5b,
   501  	0x6b, 0x5a, 0xb5, 0x3c, 0xf3, 0xf9, 0x93, 0x94, 0x09, 0xdc, 0x58, 0xd7, 0xa7, 0xe4, 0xfd, 0x2a,
   502  	0x36, 0x0e, 0x25, 0xfc, 0x77, 0xe7, 0xcf, 0x45, 0x03, 0xd8, 0x64, 0x9c, 0x05, 0x91, 0x9a, 0xa2,
   503  	0x86, 0x7b, 0x94, 0x99, 0x7e, 0xde, 0xb4, 0x1f, 0x0f, 0xa9, 0x1c, 0x4d, 0x7c, 0x3b, 0xe0, 0xb1,
   504  	0xf3, 0x82, 0x32, 0x11, 0x8c, 0x28, 0x71, 0xde, 0xe5, 0x8b, 0x27, 0x22, 0xbc, 0x70, 0xe4, 0xc7,
   505  	0x24, 0x12, 0xf6, 0x1b, 0xca, 0xa4, 0xa7, 0x09, 0x68, 0x17, 0x6a, 0x34, 0x14, 0xb8, 0x7a, 0x50,
   506  	0xeb, 0x34, 0xbc, 0x6c, 0xa9, 0x52, 0x13, 0xd8, 0x5d, 0x9c, 0x09, 0xd4, 0x86, 0x66, 0x90, 0x3f,
   507  	0x3b, 0xa7, 0xa1, 0x8e, 0xf6, 0xa0, 0x78, 0x34, 0x08, 0xd1, 0xd3, 0xb9, 0x31, 0xab, 0xaa, 0xa6,
   508  	0xf7, 0xca, 0x4d, 0x73, 0xd4, 0xe2, 0x74, 0xa9, 0xc4, 0xf7, 0x50, 0xcf, 0xb7, 0x11, 0x86, 0x3a,
   509  	0x09, 0xc3, 0x34, 0x12, 0x22, 0x0f, 0x29, 0x7e, 0xa2, 0x97, 0x60, 0x92, 0x98, 0x4f, 0x98, 0x54,
   510  	0xb7, 0xa0, 0xe1, 0xf6, 0xf2, 0xe2, 0x8f, 0xd6, 0x2c, 0x3e, 0x60, 0xd2, 0xcb, 0x09, 0x7d, 0xf3,
   511  	0xf7, 0xb7, 0xb6, 0x81, 0x8d, 0xc3, 0x2f, 0x06, 0xec, 0x2f, 0x9f, 0xa1, 0xd5, 0x8d, 0x07, 0x77,
   512  	0x46, 0x54, 0xf7, 0xbe, 0x5f, 0xee, 0x5d, 0xc2, 0x2e, 0x9f, 0x4c, 0x75, 0x06, 0x23, 0xd8, 0x29,
   513  	0xdf, 0x88, 0xd5, 0x6f, 0xd0, 0xbd, 0xbd, 0x60, 0x3a, 0xf9, 0xff, 0x72, 0xb2, 0xc2, 0x94, 0xef,
   514  	0x95, 0x4a, 0xfa, 0x0c, 0xdb, 0xf3, 0x63, 0xb7, 0x3a, 0xe7, 0x5f, 0x9e, 0x7c, 0x15, 0x1b, 0xae,
   515  	0x7b, 0x35, 0xb5, 0x8c, 0xeb, 0xa9, 0x65, 0xfc, 0x9a, 0x5a, 0xc6, 0xd7, 0x99, 0x55, 0xb9, 0x9e,
   516  	0x59, 0x95, 0x1f, 0x33, 0xab, 0xf2, 0xb6, 0xb3, 0x92, 0xf8, 0x41, 0x7f, 0x63, 0x7d, 0x53, 0x7d,
   517  	0x64, 0x8f, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0x2a, 0xaf, 0x98, 0x1b, 0xc0, 0x05, 0x00, 0x00,
   518  }
   519  
   520  func (this *Balance) Equal(that interface{}) bool {
   521  	if that == nil {
   522  		return this == nil
   523  	}
   524  
   525  	that1, ok := that.(*Balance)
   526  	if !ok {
   527  		that2, ok := that.(Balance)
   528  		if ok {
   529  			that1 = &that2
   530  		} else {
   531  			return false
   532  		}
   533  	}
   534  	if that1 == nil {
   535  		return this == nil
   536  	} else if this == nil {
   537  		return false
   538  	}
   539  	if this.Address != that1.Address {
   540  		return false
   541  	}
   542  	if !this.Amount.Equal(that1.Amount) {
   543  		return false
   544  	}
   545  	return true
   546  }
   547  func (m *GenesisState) Marshal() (dAtA []byte, err error) {
   548  	size := m.Size()
   549  	dAtA = make([]byte, size)
   550  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   551  	if err != nil {
   552  		return nil, err
   553  	}
   554  	return dAtA[:n], nil
   555  }
   556  
   557  func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) {
   558  	size := m.Size()
   559  	return m.MarshalToSizedBuffer(dAtA[:size])
   560  }
   561  
   562  func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   563  	i := len(dAtA)
   564  	_ = i
   565  	var l int
   566  	_ = l
   567  	if len(m.Burns) > 0 {
   568  		for iNdEx := len(m.Burns) - 1; iNdEx >= 0; iNdEx-- {
   569  			{
   570  				size, err := m.Burns[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   571  				if err != nil {
   572  					return 0, err
   573  				}
   574  				i -= size
   575  				i = encodeVarintGenesis(dAtA, i, uint64(size))
   576  			}
   577  			i--
   578  			dAtA[i] = 0x4a
   579  		}
   580  	}
   581  	if len(m.Mints) > 0 {
   582  		for iNdEx := len(m.Mints) - 1; iNdEx >= 0; iNdEx-- {
   583  			{
   584  				size, err := m.Mints[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   585  				if err != nil {
   586  					return 0, err
   587  				}
   588  				i -= size
   589  				i = encodeVarintGenesis(dAtA, i, uint64(size))
   590  			}
   591  			i--
   592  			dAtA[i] = 0x42
   593  		}
   594  	}
   595  	if len(m.Supplies) > 0 {
   596  		for iNdEx := len(m.Supplies) - 1; iNdEx >= 0; iNdEx-- {
   597  			{
   598  				size, err := m.Supplies[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   599  				if err != nil {
   600  					return 0, err
   601  				}
   602  				i -= size
   603  				i = encodeVarintGenesis(dAtA, i, uint64(size))
   604  			}
   605  			i--
   606  			dAtA[i] = 0x3a
   607  		}
   608  	}
   609  	if len(m.Authorizations) > 0 {
   610  		for iNdEx := len(m.Authorizations) - 1; iNdEx >= 0; iNdEx-- {
   611  			{
   612  				size, err := m.Authorizations[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   613  				if err != nil {
   614  					return 0, err
   615  				}
   616  				i -= size
   617  				i = encodeVarintGenesis(dAtA, i, uint64(size))
   618  			}
   619  			i--
   620  			dAtA[i] = 0x32
   621  		}
   622  	}
   623  	if len(m.Grants) > 0 {
   624  		for iNdEx := len(m.Grants) - 1; iNdEx >= 0; iNdEx-- {
   625  			{
   626  				size, err := m.Grants[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   627  				if err != nil {
   628  					return 0, err
   629  				}
   630  				i -= size
   631  				i = encodeVarintGenesis(dAtA, i, uint64(size))
   632  			}
   633  			i--
   634  			dAtA[i] = 0x2a
   635  		}
   636  	}
   637  	if len(m.Classes) > 0 {
   638  		for iNdEx := len(m.Classes) - 1; iNdEx >= 0; iNdEx-- {
   639  			{
   640  				size, err := m.Classes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   641  				if err != nil {
   642  					return 0, err
   643  				}
   644  				i -= size
   645  				i = encodeVarintGenesis(dAtA, i, uint64(size))
   646  			}
   647  			i--
   648  			dAtA[i] = 0x22
   649  		}
   650  	}
   651  	if len(m.Balances) > 0 {
   652  		for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- {
   653  			{
   654  				size, err := m.Balances[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   655  				if err != nil {
   656  					return 0, err
   657  				}
   658  				i -= size
   659  				i = encodeVarintGenesis(dAtA, i, uint64(size))
   660  			}
   661  			i--
   662  			dAtA[i] = 0x1a
   663  		}
   664  	}
   665  	if m.ClassState != nil {
   666  		{
   667  			size, err := m.ClassState.MarshalToSizedBuffer(dAtA[:i])
   668  			if err != nil {
   669  				return 0, err
   670  			}
   671  			i -= size
   672  			i = encodeVarintGenesis(dAtA, i, uint64(size))
   673  		}
   674  		i--
   675  		dAtA[i] = 0x12
   676  	}
   677  	{
   678  		size, err := m.Params.MarshalToSizedBuffer(dAtA[:i])
   679  		if err != nil {
   680  			return 0, err
   681  		}
   682  		i -= size
   683  		i = encodeVarintGenesis(dAtA, i, uint64(size))
   684  	}
   685  	i--
   686  	dAtA[i] = 0xa
   687  	return len(dAtA) - i, nil
   688  }
   689  
   690  func (m *ClassGenesisState) Marshal() (dAtA []byte, err error) {
   691  	size := m.Size()
   692  	dAtA = make([]byte, size)
   693  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   694  	if err != nil {
   695  		return nil, err
   696  	}
   697  	return dAtA[:n], nil
   698  }
   699  
   700  func (m *ClassGenesisState) MarshalTo(dAtA []byte) (int, error) {
   701  	size := m.Size()
   702  	return m.MarshalToSizedBuffer(dAtA[:size])
   703  }
   704  
   705  func (m *ClassGenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   706  	i := len(dAtA)
   707  	_ = i
   708  	var l int
   709  	_ = l
   710  	if len(m.Ids) > 0 {
   711  		for iNdEx := len(m.Ids) - 1; iNdEx >= 0; iNdEx-- {
   712  			i -= len(m.Ids[iNdEx])
   713  			copy(dAtA[i:], m.Ids[iNdEx])
   714  			i = encodeVarintGenesis(dAtA, i, uint64(len(m.Ids[iNdEx])))
   715  			i--
   716  			dAtA[i] = 0x12
   717  		}
   718  	}
   719  	{
   720  		size := m.Nonce.Size()
   721  		i -= size
   722  		if _, err := m.Nonce.MarshalTo(dAtA[i:]); err != nil {
   723  			return 0, err
   724  		}
   725  		i = encodeVarintGenesis(dAtA, i, uint64(size))
   726  	}
   727  	i--
   728  	dAtA[i] = 0xa
   729  	return len(dAtA) - i, nil
   730  }
   731  
   732  func (m *ContractBalances) Marshal() (dAtA []byte, err error) {
   733  	size := m.Size()
   734  	dAtA = make([]byte, size)
   735  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   736  	if err != nil {
   737  		return nil, err
   738  	}
   739  	return dAtA[:n], nil
   740  }
   741  
   742  func (m *ContractBalances) MarshalTo(dAtA []byte) (int, error) {
   743  	size := m.Size()
   744  	return m.MarshalToSizedBuffer(dAtA[:size])
   745  }
   746  
   747  func (m *ContractBalances) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   748  	i := len(dAtA)
   749  	_ = i
   750  	var l int
   751  	_ = l
   752  	if len(m.Balances) > 0 {
   753  		for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- {
   754  			{
   755  				size, err := m.Balances[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   756  				if err != nil {
   757  					return 0, err
   758  				}
   759  				i -= size
   760  				i = encodeVarintGenesis(dAtA, i, uint64(size))
   761  			}
   762  			i--
   763  			dAtA[i] = 0x12
   764  		}
   765  	}
   766  	if len(m.ContractId) > 0 {
   767  		i -= len(m.ContractId)
   768  		copy(dAtA[i:], m.ContractId)
   769  		i = encodeVarintGenesis(dAtA, i, uint64(len(m.ContractId)))
   770  		i--
   771  		dAtA[i] = 0xa
   772  	}
   773  	return len(dAtA) - i, nil
   774  }
   775  
   776  func (m *Balance) Marshal() (dAtA []byte, err error) {
   777  	size := m.Size()
   778  	dAtA = make([]byte, size)
   779  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   780  	if err != nil {
   781  		return nil, err
   782  	}
   783  	return dAtA[:n], nil
   784  }
   785  
   786  func (m *Balance) MarshalTo(dAtA []byte) (int, error) {
   787  	size := m.Size()
   788  	return m.MarshalToSizedBuffer(dAtA[:size])
   789  }
   790  
   791  func (m *Balance) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   792  	i := len(dAtA)
   793  	_ = i
   794  	var l int
   795  	_ = l
   796  	{
   797  		size := m.Amount.Size()
   798  		i -= size
   799  		if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil {
   800  			return 0, err
   801  		}
   802  		i = encodeVarintGenesis(dAtA, i, uint64(size))
   803  	}
   804  	i--
   805  	dAtA[i] = 0x12
   806  	if len(m.Address) > 0 {
   807  		i -= len(m.Address)
   808  		copy(dAtA[i:], m.Address)
   809  		i = encodeVarintGenesis(dAtA, i, uint64(len(m.Address)))
   810  		i--
   811  		dAtA[i] = 0xa
   812  	}
   813  	return len(dAtA) - i, nil
   814  }
   815  
   816  func (m *ContractAuthorizations) Marshal() (dAtA []byte, err error) {
   817  	size := m.Size()
   818  	dAtA = make([]byte, size)
   819  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   820  	if err != nil {
   821  		return nil, err
   822  	}
   823  	return dAtA[:n], nil
   824  }
   825  
   826  func (m *ContractAuthorizations) MarshalTo(dAtA []byte) (int, error) {
   827  	size := m.Size()
   828  	return m.MarshalToSizedBuffer(dAtA[:size])
   829  }
   830  
   831  func (m *ContractAuthorizations) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   832  	i := len(dAtA)
   833  	_ = i
   834  	var l int
   835  	_ = l
   836  	if len(m.Authorizations) > 0 {
   837  		for iNdEx := len(m.Authorizations) - 1; iNdEx >= 0; iNdEx-- {
   838  			{
   839  				size, err := m.Authorizations[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   840  				if err != nil {
   841  					return 0, err
   842  				}
   843  				i -= size
   844  				i = encodeVarintGenesis(dAtA, i, uint64(size))
   845  			}
   846  			i--
   847  			dAtA[i] = 0x12
   848  		}
   849  	}
   850  	if len(m.ContractId) > 0 {
   851  		i -= len(m.ContractId)
   852  		copy(dAtA[i:], m.ContractId)
   853  		i = encodeVarintGenesis(dAtA, i, uint64(len(m.ContractId)))
   854  		i--
   855  		dAtA[i] = 0xa
   856  	}
   857  	return len(dAtA) - i, nil
   858  }
   859  
   860  func (m *ContractGrants) Marshal() (dAtA []byte, err error) {
   861  	size := m.Size()
   862  	dAtA = make([]byte, size)
   863  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   864  	if err != nil {
   865  		return nil, err
   866  	}
   867  	return dAtA[:n], nil
   868  }
   869  
   870  func (m *ContractGrants) MarshalTo(dAtA []byte) (int, error) {
   871  	size := m.Size()
   872  	return m.MarshalToSizedBuffer(dAtA[:size])
   873  }
   874  
   875  func (m *ContractGrants) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   876  	i := len(dAtA)
   877  	_ = i
   878  	var l int
   879  	_ = l
   880  	if len(m.Grants) > 0 {
   881  		for iNdEx := len(m.Grants) - 1; iNdEx >= 0; iNdEx-- {
   882  			{
   883  				size, err := m.Grants[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   884  				if err != nil {
   885  					return 0, err
   886  				}
   887  				i -= size
   888  				i = encodeVarintGenesis(dAtA, i, uint64(size))
   889  			}
   890  			i--
   891  			dAtA[i] = 0x12
   892  		}
   893  	}
   894  	if len(m.ContractId) > 0 {
   895  		i -= len(m.ContractId)
   896  		copy(dAtA[i:], m.ContractId)
   897  		i = encodeVarintGenesis(dAtA, i, uint64(len(m.ContractId)))
   898  		i--
   899  		dAtA[i] = 0xa
   900  	}
   901  	return len(dAtA) - i, nil
   902  }
   903  
   904  func (m *ContractCoin) Marshal() (dAtA []byte, err error) {
   905  	size := m.Size()
   906  	dAtA = make([]byte, size)
   907  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   908  	if err != nil {
   909  		return nil, err
   910  	}
   911  	return dAtA[:n], nil
   912  }
   913  
   914  func (m *ContractCoin) MarshalTo(dAtA []byte) (int, error) {
   915  	size := m.Size()
   916  	return m.MarshalToSizedBuffer(dAtA[:size])
   917  }
   918  
   919  func (m *ContractCoin) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   920  	i := len(dAtA)
   921  	_ = i
   922  	var l int
   923  	_ = l
   924  	{
   925  		size := m.Amount.Size()
   926  		i -= size
   927  		if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil {
   928  			return 0, err
   929  		}
   930  		i = encodeVarintGenesis(dAtA, i, uint64(size))
   931  	}
   932  	i--
   933  	dAtA[i] = 0x12
   934  	if len(m.ContractId) > 0 {
   935  		i -= len(m.ContractId)
   936  		copy(dAtA[i:], m.ContractId)
   937  		i = encodeVarintGenesis(dAtA, i, uint64(len(m.ContractId)))
   938  		i--
   939  		dAtA[i] = 0xa
   940  	}
   941  	return len(dAtA) - i, nil
   942  }
   943  
   944  func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int {
   945  	offset -= sovGenesis(v)
   946  	base := offset
   947  	for v >= 1<<7 {
   948  		dAtA[offset] = uint8(v&0x7f | 0x80)
   949  		v >>= 7
   950  		offset++
   951  	}
   952  	dAtA[offset] = uint8(v)
   953  	return base
   954  }
   955  func (m *GenesisState) Size() (n int) {
   956  	if m == nil {
   957  		return 0
   958  	}
   959  	var l int
   960  	_ = l
   961  	l = m.Params.Size()
   962  	n += 1 + l + sovGenesis(uint64(l))
   963  	if m.ClassState != nil {
   964  		l = m.ClassState.Size()
   965  		n += 1 + l + sovGenesis(uint64(l))
   966  	}
   967  	if len(m.Balances) > 0 {
   968  		for _, e := range m.Balances {
   969  			l = e.Size()
   970  			n += 1 + l + sovGenesis(uint64(l))
   971  		}
   972  	}
   973  	if len(m.Classes) > 0 {
   974  		for _, e := range m.Classes {
   975  			l = e.Size()
   976  			n += 1 + l + sovGenesis(uint64(l))
   977  		}
   978  	}
   979  	if len(m.Grants) > 0 {
   980  		for _, e := range m.Grants {
   981  			l = e.Size()
   982  			n += 1 + l + sovGenesis(uint64(l))
   983  		}
   984  	}
   985  	if len(m.Authorizations) > 0 {
   986  		for _, e := range m.Authorizations {
   987  			l = e.Size()
   988  			n += 1 + l + sovGenesis(uint64(l))
   989  		}
   990  	}
   991  	if len(m.Supplies) > 0 {
   992  		for _, e := range m.Supplies {
   993  			l = e.Size()
   994  			n += 1 + l + sovGenesis(uint64(l))
   995  		}
   996  	}
   997  	if len(m.Mints) > 0 {
   998  		for _, e := range m.Mints {
   999  			l = e.Size()
  1000  			n += 1 + l + sovGenesis(uint64(l))
  1001  		}
  1002  	}
  1003  	if len(m.Burns) > 0 {
  1004  		for _, e := range m.Burns {
  1005  			l = e.Size()
  1006  			n += 1 + l + sovGenesis(uint64(l))
  1007  		}
  1008  	}
  1009  	return n
  1010  }
  1011  
  1012  func (m *ClassGenesisState) Size() (n int) {
  1013  	if m == nil {
  1014  		return 0
  1015  	}
  1016  	var l int
  1017  	_ = l
  1018  	l = m.Nonce.Size()
  1019  	n += 1 + l + sovGenesis(uint64(l))
  1020  	if len(m.Ids) > 0 {
  1021  		for _, s := range m.Ids {
  1022  			l = len(s)
  1023  			n += 1 + l + sovGenesis(uint64(l))
  1024  		}
  1025  	}
  1026  	return n
  1027  }
  1028  
  1029  func (m *ContractBalances) Size() (n int) {
  1030  	if m == nil {
  1031  		return 0
  1032  	}
  1033  	var l int
  1034  	_ = l
  1035  	l = len(m.ContractId)
  1036  	if l > 0 {
  1037  		n += 1 + l + sovGenesis(uint64(l))
  1038  	}
  1039  	if len(m.Balances) > 0 {
  1040  		for _, e := range m.Balances {
  1041  			l = e.Size()
  1042  			n += 1 + l + sovGenesis(uint64(l))
  1043  		}
  1044  	}
  1045  	return n
  1046  }
  1047  
  1048  func (m *Balance) Size() (n int) {
  1049  	if m == nil {
  1050  		return 0
  1051  	}
  1052  	var l int
  1053  	_ = l
  1054  	l = len(m.Address)
  1055  	if l > 0 {
  1056  		n += 1 + l + sovGenesis(uint64(l))
  1057  	}
  1058  	l = m.Amount.Size()
  1059  	n += 1 + l + sovGenesis(uint64(l))
  1060  	return n
  1061  }
  1062  
  1063  func (m *ContractAuthorizations) Size() (n int) {
  1064  	if m == nil {
  1065  		return 0
  1066  	}
  1067  	var l int
  1068  	_ = l
  1069  	l = len(m.ContractId)
  1070  	if l > 0 {
  1071  		n += 1 + l + sovGenesis(uint64(l))
  1072  	}
  1073  	if len(m.Authorizations) > 0 {
  1074  		for _, e := range m.Authorizations {
  1075  			l = e.Size()
  1076  			n += 1 + l + sovGenesis(uint64(l))
  1077  		}
  1078  	}
  1079  	return n
  1080  }
  1081  
  1082  func (m *ContractGrants) Size() (n int) {
  1083  	if m == nil {
  1084  		return 0
  1085  	}
  1086  	var l int
  1087  	_ = l
  1088  	l = len(m.ContractId)
  1089  	if l > 0 {
  1090  		n += 1 + l + sovGenesis(uint64(l))
  1091  	}
  1092  	if len(m.Grants) > 0 {
  1093  		for _, e := range m.Grants {
  1094  			l = e.Size()
  1095  			n += 1 + l + sovGenesis(uint64(l))
  1096  		}
  1097  	}
  1098  	return n
  1099  }
  1100  
  1101  func (m *ContractCoin) Size() (n int) {
  1102  	if m == nil {
  1103  		return 0
  1104  	}
  1105  	var l int
  1106  	_ = l
  1107  	l = len(m.ContractId)
  1108  	if l > 0 {
  1109  		n += 1 + l + sovGenesis(uint64(l))
  1110  	}
  1111  	l = m.Amount.Size()
  1112  	n += 1 + l + sovGenesis(uint64(l))
  1113  	return n
  1114  }
  1115  
  1116  func sovGenesis(x uint64) (n int) {
  1117  	return (math_bits.Len64(x|1) + 6) / 7
  1118  }
  1119  func sozGenesis(x uint64) (n int) {
  1120  	return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1121  }
  1122  func (m *GenesisState) Unmarshal(dAtA []byte) error {
  1123  	l := len(dAtA)
  1124  	iNdEx := 0
  1125  	for iNdEx < l {
  1126  		preIndex := iNdEx
  1127  		var wire uint64
  1128  		for shift := uint(0); ; shift += 7 {
  1129  			if shift >= 64 {
  1130  				return ErrIntOverflowGenesis
  1131  			}
  1132  			if iNdEx >= l {
  1133  				return io.ErrUnexpectedEOF
  1134  			}
  1135  			b := dAtA[iNdEx]
  1136  			iNdEx++
  1137  			wire |= uint64(b&0x7F) << shift
  1138  			if b < 0x80 {
  1139  				break
  1140  			}
  1141  		}
  1142  		fieldNum := int32(wire >> 3)
  1143  		wireType := int(wire & 0x7)
  1144  		if wireType == 4 {
  1145  			return fmt.Errorf("proto: GenesisState: wiretype end group for non-group")
  1146  		}
  1147  		if fieldNum <= 0 {
  1148  			return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire)
  1149  		}
  1150  		switch fieldNum {
  1151  		case 1:
  1152  			if wireType != 2 {
  1153  				return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType)
  1154  			}
  1155  			var msglen int
  1156  			for shift := uint(0); ; shift += 7 {
  1157  				if shift >= 64 {
  1158  					return ErrIntOverflowGenesis
  1159  				}
  1160  				if iNdEx >= l {
  1161  					return io.ErrUnexpectedEOF
  1162  				}
  1163  				b := dAtA[iNdEx]
  1164  				iNdEx++
  1165  				msglen |= int(b&0x7F) << shift
  1166  				if b < 0x80 {
  1167  					break
  1168  				}
  1169  			}
  1170  			if msglen < 0 {
  1171  				return ErrInvalidLengthGenesis
  1172  			}
  1173  			postIndex := iNdEx + msglen
  1174  			if postIndex < 0 {
  1175  				return ErrInvalidLengthGenesis
  1176  			}
  1177  			if postIndex > l {
  1178  				return io.ErrUnexpectedEOF
  1179  			}
  1180  			if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1181  				return err
  1182  			}
  1183  			iNdEx = postIndex
  1184  		case 2:
  1185  			if wireType != 2 {
  1186  				return fmt.Errorf("proto: wrong wireType = %d for field ClassState", wireType)
  1187  			}
  1188  			var msglen int
  1189  			for shift := uint(0); ; shift += 7 {
  1190  				if shift >= 64 {
  1191  					return ErrIntOverflowGenesis
  1192  				}
  1193  				if iNdEx >= l {
  1194  					return io.ErrUnexpectedEOF
  1195  				}
  1196  				b := dAtA[iNdEx]
  1197  				iNdEx++
  1198  				msglen |= int(b&0x7F) << shift
  1199  				if b < 0x80 {
  1200  					break
  1201  				}
  1202  			}
  1203  			if msglen < 0 {
  1204  				return ErrInvalidLengthGenesis
  1205  			}
  1206  			postIndex := iNdEx + msglen
  1207  			if postIndex < 0 {
  1208  				return ErrInvalidLengthGenesis
  1209  			}
  1210  			if postIndex > l {
  1211  				return io.ErrUnexpectedEOF
  1212  			}
  1213  			if m.ClassState == nil {
  1214  				m.ClassState = &ClassGenesisState{}
  1215  			}
  1216  			if err := m.ClassState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1217  				return err
  1218  			}
  1219  			iNdEx = postIndex
  1220  		case 3:
  1221  			if wireType != 2 {
  1222  				return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType)
  1223  			}
  1224  			var msglen int
  1225  			for shift := uint(0); ; shift += 7 {
  1226  				if shift >= 64 {
  1227  					return ErrIntOverflowGenesis
  1228  				}
  1229  				if iNdEx >= l {
  1230  					return io.ErrUnexpectedEOF
  1231  				}
  1232  				b := dAtA[iNdEx]
  1233  				iNdEx++
  1234  				msglen |= int(b&0x7F) << shift
  1235  				if b < 0x80 {
  1236  					break
  1237  				}
  1238  			}
  1239  			if msglen < 0 {
  1240  				return ErrInvalidLengthGenesis
  1241  			}
  1242  			postIndex := iNdEx + msglen
  1243  			if postIndex < 0 {
  1244  				return ErrInvalidLengthGenesis
  1245  			}
  1246  			if postIndex > l {
  1247  				return io.ErrUnexpectedEOF
  1248  			}
  1249  			m.Balances = append(m.Balances, ContractBalances{})
  1250  			if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1251  				return err
  1252  			}
  1253  			iNdEx = postIndex
  1254  		case 4:
  1255  			if wireType != 2 {
  1256  				return fmt.Errorf("proto: wrong wireType = %d for field Classes", wireType)
  1257  			}
  1258  			var msglen int
  1259  			for shift := uint(0); ; shift += 7 {
  1260  				if shift >= 64 {
  1261  					return ErrIntOverflowGenesis
  1262  				}
  1263  				if iNdEx >= l {
  1264  					return io.ErrUnexpectedEOF
  1265  				}
  1266  				b := dAtA[iNdEx]
  1267  				iNdEx++
  1268  				msglen |= int(b&0x7F) << shift
  1269  				if b < 0x80 {
  1270  					break
  1271  				}
  1272  			}
  1273  			if msglen < 0 {
  1274  				return ErrInvalidLengthGenesis
  1275  			}
  1276  			postIndex := iNdEx + msglen
  1277  			if postIndex < 0 {
  1278  				return ErrInvalidLengthGenesis
  1279  			}
  1280  			if postIndex > l {
  1281  				return io.ErrUnexpectedEOF
  1282  			}
  1283  			m.Classes = append(m.Classes, Contract{})
  1284  			if err := m.Classes[len(m.Classes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1285  				return err
  1286  			}
  1287  			iNdEx = postIndex
  1288  		case 5:
  1289  			if wireType != 2 {
  1290  				return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType)
  1291  			}
  1292  			var msglen int
  1293  			for shift := uint(0); ; shift += 7 {
  1294  				if shift >= 64 {
  1295  					return ErrIntOverflowGenesis
  1296  				}
  1297  				if iNdEx >= l {
  1298  					return io.ErrUnexpectedEOF
  1299  				}
  1300  				b := dAtA[iNdEx]
  1301  				iNdEx++
  1302  				msglen |= int(b&0x7F) << shift
  1303  				if b < 0x80 {
  1304  					break
  1305  				}
  1306  			}
  1307  			if msglen < 0 {
  1308  				return ErrInvalidLengthGenesis
  1309  			}
  1310  			postIndex := iNdEx + msglen
  1311  			if postIndex < 0 {
  1312  				return ErrInvalidLengthGenesis
  1313  			}
  1314  			if postIndex > l {
  1315  				return io.ErrUnexpectedEOF
  1316  			}
  1317  			m.Grants = append(m.Grants, ContractGrants{})
  1318  			if err := m.Grants[len(m.Grants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1319  				return err
  1320  			}
  1321  			iNdEx = postIndex
  1322  		case 6:
  1323  			if wireType != 2 {
  1324  				return fmt.Errorf("proto: wrong wireType = %d for field Authorizations", wireType)
  1325  			}
  1326  			var msglen int
  1327  			for shift := uint(0); ; shift += 7 {
  1328  				if shift >= 64 {
  1329  					return ErrIntOverflowGenesis
  1330  				}
  1331  				if iNdEx >= l {
  1332  					return io.ErrUnexpectedEOF
  1333  				}
  1334  				b := dAtA[iNdEx]
  1335  				iNdEx++
  1336  				msglen |= int(b&0x7F) << shift
  1337  				if b < 0x80 {
  1338  					break
  1339  				}
  1340  			}
  1341  			if msglen < 0 {
  1342  				return ErrInvalidLengthGenesis
  1343  			}
  1344  			postIndex := iNdEx + msglen
  1345  			if postIndex < 0 {
  1346  				return ErrInvalidLengthGenesis
  1347  			}
  1348  			if postIndex > l {
  1349  				return io.ErrUnexpectedEOF
  1350  			}
  1351  			m.Authorizations = append(m.Authorizations, ContractAuthorizations{})
  1352  			if err := m.Authorizations[len(m.Authorizations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1353  				return err
  1354  			}
  1355  			iNdEx = postIndex
  1356  		case 7:
  1357  			if wireType != 2 {
  1358  				return fmt.Errorf("proto: wrong wireType = %d for field Supplies", wireType)
  1359  			}
  1360  			var msglen int
  1361  			for shift := uint(0); ; shift += 7 {
  1362  				if shift >= 64 {
  1363  					return ErrIntOverflowGenesis
  1364  				}
  1365  				if iNdEx >= l {
  1366  					return io.ErrUnexpectedEOF
  1367  				}
  1368  				b := dAtA[iNdEx]
  1369  				iNdEx++
  1370  				msglen |= int(b&0x7F) << shift
  1371  				if b < 0x80 {
  1372  					break
  1373  				}
  1374  			}
  1375  			if msglen < 0 {
  1376  				return ErrInvalidLengthGenesis
  1377  			}
  1378  			postIndex := iNdEx + msglen
  1379  			if postIndex < 0 {
  1380  				return ErrInvalidLengthGenesis
  1381  			}
  1382  			if postIndex > l {
  1383  				return io.ErrUnexpectedEOF
  1384  			}
  1385  			m.Supplies = append(m.Supplies, ContractCoin{})
  1386  			if err := m.Supplies[len(m.Supplies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1387  				return err
  1388  			}
  1389  			iNdEx = postIndex
  1390  		case 8:
  1391  			if wireType != 2 {
  1392  				return fmt.Errorf("proto: wrong wireType = %d for field Mints", wireType)
  1393  			}
  1394  			var msglen int
  1395  			for shift := uint(0); ; shift += 7 {
  1396  				if shift >= 64 {
  1397  					return ErrIntOverflowGenesis
  1398  				}
  1399  				if iNdEx >= l {
  1400  					return io.ErrUnexpectedEOF
  1401  				}
  1402  				b := dAtA[iNdEx]
  1403  				iNdEx++
  1404  				msglen |= int(b&0x7F) << shift
  1405  				if b < 0x80 {
  1406  					break
  1407  				}
  1408  			}
  1409  			if msglen < 0 {
  1410  				return ErrInvalidLengthGenesis
  1411  			}
  1412  			postIndex := iNdEx + msglen
  1413  			if postIndex < 0 {
  1414  				return ErrInvalidLengthGenesis
  1415  			}
  1416  			if postIndex > l {
  1417  				return io.ErrUnexpectedEOF
  1418  			}
  1419  			m.Mints = append(m.Mints, ContractCoin{})
  1420  			if err := m.Mints[len(m.Mints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1421  				return err
  1422  			}
  1423  			iNdEx = postIndex
  1424  		case 9:
  1425  			if wireType != 2 {
  1426  				return fmt.Errorf("proto: wrong wireType = %d for field Burns", wireType)
  1427  			}
  1428  			var msglen int
  1429  			for shift := uint(0); ; shift += 7 {
  1430  				if shift >= 64 {
  1431  					return ErrIntOverflowGenesis
  1432  				}
  1433  				if iNdEx >= l {
  1434  					return io.ErrUnexpectedEOF
  1435  				}
  1436  				b := dAtA[iNdEx]
  1437  				iNdEx++
  1438  				msglen |= int(b&0x7F) << shift
  1439  				if b < 0x80 {
  1440  					break
  1441  				}
  1442  			}
  1443  			if msglen < 0 {
  1444  				return ErrInvalidLengthGenesis
  1445  			}
  1446  			postIndex := iNdEx + msglen
  1447  			if postIndex < 0 {
  1448  				return ErrInvalidLengthGenesis
  1449  			}
  1450  			if postIndex > l {
  1451  				return io.ErrUnexpectedEOF
  1452  			}
  1453  			m.Burns = append(m.Burns, ContractCoin{})
  1454  			if err := m.Burns[len(m.Burns)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1455  				return err
  1456  			}
  1457  			iNdEx = postIndex
  1458  		default:
  1459  			iNdEx = preIndex
  1460  			skippy, err := skipGenesis(dAtA[iNdEx:])
  1461  			if err != nil {
  1462  				return err
  1463  			}
  1464  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1465  				return ErrInvalidLengthGenesis
  1466  			}
  1467  			if (iNdEx + skippy) > l {
  1468  				return io.ErrUnexpectedEOF
  1469  			}
  1470  			iNdEx += skippy
  1471  		}
  1472  	}
  1473  
  1474  	if iNdEx > l {
  1475  		return io.ErrUnexpectedEOF
  1476  	}
  1477  	return nil
  1478  }
  1479  func (m *ClassGenesisState) Unmarshal(dAtA []byte) error {
  1480  	l := len(dAtA)
  1481  	iNdEx := 0
  1482  	for iNdEx < l {
  1483  		preIndex := iNdEx
  1484  		var wire uint64
  1485  		for shift := uint(0); ; shift += 7 {
  1486  			if shift >= 64 {
  1487  				return ErrIntOverflowGenesis
  1488  			}
  1489  			if iNdEx >= l {
  1490  				return io.ErrUnexpectedEOF
  1491  			}
  1492  			b := dAtA[iNdEx]
  1493  			iNdEx++
  1494  			wire |= uint64(b&0x7F) << shift
  1495  			if b < 0x80 {
  1496  				break
  1497  			}
  1498  		}
  1499  		fieldNum := int32(wire >> 3)
  1500  		wireType := int(wire & 0x7)
  1501  		if wireType == 4 {
  1502  			return fmt.Errorf("proto: ClassGenesisState: wiretype end group for non-group")
  1503  		}
  1504  		if fieldNum <= 0 {
  1505  			return fmt.Errorf("proto: ClassGenesisState: illegal tag %d (wire type %d)", fieldNum, wire)
  1506  		}
  1507  		switch fieldNum {
  1508  		case 1:
  1509  			if wireType != 2 {
  1510  				return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType)
  1511  			}
  1512  			var stringLen uint64
  1513  			for shift := uint(0); ; shift += 7 {
  1514  				if shift >= 64 {
  1515  					return ErrIntOverflowGenesis
  1516  				}
  1517  				if iNdEx >= l {
  1518  					return io.ErrUnexpectedEOF
  1519  				}
  1520  				b := dAtA[iNdEx]
  1521  				iNdEx++
  1522  				stringLen |= uint64(b&0x7F) << shift
  1523  				if b < 0x80 {
  1524  					break
  1525  				}
  1526  			}
  1527  			intStringLen := int(stringLen)
  1528  			if intStringLen < 0 {
  1529  				return ErrInvalidLengthGenesis
  1530  			}
  1531  			postIndex := iNdEx + intStringLen
  1532  			if postIndex < 0 {
  1533  				return ErrInvalidLengthGenesis
  1534  			}
  1535  			if postIndex > l {
  1536  				return io.ErrUnexpectedEOF
  1537  			}
  1538  			if err := m.Nonce.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1539  				return err
  1540  			}
  1541  			iNdEx = postIndex
  1542  		case 2:
  1543  			if wireType != 2 {
  1544  				return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType)
  1545  			}
  1546  			var stringLen uint64
  1547  			for shift := uint(0); ; shift += 7 {
  1548  				if shift >= 64 {
  1549  					return ErrIntOverflowGenesis
  1550  				}
  1551  				if iNdEx >= l {
  1552  					return io.ErrUnexpectedEOF
  1553  				}
  1554  				b := dAtA[iNdEx]
  1555  				iNdEx++
  1556  				stringLen |= uint64(b&0x7F) << shift
  1557  				if b < 0x80 {
  1558  					break
  1559  				}
  1560  			}
  1561  			intStringLen := int(stringLen)
  1562  			if intStringLen < 0 {
  1563  				return ErrInvalidLengthGenesis
  1564  			}
  1565  			postIndex := iNdEx + intStringLen
  1566  			if postIndex < 0 {
  1567  				return ErrInvalidLengthGenesis
  1568  			}
  1569  			if postIndex > l {
  1570  				return io.ErrUnexpectedEOF
  1571  			}
  1572  			m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex]))
  1573  			iNdEx = postIndex
  1574  		default:
  1575  			iNdEx = preIndex
  1576  			skippy, err := skipGenesis(dAtA[iNdEx:])
  1577  			if err != nil {
  1578  				return err
  1579  			}
  1580  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1581  				return ErrInvalidLengthGenesis
  1582  			}
  1583  			if (iNdEx + skippy) > l {
  1584  				return io.ErrUnexpectedEOF
  1585  			}
  1586  			iNdEx += skippy
  1587  		}
  1588  	}
  1589  
  1590  	if iNdEx > l {
  1591  		return io.ErrUnexpectedEOF
  1592  	}
  1593  	return nil
  1594  }
  1595  func (m *ContractBalances) Unmarshal(dAtA []byte) error {
  1596  	l := len(dAtA)
  1597  	iNdEx := 0
  1598  	for iNdEx < l {
  1599  		preIndex := iNdEx
  1600  		var wire uint64
  1601  		for shift := uint(0); ; shift += 7 {
  1602  			if shift >= 64 {
  1603  				return ErrIntOverflowGenesis
  1604  			}
  1605  			if iNdEx >= l {
  1606  				return io.ErrUnexpectedEOF
  1607  			}
  1608  			b := dAtA[iNdEx]
  1609  			iNdEx++
  1610  			wire |= uint64(b&0x7F) << shift
  1611  			if b < 0x80 {
  1612  				break
  1613  			}
  1614  		}
  1615  		fieldNum := int32(wire >> 3)
  1616  		wireType := int(wire & 0x7)
  1617  		if wireType == 4 {
  1618  			return fmt.Errorf("proto: ContractBalances: wiretype end group for non-group")
  1619  		}
  1620  		if fieldNum <= 0 {
  1621  			return fmt.Errorf("proto: ContractBalances: illegal tag %d (wire type %d)", fieldNum, wire)
  1622  		}
  1623  		switch fieldNum {
  1624  		case 1:
  1625  			if wireType != 2 {
  1626  				return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType)
  1627  			}
  1628  			var stringLen uint64
  1629  			for shift := uint(0); ; shift += 7 {
  1630  				if shift >= 64 {
  1631  					return ErrIntOverflowGenesis
  1632  				}
  1633  				if iNdEx >= l {
  1634  					return io.ErrUnexpectedEOF
  1635  				}
  1636  				b := dAtA[iNdEx]
  1637  				iNdEx++
  1638  				stringLen |= uint64(b&0x7F) << shift
  1639  				if b < 0x80 {
  1640  					break
  1641  				}
  1642  			}
  1643  			intStringLen := int(stringLen)
  1644  			if intStringLen < 0 {
  1645  				return ErrInvalidLengthGenesis
  1646  			}
  1647  			postIndex := iNdEx + intStringLen
  1648  			if postIndex < 0 {
  1649  				return ErrInvalidLengthGenesis
  1650  			}
  1651  			if postIndex > l {
  1652  				return io.ErrUnexpectedEOF
  1653  			}
  1654  			m.ContractId = string(dAtA[iNdEx:postIndex])
  1655  			iNdEx = postIndex
  1656  		case 2:
  1657  			if wireType != 2 {
  1658  				return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType)
  1659  			}
  1660  			var msglen int
  1661  			for shift := uint(0); ; shift += 7 {
  1662  				if shift >= 64 {
  1663  					return ErrIntOverflowGenesis
  1664  				}
  1665  				if iNdEx >= l {
  1666  					return io.ErrUnexpectedEOF
  1667  				}
  1668  				b := dAtA[iNdEx]
  1669  				iNdEx++
  1670  				msglen |= int(b&0x7F) << shift
  1671  				if b < 0x80 {
  1672  					break
  1673  				}
  1674  			}
  1675  			if msglen < 0 {
  1676  				return ErrInvalidLengthGenesis
  1677  			}
  1678  			postIndex := iNdEx + msglen
  1679  			if postIndex < 0 {
  1680  				return ErrInvalidLengthGenesis
  1681  			}
  1682  			if postIndex > l {
  1683  				return io.ErrUnexpectedEOF
  1684  			}
  1685  			m.Balances = append(m.Balances, Balance{})
  1686  			if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1687  				return err
  1688  			}
  1689  			iNdEx = postIndex
  1690  		default:
  1691  			iNdEx = preIndex
  1692  			skippy, err := skipGenesis(dAtA[iNdEx:])
  1693  			if err != nil {
  1694  				return err
  1695  			}
  1696  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1697  				return ErrInvalidLengthGenesis
  1698  			}
  1699  			if (iNdEx + skippy) > l {
  1700  				return io.ErrUnexpectedEOF
  1701  			}
  1702  			iNdEx += skippy
  1703  		}
  1704  	}
  1705  
  1706  	if iNdEx > l {
  1707  		return io.ErrUnexpectedEOF
  1708  	}
  1709  	return nil
  1710  }
  1711  func (m *Balance) Unmarshal(dAtA []byte) error {
  1712  	l := len(dAtA)
  1713  	iNdEx := 0
  1714  	for iNdEx < l {
  1715  		preIndex := iNdEx
  1716  		var wire uint64
  1717  		for shift := uint(0); ; shift += 7 {
  1718  			if shift >= 64 {
  1719  				return ErrIntOverflowGenesis
  1720  			}
  1721  			if iNdEx >= l {
  1722  				return io.ErrUnexpectedEOF
  1723  			}
  1724  			b := dAtA[iNdEx]
  1725  			iNdEx++
  1726  			wire |= uint64(b&0x7F) << shift
  1727  			if b < 0x80 {
  1728  				break
  1729  			}
  1730  		}
  1731  		fieldNum := int32(wire >> 3)
  1732  		wireType := int(wire & 0x7)
  1733  		if wireType == 4 {
  1734  			return fmt.Errorf("proto: Balance: wiretype end group for non-group")
  1735  		}
  1736  		if fieldNum <= 0 {
  1737  			return fmt.Errorf("proto: Balance: illegal tag %d (wire type %d)", fieldNum, wire)
  1738  		}
  1739  		switch fieldNum {
  1740  		case 1:
  1741  			if wireType != 2 {
  1742  				return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  1743  			}
  1744  			var stringLen uint64
  1745  			for shift := uint(0); ; shift += 7 {
  1746  				if shift >= 64 {
  1747  					return ErrIntOverflowGenesis
  1748  				}
  1749  				if iNdEx >= l {
  1750  					return io.ErrUnexpectedEOF
  1751  				}
  1752  				b := dAtA[iNdEx]
  1753  				iNdEx++
  1754  				stringLen |= uint64(b&0x7F) << shift
  1755  				if b < 0x80 {
  1756  					break
  1757  				}
  1758  			}
  1759  			intStringLen := int(stringLen)
  1760  			if intStringLen < 0 {
  1761  				return ErrInvalidLengthGenesis
  1762  			}
  1763  			postIndex := iNdEx + intStringLen
  1764  			if postIndex < 0 {
  1765  				return ErrInvalidLengthGenesis
  1766  			}
  1767  			if postIndex > l {
  1768  				return io.ErrUnexpectedEOF
  1769  			}
  1770  			m.Address = string(dAtA[iNdEx:postIndex])
  1771  			iNdEx = postIndex
  1772  		case 2:
  1773  			if wireType != 2 {
  1774  				return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
  1775  			}
  1776  			var stringLen uint64
  1777  			for shift := uint(0); ; shift += 7 {
  1778  				if shift >= 64 {
  1779  					return ErrIntOverflowGenesis
  1780  				}
  1781  				if iNdEx >= l {
  1782  					return io.ErrUnexpectedEOF
  1783  				}
  1784  				b := dAtA[iNdEx]
  1785  				iNdEx++
  1786  				stringLen |= uint64(b&0x7F) << shift
  1787  				if b < 0x80 {
  1788  					break
  1789  				}
  1790  			}
  1791  			intStringLen := int(stringLen)
  1792  			if intStringLen < 0 {
  1793  				return ErrInvalidLengthGenesis
  1794  			}
  1795  			postIndex := iNdEx + intStringLen
  1796  			if postIndex < 0 {
  1797  				return ErrInvalidLengthGenesis
  1798  			}
  1799  			if postIndex > l {
  1800  				return io.ErrUnexpectedEOF
  1801  			}
  1802  			if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1803  				return err
  1804  			}
  1805  			iNdEx = postIndex
  1806  		default:
  1807  			iNdEx = preIndex
  1808  			skippy, err := skipGenesis(dAtA[iNdEx:])
  1809  			if err != nil {
  1810  				return err
  1811  			}
  1812  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1813  				return ErrInvalidLengthGenesis
  1814  			}
  1815  			if (iNdEx + skippy) > l {
  1816  				return io.ErrUnexpectedEOF
  1817  			}
  1818  			iNdEx += skippy
  1819  		}
  1820  	}
  1821  
  1822  	if iNdEx > l {
  1823  		return io.ErrUnexpectedEOF
  1824  	}
  1825  	return nil
  1826  }
  1827  func (m *ContractAuthorizations) Unmarshal(dAtA []byte) error {
  1828  	l := len(dAtA)
  1829  	iNdEx := 0
  1830  	for iNdEx < l {
  1831  		preIndex := iNdEx
  1832  		var wire uint64
  1833  		for shift := uint(0); ; shift += 7 {
  1834  			if shift >= 64 {
  1835  				return ErrIntOverflowGenesis
  1836  			}
  1837  			if iNdEx >= l {
  1838  				return io.ErrUnexpectedEOF
  1839  			}
  1840  			b := dAtA[iNdEx]
  1841  			iNdEx++
  1842  			wire |= uint64(b&0x7F) << shift
  1843  			if b < 0x80 {
  1844  				break
  1845  			}
  1846  		}
  1847  		fieldNum := int32(wire >> 3)
  1848  		wireType := int(wire & 0x7)
  1849  		if wireType == 4 {
  1850  			return fmt.Errorf("proto: ContractAuthorizations: wiretype end group for non-group")
  1851  		}
  1852  		if fieldNum <= 0 {
  1853  			return fmt.Errorf("proto: ContractAuthorizations: illegal tag %d (wire type %d)", fieldNum, wire)
  1854  		}
  1855  		switch fieldNum {
  1856  		case 1:
  1857  			if wireType != 2 {
  1858  				return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType)
  1859  			}
  1860  			var stringLen uint64
  1861  			for shift := uint(0); ; shift += 7 {
  1862  				if shift >= 64 {
  1863  					return ErrIntOverflowGenesis
  1864  				}
  1865  				if iNdEx >= l {
  1866  					return io.ErrUnexpectedEOF
  1867  				}
  1868  				b := dAtA[iNdEx]
  1869  				iNdEx++
  1870  				stringLen |= uint64(b&0x7F) << shift
  1871  				if b < 0x80 {
  1872  					break
  1873  				}
  1874  			}
  1875  			intStringLen := int(stringLen)
  1876  			if intStringLen < 0 {
  1877  				return ErrInvalidLengthGenesis
  1878  			}
  1879  			postIndex := iNdEx + intStringLen
  1880  			if postIndex < 0 {
  1881  				return ErrInvalidLengthGenesis
  1882  			}
  1883  			if postIndex > l {
  1884  				return io.ErrUnexpectedEOF
  1885  			}
  1886  			m.ContractId = string(dAtA[iNdEx:postIndex])
  1887  			iNdEx = postIndex
  1888  		case 2:
  1889  			if wireType != 2 {
  1890  				return fmt.Errorf("proto: wrong wireType = %d for field Authorizations", wireType)
  1891  			}
  1892  			var msglen int
  1893  			for shift := uint(0); ; shift += 7 {
  1894  				if shift >= 64 {
  1895  					return ErrIntOverflowGenesis
  1896  				}
  1897  				if iNdEx >= l {
  1898  					return io.ErrUnexpectedEOF
  1899  				}
  1900  				b := dAtA[iNdEx]
  1901  				iNdEx++
  1902  				msglen |= int(b&0x7F) << shift
  1903  				if b < 0x80 {
  1904  					break
  1905  				}
  1906  			}
  1907  			if msglen < 0 {
  1908  				return ErrInvalidLengthGenesis
  1909  			}
  1910  			postIndex := iNdEx + msglen
  1911  			if postIndex < 0 {
  1912  				return ErrInvalidLengthGenesis
  1913  			}
  1914  			if postIndex > l {
  1915  				return io.ErrUnexpectedEOF
  1916  			}
  1917  			m.Authorizations = append(m.Authorizations, Authorization{})
  1918  			if err := m.Authorizations[len(m.Authorizations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1919  				return err
  1920  			}
  1921  			iNdEx = postIndex
  1922  		default:
  1923  			iNdEx = preIndex
  1924  			skippy, err := skipGenesis(dAtA[iNdEx:])
  1925  			if err != nil {
  1926  				return err
  1927  			}
  1928  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1929  				return ErrInvalidLengthGenesis
  1930  			}
  1931  			if (iNdEx + skippy) > l {
  1932  				return io.ErrUnexpectedEOF
  1933  			}
  1934  			iNdEx += skippy
  1935  		}
  1936  	}
  1937  
  1938  	if iNdEx > l {
  1939  		return io.ErrUnexpectedEOF
  1940  	}
  1941  	return nil
  1942  }
  1943  func (m *ContractGrants) Unmarshal(dAtA []byte) error {
  1944  	l := len(dAtA)
  1945  	iNdEx := 0
  1946  	for iNdEx < l {
  1947  		preIndex := iNdEx
  1948  		var wire uint64
  1949  		for shift := uint(0); ; shift += 7 {
  1950  			if shift >= 64 {
  1951  				return ErrIntOverflowGenesis
  1952  			}
  1953  			if iNdEx >= l {
  1954  				return io.ErrUnexpectedEOF
  1955  			}
  1956  			b := dAtA[iNdEx]
  1957  			iNdEx++
  1958  			wire |= uint64(b&0x7F) << shift
  1959  			if b < 0x80 {
  1960  				break
  1961  			}
  1962  		}
  1963  		fieldNum := int32(wire >> 3)
  1964  		wireType := int(wire & 0x7)
  1965  		if wireType == 4 {
  1966  			return fmt.Errorf("proto: ContractGrants: wiretype end group for non-group")
  1967  		}
  1968  		if fieldNum <= 0 {
  1969  			return fmt.Errorf("proto: ContractGrants: illegal tag %d (wire type %d)", fieldNum, wire)
  1970  		}
  1971  		switch fieldNum {
  1972  		case 1:
  1973  			if wireType != 2 {
  1974  				return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType)
  1975  			}
  1976  			var stringLen uint64
  1977  			for shift := uint(0); ; shift += 7 {
  1978  				if shift >= 64 {
  1979  					return ErrIntOverflowGenesis
  1980  				}
  1981  				if iNdEx >= l {
  1982  					return io.ErrUnexpectedEOF
  1983  				}
  1984  				b := dAtA[iNdEx]
  1985  				iNdEx++
  1986  				stringLen |= uint64(b&0x7F) << shift
  1987  				if b < 0x80 {
  1988  					break
  1989  				}
  1990  			}
  1991  			intStringLen := int(stringLen)
  1992  			if intStringLen < 0 {
  1993  				return ErrInvalidLengthGenesis
  1994  			}
  1995  			postIndex := iNdEx + intStringLen
  1996  			if postIndex < 0 {
  1997  				return ErrInvalidLengthGenesis
  1998  			}
  1999  			if postIndex > l {
  2000  				return io.ErrUnexpectedEOF
  2001  			}
  2002  			m.ContractId = string(dAtA[iNdEx:postIndex])
  2003  			iNdEx = postIndex
  2004  		case 2:
  2005  			if wireType != 2 {
  2006  				return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType)
  2007  			}
  2008  			var msglen int
  2009  			for shift := uint(0); ; shift += 7 {
  2010  				if shift >= 64 {
  2011  					return ErrIntOverflowGenesis
  2012  				}
  2013  				if iNdEx >= l {
  2014  					return io.ErrUnexpectedEOF
  2015  				}
  2016  				b := dAtA[iNdEx]
  2017  				iNdEx++
  2018  				msglen |= int(b&0x7F) << shift
  2019  				if b < 0x80 {
  2020  					break
  2021  				}
  2022  			}
  2023  			if msglen < 0 {
  2024  				return ErrInvalidLengthGenesis
  2025  			}
  2026  			postIndex := iNdEx + msglen
  2027  			if postIndex < 0 {
  2028  				return ErrInvalidLengthGenesis
  2029  			}
  2030  			if postIndex > l {
  2031  				return io.ErrUnexpectedEOF
  2032  			}
  2033  			m.Grants = append(m.Grants, Grant{})
  2034  			if err := m.Grants[len(m.Grants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2035  				return err
  2036  			}
  2037  			iNdEx = postIndex
  2038  		default:
  2039  			iNdEx = preIndex
  2040  			skippy, err := skipGenesis(dAtA[iNdEx:])
  2041  			if err != nil {
  2042  				return err
  2043  			}
  2044  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2045  				return ErrInvalidLengthGenesis
  2046  			}
  2047  			if (iNdEx + skippy) > l {
  2048  				return io.ErrUnexpectedEOF
  2049  			}
  2050  			iNdEx += skippy
  2051  		}
  2052  	}
  2053  
  2054  	if iNdEx > l {
  2055  		return io.ErrUnexpectedEOF
  2056  	}
  2057  	return nil
  2058  }
  2059  func (m *ContractCoin) Unmarshal(dAtA []byte) error {
  2060  	l := len(dAtA)
  2061  	iNdEx := 0
  2062  	for iNdEx < l {
  2063  		preIndex := iNdEx
  2064  		var wire uint64
  2065  		for shift := uint(0); ; shift += 7 {
  2066  			if shift >= 64 {
  2067  				return ErrIntOverflowGenesis
  2068  			}
  2069  			if iNdEx >= l {
  2070  				return io.ErrUnexpectedEOF
  2071  			}
  2072  			b := dAtA[iNdEx]
  2073  			iNdEx++
  2074  			wire |= uint64(b&0x7F) << shift
  2075  			if b < 0x80 {
  2076  				break
  2077  			}
  2078  		}
  2079  		fieldNum := int32(wire >> 3)
  2080  		wireType := int(wire & 0x7)
  2081  		if wireType == 4 {
  2082  			return fmt.Errorf("proto: ContractCoin: wiretype end group for non-group")
  2083  		}
  2084  		if fieldNum <= 0 {
  2085  			return fmt.Errorf("proto: ContractCoin: illegal tag %d (wire type %d)", fieldNum, wire)
  2086  		}
  2087  		switch fieldNum {
  2088  		case 1:
  2089  			if wireType != 2 {
  2090  				return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType)
  2091  			}
  2092  			var stringLen uint64
  2093  			for shift := uint(0); ; shift += 7 {
  2094  				if shift >= 64 {
  2095  					return ErrIntOverflowGenesis
  2096  				}
  2097  				if iNdEx >= l {
  2098  					return io.ErrUnexpectedEOF
  2099  				}
  2100  				b := dAtA[iNdEx]
  2101  				iNdEx++
  2102  				stringLen |= uint64(b&0x7F) << shift
  2103  				if b < 0x80 {
  2104  					break
  2105  				}
  2106  			}
  2107  			intStringLen := int(stringLen)
  2108  			if intStringLen < 0 {
  2109  				return ErrInvalidLengthGenesis
  2110  			}
  2111  			postIndex := iNdEx + intStringLen
  2112  			if postIndex < 0 {
  2113  				return ErrInvalidLengthGenesis
  2114  			}
  2115  			if postIndex > l {
  2116  				return io.ErrUnexpectedEOF
  2117  			}
  2118  			m.ContractId = string(dAtA[iNdEx:postIndex])
  2119  			iNdEx = postIndex
  2120  		case 2:
  2121  			if wireType != 2 {
  2122  				return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
  2123  			}
  2124  			var stringLen uint64
  2125  			for shift := uint(0); ; shift += 7 {
  2126  				if shift >= 64 {
  2127  					return ErrIntOverflowGenesis
  2128  				}
  2129  				if iNdEx >= l {
  2130  					return io.ErrUnexpectedEOF
  2131  				}
  2132  				b := dAtA[iNdEx]
  2133  				iNdEx++
  2134  				stringLen |= uint64(b&0x7F) << shift
  2135  				if b < 0x80 {
  2136  					break
  2137  				}
  2138  			}
  2139  			intStringLen := int(stringLen)
  2140  			if intStringLen < 0 {
  2141  				return ErrInvalidLengthGenesis
  2142  			}
  2143  			postIndex := iNdEx + intStringLen
  2144  			if postIndex < 0 {
  2145  				return ErrInvalidLengthGenesis
  2146  			}
  2147  			if postIndex > l {
  2148  				return io.ErrUnexpectedEOF
  2149  			}
  2150  			if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2151  				return err
  2152  			}
  2153  			iNdEx = postIndex
  2154  		default:
  2155  			iNdEx = preIndex
  2156  			skippy, err := skipGenesis(dAtA[iNdEx:])
  2157  			if err != nil {
  2158  				return err
  2159  			}
  2160  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2161  				return ErrInvalidLengthGenesis
  2162  			}
  2163  			if (iNdEx + skippy) > l {
  2164  				return io.ErrUnexpectedEOF
  2165  			}
  2166  			iNdEx += skippy
  2167  		}
  2168  	}
  2169  
  2170  	if iNdEx > l {
  2171  		return io.ErrUnexpectedEOF
  2172  	}
  2173  	return nil
  2174  }
  2175  func skipGenesis(dAtA []byte) (n int, err error) {
  2176  	l := len(dAtA)
  2177  	iNdEx := 0
  2178  	depth := 0
  2179  	for iNdEx < l {
  2180  		var wire uint64
  2181  		for shift := uint(0); ; shift += 7 {
  2182  			if shift >= 64 {
  2183  				return 0, ErrIntOverflowGenesis
  2184  			}
  2185  			if iNdEx >= l {
  2186  				return 0, io.ErrUnexpectedEOF
  2187  			}
  2188  			b := dAtA[iNdEx]
  2189  			iNdEx++
  2190  			wire |= (uint64(b) & 0x7F) << shift
  2191  			if b < 0x80 {
  2192  				break
  2193  			}
  2194  		}
  2195  		wireType := int(wire & 0x7)
  2196  		switch wireType {
  2197  		case 0:
  2198  			for shift := uint(0); ; shift += 7 {
  2199  				if shift >= 64 {
  2200  					return 0, ErrIntOverflowGenesis
  2201  				}
  2202  				if iNdEx >= l {
  2203  					return 0, io.ErrUnexpectedEOF
  2204  				}
  2205  				iNdEx++
  2206  				if dAtA[iNdEx-1] < 0x80 {
  2207  					break
  2208  				}
  2209  			}
  2210  		case 1:
  2211  			iNdEx += 8
  2212  		case 2:
  2213  			var length int
  2214  			for shift := uint(0); ; shift += 7 {
  2215  				if shift >= 64 {
  2216  					return 0, ErrIntOverflowGenesis
  2217  				}
  2218  				if iNdEx >= l {
  2219  					return 0, io.ErrUnexpectedEOF
  2220  				}
  2221  				b := dAtA[iNdEx]
  2222  				iNdEx++
  2223  				length |= (int(b) & 0x7F) << shift
  2224  				if b < 0x80 {
  2225  					break
  2226  				}
  2227  			}
  2228  			if length < 0 {
  2229  				return 0, ErrInvalidLengthGenesis
  2230  			}
  2231  			iNdEx += length
  2232  		case 3:
  2233  			depth++
  2234  		case 4:
  2235  			if depth == 0 {
  2236  				return 0, ErrUnexpectedEndOfGroupGenesis
  2237  			}
  2238  			depth--
  2239  		case 5:
  2240  			iNdEx += 4
  2241  		default:
  2242  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  2243  		}
  2244  		if iNdEx < 0 {
  2245  			return 0, ErrInvalidLengthGenesis
  2246  		}
  2247  		if depth == 0 {
  2248  			return iNdEx, nil
  2249  		}
  2250  	}
  2251  	return 0, io.ErrUnexpectedEOF
  2252  }
  2253  
  2254  var (
  2255  	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
  2256  	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
  2257  	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
  2258  )