github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/x/wasm/types/query.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: cosmwasm/wasm/v1/query.proto
     3  
     4  package types
     5  
     6  import (
     7  	bytes "bytes"
     8  	context "context"
     9  	fmt "fmt"
    10  	io "io"
    11  	math "math"
    12  	math_bits "math/bits"
    13  
    14  	_ "github.com/gogo/protobuf/gogoproto"
    15  	grpc1 "github.com/gogo/protobuf/grpc"
    16  	proto "github.com/gogo/protobuf/proto"
    17  	query "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types/query"
    18  	github_com_tendermint_tendermint_libs_bytes "github.com/fibonacci-chain/fbc/libs/tendermint/libs/bytes"
    19  	_ "google.golang.org/genproto/googleapis/api/annotations"
    20  	grpc "google.golang.org/grpc"
    21  	codes "google.golang.org/grpc/codes"
    22  	status "google.golang.org/grpc/status"
    23  )
    24  
    25  // Reference imports to suppress errors if they are not otherwise used.
    26  var _ = proto.Marshal
    27  
    28  var (
    29  	_ = fmt.Errorf
    30  	_ = math.Inf
    31  )
    32  
    33  // This is a compile-time assertion to ensure that this generated file
    34  // is compatible with the proto package it is being compiled against.
    35  // A compilation error at this line likely means your copy of the
    36  // proto package needs to be updated.
    37  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    38  
    39  // QueryContractInfoRequest is the request type for the Query/ContractInfo RPC
    40  // method
    41  type QueryContractInfoRequest struct {
    42  	// address is the address of the contract to query
    43  	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
    44  }
    45  
    46  func (m *QueryContractInfoRequest) Reset()         { *m = QueryContractInfoRequest{} }
    47  func (m *QueryContractInfoRequest) String() string { return proto.CompactTextString(m) }
    48  func (*QueryContractInfoRequest) ProtoMessage()    {}
    49  func (*QueryContractInfoRequest) Descriptor() ([]byte, []int) {
    50  	return fileDescriptor_9677c207036b9f2b, []int{0}
    51  }
    52  
    53  func (m *QueryContractInfoRequest) XXX_Unmarshal(b []byte) error {
    54  	return m.Unmarshal(b)
    55  }
    56  
    57  func (m *QueryContractInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    58  	if deterministic {
    59  		return xxx_messageInfo_QueryContractInfoRequest.Marshal(b, m, deterministic)
    60  	} else {
    61  		b = b[:cap(b)]
    62  		n, err := m.MarshalToSizedBuffer(b)
    63  		if err != nil {
    64  			return nil, err
    65  		}
    66  		return b[:n], nil
    67  	}
    68  }
    69  
    70  func (m *QueryContractInfoRequest) XXX_Merge(src proto.Message) {
    71  	xxx_messageInfo_QueryContractInfoRequest.Merge(m, src)
    72  }
    73  
    74  func (m *QueryContractInfoRequest) XXX_Size() int {
    75  	return m.Size()
    76  }
    77  
    78  func (m *QueryContractInfoRequest) XXX_DiscardUnknown() {
    79  	xxx_messageInfo_QueryContractInfoRequest.DiscardUnknown(m)
    80  }
    81  
    82  var xxx_messageInfo_QueryContractInfoRequest proto.InternalMessageInfo
    83  
    84  // QueryContractInfoResponse is the response type for the Query/ContractInfo RPC
    85  // method
    86  type QueryContractInfoResponse struct {
    87  	// address is the address of the contract
    88  	Address      string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
    89  	ContractInfo `protobuf:"bytes,2,opt,name=contract_info,json=contractInfo,proto3,embedded=contract_info" json:""`
    90  }
    91  
    92  func (m *QueryContractInfoResponse) Reset()         { *m = QueryContractInfoResponse{} }
    93  func (m *QueryContractInfoResponse) String() string { return proto.CompactTextString(m) }
    94  func (*QueryContractInfoResponse) ProtoMessage()    {}
    95  func (*QueryContractInfoResponse) Descriptor() ([]byte, []int) {
    96  	return fileDescriptor_9677c207036b9f2b, []int{1}
    97  }
    98  
    99  func (m *QueryContractInfoResponse) XXX_Unmarshal(b []byte) error {
   100  	return m.Unmarshal(b)
   101  }
   102  
   103  func (m *QueryContractInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   104  	if deterministic {
   105  		return xxx_messageInfo_QueryContractInfoResponse.Marshal(b, m, deterministic)
   106  	} else {
   107  		b = b[:cap(b)]
   108  		n, err := m.MarshalToSizedBuffer(b)
   109  		if err != nil {
   110  			return nil, err
   111  		}
   112  		return b[:n], nil
   113  	}
   114  }
   115  
   116  func (m *QueryContractInfoResponse) XXX_Merge(src proto.Message) {
   117  	xxx_messageInfo_QueryContractInfoResponse.Merge(m, src)
   118  }
   119  
   120  func (m *QueryContractInfoResponse) XXX_Size() int {
   121  	return m.Size()
   122  }
   123  
   124  func (m *QueryContractInfoResponse) XXX_DiscardUnknown() {
   125  	xxx_messageInfo_QueryContractInfoResponse.DiscardUnknown(m)
   126  }
   127  
   128  var xxx_messageInfo_QueryContractInfoResponse proto.InternalMessageInfo
   129  
   130  // QueryContractHistoryRequest is the request type for the Query/ContractHistory
   131  // RPC method
   132  type QueryContractHistoryRequest struct {
   133  	// address is the address of the contract to query
   134  	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
   135  	// pagination defines an optional pagination for the request.
   136  	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
   137  }
   138  
   139  func (m *QueryContractHistoryRequest) Reset()         { *m = QueryContractHistoryRequest{} }
   140  func (m *QueryContractHistoryRequest) String() string { return proto.CompactTextString(m) }
   141  func (*QueryContractHistoryRequest) ProtoMessage()    {}
   142  func (*QueryContractHistoryRequest) Descriptor() ([]byte, []int) {
   143  	return fileDescriptor_9677c207036b9f2b, []int{2}
   144  }
   145  
   146  func (m *QueryContractHistoryRequest) XXX_Unmarshal(b []byte) error {
   147  	return m.Unmarshal(b)
   148  }
   149  
   150  func (m *QueryContractHistoryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   151  	if deterministic {
   152  		return xxx_messageInfo_QueryContractHistoryRequest.Marshal(b, m, deterministic)
   153  	} else {
   154  		b = b[:cap(b)]
   155  		n, err := m.MarshalToSizedBuffer(b)
   156  		if err != nil {
   157  			return nil, err
   158  		}
   159  		return b[:n], nil
   160  	}
   161  }
   162  
   163  func (m *QueryContractHistoryRequest) XXX_Merge(src proto.Message) {
   164  	xxx_messageInfo_QueryContractHistoryRequest.Merge(m, src)
   165  }
   166  
   167  func (m *QueryContractHistoryRequest) XXX_Size() int {
   168  	return m.Size()
   169  }
   170  
   171  func (m *QueryContractHistoryRequest) XXX_DiscardUnknown() {
   172  	xxx_messageInfo_QueryContractHistoryRequest.DiscardUnknown(m)
   173  }
   174  
   175  var xxx_messageInfo_QueryContractHistoryRequest proto.InternalMessageInfo
   176  
   177  // QueryContractHistoryResponse is the response type for the
   178  // Query/ContractHistory RPC method
   179  type QueryContractHistoryResponse struct {
   180  	Entries []ContractCodeHistoryEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries"`
   181  	// pagination defines the pagination in the response.
   182  	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
   183  }
   184  
   185  func (m *QueryContractHistoryResponse) Reset()         { *m = QueryContractHistoryResponse{} }
   186  func (m *QueryContractHistoryResponse) String() string { return proto.CompactTextString(m) }
   187  func (*QueryContractHistoryResponse) ProtoMessage()    {}
   188  func (*QueryContractHistoryResponse) Descriptor() ([]byte, []int) {
   189  	return fileDescriptor_9677c207036b9f2b, []int{3}
   190  }
   191  
   192  func (m *QueryContractHistoryResponse) XXX_Unmarshal(b []byte) error {
   193  	return m.Unmarshal(b)
   194  }
   195  
   196  func (m *QueryContractHistoryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   197  	if deterministic {
   198  		return xxx_messageInfo_QueryContractHistoryResponse.Marshal(b, m, deterministic)
   199  	} else {
   200  		b = b[:cap(b)]
   201  		n, err := m.MarshalToSizedBuffer(b)
   202  		if err != nil {
   203  			return nil, err
   204  		}
   205  		return b[:n], nil
   206  	}
   207  }
   208  
   209  func (m *QueryContractHistoryResponse) XXX_Merge(src proto.Message) {
   210  	xxx_messageInfo_QueryContractHistoryResponse.Merge(m, src)
   211  }
   212  
   213  func (m *QueryContractHistoryResponse) XXX_Size() int {
   214  	return m.Size()
   215  }
   216  
   217  func (m *QueryContractHistoryResponse) XXX_DiscardUnknown() {
   218  	xxx_messageInfo_QueryContractHistoryResponse.DiscardUnknown(m)
   219  }
   220  
   221  var xxx_messageInfo_QueryContractHistoryResponse proto.InternalMessageInfo
   222  
   223  // QueryContractsByCodeRequest is the request type for the Query/ContractsByCode
   224  // RPC method
   225  type QueryContractsByCodeRequest struct {
   226  	CodeId uint64 `protobuf:"varint,1,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"`
   227  	// pagination defines an optional pagination for the request.
   228  	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
   229  }
   230  
   231  func (m *QueryContractsByCodeRequest) Reset()         { *m = QueryContractsByCodeRequest{} }
   232  func (m *QueryContractsByCodeRequest) String() string { return proto.CompactTextString(m) }
   233  func (*QueryContractsByCodeRequest) ProtoMessage()    {}
   234  func (*QueryContractsByCodeRequest) Descriptor() ([]byte, []int) {
   235  	return fileDescriptor_9677c207036b9f2b, []int{4}
   236  }
   237  
   238  func (m *QueryContractsByCodeRequest) XXX_Unmarshal(b []byte) error {
   239  	return m.Unmarshal(b)
   240  }
   241  
   242  func (m *QueryContractsByCodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   243  	if deterministic {
   244  		return xxx_messageInfo_QueryContractsByCodeRequest.Marshal(b, m, deterministic)
   245  	} else {
   246  		b = b[:cap(b)]
   247  		n, err := m.MarshalToSizedBuffer(b)
   248  		if err != nil {
   249  			return nil, err
   250  		}
   251  		return b[:n], nil
   252  	}
   253  }
   254  
   255  func (m *QueryContractsByCodeRequest) XXX_Merge(src proto.Message) {
   256  	xxx_messageInfo_QueryContractsByCodeRequest.Merge(m, src)
   257  }
   258  
   259  func (m *QueryContractsByCodeRequest) XXX_Size() int {
   260  	return m.Size()
   261  }
   262  
   263  func (m *QueryContractsByCodeRequest) XXX_DiscardUnknown() {
   264  	xxx_messageInfo_QueryContractsByCodeRequest.DiscardUnknown(m)
   265  }
   266  
   267  var xxx_messageInfo_QueryContractsByCodeRequest proto.InternalMessageInfo
   268  
   269  // QueryContractsByCodeResponse is the response type for the
   270  // Query/ContractsByCode RPC method
   271  type QueryContractsByCodeResponse struct {
   272  	// contracts are a set of contract addresses
   273  	Contracts []string `protobuf:"bytes,1,rep,name=contracts,proto3" json:"contracts,omitempty"`
   274  	// pagination defines the pagination in the response.
   275  	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
   276  }
   277  
   278  func (m *QueryContractsByCodeResponse) Reset()         { *m = QueryContractsByCodeResponse{} }
   279  func (m *QueryContractsByCodeResponse) String() string { return proto.CompactTextString(m) }
   280  func (*QueryContractsByCodeResponse) ProtoMessage()    {}
   281  func (*QueryContractsByCodeResponse) Descriptor() ([]byte, []int) {
   282  	return fileDescriptor_9677c207036b9f2b, []int{5}
   283  }
   284  
   285  func (m *QueryContractsByCodeResponse) XXX_Unmarshal(b []byte) error {
   286  	return m.Unmarshal(b)
   287  }
   288  
   289  func (m *QueryContractsByCodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   290  	if deterministic {
   291  		return xxx_messageInfo_QueryContractsByCodeResponse.Marshal(b, m, deterministic)
   292  	} else {
   293  		b = b[:cap(b)]
   294  		n, err := m.MarshalToSizedBuffer(b)
   295  		if err != nil {
   296  			return nil, err
   297  		}
   298  		return b[:n], nil
   299  	}
   300  }
   301  
   302  func (m *QueryContractsByCodeResponse) XXX_Merge(src proto.Message) {
   303  	xxx_messageInfo_QueryContractsByCodeResponse.Merge(m, src)
   304  }
   305  
   306  func (m *QueryContractsByCodeResponse) XXX_Size() int {
   307  	return m.Size()
   308  }
   309  
   310  func (m *QueryContractsByCodeResponse) XXX_DiscardUnknown() {
   311  	xxx_messageInfo_QueryContractsByCodeResponse.DiscardUnknown(m)
   312  }
   313  
   314  var xxx_messageInfo_QueryContractsByCodeResponse proto.InternalMessageInfo
   315  
   316  // QueryAllContractStateRequest is the request type for the
   317  // Query/AllContractState RPC method
   318  type QueryAllContractStateRequest struct {
   319  	// address is the address of the contract
   320  	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
   321  	// pagination defines an optional pagination for the request.
   322  	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
   323  }
   324  
   325  func (m *QueryAllContractStateRequest) Reset()         { *m = QueryAllContractStateRequest{} }
   326  func (m *QueryAllContractStateRequest) String() string { return proto.CompactTextString(m) }
   327  func (*QueryAllContractStateRequest) ProtoMessage()    {}
   328  func (*QueryAllContractStateRequest) Descriptor() ([]byte, []int) {
   329  	return fileDescriptor_9677c207036b9f2b, []int{6}
   330  }
   331  
   332  func (m *QueryAllContractStateRequest) XXX_Unmarshal(b []byte) error {
   333  	return m.Unmarshal(b)
   334  }
   335  
   336  func (m *QueryAllContractStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   337  	if deterministic {
   338  		return xxx_messageInfo_QueryAllContractStateRequest.Marshal(b, m, deterministic)
   339  	} else {
   340  		b = b[:cap(b)]
   341  		n, err := m.MarshalToSizedBuffer(b)
   342  		if err != nil {
   343  			return nil, err
   344  		}
   345  		return b[:n], nil
   346  	}
   347  }
   348  
   349  func (m *QueryAllContractStateRequest) XXX_Merge(src proto.Message) {
   350  	xxx_messageInfo_QueryAllContractStateRequest.Merge(m, src)
   351  }
   352  
   353  func (m *QueryAllContractStateRequest) XXX_Size() int {
   354  	return m.Size()
   355  }
   356  
   357  func (m *QueryAllContractStateRequest) XXX_DiscardUnknown() {
   358  	xxx_messageInfo_QueryAllContractStateRequest.DiscardUnknown(m)
   359  }
   360  
   361  var xxx_messageInfo_QueryAllContractStateRequest proto.InternalMessageInfo
   362  
   363  // QueryAllContractStateResponse is the response type for the
   364  // Query/AllContractState RPC method
   365  type QueryAllContractStateResponse struct {
   366  	Models []Model `protobuf:"bytes,1,rep,name=models,proto3" json:"models"`
   367  	// pagination defines the pagination in the response.
   368  	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
   369  }
   370  
   371  func (m *QueryAllContractStateResponse) Reset()         { *m = QueryAllContractStateResponse{} }
   372  func (m *QueryAllContractStateResponse) String() string { return proto.CompactTextString(m) }
   373  func (*QueryAllContractStateResponse) ProtoMessage()    {}
   374  func (*QueryAllContractStateResponse) Descriptor() ([]byte, []int) {
   375  	return fileDescriptor_9677c207036b9f2b, []int{7}
   376  }
   377  
   378  func (m *QueryAllContractStateResponse) XXX_Unmarshal(b []byte) error {
   379  	return m.Unmarshal(b)
   380  }
   381  
   382  func (m *QueryAllContractStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   383  	if deterministic {
   384  		return xxx_messageInfo_QueryAllContractStateResponse.Marshal(b, m, deterministic)
   385  	} else {
   386  		b = b[:cap(b)]
   387  		n, err := m.MarshalToSizedBuffer(b)
   388  		if err != nil {
   389  			return nil, err
   390  		}
   391  		return b[:n], nil
   392  	}
   393  }
   394  
   395  func (m *QueryAllContractStateResponse) XXX_Merge(src proto.Message) {
   396  	xxx_messageInfo_QueryAllContractStateResponse.Merge(m, src)
   397  }
   398  
   399  func (m *QueryAllContractStateResponse) XXX_Size() int {
   400  	return m.Size()
   401  }
   402  
   403  func (m *QueryAllContractStateResponse) XXX_DiscardUnknown() {
   404  	xxx_messageInfo_QueryAllContractStateResponse.DiscardUnknown(m)
   405  }
   406  
   407  var xxx_messageInfo_QueryAllContractStateResponse proto.InternalMessageInfo
   408  
   409  // QueryRawContractStateRequest is the request type for the
   410  // Query/RawContractState RPC method
   411  type QueryRawContractStateRequest struct {
   412  	// address is the address of the contract
   413  	Address   string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
   414  	QueryData []byte `protobuf:"bytes,2,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"`
   415  }
   416  
   417  func (m *QueryRawContractStateRequest) Reset()         { *m = QueryRawContractStateRequest{} }
   418  func (m *QueryRawContractStateRequest) String() string { return proto.CompactTextString(m) }
   419  func (*QueryRawContractStateRequest) ProtoMessage()    {}
   420  func (*QueryRawContractStateRequest) Descriptor() ([]byte, []int) {
   421  	return fileDescriptor_9677c207036b9f2b, []int{8}
   422  }
   423  
   424  func (m *QueryRawContractStateRequest) XXX_Unmarshal(b []byte) error {
   425  	return m.Unmarshal(b)
   426  }
   427  
   428  func (m *QueryRawContractStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   429  	if deterministic {
   430  		return xxx_messageInfo_QueryRawContractStateRequest.Marshal(b, m, deterministic)
   431  	} else {
   432  		b = b[:cap(b)]
   433  		n, err := m.MarshalToSizedBuffer(b)
   434  		if err != nil {
   435  			return nil, err
   436  		}
   437  		return b[:n], nil
   438  	}
   439  }
   440  
   441  func (m *QueryRawContractStateRequest) XXX_Merge(src proto.Message) {
   442  	xxx_messageInfo_QueryRawContractStateRequest.Merge(m, src)
   443  }
   444  
   445  func (m *QueryRawContractStateRequest) XXX_Size() int {
   446  	return m.Size()
   447  }
   448  
   449  func (m *QueryRawContractStateRequest) XXX_DiscardUnknown() {
   450  	xxx_messageInfo_QueryRawContractStateRequest.DiscardUnknown(m)
   451  }
   452  
   453  var xxx_messageInfo_QueryRawContractStateRequest proto.InternalMessageInfo
   454  
   455  // QueryRawContractStateResponse is the response type for the
   456  // Query/RawContractState RPC method
   457  type QueryRawContractStateResponse struct {
   458  	// Data contains the raw store data
   459  	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
   460  }
   461  
   462  func (m *QueryRawContractStateResponse) Reset()         { *m = QueryRawContractStateResponse{} }
   463  func (m *QueryRawContractStateResponse) String() string { return proto.CompactTextString(m) }
   464  func (*QueryRawContractStateResponse) ProtoMessage()    {}
   465  func (*QueryRawContractStateResponse) Descriptor() ([]byte, []int) {
   466  	return fileDescriptor_9677c207036b9f2b, []int{9}
   467  }
   468  
   469  func (m *QueryRawContractStateResponse) XXX_Unmarshal(b []byte) error {
   470  	return m.Unmarshal(b)
   471  }
   472  
   473  func (m *QueryRawContractStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   474  	if deterministic {
   475  		return xxx_messageInfo_QueryRawContractStateResponse.Marshal(b, m, deterministic)
   476  	} else {
   477  		b = b[:cap(b)]
   478  		n, err := m.MarshalToSizedBuffer(b)
   479  		if err != nil {
   480  			return nil, err
   481  		}
   482  		return b[:n], nil
   483  	}
   484  }
   485  
   486  func (m *QueryRawContractStateResponse) XXX_Merge(src proto.Message) {
   487  	xxx_messageInfo_QueryRawContractStateResponse.Merge(m, src)
   488  }
   489  
   490  func (m *QueryRawContractStateResponse) XXX_Size() int {
   491  	return m.Size()
   492  }
   493  
   494  func (m *QueryRawContractStateResponse) XXX_DiscardUnknown() {
   495  	xxx_messageInfo_QueryRawContractStateResponse.DiscardUnknown(m)
   496  }
   497  
   498  var xxx_messageInfo_QueryRawContractStateResponse proto.InternalMessageInfo
   499  
   500  // QuerySmartContractStateRequest is the request type for the
   501  // Query/SmartContractState RPC method
   502  type QuerySmartContractStateRequest struct {
   503  	// address is the address of the contract
   504  	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
   505  	// QueryData contains the query data passed to the contract
   506  	QueryData RawContractMessage `protobuf:"bytes,2,opt,name=query_data,json=queryData,proto3,casttype=RawContractMessage" json:"query_data,omitempty"`
   507  }
   508  
   509  func (m *QuerySmartContractStateRequest) Reset()         { *m = QuerySmartContractStateRequest{} }
   510  func (m *QuerySmartContractStateRequest) String() string { return proto.CompactTextString(m) }
   511  func (*QuerySmartContractStateRequest) ProtoMessage()    {}
   512  func (*QuerySmartContractStateRequest) Descriptor() ([]byte, []int) {
   513  	return fileDescriptor_9677c207036b9f2b, []int{10}
   514  }
   515  
   516  func (m *QuerySmartContractStateRequest) XXX_Unmarshal(b []byte) error {
   517  	return m.Unmarshal(b)
   518  }
   519  
   520  func (m *QuerySmartContractStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   521  	if deterministic {
   522  		return xxx_messageInfo_QuerySmartContractStateRequest.Marshal(b, m, deterministic)
   523  	} else {
   524  		b = b[:cap(b)]
   525  		n, err := m.MarshalToSizedBuffer(b)
   526  		if err != nil {
   527  			return nil, err
   528  		}
   529  		return b[:n], nil
   530  	}
   531  }
   532  
   533  func (m *QuerySmartContractStateRequest) XXX_Merge(src proto.Message) {
   534  	xxx_messageInfo_QuerySmartContractStateRequest.Merge(m, src)
   535  }
   536  
   537  func (m *QuerySmartContractStateRequest) XXX_Size() int {
   538  	return m.Size()
   539  }
   540  
   541  func (m *QuerySmartContractStateRequest) XXX_DiscardUnknown() {
   542  	xxx_messageInfo_QuerySmartContractStateRequest.DiscardUnknown(m)
   543  }
   544  
   545  var xxx_messageInfo_QuerySmartContractStateRequest proto.InternalMessageInfo
   546  
   547  // QuerySmartContractStateResponse is the response type for the
   548  // Query/SmartContractState RPC method
   549  type QuerySmartContractStateResponse struct {
   550  	// Data contains the json data returned from the smart contract
   551  	Data RawContractMessage `protobuf:"bytes,1,opt,name=data,proto3,casttype=RawContractMessage" json:"data,omitempty"`
   552  }
   553  
   554  func (m *QuerySmartContractStateResponse) Reset()         { *m = QuerySmartContractStateResponse{} }
   555  func (m *QuerySmartContractStateResponse) String() string { return proto.CompactTextString(m) }
   556  func (*QuerySmartContractStateResponse) ProtoMessage()    {}
   557  func (*QuerySmartContractStateResponse) Descriptor() ([]byte, []int) {
   558  	return fileDescriptor_9677c207036b9f2b, []int{11}
   559  }
   560  
   561  func (m *QuerySmartContractStateResponse) XXX_Unmarshal(b []byte) error {
   562  	return m.Unmarshal(b)
   563  }
   564  
   565  func (m *QuerySmartContractStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   566  	if deterministic {
   567  		return xxx_messageInfo_QuerySmartContractStateResponse.Marshal(b, m, deterministic)
   568  	} else {
   569  		b = b[:cap(b)]
   570  		n, err := m.MarshalToSizedBuffer(b)
   571  		if err != nil {
   572  			return nil, err
   573  		}
   574  		return b[:n], nil
   575  	}
   576  }
   577  
   578  func (m *QuerySmartContractStateResponse) XXX_Merge(src proto.Message) {
   579  	xxx_messageInfo_QuerySmartContractStateResponse.Merge(m, src)
   580  }
   581  
   582  func (m *QuerySmartContractStateResponse) XXX_Size() int {
   583  	return m.Size()
   584  }
   585  
   586  func (m *QuerySmartContractStateResponse) XXX_DiscardUnknown() {
   587  	xxx_messageInfo_QuerySmartContractStateResponse.DiscardUnknown(m)
   588  }
   589  
   590  var xxx_messageInfo_QuerySmartContractStateResponse proto.InternalMessageInfo
   591  
   592  // QueryCodeRequest is the request type for the Query/Code RPC method
   593  type QueryCodeRequest struct {
   594  	CodeId uint64 `protobuf:"varint,1,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"`
   595  }
   596  
   597  func (m *QueryCodeRequest) Reset()         { *m = QueryCodeRequest{} }
   598  func (m *QueryCodeRequest) String() string { return proto.CompactTextString(m) }
   599  func (*QueryCodeRequest) ProtoMessage()    {}
   600  func (*QueryCodeRequest) Descriptor() ([]byte, []int) {
   601  	return fileDescriptor_9677c207036b9f2b, []int{12}
   602  }
   603  
   604  func (m *QueryCodeRequest) XXX_Unmarshal(b []byte) error {
   605  	return m.Unmarshal(b)
   606  }
   607  
   608  func (m *QueryCodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   609  	if deterministic {
   610  		return xxx_messageInfo_QueryCodeRequest.Marshal(b, m, deterministic)
   611  	} else {
   612  		b = b[:cap(b)]
   613  		n, err := m.MarshalToSizedBuffer(b)
   614  		if err != nil {
   615  			return nil, err
   616  		}
   617  		return b[:n], nil
   618  	}
   619  }
   620  
   621  func (m *QueryCodeRequest) XXX_Merge(src proto.Message) {
   622  	xxx_messageInfo_QueryCodeRequest.Merge(m, src)
   623  }
   624  
   625  func (m *QueryCodeRequest) XXX_Size() int {
   626  	return m.Size()
   627  }
   628  
   629  func (m *QueryCodeRequest) XXX_DiscardUnknown() {
   630  	xxx_messageInfo_QueryCodeRequest.DiscardUnknown(m)
   631  }
   632  
   633  var xxx_messageInfo_QueryCodeRequest proto.InternalMessageInfo
   634  
   635  // CodeInfoResponse contains code meta data from CodeInfo
   636  type CodeInfoResponse struct {
   637  	CodeID                uint64                                               `protobuf:"varint,1,opt,name=code_id,json=codeId,proto3" json:"id"`
   638  	Creator               string                                               `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"`
   639  	DataHash              github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,3,opt,name=data_hash,json=dataHash,proto3,casttype=github.com/fibonacci-chain/fbc/libs/tendermint/libs/bytes.HexBytes" json:"data_hash,omitempty"`
   640  	InstantiatePermission AccessConfig                                         `protobuf:"bytes,6,opt,name=instantiate_permission,json=instantiatePermission,proto3" json:"instantiate_permission"`
   641  }
   642  
   643  func (m *CodeInfoResponse) Reset()         { *m = CodeInfoResponse{} }
   644  func (m *CodeInfoResponse) String() string { return proto.CompactTextString(m) }
   645  func (*CodeInfoResponse) ProtoMessage()    {}
   646  func (*CodeInfoResponse) Descriptor() ([]byte, []int) {
   647  	return fileDescriptor_9677c207036b9f2b, []int{13}
   648  }
   649  
   650  func (m *CodeInfoResponse) XXX_Unmarshal(b []byte) error {
   651  	return m.Unmarshal(b)
   652  }
   653  
   654  func (m *CodeInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   655  	if deterministic {
   656  		return xxx_messageInfo_CodeInfoResponse.Marshal(b, m, deterministic)
   657  	} else {
   658  		b = b[:cap(b)]
   659  		n, err := m.MarshalToSizedBuffer(b)
   660  		if err != nil {
   661  			return nil, err
   662  		}
   663  		return b[:n], nil
   664  	}
   665  }
   666  
   667  func (m *CodeInfoResponse) XXX_Merge(src proto.Message) {
   668  	xxx_messageInfo_CodeInfoResponse.Merge(m, src)
   669  }
   670  
   671  func (m *CodeInfoResponse) XXX_Size() int {
   672  	return m.Size()
   673  }
   674  
   675  func (m *CodeInfoResponse) XXX_DiscardUnknown() {
   676  	xxx_messageInfo_CodeInfoResponse.DiscardUnknown(m)
   677  }
   678  
   679  var xxx_messageInfo_CodeInfoResponse proto.InternalMessageInfo
   680  
   681  // QueryCodeResponse is the response type for the Query/Code RPC method
   682  type QueryCodeResponse struct {
   683  	*CodeInfoResponse `protobuf:"bytes,1,opt,name=code_info,json=codeInfo,proto3,embedded=code_info" json:""`
   684  	Data              []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data"`
   685  }
   686  
   687  func (m *QueryCodeResponse) Reset()         { *m = QueryCodeResponse{} }
   688  func (m *QueryCodeResponse) String() string { return proto.CompactTextString(m) }
   689  func (*QueryCodeResponse) ProtoMessage()    {}
   690  func (*QueryCodeResponse) Descriptor() ([]byte, []int) {
   691  	return fileDescriptor_9677c207036b9f2b, []int{14}
   692  }
   693  
   694  func (m *QueryCodeResponse) XXX_Unmarshal(b []byte) error {
   695  	return m.Unmarshal(b)
   696  }
   697  
   698  func (m *QueryCodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   699  	if deterministic {
   700  		return xxx_messageInfo_QueryCodeResponse.Marshal(b, m, deterministic)
   701  	} else {
   702  		b = b[:cap(b)]
   703  		n, err := m.MarshalToSizedBuffer(b)
   704  		if err != nil {
   705  			return nil, err
   706  		}
   707  		return b[:n], nil
   708  	}
   709  }
   710  
   711  func (m *QueryCodeResponse) XXX_Merge(src proto.Message) {
   712  	xxx_messageInfo_QueryCodeResponse.Merge(m, src)
   713  }
   714  
   715  func (m *QueryCodeResponse) XXX_Size() int {
   716  	return m.Size()
   717  }
   718  
   719  func (m *QueryCodeResponse) XXX_DiscardUnknown() {
   720  	xxx_messageInfo_QueryCodeResponse.DiscardUnknown(m)
   721  }
   722  
   723  var xxx_messageInfo_QueryCodeResponse proto.InternalMessageInfo
   724  
   725  // QueryCodesRequest is the request type for the Query/Codes RPC method
   726  type QueryCodesRequest struct {
   727  	// pagination defines an optional pagination for the request.
   728  	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
   729  }
   730  
   731  func (m *QueryCodesRequest) Reset()         { *m = QueryCodesRequest{} }
   732  func (m *QueryCodesRequest) String() string { return proto.CompactTextString(m) }
   733  func (*QueryCodesRequest) ProtoMessage()    {}
   734  func (*QueryCodesRequest) Descriptor() ([]byte, []int) {
   735  	return fileDescriptor_9677c207036b9f2b, []int{15}
   736  }
   737  
   738  func (m *QueryCodesRequest) XXX_Unmarshal(b []byte) error {
   739  	return m.Unmarshal(b)
   740  }
   741  
   742  func (m *QueryCodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   743  	if deterministic {
   744  		return xxx_messageInfo_QueryCodesRequest.Marshal(b, m, deterministic)
   745  	} else {
   746  		b = b[:cap(b)]
   747  		n, err := m.MarshalToSizedBuffer(b)
   748  		if err != nil {
   749  			return nil, err
   750  		}
   751  		return b[:n], nil
   752  	}
   753  }
   754  
   755  func (m *QueryCodesRequest) XXX_Merge(src proto.Message) {
   756  	xxx_messageInfo_QueryCodesRequest.Merge(m, src)
   757  }
   758  
   759  func (m *QueryCodesRequest) XXX_Size() int {
   760  	return m.Size()
   761  }
   762  
   763  func (m *QueryCodesRequest) XXX_DiscardUnknown() {
   764  	xxx_messageInfo_QueryCodesRequest.DiscardUnknown(m)
   765  }
   766  
   767  var xxx_messageInfo_QueryCodesRequest proto.InternalMessageInfo
   768  
   769  // QueryCodesResponse is the response type for the Query/Codes RPC method
   770  type QueryCodesResponse struct {
   771  	CodeInfos []CodeInfoResponse `protobuf:"bytes,1,rep,name=code_infos,json=codeInfos,proto3" json:"code_infos"`
   772  	// pagination defines the pagination in the response.
   773  	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
   774  }
   775  
   776  func (m *QueryCodesResponse) Reset()         { *m = QueryCodesResponse{} }
   777  func (m *QueryCodesResponse) String() string { return proto.CompactTextString(m) }
   778  func (*QueryCodesResponse) ProtoMessage()    {}
   779  func (*QueryCodesResponse) Descriptor() ([]byte, []int) {
   780  	return fileDescriptor_9677c207036b9f2b, []int{16}
   781  }
   782  
   783  func (m *QueryCodesResponse) XXX_Unmarshal(b []byte) error {
   784  	return m.Unmarshal(b)
   785  }
   786  
   787  func (m *QueryCodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   788  	if deterministic {
   789  		return xxx_messageInfo_QueryCodesResponse.Marshal(b, m, deterministic)
   790  	} else {
   791  		b = b[:cap(b)]
   792  		n, err := m.MarshalToSizedBuffer(b)
   793  		if err != nil {
   794  			return nil, err
   795  		}
   796  		return b[:n], nil
   797  	}
   798  }
   799  
   800  func (m *QueryCodesResponse) XXX_Merge(src proto.Message) {
   801  	xxx_messageInfo_QueryCodesResponse.Merge(m, src)
   802  }
   803  
   804  func (m *QueryCodesResponse) XXX_Size() int {
   805  	return m.Size()
   806  }
   807  
   808  func (m *QueryCodesResponse) XXX_DiscardUnknown() {
   809  	xxx_messageInfo_QueryCodesResponse.DiscardUnknown(m)
   810  }
   811  
   812  var xxx_messageInfo_QueryCodesResponse proto.InternalMessageInfo
   813  
   814  // QueryPinnedCodesRequest is the request type for the Query/PinnedCodes
   815  // RPC method
   816  type QueryPinnedCodesRequest struct {
   817  	// pagination defines an optional pagination for the request.
   818  	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
   819  }
   820  
   821  func (m *QueryPinnedCodesRequest) Reset()         { *m = QueryPinnedCodesRequest{} }
   822  func (m *QueryPinnedCodesRequest) String() string { return proto.CompactTextString(m) }
   823  func (*QueryPinnedCodesRequest) ProtoMessage()    {}
   824  func (*QueryPinnedCodesRequest) Descriptor() ([]byte, []int) {
   825  	return fileDescriptor_9677c207036b9f2b, []int{17}
   826  }
   827  
   828  func (m *QueryPinnedCodesRequest) XXX_Unmarshal(b []byte) error {
   829  	return m.Unmarshal(b)
   830  }
   831  
   832  func (m *QueryPinnedCodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   833  	if deterministic {
   834  		return xxx_messageInfo_QueryPinnedCodesRequest.Marshal(b, m, deterministic)
   835  	} else {
   836  		b = b[:cap(b)]
   837  		n, err := m.MarshalToSizedBuffer(b)
   838  		if err != nil {
   839  			return nil, err
   840  		}
   841  		return b[:n], nil
   842  	}
   843  }
   844  
   845  func (m *QueryPinnedCodesRequest) XXX_Merge(src proto.Message) {
   846  	xxx_messageInfo_QueryPinnedCodesRequest.Merge(m, src)
   847  }
   848  
   849  func (m *QueryPinnedCodesRequest) XXX_Size() int {
   850  	return m.Size()
   851  }
   852  
   853  func (m *QueryPinnedCodesRequest) XXX_DiscardUnknown() {
   854  	xxx_messageInfo_QueryPinnedCodesRequest.DiscardUnknown(m)
   855  }
   856  
   857  var xxx_messageInfo_QueryPinnedCodesRequest proto.InternalMessageInfo
   858  
   859  // QueryPinnedCodesResponse is the response type for the
   860  // Query/PinnedCodes RPC method
   861  type QueryPinnedCodesResponse struct {
   862  	CodeIDs []uint64 `protobuf:"varint,1,rep,packed,name=code_ids,json=codeIds,proto3" json:"code_ids,omitempty"`
   863  	// pagination defines the pagination in the response.
   864  	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
   865  }
   866  
   867  func (m *QueryPinnedCodesResponse) Reset()         { *m = QueryPinnedCodesResponse{} }
   868  func (m *QueryPinnedCodesResponse) String() string { return proto.CompactTextString(m) }
   869  func (*QueryPinnedCodesResponse) ProtoMessage()    {}
   870  func (*QueryPinnedCodesResponse) Descriptor() ([]byte, []int) {
   871  	return fileDescriptor_9677c207036b9f2b, []int{18}
   872  }
   873  
   874  func (m *QueryPinnedCodesResponse) XXX_Unmarshal(b []byte) error {
   875  	return m.Unmarshal(b)
   876  }
   877  
   878  func (m *QueryPinnedCodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   879  	if deterministic {
   880  		return xxx_messageInfo_QueryPinnedCodesResponse.Marshal(b, m, deterministic)
   881  	} else {
   882  		b = b[:cap(b)]
   883  		n, err := m.MarshalToSizedBuffer(b)
   884  		if err != nil {
   885  			return nil, err
   886  		}
   887  		return b[:n], nil
   888  	}
   889  }
   890  
   891  func (m *QueryPinnedCodesResponse) XXX_Merge(src proto.Message) {
   892  	xxx_messageInfo_QueryPinnedCodesResponse.Merge(m, src)
   893  }
   894  
   895  func (m *QueryPinnedCodesResponse) XXX_Size() int {
   896  	return m.Size()
   897  }
   898  
   899  func (m *QueryPinnedCodesResponse) XXX_DiscardUnknown() {
   900  	xxx_messageInfo_QueryPinnedCodesResponse.DiscardUnknown(m)
   901  }
   902  
   903  var xxx_messageInfo_QueryPinnedCodesResponse proto.InternalMessageInfo
   904  
   905  func init() {
   906  	proto.RegisterType((*QueryContractInfoRequest)(nil), "cosmwasm.wasm.v1.QueryContractInfoRequest")
   907  	proto.RegisterType((*QueryContractInfoResponse)(nil), "cosmwasm.wasm.v1.QueryContractInfoResponse")
   908  	proto.RegisterType((*QueryContractHistoryRequest)(nil), "cosmwasm.wasm.v1.QueryContractHistoryRequest")
   909  	proto.RegisterType((*QueryContractHistoryResponse)(nil), "cosmwasm.wasm.v1.QueryContractHistoryResponse")
   910  	proto.RegisterType((*QueryContractsByCodeRequest)(nil), "cosmwasm.wasm.v1.QueryContractsByCodeRequest")
   911  	proto.RegisterType((*QueryContractsByCodeResponse)(nil), "cosmwasm.wasm.v1.QueryContractsByCodeResponse")
   912  	proto.RegisterType((*QueryAllContractStateRequest)(nil), "cosmwasm.wasm.v1.QueryAllContractStateRequest")
   913  	proto.RegisterType((*QueryAllContractStateResponse)(nil), "cosmwasm.wasm.v1.QueryAllContractStateResponse")
   914  	proto.RegisterType((*QueryRawContractStateRequest)(nil), "cosmwasm.wasm.v1.QueryRawContractStateRequest")
   915  	proto.RegisterType((*QueryRawContractStateResponse)(nil), "cosmwasm.wasm.v1.QueryRawContractStateResponse")
   916  	proto.RegisterType((*QuerySmartContractStateRequest)(nil), "cosmwasm.wasm.v1.QuerySmartContractStateRequest")
   917  	proto.RegisterType((*QuerySmartContractStateResponse)(nil), "cosmwasm.wasm.v1.QuerySmartContractStateResponse")
   918  	proto.RegisterType((*QueryCodeRequest)(nil), "cosmwasm.wasm.v1.QueryCodeRequest")
   919  	proto.RegisterType((*CodeInfoResponse)(nil), "cosmwasm.wasm.v1.CodeInfoResponse")
   920  	proto.RegisterType((*QueryCodeResponse)(nil), "cosmwasm.wasm.v1.QueryCodeResponse")
   921  	proto.RegisterType((*QueryCodesRequest)(nil), "cosmwasm.wasm.v1.QueryCodesRequest")
   922  	proto.RegisterType((*QueryCodesResponse)(nil), "cosmwasm.wasm.v1.QueryCodesResponse")
   923  	proto.RegisterType((*QueryPinnedCodesRequest)(nil), "cosmwasm.wasm.v1.QueryPinnedCodesRequest")
   924  	proto.RegisterType((*QueryPinnedCodesResponse)(nil), "cosmwasm.wasm.v1.QueryPinnedCodesResponse")
   925  }
   926  
   927  func init() { proto.RegisterFile("cosmwasm/wasm/v1/query.proto", fileDescriptor_9677c207036b9f2b) }
   928  
   929  var fileDescriptor_9677c207036b9f2b = []byte{
   930  	// 1191 bytes of a gzipped FileDescriptorProto
   931  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x97, 0xcf, 0x4f, 0x24, 0x45,
   932  	0x14, 0xc7, 0xa7, 0xd8, 0x61, 0x7e, 0x14, 0x98, 0x1d, 0x2b, 0x0a, 0xe3, 0xc8, 0x76, 0x93, 0x76,
   933  	0x83, 0x2c, 0x8b, 0xdd, 0xc2, 0x42, 0x56, 0x4d, 0x8c, 0xd9, 0x61, 0x75, 0x81, 0x84, 0x84, 0xed,
   934  	0x8d, 0xd9, 0xc4, 0x3d, 0x90, 0x9a, 0xe9, 0x62, 0xe8, 0x84, 0xe9, 0x1a, 0xba, 0x0a, 0xd8, 0x09,
   935  	0x41, 0xcd, 0x26, 0x1e, 0x4c, 0x8c, 0x9a, 0x18, 0x8f, 0x46, 0x0f, 0x66, 0xf5, 0xac, 0x37, 0xff,
   936  	0x02, 0x8e, 0x24, 0x5e, 0x3c, 0x4d, 0x74, 0xf0, 0x60, 0xf8, 0x13, 0xf6, 0x64, 0xaa, 0xba, 0x7a,
   937  	0xe8, 0xf9, 0xd1, 0xcc, 0xb0, 0x21, 0x7b, 0x21, 0xdd, 0xd4, 0xab, 0x57, 0x9f, 0xf7, 0xed, 0x57,
   938  	0xef, 0xbd, 0x81, 0x13, 0x65, 0xca, 0xaa, 0xfb, 0x98, 0x55, 0x2d, 0xf9, 0x67, 0x6f, 0xce, 0xda,
   939  	0xd9, 0x25, 0x7e, 0xdd, 0xac, 0xf9, 0x94, 0x53, 0x94, 0x0b, 0x57, 0x4d, 0xf9, 0x67, 0x6f, 0xae,
   940  	0xf0, 0x4a, 0x85, 0x56, 0xa8, 0x5c, 0xb4, 0xc4, 0x53, 0x60, 0x57, 0xe8, 0xf6, 0xc2, 0xeb, 0x35,
   941  	0xc2, 0xc2, 0xd5, 0x0a, 0xa5, 0x95, 0x6d, 0x62, 0xe1, 0x9a, 0x6b, 0x61, 0xcf, 0xa3, 0x1c, 0x73,
   942  	0x97, 0x7a, 0xe1, 0xea, 0x8c, 0xd8, 0x4b, 0x99, 0x55, 0xc2, 0x8c, 0x04, 0x87, 0x5b, 0x7b, 0x73,
   943  	0x25, 0xc2, 0xf1, 0x9c, 0x55, 0xc3, 0x15, 0xd7, 0x93, 0xc6, 0x81, 0xad, 0xb1, 0x00, 0xf3, 0xf7,
   944  	0x85, 0xc5, 0x12, 0xf5, 0xb8, 0x8f, 0xcb, 0x7c, 0xc5, 0xdb, 0xa4, 0x36, 0xd9, 0xd9, 0x25, 0x8c,
   945  	0xa3, 0x3c, 0x4c, 0x63, 0xc7, 0xf1, 0x09, 0x63, 0x79, 0x30, 0x09, 0xa6, 0xb3, 0x76, 0xf8, 0x6a,
   946  	0x7c, 0x0d, 0xe0, 0x6b, 0x3d, 0xb6, 0xb1, 0x1a, 0xf5, 0x18, 0x89, 0xdf, 0x87, 0xee, 0xc3, 0x97,
   947  	0xca, 0x6a, 0xc7, 0x86, 0xeb, 0x6d, 0xd2, 0xfc, 0xd0, 0x24, 0x98, 0x1e, 0x99, 0xd7, 0xcc, 0x4e,
   948  	0x55, 0xcc, 0xa8, 0xe3, 0xe2, 0xe8, 0x51, 0x43, 0x4f, 0x1c, 0x37, 0x74, 0x70, 0xda, 0xd0, 0x13,
   949  	0xf6, 0x68, 0x39, 0xb2, 0xf6, 0x5e, 0xf2, 0xbf, 0x9f, 0x74, 0x60, 0x7c, 0x06, 0x5f, 0x6f, 0xe3,
   950  	0x59, 0x76, 0x19, 0xa7, 0x7e, 0xbd, 0x6f, 0x24, 0xe8, 0x23, 0x08, 0xcf, 0x34, 0x51, 0x38, 0x53,
   951  	0x66, 0x20, 0xa0, 0x29, 0x04, 0x34, 0x83, 0xaf, 0xa7, 0x04, 0x34, 0xd7, 0x71, 0x85, 0x28, 0xaf,
   952  	0x76, 0x64, 0xa7, 0xf1, 0x3b, 0x80, 0x13, 0xbd, 0x09, 0x94, 0x28, 0xab, 0x30, 0x4d, 0x3c, 0xee,
   953  	0xbb, 0x44, 0x20, 0x5c, 0x99, 0x1e, 0x99, 0x9f, 0x89, 0x0f, 0x7a, 0x89, 0x3a, 0x44, 0xed, 0xff,
   954  	0xd0, 0xe3, 0x7e, 0xbd, 0x98, 0x14, 0x02, 0xd8, 0xa1, 0x03, 0x74, 0xaf, 0x07, 0xf4, 0x9b, 0x7d,
   955  	0xa1, 0x03, 0x90, 0x36, 0xea, 0x4f, 0x3b, 0x64, 0x63, 0xc5, 0xba, 0x38, 0x3b, 0x94, 0x6d, 0x1c,
   956  	0xa6, 0xcb, 0xd4, 0x21, 0x1b, 0xae, 0x23, 0x65, 0x4b, 0xda, 0x29, 0xf1, 0xba, 0xe2, 0x5c, 0x9a,
   957  	0x6a, 0x5f, 0x74, 0xaa, 0xd6, 0x02, 0x50, 0xaa, 0x4d, 0xc0, 0x6c, 0xf8, 0xb5, 0x03, 0xdd, 0xb2,
   958  	0xf6, 0xd9, 0x3f, 0x2e, 0x4f, 0x87, 0xcf, 0x43, 0x8e, 0x3b, 0xdb, 0xdb, 0x21, 0xca, 0x03, 0x8e,
   959  	0x39, 0x79, 0x71, 0x09, 0xf4, 0x23, 0x80, 0xd7, 0x62, 0x10, 0x94, 0x16, 0x8b, 0x30, 0x55, 0xa5,
   960  	0x0e, 0xd9, 0x0e, 0x13, 0x68, 0xbc, 0x3b, 0x81, 0xd6, 0xc4, 0xba, 0xca, 0x16, 0x65, 0x7c, 0x79,
   961  	0x22, 0x3d, 0x54, 0x1a, 0xd9, 0x78, 0xff, 0x82, 0x1a, 0x5d, 0x83, 0x50, 0x9e, 0xb1, 0xe1, 0x60,
   962  	0x8e, 0x25, 0xc2, 0xa8, 0x9d, 0x95, 0xff, 0xb9, 0x8b, 0x39, 0x36, 0x6e, 0xa9, 0xc8, 0xbb, 0x1d,
   963  	0xab, 0xc8, 0x11, 0x4c, 0xca, 0x9d, 0x40, 0xee, 0x94, 0xcf, 0xc6, 0x0e, 0xd4, 0xe4, 0xa6, 0x07,
   964  	0x55, 0xec, 0xf3, 0x0b, 0xf2, 0x2c, 0x76, 0xf3, 0x14, 0xc7, 0x9e, 0x35, 0x74, 0x14, 0x21, 0x58,
   965  	0x23, 0x8c, 0x09, 0x25, 0x22, 0x9c, 0x6b, 0x50, 0x8f, 0x3d, 0x52, 0x91, 0xce, 0x44, 0x49, 0x63,
   966  	0x7d, 0x06, 0x11, 0xdc, 0x84, 0x39, 0x95, 0xfb, 0xfd, 0x6f, 0x9c, 0xf1, 0xc3, 0x10, 0xcc, 0x09,
   967  	0xc3, 0xb6, 0x42, 0x7b, 0xa3, 0xc3, 0xba, 0x98, 0x6b, 0x36, 0xf4, 0x94, 0x34, 0xbb, 0x7b, 0xda,
   968  	0xd0, 0x87, 0x5c, 0xa7, 0x75, 0x63, 0xf3, 0x30, 0x5d, 0xf6, 0x09, 0xe6, 0xd4, 0x97, 0xf1, 0x66,
   969  	0xed, 0xf0, 0x15, 0x7d, 0x0c, 0xb3, 0x02, 0x67, 0x63, 0x0b, 0xb3, 0xad, 0xfc, 0x15, 0xc9, 0xfd,
   970  	0xce, 0xb3, 0x86, 0xbe, 0x50, 0x71, 0xf9, 0xd6, 0x6e, 0xc9, 0x2c, 0xd3, 0xaa, 0xc5, 0x89, 0xe7,
   971  	0x10, 0xbf, 0xea, 0x7a, 0x3c, 0xfa, 0xb8, 0xed, 0x96, 0x98, 0x55, 0xaa, 0x73, 0xc2, 0xcc, 0x65,
   972  	0xf2, 0xb8, 0x28, 0x1e, 0xec, 0x8c, 0x70, 0xb5, 0x8c, 0xd9, 0x16, 0x7a, 0x04, 0xc7, 0x5c, 0x8f,
   973  	0x71, 0xec, 0x71, 0x17, 0x73, 0xb2, 0x51, 0x13, 0x9b, 0x18, 0x13, 0x29, 0x98, 0x8a, 0xab, 0xf9,
   974  	0x77, 0xca, 0x65, 0xc2, 0xd8, 0x12, 0xf5, 0x36, 0xdd, 0x8a, 0x4a, 0xe2, 0x57, 0x23, 0x3e, 0xd6,
   975  	0x5b, 0x2e, 0x82, 0xa2, 0xbf, 0x9a, 0xcc, 0x24, 0x73, 0xc3, 0xab, 0xc9, 0xcc, 0x70, 0x2e, 0x65,
   976  	0x3c, 0x01, 0xf0, 0xe5, 0x88, 0x9a, 0x4a, 0xa0, 0x15, 0x51, 0x3e, 0x84, 0x40, 0xa2, 0xd7, 0x00,
   977  	0x79, 0xae, 0xd1, 0xab, 0xec, 0xb6, 0xeb, 0x5a, 0xcc, 0xb4, 0x7a, 0x4d, 0xa6, 0xac, 0xd6, 0xd0,
   978  	0x84, 0xfa, 0xb2, 0x41, 0xb6, 0x64, 0x4e, 0x1b, 0xba, 0x7c, 0x0f, 0xbe, 0xa5, 0xea, 0x42, 0x8f,
   979  	0x22, 0x0c, 0x2c, 0xfc, 0xa4, 0xed, 0x05, 0x02, 0x3c, 0x77, 0x81, 0x78, 0x0a, 0x20, 0x8a, 0x7a,
   980  	0x57, 0x21, 0xde, 0x83, 0xb0, 0x15, 0x62, 0x58, 0x19, 0x06, 0x89, 0x31, 0xd0, 0x37, 0x1b, 0xc6,
   981  	0x77, 0x89, 0x75, 0x02, 0xc3, 0x71, 0xc9, 0xb9, 0xee, 0x7a, 0x1e, 0x71, 0xce, 0xd1, 0xe2, 0xf9,
   982  	0x8b, 0xe5, 0x37, 0x40, 0x8d, 0x2d, 0x6d, 0x67, 0xb4, 0xee, 0x60, 0x46, 0xdd, 0x8a, 0x40, 0x8f,
   983  	0x64, 0xf1, 0xaa, 0x88, 0xb5, 0xd9, 0xd0, 0xd3, 0xc1, 0xd5, 0x60, 0x76, 0x3a, 0xb8, 0x15, 0x97,
   984  	0x17, 0xf4, 0xfc, 0x97, 0x23, 0x70, 0x58, 0x12, 0xa1, 0xef, 0x01, 0x1c, 0x8d, 0x4e, 0x2f, 0xa8,
   985  	0x47, 0xa3, 0x8f, 0x1b, 0xb9, 0x0a, 0x37, 0x07, 0xb2, 0x0d, 0xce, 0x37, 0x66, 0x9f, 0xfc, 0xf9,
   986  	0xef, 0x77, 0x43, 0x53, 0xe8, 0xba, 0xd5, 0x35, 0x2c, 0x86, 0x3d, 0xd2, 0x3a, 0x50, 0x35, 0xef,
   987  	0x10, 0x3d, 0x05, 0xf0, 0x6a, 0xc7, 0x70, 0x82, 0xde, 0xea, 0x73, 0x5c, 0xfb, 0x18, 0x55, 0x30,
   988  	0x07, 0x35, 0x57, 0x80, 0x0b, 0x12, 0xd0, 0x44, 0xb3, 0x83, 0x00, 0x5a, 0x5b, 0x0a, 0xea, 0xe7,
   989  	0x08, 0xa8, 0x9a, 0x07, 0xfa, 0x82, 0xb6, 0x0f, 0x2e, 0x7d, 0x41, 0x3b, 0xc6, 0x0c, 0x63, 0x5e,
   990  	0x82, 0xce, 0xa2, 0x99, 0x5e, 0xa0, 0x0e, 0xb1, 0x0e, 0x54, 0x42, 0x1d, 0x5a, 0x67, 0xc3, 0xc7,
   991  	0x2f, 0x00, 0xe6, 0x3a, 0x7b, 0x35, 0x8a, 0x3b, 0x38, 0x66, 0xae, 0x28, 0x58, 0x03, 0xdb, 0x0f,
   992  	0x42, 0xda, 0x25, 0x29, 0x93, 0x50, 0xbf, 0x01, 0x98, 0xeb, 0xec, 0xad, 0xb1, 0xa4, 0x31, 0xdd,
   993  	0x3d, 0x96, 0x34, 0xae, 0x69, 0x1b, 0xef, 0x4b, 0xd2, 0xdb, 0x68, 0x71, 0x20, 0x52, 0x1f, 0xef,
   994  	0x5b, 0x07, 0x67, 0x4d, 0xf9, 0x10, 0xfd, 0x01, 0x20, 0xea, 0x6e, 0xb4, 0xe8, 0xed, 0x18, 0x8c,
   995  	0xd8, 0x31, 0xa0, 0x30, 0x77, 0x81, 0x1d, 0x0a, 0xfd, 0x03, 0x89, 0xfe, 0x2e, 0xba, 0x3d, 0x98,
   996  	0xc8, 0xc2, 0x51, 0x3b, 0x7c, 0x1d, 0x26, 0x65, 0xda, 0x1a, 0xb1, 0x79, 0x78, 0x96, 0xab, 0x6f,
   997  	0x9c, 0x6b, 0xa3, 0x88, 0xa6, 0x25, 0x91, 0x81, 0x26, 0xfb, 0x25, 0x28, 0xf2, 0xe1, 0xb0, 0x2c,
   998  	0x87, 0xe8, 0x3c, 0xbf, 0x61, 0x41, 0x2e, 0x5c, 0x3f, 0xdf, 0x48, 0x9d, 0xae, 0xc9, 0xd3, 0xf3,
   999  	0x68, 0xac, 0xf7, 0xe9, 0xe8, 0x2b, 0x00, 0x47, 0x22, 0x95, 0x18, 0xdd, 0x88, 0xf1, 0xda, 0xdd,
  1000  	0x11, 0x0a, 0x33, 0x83, 0x98, 0x2a, 0x8c, 0x29, 0x89, 0x31, 0x89, 0xb4, 0xde, 0x18, 0xcc, 0xaa,
  1001  	0xc9, 0x4d, 0xc5, 0xe5, 0xa3, 0x7f, 0xb4, 0xc4, 0xaf, 0x4d, 0x2d, 0x71, 0xd4, 0xd4, 0xc0, 0x71,
  1002  	0x53, 0x03, 0x7f, 0x37, 0x35, 0xf0, 0xed, 0x89, 0x96, 0x38, 0x3e, 0xd1, 0x12, 0x7f, 0x9d, 0x68,
  1003  	0x89, 0x4f, 0xa6, 0x22, 0xc3, 0xcd, 0x12, 0x65, 0xd5, 0x87, 0xa1, 0x2f, 0xc7, 0x7a, 0x1c, 0xf8,
  1004  	0x94, 0xbf, 0xb6, 0x4b, 0x29, 0xf9, 0x23, 0xf9, 0xd6, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe8,
  1005  	0x7b, 0x25, 0x05, 0xd4, 0x0f, 0x00, 0x00,
  1006  }
  1007  
  1008  func (this *QueryContractInfoResponse) Equal(that interface{}) bool {
  1009  	if that == nil {
  1010  		return this == nil
  1011  	}
  1012  
  1013  	that1, ok := that.(*QueryContractInfoResponse)
  1014  	if !ok {
  1015  		that2, ok := that.(QueryContractInfoResponse)
  1016  		if ok {
  1017  			that1 = &that2
  1018  		} else {
  1019  			return false
  1020  		}
  1021  	}
  1022  	if that1 == nil {
  1023  		return this == nil
  1024  	} else if this == nil {
  1025  		return false
  1026  	}
  1027  	if this.Address != that1.Address {
  1028  		return false
  1029  	}
  1030  	if !this.ContractInfo.Equal(&that1.ContractInfo) {
  1031  		return false
  1032  	}
  1033  	return true
  1034  }
  1035  
  1036  func (this *CodeInfoResponse) Equal(that interface{}) bool {
  1037  	if that == nil {
  1038  		return this == nil
  1039  	}
  1040  
  1041  	that1, ok := that.(*CodeInfoResponse)
  1042  	if !ok {
  1043  		that2, ok := that.(CodeInfoResponse)
  1044  		if ok {
  1045  			that1 = &that2
  1046  		} else {
  1047  			return false
  1048  		}
  1049  	}
  1050  	if that1 == nil {
  1051  		return this == nil
  1052  	} else if this == nil {
  1053  		return false
  1054  	}
  1055  	if this.CodeID != that1.CodeID {
  1056  		return false
  1057  	}
  1058  	if this.Creator != that1.Creator {
  1059  		return false
  1060  	}
  1061  	if !bytes.Equal(this.DataHash, that1.DataHash) {
  1062  		return false
  1063  	}
  1064  	if !this.InstantiatePermission.Equal(&that1.InstantiatePermission) {
  1065  		return false
  1066  	}
  1067  	return true
  1068  }
  1069  
  1070  func (this *QueryCodeResponse) Equal(that interface{}) bool {
  1071  	if that == nil {
  1072  		return this == nil
  1073  	}
  1074  
  1075  	that1, ok := that.(*QueryCodeResponse)
  1076  	if !ok {
  1077  		that2, ok := that.(QueryCodeResponse)
  1078  		if ok {
  1079  			that1 = &that2
  1080  		} else {
  1081  			return false
  1082  		}
  1083  	}
  1084  	if that1 == nil {
  1085  		return this == nil
  1086  	} else if this == nil {
  1087  		return false
  1088  	}
  1089  	if !this.CodeInfoResponse.Equal(that1.CodeInfoResponse) {
  1090  		return false
  1091  	}
  1092  	if !bytes.Equal(this.Data, that1.Data) {
  1093  		return false
  1094  	}
  1095  	return true
  1096  }
  1097  
  1098  // Reference imports to suppress errors if they are not otherwise used.
  1099  var _ context.Context
  1100  var _ grpc.ClientConn
  1101  
  1102  // This is a compile-time assertion to ensure that this generated file
  1103  // is compatible with the grpc package it is being compiled against.
  1104  const _ = grpc.SupportPackageIsVersion4
  1105  
  1106  // QueryClient is the client API for Query service.
  1107  //
  1108  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  1109  type QueryClient interface {
  1110  	// ContractInfo gets the contract meta data
  1111  	ContractInfo(ctx context.Context, in *QueryContractInfoRequest, opts ...grpc.CallOption) (*QueryContractInfoResponse, error)
  1112  	// ContractHistory gets the contract code history
  1113  	ContractHistory(ctx context.Context, in *QueryContractHistoryRequest, opts ...grpc.CallOption) (*QueryContractHistoryResponse, error)
  1114  	// ContractsByCode lists all smart contracts for a code id
  1115  	ContractsByCode(ctx context.Context, in *QueryContractsByCodeRequest, opts ...grpc.CallOption) (*QueryContractsByCodeResponse, error)
  1116  	// AllContractState gets all raw store data for a single contract
  1117  	AllContractState(ctx context.Context, in *QueryAllContractStateRequest, opts ...grpc.CallOption) (*QueryAllContractStateResponse, error)
  1118  	// RawContractState gets single key from the raw store data of a contract
  1119  	RawContractState(ctx context.Context, in *QueryRawContractStateRequest, opts ...grpc.CallOption) (*QueryRawContractStateResponse, error)
  1120  	// SmartContractState get smart query result from the contract
  1121  	SmartContractState(ctx context.Context, in *QuerySmartContractStateRequest, opts ...grpc.CallOption) (*QuerySmartContractStateResponse, error)
  1122  	// Code gets the binary code and metadata for a singe wasm code
  1123  	Code(ctx context.Context, in *QueryCodeRequest, opts ...grpc.CallOption) (*QueryCodeResponse, error)
  1124  	// Codes gets the metadata for all stored wasm codes
  1125  	Codes(ctx context.Context, in *QueryCodesRequest, opts ...grpc.CallOption) (*QueryCodesResponse, error)
  1126  	// PinnedCodes gets the pinned code ids
  1127  	PinnedCodes(ctx context.Context, in *QueryPinnedCodesRequest, opts ...grpc.CallOption) (*QueryPinnedCodesResponse, error)
  1128  }
  1129  
  1130  type queryClient struct {
  1131  	cc grpc1.ClientConn
  1132  }
  1133  
  1134  func NewQueryClient(cc grpc1.ClientConn) QueryClient {
  1135  	return &queryClient{cc}
  1136  }
  1137  
  1138  func (c *queryClient) ContractInfo(ctx context.Context, in *QueryContractInfoRequest, opts ...grpc.CallOption) (*QueryContractInfoResponse, error) {
  1139  	out := new(QueryContractInfoResponse)
  1140  	err := c.cc.Invoke(ctx, "/cosmwasm.wasm.v1.Query/ContractInfo", in, out, opts...)
  1141  	if err != nil {
  1142  		return nil, err
  1143  	}
  1144  	return out, nil
  1145  }
  1146  
  1147  func (c *queryClient) ContractHistory(ctx context.Context, in *QueryContractHistoryRequest, opts ...grpc.CallOption) (*QueryContractHistoryResponse, error) {
  1148  	out := new(QueryContractHistoryResponse)
  1149  	err := c.cc.Invoke(ctx, "/cosmwasm.wasm.v1.Query/ContractHistory", in, out, opts...)
  1150  	if err != nil {
  1151  		return nil, err
  1152  	}
  1153  	return out, nil
  1154  }
  1155  
  1156  func (c *queryClient) ContractsByCode(ctx context.Context, in *QueryContractsByCodeRequest, opts ...grpc.CallOption) (*QueryContractsByCodeResponse, error) {
  1157  	out := new(QueryContractsByCodeResponse)
  1158  	err := c.cc.Invoke(ctx, "/cosmwasm.wasm.v1.Query/ContractsByCode", in, out, opts...)
  1159  	if err != nil {
  1160  		return nil, err
  1161  	}
  1162  	return out, nil
  1163  }
  1164  
  1165  func (c *queryClient) AllContractState(ctx context.Context, in *QueryAllContractStateRequest, opts ...grpc.CallOption) (*QueryAllContractStateResponse, error) {
  1166  	out := new(QueryAllContractStateResponse)
  1167  	err := c.cc.Invoke(ctx, "/cosmwasm.wasm.v1.Query/AllContractState", in, out, opts...)
  1168  	if err != nil {
  1169  		return nil, err
  1170  	}
  1171  	return out, nil
  1172  }
  1173  
  1174  func (c *queryClient) RawContractState(ctx context.Context, in *QueryRawContractStateRequest, opts ...grpc.CallOption) (*QueryRawContractStateResponse, error) {
  1175  	out := new(QueryRawContractStateResponse)
  1176  	err := c.cc.Invoke(ctx, "/cosmwasm.wasm.v1.Query/RawContractState", in, out, opts...)
  1177  	if err != nil {
  1178  		return nil, err
  1179  	}
  1180  	return out, nil
  1181  }
  1182  
  1183  func (c *queryClient) SmartContractState(ctx context.Context, in *QuerySmartContractStateRequest, opts ...grpc.CallOption) (*QuerySmartContractStateResponse, error) {
  1184  	out := new(QuerySmartContractStateResponse)
  1185  	err := c.cc.Invoke(ctx, "/cosmwasm.wasm.v1.Query/SmartContractState", in, out, opts...)
  1186  	if err != nil {
  1187  		return nil, err
  1188  	}
  1189  	return out, nil
  1190  }
  1191  
  1192  func (c *queryClient) Code(ctx context.Context, in *QueryCodeRequest, opts ...grpc.CallOption) (*QueryCodeResponse, error) {
  1193  	out := new(QueryCodeResponse)
  1194  	err := c.cc.Invoke(ctx, "/cosmwasm.wasm.v1.Query/Code", in, out, opts...)
  1195  	if err != nil {
  1196  		return nil, err
  1197  	}
  1198  	return out, nil
  1199  }
  1200  
  1201  func (c *queryClient) Codes(ctx context.Context, in *QueryCodesRequest, opts ...grpc.CallOption) (*QueryCodesResponse, error) {
  1202  	out := new(QueryCodesResponse)
  1203  	err := c.cc.Invoke(ctx, "/cosmwasm.wasm.v1.Query/Codes", in, out, opts...)
  1204  	if err != nil {
  1205  		return nil, err
  1206  	}
  1207  	return out, nil
  1208  }
  1209  
  1210  func (c *queryClient) PinnedCodes(ctx context.Context, in *QueryPinnedCodesRequest, opts ...grpc.CallOption) (*QueryPinnedCodesResponse, error) {
  1211  	out := new(QueryPinnedCodesResponse)
  1212  	err := c.cc.Invoke(ctx, "/cosmwasm.wasm.v1.Query/PinnedCodes", in, out, opts...)
  1213  	if err != nil {
  1214  		return nil, err
  1215  	}
  1216  	return out, nil
  1217  }
  1218  
  1219  // QueryServer is the server API for Query service.
  1220  type QueryServer interface {
  1221  	// ContractInfo gets the contract meta data
  1222  	ContractInfo(context.Context, *QueryContractInfoRequest) (*QueryContractInfoResponse, error)
  1223  	// ContractHistory gets the contract code history
  1224  	ContractHistory(context.Context, *QueryContractHistoryRequest) (*QueryContractHistoryResponse, error)
  1225  	// ContractsByCode lists all smart contracts for a code id
  1226  	ContractsByCode(context.Context, *QueryContractsByCodeRequest) (*QueryContractsByCodeResponse, error)
  1227  	// AllContractState gets all raw store data for a single contract
  1228  	AllContractState(context.Context, *QueryAllContractStateRequest) (*QueryAllContractStateResponse, error)
  1229  	// RawContractState gets single key from the raw store data of a contract
  1230  	RawContractState(context.Context, *QueryRawContractStateRequest) (*QueryRawContractStateResponse, error)
  1231  	// SmartContractState get smart query result from the contract
  1232  	SmartContractState(context.Context, *QuerySmartContractStateRequest) (*QuerySmartContractStateResponse, error)
  1233  	// Code gets the binary code and metadata for a singe wasm code
  1234  	Code(context.Context, *QueryCodeRequest) (*QueryCodeResponse, error)
  1235  	// Codes gets the metadata for all stored wasm codes
  1236  	Codes(context.Context, *QueryCodesRequest) (*QueryCodesResponse, error)
  1237  	// PinnedCodes gets the pinned code ids
  1238  	PinnedCodes(context.Context, *QueryPinnedCodesRequest) (*QueryPinnedCodesResponse, error)
  1239  }
  1240  
  1241  // UnimplementedQueryServer can be embedded to have forward compatible implementations.
  1242  type UnimplementedQueryServer struct{}
  1243  
  1244  func (*UnimplementedQueryServer) ContractInfo(ctx context.Context, req *QueryContractInfoRequest) (*QueryContractInfoResponse, error) {
  1245  	return nil, status.Errorf(codes.Unimplemented, "method ContractInfo not implemented")
  1246  }
  1247  
  1248  func (*UnimplementedQueryServer) ContractHistory(ctx context.Context, req *QueryContractHistoryRequest) (*QueryContractHistoryResponse, error) {
  1249  	return nil, status.Errorf(codes.Unimplemented, "method ContractHistory not implemented")
  1250  }
  1251  
  1252  func (*UnimplementedQueryServer) ContractsByCode(ctx context.Context, req *QueryContractsByCodeRequest) (*QueryContractsByCodeResponse, error) {
  1253  	return nil, status.Errorf(codes.Unimplemented, "method ContractsByCode not implemented")
  1254  }
  1255  
  1256  func (*UnimplementedQueryServer) AllContractState(ctx context.Context, req *QueryAllContractStateRequest) (*QueryAllContractStateResponse, error) {
  1257  	return nil, status.Errorf(codes.Unimplemented, "method AllContractState not implemented")
  1258  }
  1259  
  1260  func (*UnimplementedQueryServer) RawContractState(ctx context.Context, req *QueryRawContractStateRequest) (*QueryRawContractStateResponse, error) {
  1261  	return nil, status.Errorf(codes.Unimplemented, "method RawContractState not implemented")
  1262  }
  1263  
  1264  func (*UnimplementedQueryServer) SmartContractState(ctx context.Context, req *QuerySmartContractStateRequest) (*QuerySmartContractStateResponse, error) {
  1265  	return nil, status.Errorf(codes.Unimplemented, "method SmartContractState not implemented")
  1266  }
  1267  
  1268  func (*UnimplementedQueryServer) Code(ctx context.Context, req *QueryCodeRequest) (*QueryCodeResponse, error) {
  1269  	return nil, status.Errorf(codes.Unimplemented, "method Code not implemented")
  1270  }
  1271  
  1272  func (*UnimplementedQueryServer) Codes(ctx context.Context, req *QueryCodesRequest) (*QueryCodesResponse, error) {
  1273  	return nil, status.Errorf(codes.Unimplemented, "method Codes not implemented")
  1274  }
  1275  
  1276  func (*UnimplementedQueryServer) PinnedCodes(ctx context.Context, req *QueryPinnedCodesRequest) (*QueryPinnedCodesResponse, error) {
  1277  	return nil, status.Errorf(codes.Unimplemented, "method PinnedCodes not implemented")
  1278  }
  1279  
  1280  func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
  1281  	s.RegisterService(&_Query_serviceDesc, srv)
  1282  }
  1283  
  1284  func _Query_ContractInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1285  	in := new(QueryContractInfoRequest)
  1286  	if err := dec(in); err != nil {
  1287  		return nil, err
  1288  	}
  1289  	if interceptor == nil {
  1290  		return srv.(QueryServer).ContractInfo(ctx, in)
  1291  	}
  1292  	info := &grpc.UnaryServerInfo{
  1293  		Server:     srv,
  1294  		FullMethod: "/cosmwasm.wasm.v1.Query/ContractInfo",
  1295  	}
  1296  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1297  		return srv.(QueryServer).ContractInfo(ctx, req.(*QueryContractInfoRequest))
  1298  	}
  1299  	return interceptor(ctx, in, info, handler)
  1300  }
  1301  
  1302  func _Query_ContractHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1303  	in := new(QueryContractHistoryRequest)
  1304  	if err := dec(in); err != nil {
  1305  		return nil, err
  1306  	}
  1307  	if interceptor == nil {
  1308  		return srv.(QueryServer).ContractHistory(ctx, in)
  1309  	}
  1310  	info := &grpc.UnaryServerInfo{
  1311  		Server:     srv,
  1312  		FullMethod: "/cosmwasm.wasm.v1.Query/ContractHistory",
  1313  	}
  1314  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1315  		return srv.(QueryServer).ContractHistory(ctx, req.(*QueryContractHistoryRequest))
  1316  	}
  1317  	return interceptor(ctx, in, info, handler)
  1318  }
  1319  
  1320  func _Query_ContractsByCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1321  	in := new(QueryContractsByCodeRequest)
  1322  	if err := dec(in); err != nil {
  1323  		return nil, err
  1324  	}
  1325  	if interceptor == nil {
  1326  		return srv.(QueryServer).ContractsByCode(ctx, in)
  1327  	}
  1328  	info := &grpc.UnaryServerInfo{
  1329  		Server:     srv,
  1330  		FullMethod: "/cosmwasm.wasm.v1.Query/ContractsByCode",
  1331  	}
  1332  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1333  		return srv.(QueryServer).ContractsByCode(ctx, req.(*QueryContractsByCodeRequest))
  1334  	}
  1335  	return interceptor(ctx, in, info, handler)
  1336  }
  1337  
  1338  func _Query_AllContractState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1339  	in := new(QueryAllContractStateRequest)
  1340  	if err := dec(in); err != nil {
  1341  		return nil, err
  1342  	}
  1343  	if interceptor == nil {
  1344  		return srv.(QueryServer).AllContractState(ctx, in)
  1345  	}
  1346  	info := &grpc.UnaryServerInfo{
  1347  		Server:     srv,
  1348  		FullMethod: "/cosmwasm.wasm.v1.Query/AllContractState",
  1349  	}
  1350  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1351  		return srv.(QueryServer).AllContractState(ctx, req.(*QueryAllContractStateRequest))
  1352  	}
  1353  	return interceptor(ctx, in, info, handler)
  1354  }
  1355  
  1356  func _Query_RawContractState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1357  	in := new(QueryRawContractStateRequest)
  1358  	if err := dec(in); err != nil {
  1359  		return nil, err
  1360  	}
  1361  	if interceptor == nil {
  1362  		return srv.(QueryServer).RawContractState(ctx, in)
  1363  	}
  1364  	info := &grpc.UnaryServerInfo{
  1365  		Server:     srv,
  1366  		FullMethod: "/cosmwasm.wasm.v1.Query/RawContractState",
  1367  	}
  1368  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1369  		return srv.(QueryServer).RawContractState(ctx, req.(*QueryRawContractStateRequest))
  1370  	}
  1371  	return interceptor(ctx, in, info, handler)
  1372  }
  1373  
  1374  func _Query_SmartContractState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1375  	in := new(QuerySmartContractStateRequest)
  1376  	if err := dec(in); err != nil {
  1377  		return nil, err
  1378  	}
  1379  	if interceptor == nil {
  1380  		return srv.(QueryServer).SmartContractState(ctx, in)
  1381  	}
  1382  	info := &grpc.UnaryServerInfo{
  1383  		Server:     srv,
  1384  		FullMethod: "/cosmwasm.wasm.v1.Query/SmartContractState",
  1385  	}
  1386  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1387  		return srv.(QueryServer).SmartContractState(ctx, req.(*QuerySmartContractStateRequest))
  1388  	}
  1389  	return interceptor(ctx, in, info, handler)
  1390  }
  1391  
  1392  func _Query_Code_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1393  	in := new(QueryCodeRequest)
  1394  	if err := dec(in); err != nil {
  1395  		return nil, err
  1396  	}
  1397  	if interceptor == nil {
  1398  		return srv.(QueryServer).Code(ctx, in)
  1399  	}
  1400  	info := &grpc.UnaryServerInfo{
  1401  		Server:     srv,
  1402  		FullMethod: "/cosmwasm.wasm.v1.Query/Code",
  1403  	}
  1404  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1405  		return srv.(QueryServer).Code(ctx, req.(*QueryCodeRequest))
  1406  	}
  1407  	return interceptor(ctx, in, info, handler)
  1408  }
  1409  
  1410  func _Query_Codes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1411  	in := new(QueryCodesRequest)
  1412  	if err := dec(in); err != nil {
  1413  		return nil, err
  1414  	}
  1415  	if interceptor == nil {
  1416  		return srv.(QueryServer).Codes(ctx, in)
  1417  	}
  1418  	info := &grpc.UnaryServerInfo{
  1419  		Server:     srv,
  1420  		FullMethod: "/cosmwasm.wasm.v1.Query/Codes",
  1421  	}
  1422  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1423  		return srv.(QueryServer).Codes(ctx, req.(*QueryCodesRequest))
  1424  	}
  1425  	return interceptor(ctx, in, info, handler)
  1426  }
  1427  
  1428  func _Query_PinnedCodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1429  	in := new(QueryPinnedCodesRequest)
  1430  	if err := dec(in); err != nil {
  1431  		return nil, err
  1432  	}
  1433  	if interceptor == nil {
  1434  		return srv.(QueryServer).PinnedCodes(ctx, in)
  1435  	}
  1436  	info := &grpc.UnaryServerInfo{
  1437  		Server:     srv,
  1438  		FullMethod: "/cosmwasm.wasm.v1.Query/PinnedCodes",
  1439  	}
  1440  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1441  		return srv.(QueryServer).PinnedCodes(ctx, req.(*QueryPinnedCodesRequest))
  1442  	}
  1443  	return interceptor(ctx, in, info, handler)
  1444  }
  1445  
  1446  var _Query_serviceDesc = grpc.ServiceDesc{
  1447  	ServiceName: "cosmwasm.wasm.v1.Query",
  1448  	HandlerType: (*QueryServer)(nil),
  1449  	Methods: []grpc.MethodDesc{
  1450  		{
  1451  			MethodName: "ContractInfo",
  1452  			Handler:    _Query_ContractInfo_Handler,
  1453  		},
  1454  		{
  1455  			MethodName: "ContractHistory",
  1456  			Handler:    _Query_ContractHistory_Handler,
  1457  		},
  1458  		{
  1459  			MethodName: "ContractsByCode",
  1460  			Handler:    _Query_ContractsByCode_Handler,
  1461  		},
  1462  		{
  1463  			MethodName: "AllContractState",
  1464  			Handler:    _Query_AllContractState_Handler,
  1465  		},
  1466  		{
  1467  			MethodName: "RawContractState",
  1468  			Handler:    _Query_RawContractState_Handler,
  1469  		},
  1470  		{
  1471  			MethodName: "SmartContractState",
  1472  			Handler:    _Query_SmartContractState_Handler,
  1473  		},
  1474  		{
  1475  			MethodName: "Code",
  1476  			Handler:    _Query_Code_Handler,
  1477  		},
  1478  		{
  1479  			MethodName: "Codes",
  1480  			Handler:    _Query_Codes_Handler,
  1481  		},
  1482  		{
  1483  			MethodName: "PinnedCodes",
  1484  			Handler:    _Query_PinnedCodes_Handler,
  1485  		},
  1486  	},
  1487  	Streams:  []grpc.StreamDesc{},
  1488  	Metadata: "cosmwasm/wasm/v1/query.proto",
  1489  }
  1490  
  1491  func (m *QueryContractInfoRequest) Marshal() (dAtA []byte, err error) {
  1492  	size := m.Size()
  1493  	dAtA = make([]byte, size)
  1494  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1495  	if err != nil {
  1496  		return nil, err
  1497  	}
  1498  	return dAtA[:n], nil
  1499  }
  1500  
  1501  func (m *QueryContractInfoRequest) MarshalTo(dAtA []byte) (int, error) {
  1502  	size := m.Size()
  1503  	return m.MarshalToSizedBuffer(dAtA[:size])
  1504  }
  1505  
  1506  func (m *QueryContractInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1507  	i := len(dAtA)
  1508  	_ = i
  1509  	var l int
  1510  	_ = l
  1511  	if len(m.Address) > 0 {
  1512  		i -= len(m.Address)
  1513  		copy(dAtA[i:], m.Address)
  1514  		i = encodeVarintQuery(dAtA, i, uint64(len(m.Address)))
  1515  		i--
  1516  		dAtA[i] = 0xa
  1517  	}
  1518  	return len(dAtA) - i, nil
  1519  }
  1520  
  1521  func (m *QueryContractInfoResponse) Marshal() (dAtA []byte, err error) {
  1522  	size := m.Size()
  1523  	dAtA = make([]byte, size)
  1524  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1525  	if err != nil {
  1526  		return nil, err
  1527  	}
  1528  	return dAtA[:n], nil
  1529  }
  1530  
  1531  func (m *QueryContractInfoResponse) MarshalTo(dAtA []byte) (int, error) {
  1532  	size := m.Size()
  1533  	return m.MarshalToSizedBuffer(dAtA[:size])
  1534  }
  1535  
  1536  func (m *QueryContractInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1537  	i := len(dAtA)
  1538  	_ = i
  1539  	var l int
  1540  	_ = l
  1541  	{
  1542  		size, err := m.ContractInfo.MarshalToSizedBuffer(dAtA[:i])
  1543  		if err != nil {
  1544  			return 0, err
  1545  		}
  1546  		i -= size
  1547  		i = encodeVarintQuery(dAtA, i, uint64(size))
  1548  	}
  1549  	i--
  1550  	dAtA[i] = 0x12
  1551  	if len(m.Address) > 0 {
  1552  		i -= len(m.Address)
  1553  		copy(dAtA[i:], m.Address)
  1554  		i = encodeVarintQuery(dAtA, i, uint64(len(m.Address)))
  1555  		i--
  1556  		dAtA[i] = 0xa
  1557  	}
  1558  	return len(dAtA) - i, nil
  1559  }
  1560  
  1561  func (m *QueryContractHistoryRequest) Marshal() (dAtA []byte, err error) {
  1562  	size := m.Size()
  1563  	dAtA = make([]byte, size)
  1564  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1565  	if err != nil {
  1566  		return nil, err
  1567  	}
  1568  	return dAtA[:n], nil
  1569  }
  1570  
  1571  func (m *QueryContractHistoryRequest) MarshalTo(dAtA []byte) (int, error) {
  1572  	size := m.Size()
  1573  	return m.MarshalToSizedBuffer(dAtA[:size])
  1574  }
  1575  
  1576  func (m *QueryContractHistoryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1577  	i := len(dAtA)
  1578  	_ = i
  1579  	var l int
  1580  	_ = l
  1581  	if m.Pagination != nil {
  1582  		{
  1583  			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
  1584  			if err != nil {
  1585  				return 0, err
  1586  			}
  1587  			i -= size
  1588  			i = encodeVarintQuery(dAtA, i, uint64(size))
  1589  		}
  1590  		i--
  1591  		dAtA[i] = 0x12
  1592  	}
  1593  	if len(m.Address) > 0 {
  1594  		i -= len(m.Address)
  1595  		copy(dAtA[i:], m.Address)
  1596  		i = encodeVarintQuery(dAtA, i, uint64(len(m.Address)))
  1597  		i--
  1598  		dAtA[i] = 0xa
  1599  	}
  1600  	return len(dAtA) - i, nil
  1601  }
  1602  
  1603  func (m *QueryContractHistoryResponse) Marshal() (dAtA []byte, err error) {
  1604  	size := m.Size()
  1605  	dAtA = make([]byte, size)
  1606  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1607  	if err != nil {
  1608  		return nil, err
  1609  	}
  1610  	return dAtA[:n], nil
  1611  }
  1612  
  1613  func (m *QueryContractHistoryResponse) MarshalTo(dAtA []byte) (int, error) {
  1614  	size := m.Size()
  1615  	return m.MarshalToSizedBuffer(dAtA[:size])
  1616  }
  1617  
  1618  func (m *QueryContractHistoryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1619  	i := len(dAtA)
  1620  	_ = i
  1621  	var l int
  1622  	_ = l
  1623  	if m.Pagination != nil {
  1624  		{
  1625  			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
  1626  			if err != nil {
  1627  				return 0, err
  1628  			}
  1629  			i -= size
  1630  			i = encodeVarintQuery(dAtA, i, uint64(size))
  1631  		}
  1632  		i--
  1633  		dAtA[i] = 0x12
  1634  	}
  1635  	if len(m.Entries) > 0 {
  1636  		for iNdEx := len(m.Entries) - 1; iNdEx >= 0; iNdEx-- {
  1637  			{
  1638  				size, err := m.Entries[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1639  				if err != nil {
  1640  					return 0, err
  1641  				}
  1642  				i -= size
  1643  				i = encodeVarintQuery(dAtA, i, uint64(size))
  1644  			}
  1645  			i--
  1646  			dAtA[i] = 0xa
  1647  		}
  1648  	}
  1649  	return len(dAtA) - i, nil
  1650  }
  1651  
  1652  func (m *QueryContractsByCodeRequest) Marshal() (dAtA []byte, err error) {
  1653  	size := m.Size()
  1654  	dAtA = make([]byte, size)
  1655  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1656  	if err != nil {
  1657  		return nil, err
  1658  	}
  1659  	return dAtA[:n], nil
  1660  }
  1661  
  1662  func (m *QueryContractsByCodeRequest) MarshalTo(dAtA []byte) (int, error) {
  1663  	size := m.Size()
  1664  	return m.MarshalToSizedBuffer(dAtA[:size])
  1665  }
  1666  
  1667  func (m *QueryContractsByCodeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1668  	i := len(dAtA)
  1669  	_ = i
  1670  	var l int
  1671  	_ = l
  1672  	if m.Pagination != nil {
  1673  		{
  1674  			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
  1675  			if err != nil {
  1676  				return 0, err
  1677  			}
  1678  			i -= size
  1679  			i = encodeVarintQuery(dAtA, i, uint64(size))
  1680  		}
  1681  		i--
  1682  		dAtA[i] = 0x12
  1683  	}
  1684  	if m.CodeId != 0 {
  1685  		i = encodeVarintQuery(dAtA, i, uint64(m.CodeId))
  1686  		i--
  1687  		dAtA[i] = 0x8
  1688  	}
  1689  	return len(dAtA) - i, nil
  1690  }
  1691  
  1692  func (m *QueryContractsByCodeResponse) Marshal() (dAtA []byte, err error) {
  1693  	size := m.Size()
  1694  	dAtA = make([]byte, size)
  1695  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1696  	if err != nil {
  1697  		return nil, err
  1698  	}
  1699  	return dAtA[:n], nil
  1700  }
  1701  
  1702  func (m *QueryContractsByCodeResponse) MarshalTo(dAtA []byte) (int, error) {
  1703  	size := m.Size()
  1704  	return m.MarshalToSizedBuffer(dAtA[:size])
  1705  }
  1706  
  1707  func (m *QueryContractsByCodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1708  	i := len(dAtA)
  1709  	_ = i
  1710  	var l int
  1711  	_ = l
  1712  	if m.Pagination != nil {
  1713  		{
  1714  			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
  1715  			if err != nil {
  1716  				return 0, err
  1717  			}
  1718  			i -= size
  1719  			i = encodeVarintQuery(dAtA, i, uint64(size))
  1720  		}
  1721  		i--
  1722  		dAtA[i] = 0x12
  1723  	}
  1724  	if len(m.Contracts) > 0 {
  1725  		for iNdEx := len(m.Contracts) - 1; iNdEx >= 0; iNdEx-- {
  1726  			i -= len(m.Contracts[iNdEx])
  1727  			copy(dAtA[i:], m.Contracts[iNdEx])
  1728  			i = encodeVarintQuery(dAtA, i, uint64(len(m.Contracts[iNdEx])))
  1729  			i--
  1730  			dAtA[i] = 0xa
  1731  		}
  1732  	}
  1733  	return len(dAtA) - i, nil
  1734  }
  1735  
  1736  func (m *QueryAllContractStateRequest) Marshal() (dAtA []byte, err error) {
  1737  	size := m.Size()
  1738  	dAtA = make([]byte, size)
  1739  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1740  	if err != nil {
  1741  		return nil, err
  1742  	}
  1743  	return dAtA[:n], nil
  1744  }
  1745  
  1746  func (m *QueryAllContractStateRequest) MarshalTo(dAtA []byte) (int, error) {
  1747  	size := m.Size()
  1748  	return m.MarshalToSizedBuffer(dAtA[:size])
  1749  }
  1750  
  1751  func (m *QueryAllContractStateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1752  	i := len(dAtA)
  1753  	_ = i
  1754  	var l int
  1755  	_ = l
  1756  	if m.Pagination != nil {
  1757  		{
  1758  			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
  1759  			if err != nil {
  1760  				return 0, err
  1761  			}
  1762  			i -= size
  1763  			i = encodeVarintQuery(dAtA, i, uint64(size))
  1764  		}
  1765  		i--
  1766  		dAtA[i] = 0x12
  1767  	}
  1768  	if len(m.Address) > 0 {
  1769  		i -= len(m.Address)
  1770  		copy(dAtA[i:], m.Address)
  1771  		i = encodeVarintQuery(dAtA, i, uint64(len(m.Address)))
  1772  		i--
  1773  		dAtA[i] = 0xa
  1774  	}
  1775  	return len(dAtA) - i, nil
  1776  }
  1777  
  1778  func (m *QueryAllContractStateResponse) Marshal() (dAtA []byte, err error) {
  1779  	size := m.Size()
  1780  	dAtA = make([]byte, size)
  1781  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1782  	if err != nil {
  1783  		return nil, err
  1784  	}
  1785  	return dAtA[:n], nil
  1786  }
  1787  
  1788  func (m *QueryAllContractStateResponse) MarshalTo(dAtA []byte) (int, error) {
  1789  	size := m.Size()
  1790  	return m.MarshalToSizedBuffer(dAtA[:size])
  1791  }
  1792  
  1793  func (m *QueryAllContractStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1794  	i := len(dAtA)
  1795  	_ = i
  1796  	var l int
  1797  	_ = l
  1798  	if m.Pagination != nil {
  1799  		{
  1800  			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
  1801  			if err != nil {
  1802  				return 0, err
  1803  			}
  1804  			i -= size
  1805  			i = encodeVarintQuery(dAtA, i, uint64(size))
  1806  		}
  1807  		i--
  1808  		dAtA[i] = 0x12
  1809  	}
  1810  	if len(m.Models) > 0 {
  1811  		for iNdEx := len(m.Models) - 1; iNdEx >= 0; iNdEx-- {
  1812  			{
  1813  				size, err := m.Models[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1814  				if err != nil {
  1815  					return 0, err
  1816  				}
  1817  				i -= size
  1818  				i = encodeVarintQuery(dAtA, i, uint64(size))
  1819  			}
  1820  			i--
  1821  			dAtA[i] = 0xa
  1822  		}
  1823  	}
  1824  	return len(dAtA) - i, nil
  1825  }
  1826  
  1827  func (m *QueryRawContractStateRequest) Marshal() (dAtA []byte, err error) {
  1828  	size := m.Size()
  1829  	dAtA = make([]byte, size)
  1830  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1831  	if err != nil {
  1832  		return nil, err
  1833  	}
  1834  	return dAtA[:n], nil
  1835  }
  1836  
  1837  func (m *QueryRawContractStateRequest) MarshalTo(dAtA []byte) (int, error) {
  1838  	size := m.Size()
  1839  	return m.MarshalToSizedBuffer(dAtA[:size])
  1840  }
  1841  
  1842  func (m *QueryRawContractStateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1843  	i := len(dAtA)
  1844  	_ = i
  1845  	var l int
  1846  	_ = l
  1847  	if len(m.QueryData) > 0 {
  1848  		i -= len(m.QueryData)
  1849  		copy(dAtA[i:], m.QueryData)
  1850  		i = encodeVarintQuery(dAtA, i, uint64(len(m.QueryData)))
  1851  		i--
  1852  		dAtA[i] = 0x12
  1853  	}
  1854  	if len(m.Address) > 0 {
  1855  		i -= len(m.Address)
  1856  		copy(dAtA[i:], m.Address)
  1857  		i = encodeVarintQuery(dAtA, i, uint64(len(m.Address)))
  1858  		i--
  1859  		dAtA[i] = 0xa
  1860  	}
  1861  	return len(dAtA) - i, nil
  1862  }
  1863  
  1864  func (m *QueryRawContractStateResponse) Marshal() (dAtA []byte, err error) {
  1865  	size := m.Size()
  1866  	dAtA = make([]byte, size)
  1867  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1868  	if err != nil {
  1869  		return nil, err
  1870  	}
  1871  	return dAtA[:n], nil
  1872  }
  1873  
  1874  func (m *QueryRawContractStateResponse) MarshalTo(dAtA []byte) (int, error) {
  1875  	size := m.Size()
  1876  	return m.MarshalToSizedBuffer(dAtA[:size])
  1877  }
  1878  
  1879  func (m *QueryRawContractStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1880  	i := len(dAtA)
  1881  	_ = i
  1882  	var l int
  1883  	_ = l
  1884  	if len(m.Data) > 0 {
  1885  		i -= len(m.Data)
  1886  		copy(dAtA[i:], m.Data)
  1887  		i = encodeVarintQuery(dAtA, i, uint64(len(m.Data)))
  1888  		i--
  1889  		dAtA[i] = 0xa
  1890  	}
  1891  	return len(dAtA) - i, nil
  1892  }
  1893  
  1894  func (m *QuerySmartContractStateRequest) Marshal() (dAtA []byte, err error) {
  1895  	size := m.Size()
  1896  	dAtA = make([]byte, size)
  1897  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1898  	if err != nil {
  1899  		return nil, err
  1900  	}
  1901  	return dAtA[:n], nil
  1902  }
  1903  
  1904  func (m *QuerySmartContractStateRequest) MarshalTo(dAtA []byte) (int, error) {
  1905  	size := m.Size()
  1906  	return m.MarshalToSizedBuffer(dAtA[:size])
  1907  }
  1908  
  1909  func (m *QuerySmartContractStateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1910  	i := len(dAtA)
  1911  	_ = i
  1912  	var l int
  1913  	_ = l
  1914  	if len(m.QueryData) > 0 {
  1915  		i -= len(m.QueryData)
  1916  		copy(dAtA[i:], m.QueryData)
  1917  		i = encodeVarintQuery(dAtA, i, uint64(len(m.QueryData)))
  1918  		i--
  1919  		dAtA[i] = 0x12
  1920  	}
  1921  	if len(m.Address) > 0 {
  1922  		i -= len(m.Address)
  1923  		copy(dAtA[i:], m.Address)
  1924  		i = encodeVarintQuery(dAtA, i, uint64(len(m.Address)))
  1925  		i--
  1926  		dAtA[i] = 0xa
  1927  	}
  1928  	return len(dAtA) - i, nil
  1929  }
  1930  
  1931  func (m *QuerySmartContractStateResponse) Marshal() (dAtA []byte, err error) {
  1932  	size := m.Size()
  1933  	dAtA = make([]byte, size)
  1934  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1935  	if err != nil {
  1936  		return nil, err
  1937  	}
  1938  	return dAtA[:n], nil
  1939  }
  1940  
  1941  func (m *QuerySmartContractStateResponse) MarshalTo(dAtA []byte) (int, error) {
  1942  	size := m.Size()
  1943  	return m.MarshalToSizedBuffer(dAtA[:size])
  1944  }
  1945  
  1946  func (m *QuerySmartContractStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1947  	i := len(dAtA)
  1948  	_ = i
  1949  	var l int
  1950  	_ = l
  1951  	if len(m.Data) > 0 {
  1952  		i -= len(m.Data)
  1953  		copy(dAtA[i:], m.Data)
  1954  		i = encodeVarintQuery(dAtA, i, uint64(len(m.Data)))
  1955  		i--
  1956  		dAtA[i] = 0xa
  1957  	}
  1958  	return len(dAtA) - i, nil
  1959  }
  1960  
  1961  func (m *QueryCodeRequest) Marshal() (dAtA []byte, err error) {
  1962  	size := m.Size()
  1963  	dAtA = make([]byte, size)
  1964  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1965  	if err != nil {
  1966  		return nil, err
  1967  	}
  1968  	return dAtA[:n], nil
  1969  }
  1970  
  1971  func (m *QueryCodeRequest) MarshalTo(dAtA []byte) (int, error) {
  1972  	size := m.Size()
  1973  	return m.MarshalToSizedBuffer(dAtA[:size])
  1974  }
  1975  
  1976  func (m *QueryCodeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1977  	i := len(dAtA)
  1978  	_ = i
  1979  	var l int
  1980  	_ = l
  1981  	if m.CodeId != 0 {
  1982  		i = encodeVarintQuery(dAtA, i, uint64(m.CodeId))
  1983  		i--
  1984  		dAtA[i] = 0x8
  1985  	}
  1986  	return len(dAtA) - i, nil
  1987  }
  1988  
  1989  func (m *CodeInfoResponse) Marshal() (dAtA []byte, err error) {
  1990  	size := m.Size()
  1991  	dAtA = make([]byte, size)
  1992  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1993  	if err != nil {
  1994  		return nil, err
  1995  	}
  1996  	return dAtA[:n], nil
  1997  }
  1998  
  1999  func (m *CodeInfoResponse) MarshalTo(dAtA []byte) (int, error) {
  2000  	size := m.Size()
  2001  	return m.MarshalToSizedBuffer(dAtA[:size])
  2002  }
  2003  
  2004  func (m *CodeInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2005  	i := len(dAtA)
  2006  	_ = i
  2007  	var l int
  2008  	_ = l
  2009  	{
  2010  		size, err := m.InstantiatePermission.MarshalToSizedBuffer(dAtA[:i])
  2011  		if err != nil {
  2012  			return 0, err
  2013  		}
  2014  		i -= size
  2015  		i = encodeVarintQuery(dAtA, i, uint64(size))
  2016  	}
  2017  	i--
  2018  	dAtA[i] = 0x32
  2019  	if len(m.DataHash) > 0 {
  2020  		i -= len(m.DataHash)
  2021  		copy(dAtA[i:], m.DataHash)
  2022  		i = encodeVarintQuery(dAtA, i, uint64(len(m.DataHash)))
  2023  		i--
  2024  		dAtA[i] = 0x1a
  2025  	}
  2026  	if len(m.Creator) > 0 {
  2027  		i -= len(m.Creator)
  2028  		copy(dAtA[i:], m.Creator)
  2029  		i = encodeVarintQuery(dAtA, i, uint64(len(m.Creator)))
  2030  		i--
  2031  		dAtA[i] = 0x12
  2032  	}
  2033  	if m.CodeID != 0 {
  2034  		i = encodeVarintQuery(dAtA, i, uint64(m.CodeID))
  2035  		i--
  2036  		dAtA[i] = 0x8
  2037  	}
  2038  	return len(dAtA) - i, nil
  2039  }
  2040  
  2041  func (m *QueryCodeResponse) Marshal() (dAtA []byte, err error) {
  2042  	size := m.Size()
  2043  	dAtA = make([]byte, size)
  2044  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2045  	if err != nil {
  2046  		return nil, err
  2047  	}
  2048  	return dAtA[:n], nil
  2049  }
  2050  
  2051  func (m *QueryCodeResponse) MarshalTo(dAtA []byte) (int, error) {
  2052  	size := m.Size()
  2053  	return m.MarshalToSizedBuffer(dAtA[:size])
  2054  }
  2055  
  2056  func (m *QueryCodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2057  	i := len(dAtA)
  2058  	_ = i
  2059  	var l int
  2060  	_ = l
  2061  	if len(m.Data) > 0 {
  2062  		i -= len(m.Data)
  2063  		copy(dAtA[i:], m.Data)
  2064  		i = encodeVarintQuery(dAtA, i, uint64(len(m.Data)))
  2065  		i--
  2066  		dAtA[i] = 0x12
  2067  	}
  2068  	if m.CodeInfoResponse != nil {
  2069  		{
  2070  			size, err := m.CodeInfoResponse.MarshalToSizedBuffer(dAtA[:i])
  2071  			if err != nil {
  2072  				return 0, err
  2073  			}
  2074  			i -= size
  2075  			i = encodeVarintQuery(dAtA, i, uint64(size))
  2076  		}
  2077  		i--
  2078  		dAtA[i] = 0xa
  2079  	}
  2080  	return len(dAtA) - i, nil
  2081  }
  2082  
  2083  func (m *QueryCodesRequest) Marshal() (dAtA []byte, err error) {
  2084  	size := m.Size()
  2085  	dAtA = make([]byte, size)
  2086  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2087  	if err != nil {
  2088  		return nil, err
  2089  	}
  2090  	return dAtA[:n], nil
  2091  }
  2092  
  2093  func (m *QueryCodesRequest) MarshalTo(dAtA []byte) (int, error) {
  2094  	size := m.Size()
  2095  	return m.MarshalToSizedBuffer(dAtA[:size])
  2096  }
  2097  
  2098  func (m *QueryCodesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2099  	i := len(dAtA)
  2100  	_ = i
  2101  	var l int
  2102  	_ = l
  2103  	if m.Pagination != nil {
  2104  		{
  2105  			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
  2106  			if err != nil {
  2107  				return 0, err
  2108  			}
  2109  			i -= size
  2110  			i = encodeVarintQuery(dAtA, i, uint64(size))
  2111  		}
  2112  		i--
  2113  		dAtA[i] = 0xa
  2114  	}
  2115  	return len(dAtA) - i, nil
  2116  }
  2117  
  2118  func (m *QueryCodesResponse) Marshal() (dAtA []byte, err error) {
  2119  	size := m.Size()
  2120  	dAtA = make([]byte, size)
  2121  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2122  	if err != nil {
  2123  		return nil, err
  2124  	}
  2125  	return dAtA[:n], nil
  2126  }
  2127  
  2128  func (m *QueryCodesResponse) MarshalTo(dAtA []byte) (int, error) {
  2129  	size := m.Size()
  2130  	return m.MarshalToSizedBuffer(dAtA[:size])
  2131  }
  2132  
  2133  func (m *QueryCodesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2134  	i := len(dAtA)
  2135  	_ = i
  2136  	var l int
  2137  	_ = l
  2138  	if m.Pagination != nil {
  2139  		{
  2140  			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
  2141  			if err != nil {
  2142  				return 0, err
  2143  			}
  2144  			i -= size
  2145  			i = encodeVarintQuery(dAtA, i, uint64(size))
  2146  		}
  2147  		i--
  2148  		dAtA[i] = 0x12
  2149  	}
  2150  	if len(m.CodeInfos) > 0 {
  2151  		for iNdEx := len(m.CodeInfos) - 1; iNdEx >= 0; iNdEx-- {
  2152  			{
  2153  				size, err := m.CodeInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  2154  				if err != nil {
  2155  					return 0, err
  2156  				}
  2157  				i -= size
  2158  				i = encodeVarintQuery(dAtA, i, uint64(size))
  2159  			}
  2160  			i--
  2161  			dAtA[i] = 0xa
  2162  		}
  2163  	}
  2164  	return len(dAtA) - i, nil
  2165  }
  2166  
  2167  func (m *QueryPinnedCodesRequest) Marshal() (dAtA []byte, err error) {
  2168  	size := m.Size()
  2169  	dAtA = make([]byte, size)
  2170  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2171  	if err != nil {
  2172  		return nil, err
  2173  	}
  2174  	return dAtA[:n], nil
  2175  }
  2176  
  2177  func (m *QueryPinnedCodesRequest) MarshalTo(dAtA []byte) (int, error) {
  2178  	size := m.Size()
  2179  	return m.MarshalToSizedBuffer(dAtA[:size])
  2180  }
  2181  
  2182  func (m *QueryPinnedCodesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2183  	i := len(dAtA)
  2184  	_ = i
  2185  	var l int
  2186  	_ = l
  2187  	if m.Pagination != nil {
  2188  		{
  2189  			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
  2190  			if err != nil {
  2191  				return 0, err
  2192  			}
  2193  			i -= size
  2194  			i = encodeVarintQuery(dAtA, i, uint64(size))
  2195  		}
  2196  		i--
  2197  		dAtA[i] = 0x12
  2198  	}
  2199  	return len(dAtA) - i, nil
  2200  }
  2201  
  2202  func (m *QueryPinnedCodesResponse) Marshal() (dAtA []byte, err error) {
  2203  	size := m.Size()
  2204  	dAtA = make([]byte, size)
  2205  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2206  	if err != nil {
  2207  		return nil, err
  2208  	}
  2209  	return dAtA[:n], nil
  2210  }
  2211  
  2212  func (m *QueryPinnedCodesResponse) MarshalTo(dAtA []byte) (int, error) {
  2213  	size := m.Size()
  2214  	return m.MarshalToSizedBuffer(dAtA[:size])
  2215  }
  2216  
  2217  func (m *QueryPinnedCodesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2218  	i := len(dAtA)
  2219  	_ = i
  2220  	var l int
  2221  	_ = l
  2222  	if m.Pagination != nil {
  2223  		{
  2224  			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
  2225  			if err != nil {
  2226  				return 0, err
  2227  			}
  2228  			i -= size
  2229  			i = encodeVarintQuery(dAtA, i, uint64(size))
  2230  		}
  2231  		i--
  2232  		dAtA[i] = 0x12
  2233  	}
  2234  	if len(m.CodeIDs) > 0 {
  2235  		dAtA15 := make([]byte, len(m.CodeIDs)*10)
  2236  		var j14 int
  2237  		for _, num := range m.CodeIDs {
  2238  			for num >= 1<<7 {
  2239  				dAtA15[j14] = uint8(uint64(num)&0x7f | 0x80)
  2240  				num >>= 7
  2241  				j14++
  2242  			}
  2243  			dAtA15[j14] = uint8(num)
  2244  			j14++
  2245  		}
  2246  		i -= j14
  2247  		copy(dAtA[i:], dAtA15[:j14])
  2248  		i = encodeVarintQuery(dAtA, i, uint64(j14))
  2249  		i--
  2250  		dAtA[i] = 0xa
  2251  	}
  2252  	return len(dAtA) - i, nil
  2253  }
  2254  
  2255  func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
  2256  	offset -= sovQuery(v)
  2257  	base := offset
  2258  	for v >= 1<<7 {
  2259  		dAtA[offset] = uint8(v&0x7f | 0x80)
  2260  		v >>= 7
  2261  		offset++
  2262  	}
  2263  	dAtA[offset] = uint8(v)
  2264  	return base
  2265  }
  2266  
  2267  func (m *QueryContractInfoRequest) Size() (n int) {
  2268  	if m == nil {
  2269  		return 0
  2270  	}
  2271  	var l int
  2272  	_ = l
  2273  	l = len(m.Address)
  2274  	if l > 0 {
  2275  		n += 1 + l + sovQuery(uint64(l))
  2276  	}
  2277  	return n
  2278  }
  2279  
  2280  func (m *QueryContractInfoResponse) Size() (n int) {
  2281  	if m == nil {
  2282  		return 0
  2283  	}
  2284  	var l int
  2285  	_ = l
  2286  	l = len(m.Address)
  2287  	if l > 0 {
  2288  		n += 1 + l + sovQuery(uint64(l))
  2289  	}
  2290  	l = m.ContractInfo.Size()
  2291  	n += 1 + l + sovQuery(uint64(l))
  2292  	return n
  2293  }
  2294  
  2295  func (m *QueryContractHistoryRequest) Size() (n int) {
  2296  	if m == nil {
  2297  		return 0
  2298  	}
  2299  	var l int
  2300  	_ = l
  2301  	l = len(m.Address)
  2302  	if l > 0 {
  2303  		n += 1 + l + sovQuery(uint64(l))
  2304  	}
  2305  	if m.Pagination != nil {
  2306  		l = m.Pagination.Size()
  2307  		n += 1 + l + sovQuery(uint64(l))
  2308  	}
  2309  	return n
  2310  }
  2311  
  2312  func (m *QueryContractHistoryResponse) Size() (n int) {
  2313  	if m == nil {
  2314  		return 0
  2315  	}
  2316  	var l int
  2317  	_ = l
  2318  	if len(m.Entries) > 0 {
  2319  		for _, e := range m.Entries {
  2320  			l = e.Size()
  2321  			n += 1 + l + sovQuery(uint64(l))
  2322  		}
  2323  	}
  2324  	if m.Pagination != nil {
  2325  		l = m.Pagination.Size()
  2326  		n += 1 + l + sovQuery(uint64(l))
  2327  	}
  2328  	return n
  2329  }
  2330  
  2331  func (m *QueryContractsByCodeRequest) Size() (n int) {
  2332  	if m == nil {
  2333  		return 0
  2334  	}
  2335  	var l int
  2336  	_ = l
  2337  	if m.CodeId != 0 {
  2338  		n += 1 + sovQuery(uint64(m.CodeId))
  2339  	}
  2340  	if m.Pagination != nil {
  2341  		l = m.Pagination.Size()
  2342  		n += 1 + l + sovQuery(uint64(l))
  2343  	}
  2344  	return n
  2345  }
  2346  
  2347  func (m *QueryContractsByCodeResponse) Size() (n int) {
  2348  	if m == nil {
  2349  		return 0
  2350  	}
  2351  	var l int
  2352  	_ = l
  2353  	if len(m.Contracts) > 0 {
  2354  		for _, s := range m.Contracts {
  2355  			l = len(s)
  2356  			n += 1 + l + sovQuery(uint64(l))
  2357  		}
  2358  	}
  2359  	if m.Pagination != nil {
  2360  		l = m.Pagination.Size()
  2361  		n += 1 + l + sovQuery(uint64(l))
  2362  	}
  2363  	return n
  2364  }
  2365  
  2366  func (m *QueryAllContractStateRequest) Size() (n int) {
  2367  	if m == nil {
  2368  		return 0
  2369  	}
  2370  	var l int
  2371  	_ = l
  2372  	l = len(m.Address)
  2373  	if l > 0 {
  2374  		n += 1 + l + sovQuery(uint64(l))
  2375  	}
  2376  	if m.Pagination != nil {
  2377  		l = m.Pagination.Size()
  2378  		n += 1 + l + sovQuery(uint64(l))
  2379  	}
  2380  	return n
  2381  }
  2382  
  2383  func (m *QueryAllContractStateResponse) Size() (n int) {
  2384  	if m == nil {
  2385  		return 0
  2386  	}
  2387  	var l int
  2388  	_ = l
  2389  	if len(m.Models) > 0 {
  2390  		for _, e := range m.Models {
  2391  			l = e.Size()
  2392  			n += 1 + l + sovQuery(uint64(l))
  2393  		}
  2394  	}
  2395  	if m.Pagination != nil {
  2396  		l = m.Pagination.Size()
  2397  		n += 1 + l + sovQuery(uint64(l))
  2398  	}
  2399  	return n
  2400  }
  2401  
  2402  func (m *QueryRawContractStateRequest) Size() (n int) {
  2403  	if m == nil {
  2404  		return 0
  2405  	}
  2406  	var l int
  2407  	_ = l
  2408  	l = len(m.Address)
  2409  	if l > 0 {
  2410  		n += 1 + l + sovQuery(uint64(l))
  2411  	}
  2412  	l = len(m.QueryData)
  2413  	if l > 0 {
  2414  		n += 1 + l + sovQuery(uint64(l))
  2415  	}
  2416  	return n
  2417  }
  2418  
  2419  func (m *QueryRawContractStateResponse) Size() (n int) {
  2420  	if m == nil {
  2421  		return 0
  2422  	}
  2423  	var l int
  2424  	_ = l
  2425  	l = len(m.Data)
  2426  	if l > 0 {
  2427  		n += 1 + l + sovQuery(uint64(l))
  2428  	}
  2429  	return n
  2430  }
  2431  
  2432  func (m *QuerySmartContractStateRequest) Size() (n int) {
  2433  	if m == nil {
  2434  		return 0
  2435  	}
  2436  	var l int
  2437  	_ = l
  2438  	l = len(m.Address)
  2439  	if l > 0 {
  2440  		n += 1 + l + sovQuery(uint64(l))
  2441  	}
  2442  	l = len(m.QueryData)
  2443  	if l > 0 {
  2444  		n += 1 + l + sovQuery(uint64(l))
  2445  	}
  2446  	return n
  2447  }
  2448  
  2449  func (m *QuerySmartContractStateResponse) Size() (n int) {
  2450  	if m == nil {
  2451  		return 0
  2452  	}
  2453  	var l int
  2454  	_ = l
  2455  	l = len(m.Data)
  2456  	if l > 0 {
  2457  		n += 1 + l + sovQuery(uint64(l))
  2458  	}
  2459  	return n
  2460  }
  2461  
  2462  func (m *QueryCodeRequest) Size() (n int) {
  2463  	if m == nil {
  2464  		return 0
  2465  	}
  2466  	var l int
  2467  	_ = l
  2468  	if m.CodeId != 0 {
  2469  		n += 1 + sovQuery(uint64(m.CodeId))
  2470  	}
  2471  	return n
  2472  }
  2473  
  2474  func (m *CodeInfoResponse) Size() (n int) {
  2475  	if m == nil {
  2476  		return 0
  2477  	}
  2478  	var l int
  2479  	_ = l
  2480  	if m.CodeID != 0 {
  2481  		n += 1 + sovQuery(uint64(m.CodeID))
  2482  	}
  2483  	l = len(m.Creator)
  2484  	if l > 0 {
  2485  		n += 1 + l + sovQuery(uint64(l))
  2486  	}
  2487  	l = len(m.DataHash)
  2488  	if l > 0 {
  2489  		n += 1 + l + sovQuery(uint64(l))
  2490  	}
  2491  	l = m.InstantiatePermission.Size()
  2492  	n += 1 + l + sovQuery(uint64(l))
  2493  	return n
  2494  }
  2495  
  2496  func (m *QueryCodeResponse) Size() (n int) {
  2497  	if m == nil {
  2498  		return 0
  2499  	}
  2500  	var l int
  2501  	_ = l
  2502  	if m.CodeInfoResponse != nil {
  2503  		l = m.CodeInfoResponse.Size()
  2504  		n += 1 + l + sovQuery(uint64(l))
  2505  	}
  2506  	l = len(m.Data)
  2507  	if l > 0 {
  2508  		n += 1 + l + sovQuery(uint64(l))
  2509  	}
  2510  	return n
  2511  }
  2512  
  2513  func (m *QueryCodesRequest) Size() (n int) {
  2514  	if m == nil {
  2515  		return 0
  2516  	}
  2517  	var l int
  2518  	_ = l
  2519  	if m.Pagination != nil {
  2520  		l = m.Pagination.Size()
  2521  		n += 1 + l + sovQuery(uint64(l))
  2522  	}
  2523  	return n
  2524  }
  2525  
  2526  func (m *QueryCodesResponse) Size() (n int) {
  2527  	if m == nil {
  2528  		return 0
  2529  	}
  2530  	var l int
  2531  	_ = l
  2532  	if len(m.CodeInfos) > 0 {
  2533  		for _, e := range m.CodeInfos {
  2534  			l = e.Size()
  2535  			n += 1 + l + sovQuery(uint64(l))
  2536  		}
  2537  	}
  2538  	if m.Pagination != nil {
  2539  		l = m.Pagination.Size()
  2540  		n += 1 + l + sovQuery(uint64(l))
  2541  	}
  2542  	return n
  2543  }
  2544  
  2545  func (m *QueryPinnedCodesRequest) Size() (n int) {
  2546  	if m == nil {
  2547  		return 0
  2548  	}
  2549  	var l int
  2550  	_ = l
  2551  	if m.Pagination != nil {
  2552  		l = m.Pagination.Size()
  2553  		n += 1 + l + sovQuery(uint64(l))
  2554  	}
  2555  	return n
  2556  }
  2557  
  2558  func (m *QueryPinnedCodesResponse) Size() (n int) {
  2559  	if m == nil {
  2560  		return 0
  2561  	}
  2562  	var l int
  2563  	_ = l
  2564  	if len(m.CodeIDs) > 0 {
  2565  		l = 0
  2566  		for _, e := range m.CodeIDs {
  2567  			l += sovQuery(uint64(e))
  2568  		}
  2569  		n += 1 + sovQuery(uint64(l)) + l
  2570  	}
  2571  	if m.Pagination != nil {
  2572  		l = m.Pagination.Size()
  2573  		n += 1 + l + sovQuery(uint64(l))
  2574  	}
  2575  	return n
  2576  }
  2577  
  2578  func sovQuery(x uint64) (n int) {
  2579  	return (math_bits.Len64(x|1) + 6) / 7
  2580  }
  2581  
  2582  func sozQuery(x uint64) (n int) {
  2583  	return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  2584  }
  2585  
  2586  func (m *QueryContractInfoRequest) Unmarshal(dAtA []byte) error {
  2587  	l := len(dAtA)
  2588  	iNdEx := 0
  2589  	for iNdEx < l {
  2590  		preIndex := iNdEx
  2591  		var wire uint64
  2592  		for shift := uint(0); ; shift += 7 {
  2593  			if shift >= 64 {
  2594  				return ErrIntOverflowQuery
  2595  			}
  2596  			if iNdEx >= l {
  2597  				return io.ErrUnexpectedEOF
  2598  			}
  2599  			b := dAtA[iNdEx]
  2600  			iNdEx++
  2601  			wire |= uint64(b&0x7F) << shift
  2602  			if b < 0x80 {
  2603  				break
  2604  			}
  2605  		}
  2606  		fieldNum := int32(wire >> 3)
  2607  		wireType := int(wire & 0x7)
  2608  		if wireType == 4 {
  2609  			return fmt.Errorf("proto: QueryContractInfoRequest: wiretype end group for non-group")
  2610  		}
  2611  		if fieldNum <= 0 {
  2612  			return fmt.Errorf("proto: QueryContractInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  2613  		}
  2614  		switch fieldNum {
  2615  		case 1:
  2616  			if wireType != 2 {
  2617  				return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  2618  			}
  2619  			var stringLen uint64
  2620  			for shift := uint(0); ; shift += 7 {
  2621  				if shift >= 64 {
  2622  					return ErrIntOverflowQuery
  2623  				}
  2624  				if iNdEx >= l {
  2625  					return io.ErrUnexpectedEOF
  2626  				}
  2627  				b := dAtA[iNdEx]
  2628  				iNdEx++
  2629  				stringLen |= uint64(b&0x7F) << shift
  2630  				if b < 0x80 {
  2631  					break
  2632  				}
  2633  			}
  2634  			intStringLen := int(stringLen)
  2635  			if intStringLen < 0 {
  2636  				return ErrInvalidLengthQuery
  2637  			}
  2638  			postIndex := iNdEx + intStringLen
  2639  			if postIndex < 0 {
  2640  				return ErrInvalidLengthQuery
  2641  			}
  2642  			if postIndex > l {
  2643  				return io.ErrUnexpectedEOF
  2644  			}
  2645  			m.Address = string(dAtA[iNdEx:postIndex])
  2646  			iNdEx = postIndex
  2647  		default:
  2648  			iNdEx = preIndex
  2649  			skippy, err := skipQuery(dAtA[iNdEx:])
  2650  			if err != nil {
  2651  				return err
  2652  			}
  2653  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2654  				return ErrInvalidLengthQuery
  2655  			}
  2656  			if (iNdEx + skippy) > l {
  2657  				return io.ErrUnexpectedEOF
  2658  			}
  2659  			iNdEx += skippy
  2660  		}
  2661  	}
  2662  
  2663  	if iNdEx > l {
  2664  		return io.ErrUnexpectedEOF
  2665  	}
  2666  	return nil
  2667  }
  2668  
  2669  func (m *QueryContractInfoResponse) Unmarshal(dAtA []byte) error {
  2670  	l := len(dAtA)
  2671  	iNdEx := 0
  2672  	for iNdEx < l {
  2673  		preIndex := iNdEx
  2674  		var wire uint64
  2675  		for shift := uint(0); ; shift += 7 {
  2676  			if shift >= 64 {
  2677  				return ErrIntOverflowQuery
  2678  			}
  2679  			if iNdEx >= l {
  2680  				return io.ErrUnexpectedEOF
  2681  			}
  2682  			b := dAtA[iNdEx]
  2683  			iNdEx++
  2684  			wire |= uint64(b&0x7F) << shift
  2685  			if b < 0x80 {
  2686  				break
  2687  			}
  2688  		}
  2689  		fieldNum := int32(wire >> 3)
  2690  		wireType := int(wire & 0x7)
  2691  		if wireType == 4 {
  2692  			return fmt.Errorf("proto: QueryContractInfoResponse: wiretype end group for non-group")
  2693  		}
  2694  		if fieldNum <= 0 {
  2695  			return fmt.Errorf("proto: QueryContractInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  2696  		}
  2697  		switch fieldNum {
  2698  		case 1:
  2699  			if wireType != 2 {
  2700  				return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  2701  			}
  2702  			var stringLen uint64
  2703  			for shift := uint(0); ; shift += 7 {
  2704  				if shift >= 64 {
  2705  					return ErrIntOverflowQuery
  2706  				}
  2707  				if iNdEx >= l {
  2708  					return io.ErrUnexpectedEOF
  2709  				}
  2710  				b := dAtA[iNdEx]
  2711  				iNdEx++
  2712  				stringLen |= uint64(b&0x7F) << shift
  2713  				if b < 0x80 {
  2714  					break
  2715  				}
  2716  			}
  2717  			intStringLen := int(stringLen)
  2718  			if intStringLen < 0 {
  2719  				return ErrInvalidLengthQuery
  2720  			}
  2721  			postIndex := iNdEx + intStringLen
  2722  			if postIndex < 0 {
  2723  				return ErrInvalidLengthQuery
  2724  			}
  2725  			if postIndex > l {
  2726  				return io.ErrUnexpectedEOF
  2727  			}
  2728  			m.Address = string(dAtA[iNdEx:postIndex])
  2729  			iNdEx = postIndex
  2730  		case 2:
  2731  			if wireType != 2 {
  2732  				return fmt.Errorf("proto: wrong wireType = %d for field ContractInfo", wireType)
  2733  			}
  2734  			var msglen int
  2735  			for shift := uint(0); ; shift += 7 {
  2736  				if shift >= 64 {
  2737  					return ErrIntOverflowQuery
  2738  				}
  2739  				if iNdEx >= l {
  2740  					return io.ErrUnexpectedEOF
  2741  				}
  2742  				b := dAtA[iNdEx]
  2743  				iNdEx++
  2744  				msglen |= int(b&0x7F) << shift
  2745  				if b < 0x80 {
  2746  					break
  2747  				}
  2748  			}
  2749  			if msglen < 0 {
  2750  				return ErrInvalidLengthQuery
  2751  			}
  2752  			postIndex := iNdEx + msglen
  2753  			if postIndex < 0 {
  2754  				return ErrInvalidLengthQuery
  2755  			}
  2756  			if postIndex > l {
  2757  				return io.ErrUnexpectedEOF
  2758  			}
  2759  			if err := m.ContractInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2760  				return err
  2761  			}
  2762  			iNdEx = postIndex
  2763  		default:
  2764  			iNdEx = preIndex
  2765  			skippy, err := skipQuery(dAtA[iNdEx:])
  2766  			if err != nil {
  2767  				return err
  2768  			}
  2769  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2770  				return ErrInvalidLengthQuery
  2771  			}
  2772  			if (iNdEx + skippy) > l {
  2773  				return io.ErrUnexpectedEOF
  2774  			}
  2775  			iNdEx += skippy
  2776  		}
  2777  	}
  2778  
  2779  	if iNdEx > l {
  2780  		return io.ErrUnexpectedEOF
  2781  	}
  2782  	return nil
  2783  }
  2784  
  2785  func (m *QueryContractHistoryRequest) Unmarshal(dAtA []byte) error {
  2786  	l := len(dAtA)
  2787  	iNdEx := 0
  2788  	for iNdEx < l {
  2789  		preIndex := iNdEx
  2790  		var wire uint64
  2791  		for shift := uint(0); ; shift += 7 {
  2792  			if shift >= 64 {
  2793  				return ErrIntOverflowQuery
  2794  			}
  2795  			if iNdEx >= l {
  2796  				return io.ErrUnexpectedEOF
  2797  			}
  2798  			b := dAtA[iNdEx]
  2799  			iNdEx++
  2800  			wire |= uint64(b&0x7F) << shift
  2801  			if b < 0x80 {
  2802  				break
  2803  			}
  2804  		}
  2805  		fieldNum := int32(wire >> 3)
  2806  		wireType := int(wire & 0x7)
  2807  		if wireType == 4 {
  2808  			return fmt.Errorf("proto: QueryContractHistoryRequest: wiretype end group for non-group")
  2809  		}
  2810  		if fieldNum <= 0 {
  2811  			return fmt.Errorf("proto: QueryContractHistoryRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  2812  		}
  2813  		switch fieldNum {
  2814  		case 1:
  2815  			if wireType != 2 {
  2816  				return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  2817  			}
  2818  			var stringLen uint64
  2819  			for shift := uint(0); ; shift += 7 {
  2820  				if shift >= 64 {
  2821  					return ErrIntOverflowQuery
  2822  				}
  2823  				if iNdEx >= l {
  2824  					return io.ErrUnexpectedEOF
  2825  				}
  2826  				b := dAtA[iNdEx]
  2827  				iNdEx++
  2828  				stringLen |= uint64(b&0x7F) << shift
  2829  				if b < 0x80 {
  2830  					break
  2831  				}
  2832  			}
  2833  			intStringLen := int(stringLen)
  2834  			if intStringLen < 0 {
  2835  				return ErrInvalidLengthQuery
  2836  			}
  2837  			postIndex := iNdEx + intStringLen
  2838  			if postIndex < 0 {
  2839  				return ErrInvalidLengthQuery
  2840  			}
  2841  			if postIndex > l {
  2842  				return io.ErrUnexpectedEOF
  2843  			}
  2844  			m.Address = string(dAtA[iNdEx:postIndex])
  2845  			iNdEx = postIndex
  2846  		case 2:
  2847  			if wireType != 2 {
  2848  				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
  2849  			}
  2850  			var msglen int
  2851  			for shift := uint(0); ; shift += 7 {
  2852  				if shift >= 64 {
  2853  					return ErrIntOverflowQuery
  2854  				}
  2855  				if iNdEx >= l {
  2856  					return io.ErrUnexpectedEOF
  2857  				}
  2858  				b := dAtA[iNdEx]
  2859  				iNdEx++
  2860  				msglen |= int(b&0x7F) << shift
  2861  				if b < 0x80 {
  2862  					break
  2863  				}
  2864  			}
  2865  			if msglen < 0 {
  2866  				return ErrInvalidLengthQuery
  2867  			}
  2868  			postIndex := iNdEx + msglen
  2869  			if postIndex < 0 {
  2870  				return ErrInvalidLengthQuery
  2871  			}
  2872  			if postIndex > l {
  2873  				return io.ErrUnexpectedEOF
  2874  			}
  2875  			if m.Pagination == nil {
  2876  				m.Pagination = &query.PageRequest{}
  2877  			}
  2878  			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2879  				return err
  2880  			}
  2881  			iNdEx = postIndex
  2882  		default:
  2883  			iNdEx = preIndex
  2884  			skippy, err := skipQuery(dAtA[iNdEx:])
  2885  			if err != nil {
  2886  				return err
  2887  			}
  2888  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2889  				return ErrInvalidLengthQuery
  2890  			}
  2891  			if (iNdEx + skippy) > l {
  2892  				return io.ErrUnexpectedEOF
  2893  			}
  2894  			iNdEx += skippy
  2895  		}
  2896  	}
  2897  
  2898  	if iNdEx > l {
  2899  		return io.ErrUnexpectedEOF
  2900  	}
  2901  	return nil
  2902  }
  2903  
  2904  func (m *QueryContractHistoryResponse) Unmarshal(dAtA []byte) error {
  2905  	l := len(dAtA)
  2906  	iNdEx := 0
  2907  	for iNdEx < l {
  2908  		preIndex := iNdEx
  2909  		var wire uint64
  2910  		for shift := uint(0); ; shift += 7 {
  2911  			if shift >= 64 {
  2912  				return ErrIntOverflowQuery
  2913  			}
  2914  			if iNdEx >= l {
  2915  				return io.ErrUnexpectedEOF
  2916  			}
  2917  			b := dAtA[iNdEx]
  2918  			iNdEx++
  2919  			wire |= uint64(b&0x7F) << shift
  2920  			if b < 0x80 {
  2921  				break
  2922  			}
  2923  		}
  2924  		fieldNum := int32(wire >> 3)
  2925  		wireType := int(wire & 0x7)
  2926  		if wireType == 4 {
  2927  			return fmt.Errorf("proto: QueryContractHistoryResponse: wiretype end group for non-group")
  2928  		}
  2929  		if fieldNum <= 0 {
  2930  			return fmt.Errorf("proto: QueryContractHistoryResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  2931  		}
  2932  		switch fieldNum {
  2933  		case 1:
  2934  			if wireType != 2 {
  2935  				return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType)
  2936  			}
  2937  			var msglen int
  2938  			for shift := uint(0); ; shift += 7 {
  2939  				if shift >= 64 {
  2940  					return ErrIntOverflowQuery
  2941  				}
  2942  				if iNdEx >= l {
  2943  					return io.ErrUnexpectedEOF
  2944  				}
  2945  				b := dAtA[iNdEx]
  2946  				iNdEx++
  2947  				msglen |= int(b&0x7F) << shift
  2948  				if b < 0x80 {
  2949  					break
  2950  				}
  2951  			}
  2952  			if msglen < 0 {
  2953  				return ErrInvalidLengthQuery
  2954  			}
  2955  			postIndex := iNdEx + msglen
  2956  			if postIndex < 0 {
  2957  				return ErrInvalidLengthQuery
  2958  			}
  2959  			if postIndex > l {
  2960  				return io.ErrUnexpectedEOF
  2961  			}
  2962  			m.Entries = append(m.Entries, ContractCodeHistoryEntry{})
  2963  			if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2964  				return err
  2965  			}
  2966  			iNdEx = postIndex
  2967  		case 2:
  2968  			if wireType != 2 {
  2969  				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
  2970  			}
  2971  			var msglen int
  2972  			for shift := uint(0); ; shift += 7 {
  2973  				if shift >= 64 {
  2974  					return ErrIntOverflowQuery
  2975  				}
  2976  				if iNdEx >= l {
  2977  					return io.ErrUnexpectedEOF
  2978  				}
  2979  				b := dAtA[iNdEx]
  2980  				iNdEx++
  2981  				msglen |= int(b&0x7F) << shift
  2982  				if b < 0x80 {
  2983  					break
  2984  				}
  2985  			}
  2986  			if msglen < 0 {
  2987  				return ErrInvalidLengthQuery
  2988  			}
  2989  			postIndex := iNdEx + msglen
  2990  			if postIndex < 0 {
  2991  				return ErrInvalidLengthQuery
  2992  			}
  2993  			if postIndex > l {
  2994  				return io.ErrUnexpectedEOF
  2995  			}
  2996  			if m.Pagination == nil {
  2997  				m.Pagination = &query.PageResponse{}
  2998  			}
  2999  			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3000  				return err
  3001  			}
  3002  			iNdEx = postIndex
  3003  		default:
  3004  			iNdEx = preIndex
  3005  			skippy, err := skipQuery(dAtA[iNdEx:])
  3006  			if err != nil {
  3007  				return err
  3008  			}
  3009  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3010  				return ErrInvalidLengthQuery
  3011  			}
  3012  			if (iNdEx + skippy) > l {
  3013  				return io.ErrUnexpectedEOF
  3014  			}
  3015  			iNdEx += skippy
  3016  		}
  3017  	}
  3018  
  3019  	if iNdEx > l {
  3020  		return io.ErrUnexpectedEOF
  3021  	}
  3022  	return nil
  3023  }
  3024  
  3025  func (m *QueryContractsByCodeRequest) Unmarshal(dAtA []byte) error {
  3026  	l := len(dAtA)
  3027  	iNdEx := 0
  3028  	for iNdEx < l {
  3029  		preIndex := iNdEx
  3030  		var wire uint64
  3031  		for shift := uint(0); ; shift += 7 {
  3032  			if shift >= 64 {
  3033  				return ErrIntOverflowQuery
  3034  			}
  3035  			if iNdEx >= l {
  3036  				return io.ErrUnexpectedEOF
  3037  			}
  3038  			b := dAtA[iNdEx]
  3039  			iNdEx++
  3040  			wire |= uint64(b&0x7F) << shift
  3041  			if b < 0x80 {
  3042  				break
  3043  			}
  3044  		}
  3045  		fieldNum := int32(wire >> 3)
  3046  		wireType := int(wire & 0x7)
  3047  		if wireType == 4 {
  3048  			return fmt.Errorf("proto: QueryContractsByCodeRequest: wiretype end group for non-group")
  3049  		}
  3050  		if fieldNum <= 0 {
  3051  			return fmt.Errorf("proto: QueryContractsByCodeRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  3052  		}
  3053  		switch fieldNum {
  3054  		case 1:
  3055  			if wireType != 0 {
  3056  				return fmt.Errorf("proto: wrong wireType = %d for field CodeId", wireType)
  3057  			}
  3058  			m.CodeId = 0
  3059  			for shift := uint(0); ; shift += 7 {
  3060  				if shift >= 64 {
  3061  					return ErrIntOverflowQuery
  3062  				}
  3063  				if iNdEx >= l {
  3064  					return io.ErrUnexpectedEOF
  3065  				}
  3066  				b := dAtA[iNdEx]
  3067  				iNdEx++
  3068  				m.CodeId |= uint64(b&0x7F) << shift
  3069  				if b < 0x80 {
  3070  					break
  3071  				}
  3072  			}
  3073  		case 2:
  3074  			if wireType != 2 {
  3075  				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
  3076  			}
  3077  			var msglen int
  3078  			for shift := uint(0); ; shift += 7 {
  3079  				if shift >= 64 {
  3080  					return ErrIntOverflowQuery
  3081  				}
  3082  				if iNdEx >= l {
  3083  					return io.ErrUnexpectedEOF
  3084  				}
  3085  				b := dAtA[iNdEx]
  3086  				iNdEx++
  3087  				msglen |= int(b&0x7F) << shift
  3088  				if b < 0x80 {
  3089  					break
  3090  				}
  3091  			}
  3092  			if msglen < 0 {
  3093  				return ErrInvalidLengthQuery
  3094  			}
  3095  			postIndex := iNdEx + msglen
  3096  			if postIndex < 0 {
  3097  				return ErrInvalidLengthQuery
  3098  			}
  3099  			if postIndex > l {
  3100  				return io.ErrUnexpectedEOF
  3101  			}
  3102  			if m.Pagination == nil {
  3103  				m.Pagination = &query.PageRequest{}
  3104  			}
  3105  			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3106  				return err
  3107  			}
  3108  			iNdEx = postIndex
  3109  		default:
  3110  			iNdEx = preIndex
  3111  			skippy, err := skipQuery(dAtA[iNdEx:])
  3112  			if err != nil {
  3113  				return err
  3114  			}
  3115  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3116  				return ErrInvalidLengthQuery
  3117  			}
  3118  			if (iNdEx + skippy) > l {
  3119  				return io.ErrUnexpectedEOF
  3120  			}
  3121  			iNdEx += skippy
  3122  		}
  3123  	}
  3124  
  3125  	if iNdEx > l {
  3126  		return io.ErrUnexpectedEOF
  3127  	}
  3128  	return nil
  3129  }
  3130  
  3131  func (m *QueryContractsByCodeResponse) Unmarshal(dAtA []byte) error {
  3132  	l := len(dAtA)
  3133  	iNdEx := 0
  3134  	for iNdEx < l {
  3135  		preIndex := iNdEx
  3136  		var wire uint64
  3137  		for shift := uint(0); ; shift += 7 {
  3138  			if shift >= 64 {
  3139  				return ErrIntOverflowQuery
  3140  			}
  3141  			if iNdEx >= l {
  3142  				return io.ErrUnexpectedEOF
  3143  			}
  3144  			b := dAtA[iNdEx]
  3145  			iNdEx++
  3146  			wire |= uint64(b&0x7F) << shift
  3147  			if b < 0x80 {
  3148  				break
  3149  			}
  3150  		}
  3151  		fieldNum := int32(wire >> 3)
  3152  		wireType := int(wire & 0x7)
  3153  		if wireType == 4 {
  3154  			return fmt.Errorf("proto: QueryContractsByCodeResponse: wiretype end group for non-group")
  3155  		}
  3156  		if fieldNum <= 0 {
  3157  			return fmt.Errorf("proto: QueryContractsByCodeResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  3158  		}
  3159  		switch fieldNum {
  3160  		case 1:
  3161  			if wireType != 2 {
  3162  				return fmt.Errorf("proto: wrong wireType = %d for field Contracts", wireType)
  3163  			}
  3164  			var stringLen uint64
  3165  			for shift := uint(0); ; shift += 7 {
  3166  				if shift >= 64 {
  3167  					return ErrIntOverflowQuery
  3168  				}
  3169  				if iNdEx >= l {
  3170  					return io.ErrUnexpectedEOF
  3171  				}
  3172  				b := dAtA[iNdEx]
  3173  				iNdEx++
  3174  				stringLen |= uint64(b&0x7F) << shift
  3175  				if b < 0x80 {
  3176  					break
  3177  				}
  3178  			}
  3179  			intStringLen := int(stringLen)
  3180  			if intStringLen < 0 {
  3181  				return ErrInvalidLengthQuery
  3182  			}
  3183  			postIndex := iNdEx + intStringLen
  3184  			if postIndex < 0 {
  3185  				return ErrInvalidLengthQuery
  3186  			}
  3187  			if postIndex > l {
  3188  				return io.ErrUnexpectedEOF
  3189  			}
  3190  			m.Contracts = append(m.Contracts, string(dAtA[iNdEx:postIndex]))
  3191  			iNdEx = postIndex
  3192  		case 2:
  3193  			if wireType != 2 {
  3194  				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
  3195  			}
  3196  			var msglen int
  3197  			for shift := uint(0); ; shift += 7 {
  3198  				if shift >= 64 {
  3199  					return ErrIntOverflowQuery
  3200  				}
  3201  				if iNdEx >= l {
  3202  					return io.ErrUnexpectedEOF
  3203  				}
  3204  				b := dAtA[iNdEx]
  3205  				iNdEx++
  3206  				msglen |= int(b&0x7F) << shift
  3207  				if b < 0x80 {
  3208  					break
  3209  				}
  3210  			}
  3211  			if msglen < 0 {
  3212  				return ErrInvalidLengthQuery
  3213  			}
  3214  			postIndex := iNdEx + msglen
  3215  			if postIndex < 0 {
  3216  				return ErrInvalidLengthQuery
  3217  			}
  3218  			if postIndex > l {
  3219  				return io.ErrUnexpectedEOF
  3220  			}
  3221  			if m.Pagination == nil {
  3222  				m.Pagination = &query.PageResponse{}
  3223  			}
  3224  			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3225  				return err
  3226  			}
  3227  			iNdEx = postIndex
  3228  		default:
  3229  			iNdEx = preIndex
  3230  			skippy, err := skipQuery(dAtA[iNdEx:])
  3231  			if err != nil {
  3232  				return err
  3233  			}
  3234  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3235  				return ErrInvalidLengthQuery
  3236  			}
  3237  			if (iNdEx + skippy) > l {
  3238  				return io.ErrUnexpectedEOF
  3239  			}
  3240  			iNdEx += skippy
  3241  		}
  3242  	}
  3243  
  3244  	if iNdEx > l {
  3245  		return io.ErrUnexpectedEOF
  3246  	}
  3247  	return nil
  3248  }
  3249  
  3250  func (m *QueryAllContractStateRequest) Unmarshal(dAtA []byte) error {
  3251  	l := len(dAtA)
  3252  	iNdEx := 0
  3253  	for iNdEx < l {
  3254  		preIndex := iNdEx
  3255  		var wire uint64
  3256  		for shift := uint(0); ; shift += 7 {
  3257  			if shift >= 64 {
  3258  				return ErrIntOverflowQuery
  3259  			}
  3260  			if iNdEx >= l {
  3261  				return io.ErrUnexpectedEOF
  3262  			}
  3263  			b := dAtA[iNdEx]
  3264  			iNdEx++
  3265  			wire |= uint64(b&0x7F) << shift
  3266  			if b < 0x80 {
  3267  				break
  3268  			}
  3269  		}
  3270  		fieldNum := int32(wire >> 3)
  3271  		wireType := int(wire & 0x7)
  3272  		if wireType == 4 {
  3273  			return fmt.Errorf("proto: QueryAllContractStateRequest: wiretype end group for non-group")
  3274  		}
  3275  		if fieldNum <= 0 {
  3276  			return fmt.Errorf("proto: QueryAllContractStateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  3277  		}
  3278  		switch fieldNum {
  3279  		case 1:
  3280  			if wireType != 2 {
  3281  				return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  3282  			}
  3283  			var stringLen uint64
  3284  			for shift := uint(0); ; shift += 7 {
  3285  				if shift >= 64 {
  3286  					return ErrIntOverflowQuery
  3287  				}
  3288  				if iNdEx >= l {
  3289  					return io.ErrUnexpectedEOF
  3290  				}
  3291  				b := dAtA[iNdEx]
  3292  				iNdEx++
  3293  				stringLen |= uint64(b&0x7F) << shift
  3294  				if b < 0x80 {
  3295  					break
  3296  				}
  3297  			}
  3298  			intStringLen := int(stringLen)
  3299  			if intStringLen < 0 {
  3300  				return ErrInvalidLengthQuery
  3301  			}
  3302  			postIndex := iNdEx + intStringLen
  3303  			if postIndex < 0 {
  3304  				return ErrInvalidLengthQuery
  3305  			}
  3306  			if postIndex > l {
  3307  				return io.ErrUnexpectedEOF
  3308  			}
  3309  			m.Address = string(dAtA[iNdEx:postIndex])
  3310  			iNdEx = postIndex
  3311  		case 2:
  3312  			if wireType != 2 {
  3313  				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
  3314  			}
  3315  			var msglen int
  3316  			for shift := uint(0); ; shift += 7 {
  3317  				if shift >= 64 {
  3318  					return ErrIntOverflowQuery
  3319  				}
  3320  				if iNdEx >= l {
  3321  					return io.ErrUnexpectedEOF
  3322  				}
  3323  				b := dAtA[iNdEx]
  3324  				iNdEx++
  3325  				msglen |= int(b&0x7F) << shift
  3326  				if b < 0x80 {
  3327  					break
  3328  				}
  3329  			}
  3330  			if msglen < 0 {
  3331  				return ErrInvalidLengthQuery
  3332  			}
  3333  			postIndex := iNdEx + msglen
  3334  			if postIndex < 0 {
  3335  				return ErrInvalidLengthQuery
  3336  			}
  3337  			if postIndex > l {
  3338  				return io.ErrUnexpectedEOF
  3339  			}
  3340  			if m.Pagination == nil {
  3341  				m.Pagination = &query.PageRequest{}
  3342  			}
  3343  			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3344  				return err
  3345  			}
  3346  			iNdEx = postIndex
  3347  		default:
  3348  			iNdEx = preIndex
  3349  			skippy, err := skipQuery(dAtA[iNdEx:])
  3350  			if err != nil {
  3351  				return err
  3352  			}
  3353  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3354  				return ErrInvalidLengthQuery
  3355  			}
  3356  			if (iNdEx + skippy) > l {
  3357  				return io.ErrUnexpectedEOF
  3358  			}
  3359  			iNdEx += skippy
  3360  		}
  3361  	}
  3362  
  3363  	if iNdEx > l {
  3364  		return io.ErrUnexpectedEOF
  3365  	}
  3366  	return nil
  3367  }
  3368  
  3369  func (m *QueryAllContractStateResponse) Unmarshal(dAtA []byte) error {
  3370  	l := len(dAtA)
  3371  	iNdEx := 0
  3372  	for iNdEx < l {
  3373  		preIndex := iNdEx
  3374  		var wire uint64
  3375  		for shift := uint(0); ; shift += 7 {
  3376  			if shift >= 64 {
  3377  				return ErrIntOverflowQuery
  3378  			}
  3379  			if iNdEx >= l {
  3380  				return io.ErrUnexpectedEOF
  3381  			}
  3382  			b := dAtA[iNdEx]
  3383  			iNdEx++
  3384  			wire |= uint64(b&0x7F) << shift
  3385  			if b < 0x80 {
  3386  				break
  3387  			}
  3388  		}
  3389  		fieldNum := int32(wire >> 3)
  3390  		wireType := int(wire & 0x7)
  3391  		if wireType == 4 {
  3392  			return fmt.Errorf("proto: QueryAllContractStateResponse: wiretype end group for non-group")
  3393  		}
  3394  		if fieldNum <= 0 {
  3395  			return fmt.Errorf("proto: QueryAllContractStateResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  3396  		}
  3397  		switch fieldNum {
  3398  		case 1:
  3399  			if wireType != 2 {
  3400  				return fmt.Errorf("proto: wrong wireType = %d for field Models", wireType)
  3401  			}
  3402  			var msglen int
  3403  			for shift := uint(0); ; shift += 7 {
  3404  				if shift >= 64 {
  3405  					return ErrIntOverflowQuery
  3406  				}
  3407  				if iNdEx >= l {
  3408  					return io.ErrUnexpectedEOF
  3409  				}
  3410  				b := dAtA[iNdEx]
  3411  				iNdEx++
  3412  				msglen |= int(b&0x7F) << shift
  3413  				if b < 0x80 {
  3414  					break
  3415  				}
  3416  			}
  3417  			if msglen < 0 {
  3418  				return ErrInvalidLengthQuery
  3419  			}
  3420  			postIndex := iNdEx + msglen
  3421  			if postIndex < 0 {
  3422  				return ErrInvalidLengthQuery
  3423  			}
  3424  			if postIndex > l {
  3425  				return io.ErrUnexpectedEOF
  3426  			}
  3427  			m.Models = append(m.Models, Model{})
  3428  			if err := m.Models[len(m.Models)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3429  				return err
  3430  			}
  3431  			iNdEx = postIndex
  3432  		case 2:
  3433  			if wireType != 2 {
  3434  				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
  3435  			}
  3436  			var msglen int
  3437  			for shift := uint(0); ; shift += 7 {
  3438  				if shift >= 64 {
  3439  					return ErrIntOverflowQuery
  3440  				}
  3441  				if iNdEx >= l {
  3442  					return io.ErrUnexpectedEOF
  3443  				}
  3444  				b := dAtA[iNdEx]
  3445  				iNdEx++
  3446  				msglen |= int(b&0x7F) << shift
  3447  				if b < 0x80 {
  3448  					break
  3449  				}
  3450  			}
  3451  			if msglen < 0 {
  3452  				return ErrInvalidLengthQuery
  3453  			}
  3454  			postIndex := iNdEx + msglen
  3455  			if postIndex < 0 {
  3456  				return ErrInvalidLengthQuery
  3457  			}
  3458  			if postIndex > l {
  3459  				return io.ErrUnexpectedEOF
  3460  			}
  3461  			if m.Pagination == nil {
  3462  				m.Pagination = &query.PageResponse{}
  3463  			}
  3464  			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3465  				return err
  3466  			}
  3467  			iNdEx = postIndex
  3468  		default:
  3469  			iNdEx = preIndex
  3470  			skippy, err := skipQuery(dAtA[iNdEx:])
  3471  			if err != nil {
  3472  				return err
  3473  			}
  3474  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3475  				return ErrInvalidLengthQuery
  3476  			}
  3477  			if (iNdEx + skippy) > l {
  3478  				return io.ErrUnexpectedEOF
  3479  			}
  3480  			iNdEx += skippy
  3481  		}
  3482  	}
  3483  
  3484  	if iNdEx > l {
  3485  		return io.ErrUnexpectedEOF
  3486  	}
  3487  	return nil
  3488  }
  3489  
  3490  func (m *QueryRawContractStateRequest) Unmarshal(dAtA []byte) error {
  3491  	l := len(dAtA)
  3492  	iNdEx := 0
  3493  	for iNdEx < l {
  3494  		preIndex := iNdEx
  3495  		var wire uint64
  3496  		for shift := uint(0); ; shift += 7 {
  3497  			if shift >= 64 {
  3498  				return ErrIntOverflowQuery
  3499  			}
  3500  			if iNdEx >= l {
  3501  				return io.ErrUnexpectedEOF
  3502  			}
  3503  			b := dAtA[iNdEx]
  3504  			iNdEx++
  3505  			wire |= uint64(b&0x7F) << shift
  3506  			if b < 0x80 {
  3507  				break
  3508  			}
  3509  		}
  3510  		fieldNum := int32(wire >> 3)
  3511  		wireType := int(wire & 0x7)
  3512  		if wireType == 4 {
  3513  			return fmt.Errorf("proto: QueryRawContractStateRequest: wiretype end group for non-group")
  3514  		}
  3515  		if fieldNum <= 0 {
  3516  			return fmt.Errorf("proto: QueryRawContractStateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  3517  		}
  3518  		switch fieldNum {
  3519  		case 1:
  3520  			if wireType != 2 {
  3521  				return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  3522  			}
  3523  			var stringLen uint64
  3524  			for shift := uint(0); ; shift += 7 {
  3525  				if shift >= 64 {
  3526  					return ErrIntOverflowQuery
  3527  				}
  3528  				if iNdEx >= l {
  3529  					return io.ErrUnexpectedEOF
  3530  				}
  3531  				b := dAtA[iNdEx]
  3532  				iNdEx++
  3533  				stringLen |= uint64(b&0x7F) << shift
  3534  				if b < 0x80 {
  3535  					break
  3536  				}
  3537  			}
  3538  			intStringLen := int(stringLen)
  3539  			if intStringLen < 0 {
  3540  				return ErrInvalidLengthQuery
  3541  			}
  3542  			postIndex := iNdEx + intStringLen
  3543  			if postIndex < 0 {
  3544  				return ErrInvalidLengthQuery
  3545  			}
  3546  			if postIndex > l {
  3547  				return io.ErrUnexpectedEOF
  3548  			}
  3549  			m.Address = string(dAtA[iNdEx:postIndex])
  3550  			iNdEx = postIndex
  3551  		case 2:
  3552  			if wireType != 2 {
  3553  				return fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType)
  3554  			}
  3555  			var byteLen int
  3556  			for shift := uint(0); ; shift += 7 {
  3557  				if shift >= 64 {
  3558  					return ErrIntOverflowQuery
  3559  				}
  3560  				if iNdEx >= l {
  3561  					return io.ErrUnexpectedEOF
  3562  				}
  3563  				b := dAtA[iNdEx]
  3564  				iNdEx++
  3565  				byteLen |= int(b&0x7F) << shift
  3566  				if b < 0x80 {
  3567  					break
  3568  				}
  3569  			}
  3570  			if byteLen < 0 {
  3571  				return ErrInvalidLengthQuery
  3572  			}
  3573  			postIndex := iNdEx + byteLen
  3574  			if postIndex < 0 {
  3575  				return ErrInvalidLengthQuery
  3576  			}
  3577  			if postIndex > l {
  3578  				return io.ErrUnexpectedEOF
  3579  			}
  3580  			m.QueryData = append(m.QueryData[:0], dAtA[iNdEx:postIndex]...)
  3581  			if m.QueryData == nil {
  3582  				m.QueryData = []byte{}
  3583  			}
  3584  			iNdEx = postIndex
  3585  		default:
  3586  			iNdEx = preIndex
  3587  			skippy, err := skipQuery(dAtA[iNdEx:])
  3588  			if err != nil {
  3589  				return err
  3590  			}
  3591  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3592  				return ErrInvalidLengthQuery
  3593  			}
  3594  			if (iNdEx + skippy) > l {
  3595  				return io.ErrUnexpectedEOF
  3596  			}
  3597  			iNdEx += skippy
  3598  		}
  3599  	}
  3600  
  3601  	if iNdEx > l {
  3602  		return io.ErrUnexpectedEOF
  3603  	}
  3604  	return nil
  3605  }
  3606  
  3607  func (m *QueryRawContractStateResponse) Unmarshal(dAtA []byte) error {
  3608  	l := len(dAtA)
  3609  	iNdEx := 0
  3610  	for iNdEx < l {
  3611  		preIndex := iNdEx
  3612  		var wire uint64
  3613  		for shift := uint(0); ; shift += 7 {
  3614  			if shift >= 64 {
  3615  				return ErrIntOverflowQuery
  3616  			}
  3617  			if iNdEx >= l {
  3618  				return io.ErrUnexpectedEOF
  3619  			}
  3620  			b := dAtA[iNdEx]
  3621  			iNdEx++
  3622  			wire |= uint64(b&0x7F) << shift
  3623  			if b < 0x80 {
  3624  				break
  3625  			}
  3626  		}
  3627  		fieldNum := int32(wire >> 3)
  3628  		wireType := int(wire & 0x7)
  3629  		if wireType == 4 {
  3630  			return fmt.Errorf("proto: QueryRawContractStateResponse: wiretype end group for non-group")
  3631  		}
  3632  		if fieldNum <= 0 {
  3633  			return fmt.Errorf("proto: QueryRawContractStateResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  3634  		}
  3635  		switch fieldNum {
  3636  		case 1:
  3637  			if wireType != 2 {
  3638  				return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  3639  			}
  3640  			var byteLen int
  3641  			for shift := uint(0); ; shift += 7 {
  3642  				if shift >= 64 {
  3643  					return ErrIntOverflowQuery
  3644  				}
  3645  				if iNdEx >= l {
  3646  					return io.ErrUnexpectedEOF
  3647  				}
  3648  				b := dAtA[iNdEx]
  3649  				iNdEx++
  3650  				byteLen |= int(b&0x7F) << shift
  3651  				if b < 0x80 {
  3652  					break
  3653  				}
  3654  			}
  3655  			if byteLen < 0 {
  3656  				return ErrInvalidLengthQuery
  3657  			}
  3658  			postIndex := iNdEx + byteLen
  3659  			if postIndex < 0 {
  3660  				return ErrInvalidLengthQuery
  3661  			}
  3662  			if postIndex > l {
  3663  				return io.ErrUnexpectedEOF
  3664  			}
  3665  			m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  3666  			if m.Data == nil {
  3667  				m.Data = []byte{}
  3668  			}
  3669  			iNdEx = postIndex
  3670  		default:
  3671  			iNdEx = preIndex
  3672  			skippy, err := skipQuery(dAtA[iNdEx:])
  3673  			if err != nil {
  3674  				return err
  3675  			}
  3676  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3677  				return ErrInvalidLengthQuery
  3678  			}
  3679  			if (iNdEx + skippy) > l {
  3680  				return io.ErrUnexpectedEOF
  3681  			}
  3682  			iNdEx += skippy
  3683  		}
  3684  	}
  3685  
  3686  	if iNdEx > l {
  3687  		return io.ErrUnexpectedEOF
  3688  	}
  3689  	return nil
  3690  }
  3691  
  3692  func (m *QuerySmartContractStateRequest) Unmarshal(dAtA []byte) error {
  3693  	l := len(dAtA)
  3694  	iNdEx := 0
  3695  	for iNdEx < l {
  3696  		preIndex := iNdEx
  3697  		var wire uint64
  3698  		for shift := uint(0); ; shift += 7 {
  3699  			if shift >= 64 {
  3700  				return ErrIntOverflowQuery
  3701  			}
  3702  			if iNdEx >= l {
  3703  				return io.ErrUnexpectedEOF
  3704  			}
  3705  			b := dAtA[iNdEx]
  3706  			iNdEx++
  3707  			wire |= uint64(b&0x7F) << shift
  3708  			if b < 0x80 {
  3709  				break
  3710  			}
  3711  		}
  3712  		fieldNum := int32(wire >> 3)
  3713  		wireType := int(wire & 0x7)
  3714  		if wireType == 4 {
  3715  			return fmt.Errorf("proto: QuerySmartContractStateRequest: wiretype end group for non-group")
  3716  		}
  3717  		if fieldNum <= 0 {
  3718  			return fmt.Errorf("proto: QuerySmartContractStateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  3719  		}
  3720  		switch fieldNum {
  3721  		case 1:
  3722  			if wireType != 2 {
  3723  				return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  3724  			}
  3725  			var stringLen uint64
  3726  			for shift := uint(0); ; shift += 7 {
  3727  				if shift >= 64 {
  3728  					return ErrIntOverflowQuery
  3729  				}
  3730  				if iNdEx >= l {
  3731  					return io.ErrUnexpectedEOF
  3732  				}
  3733  				b := dAtA[iNdEx]
  3734  				iNdEx++
  3735  				stringLen |= uint64(b&0x7F) << shift
  3736  				if b < 0x80 {
  3737  					break
  3738  				}
  3739  			}
  3740  			intStringLen := int(stringLen)
  3741  			if intStringLen < 0 {
  3742  				return ErrInvalidLengthQuery
  3743  			}
  3744  			postIndex := iNdEx + intStringLen
  3745  			if postIndex < 0 {
  3746  				return ErrInvalidLengthQuery
  3747  			}
  3748  			if postIndex > l {
  3749  				return io.ErrUnexpectedEOF
  3750  			}
  3751  			m.Address = string(dAtA[iNdEx:postIndex])
  3752  			iNdEx = postIndex
  3753  		case 2:
  3754  			if wireType != 2 {
  3755  				return fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType)
  3756  			}
  3757  			var byteLen int
  3758  			for shift := uint(0); ; shift += 7 {
  3759  				if shift >= 64 {
  3760  					return ErrIntOverflowQuery
  3761  				}
  3762  				if iNdEx >= l {
  3763  					return io.ErrUnexpectedEOF
  3764  				}
  3765  				b := dAtA[iNdEx]
  3766  				iNdEx++
  3767  				byteLen |= int(b&0x7F) << shift
  3768  				if b < 0x80 {
  3769  					break
  3770  				}
  3771  			}
  3772  			if byteLen < 0 {
  3773  				return ErrInvalidLengthQuery
  3774  			}
  3775  			postIndex := iNdEx + byteLen
  3776  			if postIndex < 0 {
  3777  				return ErrInvalidLengthQuery
  3778  			}
  3779  			if postIndex > l {
  3780  				return io.ErrUnexpectedEOF
  3781  			}
  3782  			m.QueryData = append(m.QueryData[:0], dAtA[iNdEx:postIndex]...)
  3783  			if m.QueryData == nil {
  3784  				m.QueryData = []byte{}
  3785  			}
  3786  			iNdEx = postIndex
  3787  		default:
  3788  			iNdEx = preIndex
  3789  			skippy, err := skipQuery(dAtA[iNdEx:])
  3790  			if err != nil {
  3791  				return err
  3792  			}
  3793  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3794  				return ErrInvalidLengthQuery
  3795  			}
  3796  			if (iNdEx + skippy) > l {
  3797  				return io.ErrUnexpectedEOF
  3798  			}
  3799  			iNdEx += skippy
  3800  		}
  3801  	}
  3802  
  3803  	if iNdEx > l {
  3804  		return io.ErrUnexpectedEOF
  3805  	}
  3806  	return nil
  3807  }
  3808  
  3809  func (m *QuerySmartContractStateResponse) Unmarshal(dAtA []byte) error {
  3810  	l := len(dAtA)
  3811  	iNdEx := 0
  3812  	for iNdEx < l {
  3813  		preIndex := iNdEx
  3814  		var wire uint64
  3815  		for shift := uint(0); ; shift += 7 {
  3816  			if shift >= 64 {
  3817  				return ErrIntOverflowQuery
  3818  			}
  3819  			if iNdEx >= l {
  3820  				return io.ErrUnexpectedEOF
  3821  			}
  3822  			b := dAtA[iNdEx]
  3823  			iNdEx++
  3824  			wire |= uint64(b&0x7F) << shift
  3825  			if b < 0x80 {
  3826  				break
  3827  			}
  3828  		}
  3829  		fieldNum := int32(wire >> 3)
  3830  		wireType := int(wire & 0x7)
  3831  		if wireType == 4 {
  3832  			return fmt.Errorf("proto: QuerySmartContractStateResponse: wiretype end group for non-group")
  3833  		}
  3834  		if fieldNum <= 0 {
  3835  			return fmt.Errorf("proto: QuerySmartContractStateResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  3836  		}
  3837  		switch fieldNum {
  3838  		case 1:
  3839  			if wireType != 2 {
  3840  				return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  3841  			}
  3842  			var byteLen int
  3843  			for shift := uint(0); ; shift += 7 {
  3844  				if shift >= 64 {
  3845  					return ErrIntOverflowQuery
  3846  				}
  3847  				if iNdEx >= l {
  3848  					return io.ErrUnexpectedEOF
  3849  				}
  3850  				b := dAtA[iNdEx]
  3851  				iNdEx++
  3852  				byteLen |= int(b&0x7F) << shift
  3853  				if b < 0x80 {
  3854  					break
  3855  				}
  3856  			}
  3857  			if byteLen < 0 {
  3858  				return ErrInvalidLengthQuery
  3859  			}
  3860  			postIndex := iNdEx + byteLen
  3861  			if postIndex < 0 {
  3862  				return ErrInvalidLengthQuery
  3863  			}
  3864  			if postIndex > l {
  3865  				return io.ErrUnexpectedEOF
  3866  			}
  3867  			m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  3868  			if m.Data == nil {
  3869  				m.Data = []byte{}
  3870  			}
  3871  			iNdEx = postIndex
  3872  		default:
  3873  			iNdEx = preIndex
  3874  			skippy, err := skipQuery(dAtA[iNdEx:])
  3875  			if err != nil {
  3876  				return err
  3877  			}
  3878  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3879  				return ErrInvalidLengthQuery
  3880  			}
  3881  			if (iNdEx + skippy) > l {
  3882  				return io.ErrUnexpectedEOF
  3883  			}
  3884  			iNdEx += skippy
  3885  		}
  3886  	}
  3887  
  3888  	if iNdEx > l {
  3889  		return io.ErrUnexpectedEOF
  3890  	}
  3891  	return nil
  3892  }
  3893  
  3894  func (m *QueryCodeRequest) Unmarshal(dAtA []byte) error {
  3895  	l := len(dAtA)
  3896  	iNdEx := 0
  3897  	for iNdEx < l {
  3898  		preIndex := iNdEx
  3899  		var wire uint64
  3900  		for shift := uint(0); ; shift += 7 {
  3901  			if shift >= 64 {
  3902  				return ErrIntOverflowQuery
  3903  			}
  3904  			if iNdEx >= l {
  3905  				return io.ErrUnexpectedEOF
  3906  			}
  3907  			b := dAtA[iNdEx]
  3908  			iNdEx++
  3909  			wire |= uint64(b&0x7F) << shift
  3910  			if b < 0x80 {
  3911  				break
  3912  			}
  3913  		}
  3914  		fieldNum := int32(wire >> 3)
  3915  		wireType := int(wire & 0x7)
  3916  		if wireType == 4 {
  3917  			return fmt.Errorf("proto: QueryCodeRequest: wiretype end group for non-group")
  3918  		}
  3919  		if fieldNum <= 0 {
  3920  			return fmt.Errorf("proto: QueryCodeRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  3921  		}
  3922  		switch fieldNum {
  3923  		case 1:
  3924  			if wireType != 0 {
  3925  				return fmt.Errorf("proto: wrong wireType = %d for field CodeId", wireType)
  3926  			}
  3927  			m.CodeId = 0
  3928  			for shift := uint(0); ; shift += 7 {
  3929  				if shift >= 64 {
  3930  					return ErrIntOverflowQuery
  3931  				}
  3932  				if iNdEx >= l {
  3933  					return io.ErrUnexpectedEOF
  3934  				}
  3935  				b := dAtA[iNdEx]
  3936  				iNdEx++
  3937  				m.CodeId |= uint64(b&0x7F) << shift
  3938  				if b < 0x80 {
  3939  					break
  3940  				}
  3941  			}
  3942  		default:
  3943  			iNdEx = preIndex
  3944  			skippy, err := skipQuery(dAtA[iNdEx:])
  3945  			if err != nil {
  3946  				return err
  3947  			}
  3948  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3949  				return ErrInvalidLengthQuery
  3950  			}
  3951  			if (iNdEx + skippy) > l {
  3952  				return io.ErrUnexpectedEOF
  3953  			}
  3954  			iNdEx += skippy
  3955  		}
  3956  	}
  3957  
  3958  	if iNdEx > l {
  3959  		return io.ErrUnexpectedEOF
  3960  	}
  3961  	return nil
  3962  }
  3963  
  3964  func (m *CodeInfoResponse) Unmarshal(dAtA []byte) error {
  3965  	l := len(dAtA)
  3966  	iNdEx := 0
  3967  	for iNdEx < l {
  3968  		preIndex := iNdEx
  3969  		var wire uint64
  3970  		for shift := uint(0); ; shift += 7 {
  3971  			if shift >= 64 {
  3972  				return ErrIntOverflowQuery
  3973  			}
  3974  			if iNdEx >= l {
  3975  				return io.ErrUnexpectedEOF
  3976  			}
  3977  			b := dAtA[iNdEx]
  3978  			iNdEx++
  3979  			wire |= uint64(b&0x7F) << shift
  3980  			if b < 0x80 {
  3981  				break
  3982  			}
  3983  		}
  3984  		fieldNum := int32(wire >> 3)
  3985  		wireType := int(wire & 0x7)
  3986  		if wireType == 4 {
  3987  			return fmt.Errorf("proto: CodeInfoResponse: wiretype end group for non-group")
  3988  		}
  3989  		if fieldNum <= 0 {
  3990  			return fmt.Errorf("proto: CodeInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  3991  		}
  3992  		switch fieldNum {
  3993  		case 1:
  3994  			if wireType != 0 {
  3995  				return fmt.Errorf("proto: wrong wireType = %d for field CodeID", wireType)
  3996  			}
  3997  			m.CodeID = 0
  3998  			for shift := uint(0); ; shift += 7 {
  3999  				if shift >= 64 {
  4000  					return ErrIntOverflowQuery
  4001  				}
  4002  				if iNdEx >= l {
  4003  					return io.ErrUnexpectedEOF
  4004  				}
  4005  				b := dAtA[iNdEx]
  4006  				iNdEx++
  4007  				m.CodeID |= uint64(b&0x7F) << shift
  4008  				if b < 0x80 {
  4009  					break
  4010  				}
  4011  			}
  4012  		case 2:
  4013  			if wireType != 2 {
  4014  				return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType)
  4015  			}
  4016  			var stringLen uint64
  4017  			for shift := uint(0); ; shift += 7 {
  4018  				if shift >= 64 {
  4019  					return ErrIntOverflowQuery
  4020  				}
  4021  				if iNdEx >= l {
  4022  					return io.ErrUnexpectedEOF
  4023  				}
  4024  				b := dAtA[iNdEx]
  4025  				iNdEx++
  4026  				stringLen |= uint64(b&0x7F) << shift
  4027  				if b < 0x80 {
  4028  					break
  4029  				}
  4030  			}
  4031  			intStringLen := int(stringLen)
  4032  			if intStringLen < 0 {
  4033  				return ErrInvalidLengthQuery
  4034  			}
  4035  			postIndex := iNdEx + intStringLen
  4036  			if postIndex < 0 {
  4037  				return ErrInvalidLengthQuery
  4038  			}
  4039  			if postIndex > l {
  4040  				return io.ErrUnexpectedEOF
  4041  			}
  4042  			m.Creator = string(dAtA[iNdEx:postIndex])
  4043  			iNdEx = postIndex
  4044  		case 3:
  4045  			if wireType != 2 {
  4046  				return fmt.Errorf("proto: wrong wireType = %d for field DataHash", wireType)
  4047  			}
  4048  			var byteLen int
  4049  			for shift := uint(0); ; shift += 7 {
  4050  				if shift >= 64 {
  4051  					return ErrIntOverflowQuery
  4052  				}
  4053  				if iNdEx >= l {
  4054  					return io.ErrUnexpectedEOF
  4055  				}
  4056  				b := dAtA[iNdEx]
  4057  				iNdEx++
  4058  				byteLen |= int(b&0x7F) << shift
  4059  				if b < 0x80 {
  4060  					break
  4061  				}
  4062  			}
  4063  			if byteLen < 0 {
  4064  				return ErrInvalidLengthQuery
  4065  			}
  4066  			postIndex := iNdEx + byteLen
  4067  			if postIndex < 0 {
  4068  				return ErrInvalidLengthQuery
  4069  			}
  4070  			if postIndex > l {
  4071  				return io.ErrUnexpectedEOF
  4072  			}
  4073  			m.DataHash = append(m.DataHash[:0], dAtA[iNdEx:postIndex]...)
  4074  			if m.DataHash == nil {
  4075  				m.DataHash = []byte{}
  4076  			}
  4077  			iNdEx = postIndex
  4078  		case 6:
  4079  			if wireType != 2 {
  4080  				return fmt.Errorf("proto: wrong wireType = %d for field InstantiatePermission", wireType)
  4081  			}
  4082  			var msglen int
  4083  			for shift := uint(0); ; shift += 7 {
  4084  				if shift >= 64 {
  4085  					return ErrIntOverflowQuery
  4086  				}
  4087  				if iNdEx >= l {
  4088  					return io.ErrUnexpectedEOF
  4089  				}
  4090  				b := dAtA[iNdEx]
  4091  				iNdEx++
  4092  				msglen |= int(b&0x7F) << shift
  4093  				if b < 0x80 {
  4094  					break
  4095  				}
  4096  			}
  4097  			if msglen < 0 {
  4098  				return ErrInvalidLengthQuery
  4099  			}
  4100  			postIndex := iNdEx + msglen
  4101  			if postIndex < 0 {
  4102  				return ErrInvalidLengthQuery
  4103  			}
  4104  			if postIndex > l {
  4105  				return io.ErrUnexpectedEOF
  4106  			}
  4107  			if err := m.InstantiatePermission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4108  				return err
  4109  			}
  4110  			iNdEx = postIndex
  4111  		default:
  4112  			iNdEx = preIndex
  4113  			skippy, err := skipQuery(dAtA[iNdEx:])
  4114  			if err != nil {
  4115  				return err
  4116  			}
  4117  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4118  				return ErrInvalidLengthQuery
  4119  			}
  4120  			if (iNdEx + skippy) > l {
  4121  				return io.ErrUnexpectedEOF
  4122  			}
  4123  			iNdEx += skippy
  4124  		}
  4125  	}
  4126  
  4127  	if iNdEx > l {
  4128  		return io.ErrUnexpectedEOF
  4129  	}
  4130  	return nil
  4131  }
  4132  
  4133  func (m *QueryCodeResponse) Unmarshal(dAtA []byte) error {
  4134  	l := len(dAtA)
  4135  	iNdEx := 0
  4136  	for iNdEx < l {
  4137  		preIndex := iNdEx
  4138  		var wire uint64
  4139  		for shift := uint(0); ; shift += 7 {
  4140  			if shift >= 64 {
  4141  				return ErrIntOverflowQuery
  4142  			}
  4143  			if iNdEx >= l {
  4144  				return io.ErrUnexpectedEOF
  4145  			}
  4146  			b := dAtA[iNdEx]
  4147  			iNdEx++
  4148  			wire |= uint64(b&0x7F) << shift
  4149  			if b < 0x80 {
  4150  				break
  4151  			}
  4152  		}
  4153  		fieldNum := int32(wire >> 3)
  4154  		wireType := int(wire & 0x7)
  4155  		if wireType == 4 {
  4156  			return fmt.Errorf("proto: QueryCodeResponse: wiretype end group for non-group")
  4157  		}
  4158  		if fieldNum <= 0 {
  4159  			return fmt.Errorf("proto: QueryCodeResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  4160  		}
  4161  		switch fieldNum {
  4162  		case 1:
  4163  			if wireType != 2 {
  4164  				return fmt.Errorf("proto: wrong wireType = %d for field CodeInfoResponse", wireType)
  4165  			}
  4166  			var msglen int
  4167  			for shift := uint(0); ; shift += 7 {
  4168  				if shift >= 64 {
  4169  					return ErrIntOverflowQuery
  4170  				}
  4171  				if iNdEx >= l {
  4172  					return io.ErrUnexpectedEOF
  4173  				}
  4174  				b := dAtA[iNdEx]
  4175  				iNdEx++
  4176  				msglen |= int(b&0x7F) << shift
  4177  				if b < 0x80 {
  4178  					break
  4179  				}
  4180  			}
  4181  			if msglen < 0 {
  4182  				return ErrInvalidLengthQuery
  4183  			}
  4184  			postIndex := iNdEx + msglen
  4185  			if postIndex < 0 {
  4186  				return ErrInvalidLengthQuery
  4187  			}
  4188  			if postIndex > l {
  4189  				return io.ErrUnexpectedEOF
  4190  			}
  4191  			if m.CodeInfoResponse == nil {
  4192  				m.CodeInfoResponse = &CodeInfoResponse{}
  4193  			}
  4194  			if err := m.CodeInfoResponse.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4195  				return err
  4196  			}
  4197  			iNdEx = postIndex
  4198  		case 2:
  4199  			if wireType != 2 {
  4200  				return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  4201  			}
  4202  			var byteLen int
  4203  			for shift := uint(0); ; shift += 7 {
  4204  				if shift >= 64 {
  4205  					return ErrIntOverflowQuery
  4206  				}
  4207  				if iNdEx >= l {
  4208  					return io.ErrUnexpectedEOF
  4209  				}
  4210  				b := dAtA[iNdEx]
  4211  				iNdEx++
  4212  				byteLen |= int(b&0x7F) << shift
  4213  				if b < 0x80 {
  4214  					break
  4215  				}
  4216  			}
  4217  			if byteLen < 0 {
  4218  				return ErrInvalidLengthQuery
  4219  			}
  4220  			postIndex := iNdEx + byteLen
  4221  			if postIndex < 0 {
  4222  				return ErrInvalidLengthQuery
  4223  			}
  4224  			if postIndex > l {
  4225  				return io.ErrUnexpectedEOF
  4226  			}
  4227  			m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  4228  			if m.Data == nil {
  4229  				m.Data = []byte{}
  4230  			}
  4231  			iNdEx = postIndex
  4232  		default:
  4233  			iNdEx = preIndex
  4234  			skippy, err := skipQuery(dAtA[iNdEx:])
  4235  			if err != nil {
  4236  				return err
  4237  			}
  4238  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4239  				return ErrInvalidLengthQuery
  4240  			}
  4241  			if (iNdEx + skippy) > l {
  4242  				return io.ErrUnexpectedEOF
  4243  			}
  4244  			iNdEx += skippy
  4245  		}
  4246  	}
  4247  
  4248  	if iNdEx > l {
  4249  		return io.ErrUnexpectedEOF
  4250  	}
  4251  	return nil
  4252  }
  4253  
  4254  func (m *QueryCodesRequest) Unmarshal(dAtA []byte) error {
  4255  	l := len(dAtA)
  4256  	iNdEx := 0
  4257  	for iNdEx < l {
  4258  		preIndex := iNdEx
  4259  		var wire uint64
  4260  		for shift := uint(0); ; shift += 7 {
  4261  			if shift >= 64 {
  4262  				return ErrIntOverflowQuery
  4263  			}
  4264  			if iNdEx >= l {
  4265  				return io.ErrUnexpectedEOF
  4266  			}
  4267  			b := dAtA[iNdEx]
  4268  			iNdEx++
  4269  			wire |= uint64(b&0x7F) << shift
  4270  			if b < 0x80 {
  4271  				break
  4272  			}
  4273  		}
  4274  		fieldNum := int32(wire >> 3)
  4275  		wireType := int(wire & 0x7)
  4276  		if wireType == 4 {
  4277  			return fmt.Errorf("proto: QueryCodesRequest: wiretype end group for non-group")
  4278  		}
  4279  		if fieldNum <= 0 {
  4280  			return fmt.Errorf("proto: QueryCodesRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  4281  		}
  4282  		switch fieldNum {
  4283  		case 1:
  4284  			if wireType != 2 {
  4285  				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
  4286  			}
  4287  			var msglen int
  4288  			for shift := uint(0); ; shift += 7 {
  4289  				if shift >= 64 {
  4290  					return ErrIntOverflowQuery
  4291  				}
  4292  				if iNdEx >= l {
  4293  					return io.ErrUnexpectedEOF
  4294  				}
  4295  				b := dAtA[iNdEx]
  4296  				iNdEx++
  4297  				msglen |= int(b&0x7F) << shift
  4298  				if b < 0x80 {
  4299  					break
  4300  				}
  4301  			}
  4302  			if msglen < 0 {
  4303  				return ErrInvalidLengthQuery
  4304  			}
  4305  			postIndex := iNdEx + msglen
  4306  			if postIndex < 0 {
  4307  				return ErrInvalidLengthQuery
  4308  			}
  4309  			if postIndex > l {
  4310  				return io.ErrUnexpectedEOF
  4311  			}
  4312  			if m.Pagination == nil {
  4313  				m.Pagination = &query.PageRequest{}
  4314  			}
  4315  			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4316  				return err
  4317  			}
  4318  			iNdEx = postIndex
  4319  		default:
  4320  			iNdEx = preIndex
  4321  			skippy, err := skipQuery(dAtA[iNdEx:])
  4322  			if err != nil {
  4323  				return err
  4324  			}
  4325  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4326  				return ErrInvalidLengthQuery
  4327  			}
  4328  			if (iNdEx + skippy) > l {
  4329  				return io.ErrUnexpectedEOF
  4330  			}
  4331  			iNdEx += skippy
  4332  		}
  4333  	}
  4334  
  4335  	if iNdEx > l {
  4336  		return io.ErrUnexpectedEOF
  4337  	}
  4338  	return nil
  4339  }
  4340  
  4341  func (m *QueryCodesResponse) Unmarshal(dAtA []byte) error {
  4342  	l := len(dAtA)
  4343  	iNdEx := 0
  4344  	for iNdEx < l {
  4345  		preIndex := iNdEx
  4346  		var wire uint64
  4347  		for shift := uint(0); ; shift += 7 {
  4348  			if shift >= 64 {
  4349  				return ErrIntOverflowQuery
  4350  			}
  4351  			if iNdEx >= l {
  4352  				return io.ErrUnexpectedEOF
  4353  			}
  4354  			b := dAtA[iNdEx]
  4355  			iNdEx++
  4356  			wire |= uint64(b&0x7F) << shift
  4357  			if b < 0x80 {
  4358  				break
  4359  			}
  4360  		}
  4361  		fieldNum := int32(wire >> 3)
  4362  		wireType := int(wire & 0x7)
  4363  		if wireType == 4 {
  4364  			return fmt.Errorf("proto: QueryCodesResponse: wiretype end group for non-group")
  4365  		}
  4366  		if fieldNum <= 0 {
  4367  			return fmt.Errorf("proto: QueryCodesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  4368  		}
  4369  		switch fieldNum {
  4370  		case 1:
  4371  			if wireType != 2 {
  4372  				return fmt.Errorf("proto: wrong wireType = %d for field CodeInfos", wireType)
  4373  			}
  4374  			var msglen int
  4375  			for shift := uint(0); ; shift += 7 {
  4376  				if shift >= 64 {
  4377  					return ErrIntOverflowQuery
  4378  				}
  4379  				if iNdEx >= l {
  4380  					return io.ErrUnexpectedEOF
  4381  				}
  4382  				b := dAtA[iNdEx]
  4383  				iNdEx++
  4384  				msglen |= int(b&0x7F) << shift
  4385  				if b < 0x80 {
  4386  					break
  4387  				}
  4388  			}
  4389  			if msglen < 0 {
  4390  				return ErrInvalidLengthQuery
  4391  			}
  4392  			postIndex := iNdEx + msglen
  4393  			if postIndex < 0 {
  4394  				return ErrInvalidLengthQuery
  4395  			}
  4396  			if postIndex > l {
  4397  				return io.ErrUnexpectedEOF
  4398  			}
  4399  			m.CodeInfos = append(m.CodeInfos, CodeInfoResponse{})
  4400  			if err := m.CodeInfos[len(m.CodeInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4401  				return err
  4402  			}
  4403  			iNdEx = postIndex
  4404  		case 2:
  4405  			if wireType != 2 {
  4406  				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
  4407  			}
  4408  			var msglen int
  4409  			for shift := uint(0); ; shift += 7 {
  4410  				if shift >= 64 {
  4411  					return ErrIntOverflowQuery
  4412  				}
  4413  				if iNdEx >= l {
  4414  					return io.ErrUnexpectedEOF
  4415  				}
  4416  				b := dAtA[iNdEx]
  4417  				iNdEx++
  4418  				msglen |= int(b&0x7F) << shift
  4419  				if b < 0x80 {
  4420  					break
  4421  				}
  4422  			}
  4423  			if msglen < 0 {
  4424  				return ErrInvalidLengthQuery
  4425  			}
  4426  			postIndex := iNdEx + msglen
  4427  			if postIndex < 0 {
  4428  				return ErrInvalidLengthQuery
  4429  			}
  4430  			if postIndex > l {
  4431  				return io.ErrUnexpectedEOF
  4432  			}
  4433  			if m.Pagination == nil {
  4434  				m.Pagination = &query.PageResponse{}
  4435  			}
  4436  			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4437  				return err
  4438  			}
  4439  			iNdEx = postIndex
  4440  		default:
  4441  			iNdEx = preIndex
  4442  			skippy, err := skipQuery(dAtA[iNdEx:])
  4443  			if err != nil {
  4444  				return err
  4445  			}
  4446  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4447  				return ErrInvalidLengthQuery
  4448  			}
  4449  			if (iNdEx + skippy) > l {
  4450  				return io.ErrUnexpectedEOF
  4451  			}
  4452  			iNdEx += skippy
  4453  		}
  4454  	}
  4455  
  4456  	if iNdEx > l {
  4457  		return io.ErrUnexpectedEOF
  4458  	}
  4459  	return nil
  4460  }
  4461  
  4462  func (m *QueryPinnedCodesRequest) Unmarshal(dAtA []byte) error {
  4463  	l := len(dAtA)
  4464  	iNdEx := 0
  4465  	for iNdEx < l {
  4466  		preIndex := iNdEx
  4467  		var wire uint64
  4468  		for shift := uint(0); ; shift += 7 {
  4469  			if shift >= 64 {
  4470  				return ErrIntOverflowQuery
  4471  			}
  4472  			if iNdEx >= l {
  4473  				return io.ErrUnexpectedEOF
  4474  			}
  4475  			b := dAtA[iNdEx]
  4476  			iNdEx++
  4477  			wire |= uint64(b&0x7F) << shift
  4478  			if b < 0x80 {
  4479  				break
  4480  			}
  4481  		}
  4482  		fieldNum := int32(wire >> 3)
  4483  		wireType := int(wire & 0x7)
  4484  		if wireType == 4 {
  4485  			return fmt.Errorf("proto: QueryPinnedCodesRequest: wiretype end group for non-group")
  4486  		}
  4487  		if fieldNum <= 0 {
  4488  			return fmt.Errorf("proto: QueryPinnedCodesRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  4489  		}
  4490  		switch fieldNum {
  4491  		case 2:
  4492  			if wireType != 2 {
  4493  				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
  4494  			}
  4495  			var msglen int
  4496  			for shift := uint(0); ; shift += 7 {
  4497  				if shift >= 64 {
  4498  					return ErrIntOverflowQuery
  4499  				}
  4500  				if iNdEx >= l {
  4501  					return io.ErrUnexpectedEOF
  4502  				}
  4503  				b := dAtA[iNdEx]
  4504  				iNdEx++
  4505  				msglen |= int(b&0x7F) << shift
  4506  				if b < 0x80 {
  4507  					break
  4508  				}
  4509  			}
  4510  			if msglen < 0 {
  4511  				return ErrInvalidLengthQuery
  4512  			}
  4513  			postIndex := iNdEx + msglen
  4514  			if postIndex < 0 {
  4515  				return ErrInvalidLengthQuery
  4516  			}
  4517  			if postIndex > l {
  4518  				return io.ErrUnexpectedEOF
  4519  			}
  4520  			if m.Pagination == nil {
  4521  				m.Pagination = &query.PageRequest{}
  4522  			}
  4523  			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4524  				return err
  4525  			}
  4526  			iNdEx = postIndex
  4527  		default:
  4528  			iNdEx = preIndex
  4529  			skippy, err := skipQuery(dAtA[iNdEx:])
  4530  			if err != nil {
  4531  				return err
  4532  			}
  4533  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4534  				return ErrInvalidLengthQuery
  4535  			}
  4536  			if (iNdEx + skippy) > l {
  4537  				return io.ErrUnexpectedEOF
  4538  			}
  4539  			iNdEx += skippy
  4540  		}
  4541  	}
  4542  
  4543  	if iNdEx > l {
  4544  		return io.ErrUnexpectedEOF
  4545  	}
  4546  	return nil
  4547  }
  4548  
  4549  func (m *QueryPinnedCodesResponse) Unmarshal(dAtA []byte) error {
  4550  	l := len(dAtA)
  4551  	iNdEx := 0
  4552  	for iNdEx < l {
  4553  		preIndex := iNdEx
  4554  		var wire uint64
  4555  		for shift := uint(0); ; shift += 7 {
  4556  			if shift >= 64 {
  4557  				return ErrIntOverflowQuery
  4558  			}
  4559  			if iNdEx >= l {
  4560  				return io.ErrUnexpectedEOF
  4561  			}
  4562  			b := dAtA[iNdEx]
  4563  			iNdEx++
  4564  			wire |= uint64(b&0x7F) << shift
  4565  			if b < 0x80 {
  4566  				break
  4567  			}
  4568  		}
  4569  		fieldNum := int32(wire >> 3)
  4570  		wireType := int(wire & 0x7)
  4571  		if wireType == 4 {
  4572  			return fmt.Errorf("proto: QueryPinnedCodesResponse: wiretype end group for non-group")
  4573  		}
  4574  		if fieldNum <= 0 {
  4575  			return fmt.Errorf("proto: QueryPinnedCodesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  4576  		}
  4577  		switch fieldNum {
  4578  		case 1:
  4579  			if wireType == 0 {
  4580  				var v uint64
  4581  				for shift := uint(0); ; shift += 7 {
  4582  					if shift >= 64 {
  4583  						return ErrIntOverflowQuery
  4584  					}
  4585  					if iNdEx >= l {
  4586  						return io.ErrUnexpectedEOF
  4587  					}
  4588  					b := dAtA[iNdEx]
  4589  					iNdEx++
  4590  					v |= uint64(b&0x7F) << shift
  4591  					if b < 0x80 {
  4592  						break
  4593  					}
  4594  				}
  4595  				m.CodeIDs = append(m.CodeIDs, v)
  4596  			} else if wireType == 2 {
  4597  				var packedLen int
  4598  				for shift := uint(0); ; shift += 7 {
  4599  					if shift >= 64 {
  4600  						return ErrIntOverflowQuery
  4601  					}
  4602  					if iNdEx >= l {
  4603  						return io.ErrUnexpectedEOF
  4604  					}
  4605  					b := dAtA[iNdEx]
  4606  					iNdEx++
  4607  					packedLen |= int(b&0x7F) << shift
  4608  					if b < 0x80 {
  4609  						break
  4610  					}
  4611  				}
  4612  				if packedLen < 0 {
  4613  					return ErrInvalidLengthQuery
  4614  				}
  4615  				postIndex := iNdEx + packedLen
  4616  				if postIndex < 0 {
  4617  					return ErrInvalidLengthQuery
  4618  				}
  4619  				if postIndex > l {
  4620  					return io.ErrUnexpectedEOF
  4621  				}
  4622  				var elementCount int
  4623  				var count int
  4624  				for _, integer := range dAtA[iNdEx:postIndex] {
  4625  					if integer < 128 {
  4626  						count++
  4627  					}
  4628  				}
  4629  				elementCount = count
  4630  				if elementCount != 0 && len(m.CodeIDs) == 0 {
  4631  					m.CodeIDs = make([]uint64, 0, elementCount)
  4632  				}
  4633  				for iNdEx < postIndex {
  4634  					var v uint64
  4635  					for shift := uint(0); ; shift += 7 {
  4636  						if shift >= 64 {
  4637  							return ErrIntOverflowQuery
  4638  						}
  4639  						if iNdEx >= l {
  4640  							return io.ErrUnexpectedEOF
  4641  						}
  4642  						b := dAtA[iNdEx]
  4643  						iNdEx++
  4644  						v |= uint64(b&0x7F) << shift
  4645  						if b < 0x80 {
  4646  							break
  4647  						}
  4648  					}
  4649  					m.CodeIDs = append(m.CodeIDs, v)
  4650  				}
  4651  			} else {
  4652  				return fmt.Errorf("proto: wrong wireType = %d for field CodeIDs", wireType)
  4653  			}
  4654  		case 2:
  4655  			if wireType != 2 {
  4656  				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
  4657  			}
  4658  			var msglen int
  4659  			for shift := uint(0); ; shift += 7 {
  4660  				if shift >= 64 {
  4661  					return ErrIntOverflowQuery
  4662  				}
  4663  				if iNdEx >= l {
  4664  					return io.ErrUnexpectedEOF
  4665  				}
  4666  				b := dAtA[iNdEx]
  4667  				iNdEx++
  4668  				msglen |= int(b&0x7F) << shift
  4669  				if b < 0x80 {
  4670  					break
  4671  				}
  4672  			}
  4673  			if msglen < 0 {
  4674  				return ErrInvalidLengthQuery
  4675  			}
  4676  			postIndex := iNdEx + msglen
  4677  			if postIndex < 0 {
  4678  				return ErrInvalidLengthQuery
  4679  			}
  4680  			if postIndex > l {
  4681  				return io.ErrUnexpectedEOF
  4682  			}
  4683  			if m.Pagination == nil {
  4684  				m.Pagination = &query.PageResponse{}
  4685  			}
  4686  			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4687  				return err
  4688  			}
  4689  			iNdEx = postIndex
  4690  		default:
  4691  			iNdEx = preIndex
  4692  			skippy, err := skipQuery(dAtA[iNdEx:])
  4693  			if err != nil {
  4694  				return err
  4695  			}
  4696  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4697  				return ErrInvalidLengthQuery
  4698  			}
  4699  			if (iNdEx + skippy) > l {
  4700  				return io.ErrUnexpectedEOF
  4701  			}
  4702  			iNdEx += skippy
  4703  		}
  4704  	}
  4705  
  4706  	if iNdEx > l {
  4707  		return io.ErrUnexpectedEOF
  4708  	}
  4709  	return nil
  4710  }
  4711  
  4712  func skipQuery(dAtA []byte) (n int, err error) {
  4713  	l := len(dAtA)
  4714  	iNdEx := 0
  4715  	depth := 0
  4716  	for iNdEx < l {
  4717  		var wire uint64
  4718  		for shift := uint(0); ; shift += 7 {
  4719  			if shift >= 64 {
  4720  				return 0, ErrIntOverflowQuery
  4721  			}
  4722  			if iNdEx >= l {
  4723  				return 0, io.ErrUnexpectedEOF
  4724  			}
  4725  			b := dAtA[iNdEx]
  4726  			iNdEx++
  4727  			wire |= (uint64(b) & 0x7F) << shift
  4728  			if b < 0x80 {
  4729  				break
  4730  			}
  4731  		}
  4732  		wireType := int(wire & 0x7)
  4733  		switch wireType {
  4734  		case 0:
  4735  			for shift := uint(0); ; shift += 7 {
  4736  				if shift >= 64 {
  4737  					return 0, ErrIntOverflowQuery
  4738  				}
  4739  				if iNdEx >= l {
  4740  					return 0, io.ErrUnexpectedEOF
  4741  				}
  4742  				iNdEx++
  4743  				if dAtA[iNdEx-1] < 0x80 {
  4744  					break
  4745  				}
  4746  			}
  4747  		case 1:
  4748  			iNdEx += 8
  4749  		case 2:
  4750  			var length int
  4751  			for shift := uint(0); ; shift += 7 {
  4752  				if shift >= 64 {
  4753  					return 0, ErrIntOverflowQuery
  4754  				}
  4755  				if iNdEx >= l {
  4756  					return 0, io.ErrUnexpectedEOF
  4757  				}
  4758  				b := dAtA[iNdEx]
  4759  				iNdEx++
  4760  				length |= (int(b) & 0x7F) << shift
  4761  				if b < 0x80 {
  4762  					break
  4763  				}
  4764  			}
  4765  			if length < 0 {
  4766  				return 0, ErrInvalidLengthQuery
  4767  			}
  4768  			iNdEx += length
  4769  		case 3:
  4770  			depth++
  4771  		case 4:
  4772  			if depth == 0 {
  4773  				return 0, ErrUnexpectedEndOfGroupQuery
  4774  			}
  4775  			depth--
  4776  		case 5:
  4777  			iNdEx += 4
  4778  		default:
  4779  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  4780  		}
  4781  		if iNdEx < 0 {
  4782  			return 0, ErrInvalidLengthQuery
  4783  		}
  4784  		if depth == 0 {
  4785  			return iNdEx, nil
  4786  		}
  4787  	}
  4788  	return 0, io.ErrUnexpectedEOF
  4789  }
  4790  
  4791  var (
  4792  	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
  4793  	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
  4794  	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
  4795  )