github.com/Finschia/finschia-sdk@v0.48.1/x/token/query.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: lbm/token/v1/query.proto 3 4 package token 5 6 import ( 7 context "context" 8 fmt "fmt" 9 github_com_Finschia_finschia_sdk_types "github.com/Finschia/finschia-sdk/types" 10 query "github.com/Finschia/finschia-sdk/types/query" 11 _ "github.com/gogo/protobuf/gogoproto" 12 grpc1 "github.com/gogo/protobuf/grpc" 13 proto "github.com/gogo/protobuf/proto" 14 _ "google.golang.org/genproto/googleapis/api/annotations" 15 grpc "google.golang.org/grpc" 16 codes "google.golang.org/grpc/codes" 17 status "google.golang.org/grpc/status" 18 io "io" 19 math "math" 20 math_bits "math/bits" 21 ) 22 23 // Reference imports to suppress errors if they are not otherwise used. 24 var _ = proto.Marshal 25 var _ = fmt.Errorf 26 var _ = math.Inf 27 28 // This is a compile-time assertion to ensure that this generated file 29 // is compatible with the proto package it is being compiled against. 30 // A compilation error at this line likely means your copy of the 31 // proto package needs to be updated. 32 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 33 34 // QueryBalanceRequest is the request type for the Query/Balance RPC method 35 type QueryBalanceRequest struct { 36 // contract id associated with the contract. 37 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 38 // address is the address to query balance for. 39 Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` 40 } 41 42 func (m *QueryBalanceRequest) Reset() { *m = QueryBalanceRequest{} } 43 func (m *QueryBalanceRequest) String() string { return proto.CompactTextString(m) } 44 func (*QueryBalanceRequest) ProtoMessage() {} 45 func (*QueryBalanceRequest) Descriptor() ([]byte, []int) { 46 return fileDescriptor_7759ed3b35cde06a, []int{0} 47 } 48 func (m *QueryBalanceRequest) XXX_Unmarshal(b []byte) error { 49 return m.Unmarshal(b) 50 } 51 func (m *QueryBalanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 52 if deterministic { 53 return xxx_messageInfo_QueryBalanceRequest.Marshal(b, m, deterministic) 54 } else { 55 b = b[:cap(b)] 56 n, err := m.MarshalToSizedBuffer(b) 57 if err != nil { 58 return nil, err 59 } 60 return b[:n], nil 61 } 62 } 63 func (m *QueryBalanceRequest) XXX_Merge(src proto.Message) { 64 xxx_messageInfo_QueryBalanceRequest.Merge(m, src) 65 } 66 func (m *QueryBalanceRequest) XXX_Size() int { 67 return m.Size() 68 } 69 func (m *QueryBalanceRequest) XXX_DiscardUnknown() { 70 xxx_messageInfo_QueryBalanceRequest.DiscardUnknown(m) 71 } 72 73 var xxx_messageInfo_QueryBalanceRequest proto.InternalMessageInfo 74 75 func (m *QueryBalanceRequest) GetContractId() string { 76 if m != nil { 77 return m.ContractId 78 } 79 return "" 80 } 81 82 func (m *QueryBalanceRequest) GetAddress() string { 83 if m != nil { 84 return m.Address 85 } 86 return "" 87 } 88 89 // QueryBalanceResponse is the response type for the Query/Balance RPC method 90 type QueryBalanceResponse struct { 91 // the balance of the tokens. 92 Amount github_com_Finschia_finschia_sdk_types.Int `protobuf:"bytes,1,opt,name=amount,proto3,customtype=github.com/Finschia/finschia-sdk/types.Int" json:"amount"` 93 } 94 95 func (m *QueryBalanceResponse) Reset() { *m = QueryBalanceResponse{} } 96 func (m *QueryBalanceResponse) String() string { return proto.CompactTextString(m) } 97 func (*QueryBalanceResponse) ProtoMessage() {} 98 func (*QueryBalanceResponse) Descriptor() ([]byte, []int) { 99 return fileDescriptor_7759ed3b35cde06a, []int{1} 100 } 101 func (m *QueryBalanceResponse) XXX_Unmarshal(b []byte) error { 102 return m.Unmarshal(b) 103 } 104 func (m *QueryBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 105 if deterministic { 106 return xxx_messageInfo_QueryBalanceResponse.Marshal(b, m, deterministic) 107 } else { 108 b = b[:cap(b)] 109 n, err := m.MarshalToSizedBuffer(b) 110 if err != nil { 111 return nil, err 112 } 113 return b[:n], nil 114 } 115 } 116 func (m *QueryBalanceResponse) XXX_Merge(src proto.Message) { 117 xxx_messageInfo_QueryBalanceResponse.Merge(m, src) 118 } 119 func (m *QueryBalanceResponse) XXX_Size() int { 120 return m.Size() 121 } 122 func (m *QueryBalanceResponse) XXX_DiscardUnknown() { 123 xxx_messageInfo_QueryBalanceResponse.DiscardUnknown(m) 124 } 125 126 var xxx_messageInfo_QueryBalanceResponse proto.InternalMessageInfo 127 128 // QuerySupplyRequest is the request type for the Query/Supply RPC method 129 type QuerySupplyRequest struct { 130 // contract id associated with the contract. 131 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 132 } 133 134 func (m *QuerySupplyRequest) Reset() { *m = QuerySupplyRequest{} } 135 func (m *QuerySupplyRequest) String() string { return proto.CompactTextString(m) } 136 func (*QuerySupplyRequest) ProtoMessage() {} 137 func (*QuerySupplyRequest) Descriptor() ([]byte, []int) { 138 return fileDescriptor_7759ed3b35cde06a, []int{2} 139 } 140 func (m *QuerySupplyRequest) XXX_Unmarshal(b []byte) error { 141 return m.Unmarshal(b) 142 } 143 func (m *QuerySupplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 144 if deterministic { 145 return xxx_messageInfo_QuerySupplyRequest.Marshal(b, m, deterministic) 146 } else { 147 b = b[:cap(b)] 148 n, err := m.MarshalToSizedBuffer(b) 149 if err != nil { 150 return nil, err 151 } 152 return b[:n], nil 153 } 154 } 155 func (m *QuerySupplyRequest) XXX_Merge(src proto.Message) { 156 xxx_messageInfo_QuerySupplyRequest.Merge(m, src) 157 } 158 func (m *QuerySupplyRequest) XXX_Size() int { 159 return m.Size() 160 } 161 func (m *QuerySupplyRequest) XXX_DiscardUnknown() { 162 xxx_messageInfo_QuerySupplyRequest.DiscardUnknown(m) 163 } 164 165 var xxx_messageInfo_QuerySupplyRequest proto.InternalMessageInfo 166 167 func (m *QuerySupplyRequest) GetContractId() string { 168 if m != nil { 169 return m.ContractId 170 } 171 return "" 172 } 173 174 // QuerySupplyResponse is the response type for the Query/Supply RPC method 175 type QuerySupplyResponse struct { 176 // the supply of the tokens. 177 Amount github_com_Finschia_finschia_sdk_types.Int `protobuf:"bytes,1,opt,name=amount,proto3,customtype=github.com/Finschia/finschia-sdk/types.Int" json:"amount"` 178 } 179 180 func (m *QuerySupplyResponse) Reset() { *m = QuerySupplyResponse{} } 181 func (m *QuerySupplyResponse) String() string { return proto.CompactTextString(m) } 182 func (*QuerySupplyResponse) ProtoMessage() {} 183 func (*QuerySupplyResponse) Descriptor() ([]byte, []int) { 184 return fileDescriptor_7759ed3b35cde06a, []int{3} 185 } 186 func (m *QuerySupplyResponse) XXX_Unmarshal(b []byte) error { 187 return m.Unmarshal(b) 188 } 189 func (m *QuerySupplyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 190 if deterministic { 191 return xxx_messageInfo_QuerySupplyResponse.Marshal(b, m, deterministic) 192 } else { 193 b = b[:cap(b)] 194 n, err := m.MarshalToSizedBuffer(b) 195 if err != nil { 196 return nil, err 197 } 198 return b[:n], nil 199 } 200 } 201 func (m *QuerySupplyResponse) XXX_Merge(src proto.Message) { 202 xxx_messageInfo_QuerySupplyResponse.Merge(m, src) 203 } 204 func (m *QuerySupplyResponse) XXX_Size() int { 205 return m.Size() 206 } 207 func (m *QuerySupplyResponse) XXX_DiscardUnknown() { 208 xxx_messageInfo_QuerySupplyResponse.DiscardUnknown(m) 209 } 210 211 var xxx_messageInfo_QuerySupplyResponse proto.InternalMessageInfo 212 213 // QueryMintedRequest is the request type for the Query/Minted RPC method 214 type QueryMintedRequest struct { 215 // contract id associated with the contract. 216 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 217 } 218 219 func (m *QueryMintedRequest) Reset() { *m = QueryMintedRequest{} } 220 func (m *QueryMintedRequest) String() string { return proto.CompactTextString(m) } 221 func (*QueryMintedRequest) ProtoMessage() {} 222 func (*QueryMintedRequest) Descriptor() ([]byte, []int) { 223 return fileDescriptor_7759ed3b35cde06a, []int{4} 224 } 225 func (m *QueryMintedRequest) XXX_Unmarshal(b []byte) error { 226 return m.Unmarshal(b) 227 } 228 func (m *QueryMintedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 229 if deterministic { 230 return xxx_messageInfo_QueryMintedRequest.Marshal(b, m, deterministic) 231 } else { 232 b = b[:cap(b)] 233 n, err := m.MarshalToSizedBuffer(b) 234 if err != nil { 235 return nil, err 236 } 237 return b[:n], nil 238 } 239 } 240 func (m *QueryMintedRequest) XXX_Merge(src proto.Message) { 241 xxx_messageInfo_QueryMintedRequest.Merge(m, src) 242 } 243 func (m *QueryMintedRequest) XXX_Size() int { 244 return m.Size() 245 } 246 func (m *QueryMintedRequest) XXX_DiscardUnknown() { 247 xxx_messageInfo_QueryMintedRequest.DiscardUnknown(m) 248 } 249 250 var xxx_messageInfo_QueryMintedRequest proto.InternalMessageInfo 251 252 func (m *QueryMintedRequest) GetContractId() string { 253 if m != nil { 254 return m.ContractId 255 } 256 return "" 257 } 258 259 // QueryMintedResponse is the response type for the Query/Minted RPC method 260 type QueryMintedResponse struct { 261 // the amount of the minted tokens. 262 Amount github_com_Finschia_finschia_sdk_types.Int `protobuf:"bytes,1,opt,name=amount,proto3,customtype=github.com/Finschia/finschia-sdk/types.Int" json:"amount"` 263 } 264 265 func (m *QueryMintedResponse) Reset() { *m = QueryMintedResponse{} } 266 func (m *QueryMintedResponse) String() string { return proto.CompactTextString(m) } 267 func (*QueryMintedResponse) ProtoMessage() {} 268 func (*QueryMintedResponse) Descriptor() ([]byte, []int) { 269 return fileDescriptor_7759ed3b35cde06a, []int{5} 270 } 271 func (m *QueryMintedResponse) XXX_Unmarshal(b []byte) error { 272 return m.Unmarshal(b) 273 } 274 func (m *QueryMintedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 275 if deterministic { 276 return xxx_messageInfo_QueryMintedResponse.Marshal(b, m, deterministic) 277 } else { 278 b = b[:cap(b)] 279 n, err := m.MarshalToSizedBuffer(b) 280 if err != nil { 281 return nil, err 282 } 283 return b[:n], nil 284 } 285 } 286 func (m *QueryMintedResponse) XXX_Merge(src proto.Message) { 287 xxx_messageInfo_QueryMintedResponse.Merge(m, src) 288 } 289 func (m *QueryMintedResponse) XXX_Size() int { 290 return m.Size() 291 } 292 func (m *QueryMintedResponse) XXX_DiscardUnknown() { 293 xxx_messageInfo_QueryMintedResponse.DiscardUnknown(m) 294 } 295 296 var xxx_messageInfo_QueryMintedResponse proto.InternalMessageInfo 297 298 // QueryBurntRequest is the request type for the Query/Burnt RPC method 299 type QueryBurntRequest struct { 300 // contract id associated with the contract. 301 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 302 } 303 304 func (m *QueryBurntRequest) Reset() { *m = QueryBurntRequest{} } 305 func (m *QueryBurntRequest) String() string { return proto.CompactTextString(m) } 306 func (*QueryBurntRequest) ProtoMessage() {} 307 func (*QueryBurntRequest) Descriptor() ([]byte, []int) { 308 return fileDescriptor_7759ed3b35cde06a, []int{6} 309 } 310 func (m *QueryBurntRequest) XXX_Unmarshal(b []byte) error { 311 return m.Unmarshal(b) 312 } 313 func (m *QueryBurntRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 314 if deterministic { 315 return xxx_messageInfo_QueryBurntRequest.Marshal(b, m, deterministic) 316 } else { 317 b = b[:cap(b)] 318 n, err := m.MarshalToSizedBuffer(b) 319 if err != nil { 320 return nil, err 321 } 322 return b[:n], nil 323 } 324 } 325 func (m *QueryBurntRequest) XXX_Merge(src proto.Message) { 326 xxx_messageInfo_QueryBurntRequest.Merge(m, src) 327 } 328 func (m *QueryBurntRequest) XXX_Size() int { 329 return m.Size() 330 } 331 func (m *QueryBurntRequest) XXX_DiscardUnknown() { 332 xxx_messageInfo_QueryBurntRequest.DiscardUnknown(m) 333 } 334 335 var xxx_messageInfo_QueryBurntRequest proto.InternalMessageInfo 336 337 func (m *QueryBurntRequest) GetContractId() string { 338 if m != nil { 339 return m.ContractId 340 } 341 return "" 342 } 343 344 // QueryBurntResponse is the response type for the Query/Burnt RPC method 345 type QueryBurntResponse struct { 346 // the amount of the burnt tokens. 347 Amount github_com_Finschia_finschia_sdk_types.Int `protobuf:"bytes,1,opt,name=amount,proto3,customtype=github.com/Finschia/finschia-sdk/types.Int" json:"amount"` 348 } 349 350 func (m *QueryBurntResponse) Reset() { *m = QueryBurntResponse{} } 351 func (m *QueryBurntResponse) String() string { return proto.CompactTextString(m) } 352 func (*QueryBurntResponse) ProtoMessage() {} 353 func (*QueryBurntResponse) Descriptor() ([]byte, []int) { 354 return fileDescriptor_7759ed3b35cde06a, []int{7} 355 } 356 func (m *QueryBurntResponse) XXX_Unmarshal(b []byte) error { 357 return m.Unmarshal(b) 358 } 359 func (m *QueryBurntResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 360 if deterministic { 361 return xxx_messageInfo_QueryBurntResponse.Marshal(b, m, deterministic) 362 } else { 363 b = b[:cap(b)] 364 n, err := m.MarshalToSizedBuffer(b) 365 if err != nil { 366 return nil, err 367 } 368 return b[:n], nil 369 } 370 } 371 func (m *QueryBurntResponse) XXX_Merge(src proto.Message) { 372 xxx_messageInfo_QueryBurntResponse.Merge(m, src) 373 } 374 func (m *QueryBurntResponse) XXX_Size() int { 375 return m.Size() 376 } 377 func (m *QueryBurntResponse) XXX_DiscardUnknown() { 378 xxx_messageInfo_QueryBurntResponse.DiscardUnknown(m) 379 } 380 381 var xxx_messageInfo_QueryBurntResponse proto.InternalMessageInfo 382 383 // QueryContractRequest is the request type for the Query/Contract RPC method 384 type QueryContractRequest struct { 385 // contract id associated with the contract. 386 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 387 } 388 389 func (m *QueryContractRequest) Reset() { *m = QueryContractRequest{} } 390 func (m *QueryContractRequest) String() string { return proto.CompactTextString(m) } 391 func (*QueryContractRequest) ProtoMessage() {} 392 func (*QueryContractRequest) Descriptor() ([]byte, []int) { 393 return fileDescriptor_7759ed3b35cde06a, []int{8} 394 } 395 func (m *QueryContractRequest) XXX_Unmarshal(b []byte) error { 396 return m.Unmarshal(b) 397 } 398 func (m *QueryContractRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 399 if deterministic { 400 return xxx_messageInfo_QueryContractRequest.Marshal(b, m, deterministic) 401 } else { 402 b = b[:cap(b)] 403 n, err := m.MarshalToSizedBuffer(b) 404 if err != nil { 405 return nil, err 406 } 407 return b[:n], nil 408 } 409 } 410 func (m *QueryContractRequest) XXX_Merge(src proto.Message) { 411 xxx_messageInfo_QueryContractRequest.Merge(m, src) 412 } 413 func (m *QueryContractRequest) XXX_Size() int { 414 return m.Size() 415 } 416 func (m *QueryContractRequest) XXX_DiscardUnknown() { 417 xxx_messageInfo_QueryContractRequest.DiscardUnknown(m) 418 } 419 420 var xxx_messageInfo_QueryContractRequest proto.InternalMessageInfo 421 422 func (m *QueryContractRequest) GetContractId() string { 423 if m != nil { 424 return m.ContractId 425 } 426 return "" 427 } 428 429 // QueryContractResponse is the response type for the Query/Contract RPC method 430 type QueryContractResponse struct { 431 Contract Contract `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract"` 432 } 433 434 func (m *QueryContractResponse) Reset() { *m = QueryContractResponse{} } 435 func (m *QueryContractResponse) String() string { return proto.CompactTextString(m) } 436 func (*QueryContractResponse) ProtoMessage() {} 437 func (*QueryContractResponse) Descriptor() ([]byte, []int) { 438 return fileDescriptor_7759ed3b35cde06a, []int{9} 439 } 440 func (m *QueryContractResponse) XXX_Unmarshal(b []byte) error { 441 return m.Unmarshal(b) 442 } 443 func (m *QueryContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 444 if deterministic { 445 return xxx_messageInfo_QueryContractResponse.Marshal(b, m, deterministic) 446 } else { 447 b = b[:cap(b)] 448 n, err := m.MarshalToSizedBuffer(b) 449 if err != nil { 450 return nil, err 451 } 452 return b[:n], nil 453 } 454 } 455 func (m *QueryContractResponse) XXX_Merge(src proto.Message) { 456 xxx_messageInfo_QueryContractResponse.Merge(m, src) 457 } 458 func (m *QueryContractResponse) XXX_Size() int { 459 return m.Size() 460 } 461 func (m *QueryContractResponse) XXX_DiscardUnknown() { 462 xxx_messageInfo_QueryContractResponse.DiscardUnknown(m) 463 } 464 465 var xxx_messageInfo_QueryContractResponse proto.InternalMessageInfo 466 467 func (m *QueryContractResponse) GetContract() Contract { 468 if m != nil { 469 return m.Contract 470 } 471 return Contract{} 472 } 473 474 // QueryGranteeGrantsRequest is the request type for the Query/GranteeGrants RPC method 475 type QueryGranteeGrantsRequest struct { 476 // contract id associated with the contract. 477 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 478 // grantee which has permissions on the contract. 479 Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` 480 // pagination defines an optional pagination for the request. 481 Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` 482 } 483 484 func (m *QueryGranteeGrantsRequest) Reset() { *m = QueryGranteeGrantsRequest{} } 485 func (m *QueryGranteeGrantsRequest) String() string { return proto.CompactTextString(m) } 486 func (*QueryGranteeGrantsRequest) ProtoMessage() {} 487 func (*QueryGranteeGrantsRequest) Descriptor() ([]byte, []int) { 488 return fileDescriptor_7759ed3b35cde06a, []int{10} 489 } 490 func (m *QueryGranteeGrantsRequest) XXX_Unmarshal(b []byte) error { 491 return m.Unmarshal(b) 492 } 493 func (m *QueryGranteeGrantsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 494 if deterministic { 495 return xxx_messageInfo_QueryGranteeGrantsRequest.Marshal(b, m, deterministic) 496 } else { 497 b = b[:cap(b)] 498 n, err := m.MarshalToSizedBuffer(b) 499 if err != nil { 500 return nil, err 501 } 502 return b[:n], nil 503 } 504 } 505 func (m *QueryGranteeGrantsRequest) XXX_Merge(src proto.Message) { 506 xxx_messageInfo_QueryGranteeGrantsRequest.Merge(m, src) 507 } 508 func (m *QueryGranteeGrantsRequest) XXX_Size() int { 509 return m.Size() 510 } 511 func (m *QueryGranteeGrantsRequest) XXX_DiscardUnknown() { 512 xxx_messageInfo_QueryGranteeGrantsRequest.DiscardUnknown(m) 513 } 514 515 var xxx_messageInfo_QueryGranteeGrantsRequest proto.InternalMessageInfo 516 517 func (m *QueryGranteeGrantsRequest) GetContractId() string { 518 if m != nil { 519 return m.ContractId 520 } 521 return "" 522 } 523 524 func (m *QueryGranteeGrantsRequest) GetGrantee() string { 525 if m != nil { 526 return m.Grantee 527 } 528 return "" 529 } 530 531 func (m *QueryGranteeGrantsRequest) GetPagination() *query.PageRequest { 532 if m != nil { 533 return m.Pagination 534 } 535 return nil 536 } 537 538 // QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method 539 type QueryGranteeGrantsResponse struct { 540 // all the grants on the grantee. 541 Grants []Grant `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants"` 542 // pagination defines the pagination in the response. 543 Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` 544 } 545 546 func (m *QueryGranteeGrantsResponse) Reset() { *m = QueryGranteeGrantsResponse{} } 547 func (m *QueryGranteeGrantsResponse) String() string { return proto.CompactTextString(m) } 548 func (*QueryGranteeGrantsResponse) ProtoMessage() {} 549 func (*QueryGranteeGrantsResponse) Descriptor() ([]byte, []int) { 550 return fileDescriptor_7759ed3b35cde06a, []int{11} 551 } 552 func (m *QueryGranteeGrantsResponse) XXX_Unmarshal(b []byte) error { 553 return m.Unmarshal(b) 554 } 555 func (m *QueryGranteeGrantsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 556 if deterministic { 557 return xxx_messageInfo_QueryGranteeGrantsResponse.Marshal(b, m, deterministic) 558 } else { 559 b = b[:cap(b)] 560 n, err := m.MarshalToSizedBuffer(b) 561 if err != nil { 562 return nil, err 563 } 564 return b[:n], nil 565 } 566 } 567 func (m *QueryGranteeGrantsResponse) XXX_Merge(src proto.Message) { 568 xxx_messageInfo_QueryGranteeGrantsResponse.Merge(m, src) 569 } 570 func (m *QueryGranteeGrantsResponse) XXX_Size() int { 571 return m.Size() 572 } 573 func (m *QueryGranteeGrantsResponse) XXX_DiscardUnknown() { 574 xxx_messageInfo_QueryGranteeGrantsResponse.DiscardUnknown(m) 575 } 576 577 var xxx_messageInfo_QueryGranteeGrantsResponse proto.InternalMessageInfo 578 579 func (m *QueryGranteeGrantsResponse) GetGrants() []Grant { 580 if m != nil { 581 return m.Grants 582 } 583 return nil 584 } 585 586 func (m *QueryGranteeGrantsResponse) GetPagination() *query.PageResponse { 587 if m != nil { 588 return m.Pagination 589 } 590 return nil 591 } 592 593 // QueryIsOperatorForRequest is the request type for the Query/IsOperatorFor RPC method 594 type QueryIsOperatorForRequest struct { 595 // contract id associated with the contract. 596 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 597 // address of the operator which the authorization is granted to. 598 Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` 599 // address of the holder of the authorization. 600 Holder string `protobuf:"bytes,3,opt,name=holder,proto3" json:"holder,omitempty"` 601 } 602 603 func (m *QueryIsOperatorForRequest) Reset() { *m = QueryIsOperatorForRequest{} } 604 func (m *QueryIsOperatorForRequest) String() string { return proto.CompactTextString(m) } 605 func (*QueryIsOperatorForRequest) ProtoMessage() {} 606 func (*QueryIsOperatorForRequest) Descriptor() ([]byte, []int) { 607 return fileDescriptor_7759ed3b35cde06a, []int{12} 608 } 609 func (m *QueryIsOperatorForRequest) XXX_Unmarshal(b []byte) error { 610 return m.Unmarshal(b) 611 } 612 func (m *QueryIsOperatorForRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 613 if deterministic { 614 return xxx_messageInfo_QueryIsOperatorForRequest.Marshal(b, m, deterministic) 615 } else { 616 b = b[:cap(b)] 617 n, err := m.MarshalToSizedBuffer(b) 618 if err != nil { 619 return nil, err 620 } 621 return b[:n], nil 622 } 623 } 624 func (m *QueryIsOperatorForRequest) XXX_Merge(src proto.Message) { 625 xxx_messageInfo_QueryIsOperatorForRequest.Merge(m, src) 626 } 627 func (m *QueryIsOperatorForRequest) XXX_Size() int { 628 return m.Size() 629 } 630 func (m *QueryIsOperatorForRequest) XXX_DiscardUnknown() { 631 xxx_messageInfo_QueryIsOperatorForRequest.DiscardUnknown(m) 632 } 633 634 var xxx_messageInfo_QueryIsOperatorForRequest proto.InternalMessageInfo 635 636 func (m *QueryIsOperatorForRequest) GetContractId() string { 637 if m != nil { 638 return m.ContractId 639 } 640 return "" 641 } 642 643 func (m *QueryIsOperatorForRequest) GetOperator() string { 644 if m != nil { 645 return m.Operator 646 } 647 return "" 648 } 649 650 func (m *QueryIsOperatorForRequest) GetHolder() string { 651 if m != nil { 652 return m.Holder 653 } 654 return "" 655 } 656 657 // QueryIsOperatorForResponse is the response type for the Query/IsOperatorFor RPC method 658 type QueryIsOperatorForResponse struct { 659 Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"` 660 } 661 662 func (m *QueryIsOperatorForResponse) Reset() { *m = QueryIsOperatorForResponse{} } 663 func (m *QueryIsOperatorForResponse) String() string { return proto.CompactTextString(m) } 664 func (*QueryIsOperatorForResponse) ProtoMessage() {} 665 func (*QueryIsOperatorForResponse) Descriptor() ([]byte, []int) { 666 return fileDescriptor_7759ed3b35cde06a, []int{13} 667 } 668 func (m *QueryIsOperatorForResponse) XXX_Unmarshal(b []byte) error { 669 return m.Unmarshal(b) 670 } 671 func (m *QueryIsOperatorForResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 672 if deterministic { 673 return xxx_messageInfo_QueryIsOperatorForResponse.Marshal(b, m, deterministic) 674 } else { 675 b = b[:cap(b)] 676 n, err := m.MarshalToSizedBuffer(b) 677 if err != nil { 678 return nil, err 679 } 680 return b[:n], nil 681 } 682 } 683 func (m *QueryIsOperatorForResponse) XXX_Merge(src proto.Message) { 684 xxx_messageInfo_QueryIsOperatorForResponse.Merge(m, src) 685 } 686 func (m *QueryIsOperatorForResponse) XXX_Size() int { 687 return m.Size() 688 } 689 func (m *QueryIsOperatorForResponse) XXX_DiscardUnknown() { 690 xxx_messageInfo_QueryIsOperatorForResponse.DiscardUnknown(m) 691 } 692 693 var xxx_messageInfo_QueryIsOperatorForResponse proto.InternalMessageInfo 694 695 func (m *QueryIsOperatorForResponse) GetAuthorized() bool { 696 if m != nil { 697 return m.Authorized 698 } 699 return false 700 } 701 702 // QueryHoldersByOperatorRequest is the request type for the Query/HoldersByOperator RPC method 703 type QueryHoldersByOperatorRequest struct { 704 // contract id associated with the contract. 705 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 706 // address of the operator which the authorization is granted to. 707 Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` 708 // pagination defines an optional pagination for the request. 709 Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` 710 } 711 712 func (m *QueryHoldersByOperatorRequest) Reset() { *m = QueryHoldersByOperatorRequest{} } 713 func (m *QueryHoldersByOperatorRequest) String() string { return proto.CompactTextString(m) } 714 func (*QueryHoldersByOperatorRequest) ProtoMessage() {} 715 func (*QueryHoldersByOperatorRequest) Descriptor() ([]byte, []int) { 716 return fileDescriptor_7759ed3b35cde06a, []int{14} 717 } 718 func (m *QueryHoldersByOperatorRequest) XXX_Unmarshal(b []byte) error { 719 return m.Unmarshal(b) 720 } 721 func (m *QueryHoldersByOperatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 722 if deterministic { 723 return xxx_messageInfo_QueryHoldersByOperatorRequest.Marshal(b, m, deterministic) 724 } else { 725 b = b[:cap(b)] 726 n, err := m.MarshalToSizedBuffer(b) 727 if err != nil { 728 return nil, err 729 } 730 return b[:n], nil 731 } 732 } 733 func (m *QueryHoldersByOperatorRequest) XXX_Merge(src proto.Message) { 734 xxx_messageInfo_QueryHoldersByOperatorRequest.Merge(m, src) 735 } 736 func (m *QueryHoldersByOperatorRequest) XXX_Size() int { 737 return m.Size() 738 } 739 func (m *QueryHoldersByOperatorRequest) XXX_DiscardUnknown() { 740 xxx_messageInfo_QueryHoldersByOperatorRequest.DiscardUnknown(m) 741 } 742 743 var xxx_messageInfo_QueryHoldersByOperatorRequest proto.InternalMessageInfo 744 745 func (m *QueryHoldersByOperatorRequest) GetContractId() string { 746 if m != nil { 747 return m.ContractId 748 } 749 return "" 750 } 751 752 func (m *QueryHoldersByOperatorRequest) GetOperator() string { 753 if m != nil { 754 return m.Operator 755 } 756 return "" 757 } 758 759 func (m *QueryHoldersByOperatorRequest) GetPagination() *query.PageRequest { 760 if m != nil { 761 return m.Pagination 762 } 763 return nil 764 } 765 766 // QueryHoldersByOperatorResponse is the response type for the Query/HoldersByOperator RPC method 767 type QueryHoldersByOperatorResponse struct { 768 // holder addresses 769 Holders []string `protobuf:"bytes,1,rep,name=holders,proto3" json:"holders,omitempty"` 770 // pagination defines the pagination in the response. 771 Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` 772 } 773 774 func (m *QueryHoldersByOperatorResponse) Reset() { *m = QueryHoldersByOperatorResponse{} } 775 func (m *QueryHoldersByOperatorResponse) String() string { return proto.CompactTextString(m) } 776 func (*QueryHoldersByOperatorResponse) ProtoMessage() {} 777 func (*QueryHoldersByOperatorResponse) Descriptor() ([]byte, []int) { 778 return fileDescriptor_7759ed3b35cde06a, []int{15} 779 } 780 func (m *QueryHoldersByOperatorResponse) XXX_Unmarshal(b []byte) error { 781 return m.Unmarshal(b) 782 } 783 func (m *QueryHoldersByOperatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 784 if deterministic { 785 return xxx_messageInfo_QueryHoldersByOperatorResponse.Marshal(b, m, deterministic) 786 } else { 787 b = b[:cap(b)] 788 n, err := m.MarshalToSizedBuffer(b) 789 if err != nil { 790 return nil, err 791 } 792 return b[:n], nil 793 } 794 } 795 func (m *QueryHoldersByOperatorResponse) XXX_Merge(src proto.Message) { 796 xxx_messageInfo_QueryHoldersByOperatorResponse.Merge(m, src) 797 } 798 func (m *QueryHoldersByOperatorResponse) XXX_Size() int { 799 return m.Size() 800 } 801 func (m *QueryHoldersByOperatorResponse) XXX_DiscardUnknown() { 802 xxx_messageInfo_QueryHoldersByOperatorResponse.DiscardUnknown(m) 803 } 804 805 var xxx_messageInfo_QueryHoldersByOperatorResponse proto.InternalMessageInfo 806 807 func (m *QueryHoldersByOperatorResponse) GetHolders() []string { 808 if m != nil { 809 return m.Holders 810 } 811 return nil 812 } 813 814 func (m *QueryHoldersByOperatorResponse) GetPagination() *query.PageResponse { 815 if m != nil { 816 return m.Pagination 817 } 818 return nil 819 } 820 821 func init() { 822 proto.RegisterType((*QueryBalanceRequest)(nil), "lbm.token.v1.QueryBalanceRequest") 823 proto.RegisterType((*QueryBalanceResponse)(nil), "lbm.token.v1.QueryBalanceResponse") 824 proto.RegisterType((*QuerySupplyRequest)(nil), "lbm.token.v1.QuerySupplyRequest") 825 proto.RegisterType((*QuerySupplyResponse)(nil), "lbm.token.v1.QuerySupplyResponse") 826 proto.RegisterType((*QueryMintedRequest)(nil), "lbm.token.v1.QueryMintedRequest") 827 proto.RegisterType((*QueryMintedResponse)(nil), "lbm.token.v1.QueryMintedResponse") 828 proto.RegisterType((*QueryBurntRequest)(nil), "lbm.token.v1.QueryBurntRequest") 829 proto.RegisterType((*QueryBurntResponse)(nil), "lbm.token.v1.QueryBurntResponse") 830 proto.RegisterType((*QueryContractRequest)(nil), "lbm.token.v1.QueryContractRequest") 831 proto.RegisterType((*QueryContractResponse)(nil), "lbm.token.v1.QueryContractResponse") 832 proto.RegisterType((*QueryGranteeGrantsRequest)(nil), "lbm.token.v1.QueryGranteeGrantsRequest") 833 proto.RegisterType((*QueryGranteeGrantsResponse)(nil), "lbm.token.v1.QueryGranteeGrantsResponse") 834 proto.RegisterType((*QueryIsOperatorForRequest)(nil), "lbm.token.v1.QueryIsOperatorForRequest") 835 proto.RegisterType((*QueryIsOperatorForResponse)(nil), "lbm.token.v1.QueryIsOperatorForResponse") 836 proto.RegisterType((*QueryHoldersByOperatorRequest)(nil), "lbm.token.v1.QueryHoldersByOperatorRequest") 837 proto.RegisterType((*QueryHoldersByOperatorResponse)(nil), "lbm.token.v1.QueryHoldersByOperatorResponse") 838 } 839 840 func init() { proto.RegisterFile("lbm/token/v1/query.proto", fileDescriptor_7759ed3b35cde06a) } 841 842 var fileDescriptor_7759ed3b35cde06a = []byte{ 843 // 851 bytes of a gzipped FileDescriptorProto 844 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x96, 0x41, 0x4f, 0xdb, 0x48, 845 0x14, 0xc7, 0x63, 0x58, 0x42, 0x18, 0x96, 0x03, 0x03, 0x8b, 0xb2, 0xd6, 0xae, 0x13, 0xbc, 0xd2, 846 0x92, 0x85, 0x5d, 0xcf, 0x26, 0xbb, 0x2b, 0xd0, 0x0a, 0xf5, 0x90, 0x56, 0x50, 0x2a, 0x55, 0x05, 847 0xf7, 0xd6, 0x0b, 0x1d, 0xc7, 0x53, 0xc7, 0x22, 0xf1, 0x18, 0xcf, 0x04, 0x35, 0x45, 0x5c, 0x8a, 848 0xd4, 0x5e, 0x2b, 0x55, 0xaa, 0x7a, 0xea, 0xa9, 0xea, 0x27, 0xe9, 0x81, 0x23, 0x52, 0x2f, 0x55, 849 0x0f, 0xa8, 0x82, 0x7e, 0x90, 0x2a, 0x33, 0x63, 0x1a, 0x83, 0x01, 0x53, 0xc1, 0x29, 0x1e, 0xcf, 850 0x7b, 0xef, 0xff, 0x9b, 0x37, 0x7e, 0xef, 0x05, 0x14, 0x5b, 0x4e, 0x1b, 0x71, 0xba, 0x41, 0x02, 851 0xb4, 0x55, 0x45, 0x9b, 0x1d, 0x12, 0x75, 0xad, 0x30, 0xa2, 0x9c, 0xc2, 0x1f, 0x5b, 0x4e, 0xdb, 852 0x12, 0x3b, 0xd6, 0x56, 0x55, 0x9f, 0x6d, 0x50, 0xd6, 0xa6, 0x0c, 0x39, 0x98, 0x11, 0x69, 0x86, 853 0xb6, 0xaa, 0x0e, 0xe1, 0xb8, 0x8a, 0x42, 0xec, 0xf9, 0x01, 0xe6, 0x3e, 0x0d, 0xa4, 0xa7, 0xfe, 854 0x8b, 0x47, 0xa9, 0xd7, 0x22, 0x08, 0x87, 0x3e, 0xc2, 0x41, 0x40, 0xb9, 0xd8, 0x64, 0x6a, 0x37, 855 0xa9, 0x28, 0x05, 0xe4, 0xce, 0xa4, 0x47, 0x3d, 0x2a, 0x1e, 0x51, 0xef, 0x49, 0xbe, 0x35, 0x57, 856 0xc1, 0xc4, 0x5a, 0x4f, 0xaf, 0x8e, 0x5b, 0x38, 0x68, 0x10, 0x9b, 0x6c, 0x76, 0x08, 0xe3, 0xb0, 857 0x04, 0x46, 0x1b, 0x34, 0xe0, 0x11, 0x6e, 0xf0, 0x75, 0xdf, 0x2d, 0x6a, 0x65, 0xad, 0x32, 0x62, 858 0x83, 0xf8, 0xd5, 0x8a, 0x0b, 0x8b, 0x60, 0x18, 0xbb, 0x6e, 0x44, 0x18, 0x2b, 0x0e, 0x88, 0xcd, 859 0x78, 0x69, 0x3a, 0x60, 0x32, 0x19, 0x91, 0x85, 0x34, 0x60, 0x04, 0xde, 0x01, 0x79, 0xdc, 0xa6, 860 0x9d, 0x80, 0xcb, 0x68, 0xf5, 0xda, 0xde, 0x41, 0x29, 0xf7, 0xe9, 0xa0, 0x34, 0xeb, 0xf9, 0xbc, 861 0xd9, 0x71, 0xac, 0x06, 0x6d, 0xa3, 0x25, 0x3f, 0x60, 0x8d, 0xa6, 0x8f, 0xd1, 0x23, 0xf5, 0xf0, 862 0x17, 0x73, 0x37, 0x10, 0xef, 0x86, 0x84, 0x59, 0x2b, 0x01, 0xb7, 0x55, 0x04, 0xf3, 0x3f, 0x00, 863 0x85, 0xc6, 0xfd, 0x4e, 0x18, 0xb6, 0xba, 0x59, 0xa1, 0x4d, 0xac, 0x0e, 0x1b, 0xbb, 0x5d, 0x23, 864 0xd9, 0x5d, 0x3f, 0xe0, 0xc4, 0xbd, 0x34, 0x59, 0xec, 0x76, 0x0d, 0x64, 0xff, 0x82, 0x71, 0x79, 865 0x2f, 0x9d, 0x28, 0xe0, 0x99, 0xc1, 0x1e, 0xaa, 0xf3, 0x28, 0xaf, 0x6b, 0xe0, 0x9a, 0x57, 0xdf, 866 0xcb, 0x4d, 0x25, 0x9a, 0x19, 0x6d, 0x0d, 0xfc, 0x74, 0xc2, 0x51, 0xd1, 0x2d, 0x80, 0x42, 0x6c, 867 0x26, 0xdc, 0x46, 0x6b, 0x53, 0x56, 0x7f, 0xb9, 0x59, 0xb1, 0x47, 0xfd, 0x87, 0x1e, 0xb7, 0x7d, 868 0x6c, 0x6d, 0xbe, 0xd1, 0xc0, 0xcf, 0x22, 0xe6, 0x72, 0x84, 0x03, 0x4e, 0x88, 0xf8, 0x61, 0x97, 869 0x29, 0x0a, 0x4f, 0x3a, 0xc6, 0x45, 0xa1, 0x96, 0x70, 0x09, 0x80, 0x6f, 0x85, 0x5c, 0x1c, 0x14, 870 0x50, 0xbf, 0x5b, 0xb2, 0xea, 0xad, 0x5e, 0xd5, 0x5b, 0xb2, 0x39, 0xa8, 0xaa, 0xb7, 0x56, 0xb1, 871 0x17, 0xd7, 0xa2, 0xdd, 0xe7, 0x69, 0xbe, 0xd6, 0x80, 0x9e, 0x06, 0xa8, 0x4e, 0x5e, 0x05, 0x79, 872 0xa1, 0xc8, 0x8a, 0x5a, 0x79, 0xb0, 0x32, 0x5a, 0x9b, 0x48, 0x9e, 0x5b, 0x58, 0xab, 0x43, 0x2b, 873 0x43, 0xb8, 0x9c, 0x20, 0x1b, 0x10, 0x64, 0x33, 0x17, 0x92, 0x49, 0xbd, 0x04, 0x5a, 0xa8, 0x52, 874 0xb7, 0xc2, 0xee, 0x85, 0x24, 0xc2, 0x9c, 0x46, 0x4b, 0x34, 0xca, 0x9c, 0x3a, 0x1d, 0x14, 0xa8, 875 0x72, 0x53, 0xb9, 0x3b, 0x5e, 0xc3, 0x29, 0x90, 0x6f, 0xd2, 0x96, 0x4b, 0x22, 0x91, 0xb8, 0x11, 876 0x5b, 0xad, 0xcc, 0x45, 0x95, 0x8b, 0x13, 0x8a, 0x2a, 0x17, 0x06, 0x00, 0xb8, 0xc3, 0x9b, 0x34, 877 0xf2, 0x9f, 0x10, 0xa9, 0x58, 0xb0, 0xfb, 0xde, 0x98, 0x6f, 0x35, 0xf0, 0xab, 0x70, 0xbf, 0x2d, 878 0xa2, 0xb1, 0x7a, 0x37, 0x8e, 0x72, 0x25, 0xd0, 0x57, 0x75, 0xe3, 0xbb, 0x1a, 0x30, 0xce, 0xc2, 879 0x54, 0x27, 0x2d, 0x82, 0x61, 0x99, 0x11, 0x79, 0xed, 0x23, 0x76, 0xbc, 0xbc, 0xb2, 0xcb, 0xad, 880 0xbd, 0x2f, 0x80, 0x21, 0x41, 0x01, 0x5f, 0x69, 0x60, 0x58, 0xb5, 0x76, 0x38, 0x9d, 0xfc, 0xbc, 881 0x52, 0x06, 0x89, 0x6e, 0x9e, 0x67, 0x22, 0x85, 0xcc, 0x5b, 0x4f, 0x3f, 0x7c, 0x79, 0x39, 0x70, 882 0x03, 0x2e, 0xa2, 0xd3, 0xc3, 0x6b, 0xbd, 0xd1, 0xc2, 0x8c, 0x11, 0x86, 0xb6, 0xfb, 0xae, 0x62, 883 0x07, 0x39, 0x32, 0x04, 0x43, 0xdb, 0x6a, 0xec, 0xec, 0xc0, 0xe7, 0x1a, 0xc8, 0xcb, 0xc6, 0x0e, 884 0xcb, 0x29, 0xa2, 0x89, 0x51, 0xa1, 0x4f, 0x9f, 0x63, 0xa1, 0xa8, 0x16, 0x04, 0x55, 0x0d, 0xfe, 885 0x9d, 0x9d, 0x8a, 0x49, 0xf9, 0x1e, 0x89, 0x6c, 0xe4, 0xa9, 0x24, 0x89, 0xd1, 0x90, 0x4a, 0x92, 886 0x9c, 0x02, 0xdf, 0x43, 0xd2, 0x96, 0xf2, 0xbb, 0x1a, 0x18, 0x12, 0x9d, 0x1b, 0x96, 0xd2, 0xee, 887 0xa1, 0x6f, 0x12, 0xe8, 0xe5, 0xb3, 0x0d, 0x14, 0xc6, 0xbc, 0xc0, 0xa8, 0x42, 0x74, 0x89, 0x6b, 888 0x12, 0xda, 0xcf, 0x34, 0x50, 0x88, 0x5b, 0x2e, 0x4c, 0xfb, 0x20, 0x4e, 0xb4, 0x7e, 0xfd, 0xb7, 889 0x73, 0x6d, 0x14, 0x4e, 0x55, 0xe0, 0xcc, 0xc1, 0x3f, 0x32, 0xe3, 0xc0, 0x77, 0x1a, 0x18, 0x4b, 890 0x34, 0x4e, 0x38, 0x93, 0xa2, 0x94, 0xd6, 0xfb, 0xf5, 0xca, 0xc5, 0x86, 0x8a, 0xab, 0x2e, 0xb8, 891 0x16, 0xe1, 0xff, 0xd9, 0xd3, 0x24, 0x5b, 0x31, 0xda, 0x56, 0xd3, 0x62, 0x07, 0xba, 0x60, 0x2c, 892 0xd1, 0xd4, 0x52, 0x39, 0xd3, 0x1a, 0x6d, 0x2a, 0x67, 0x6a, 0x7f, 0x34, 0x73, 0x30, 0x04, 0xe3, 893 0xa7, 0x9a, 0x0a, 0x9c, 0x4b, 0x09, 0x70, 0x56, 0x87, 0xd4, 0xff, 0xcc, 0x66, 0x1c, 0x2b, 0xd6, 894 0xeb, 0x7b, 0x87, 0x86, 0xb6, 0x7f, 0x68, 0x68, 0x9f, 0x0f, 0x0d, 0xed, 0xc5, 0x91, 0x91, 0xdb, 895 0x3f, 0x32, 0x72, 0x1f, 0x8f, 0x8c, 0xdc, 0x83, 0xca, 0x85, 0xff, 0x1c, 0x1e, 0xcb, 0x14, 0x3a, 896 0x79, 0xf1, 0xc7, 0xf5, 0x9f, 0xaf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x32, 0x3a, 0x7f, 0x5c, 897 0x0b, 0x00, 0x00, 898 } 899 900 // Reference imports to suppress errors if they are not otherwise used. 901 var _ context.Context 902 var _ grpc.ClientConn 903 904 // This is a compile-time assertion to ensure that this generated file 905 // is compatible with the grpc package it is being compiled against. 906 const _ = grpc.SupportPackageIsVersion4 907 908 // QueryClient is the client API for Query service. 909 // 910 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 911 type QueryClient interface { 912 // Balance queries the number of tokens of a given contract owned by the address. 913 Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) 914 // Supply queries the number of tokens from the given contract id. 915 Supply(ctx context.Context, in *QuerySupplyRequest, opts ...grpc.CallOption) (*QuerySupplyResponse, error) 916 // Minted queries the number of minted tokens from the given contract id. 917 Minted(ctx context.Context, in *QueryMintedRequest, opts ...grpc.CallOption) (*QueryMintedResponse, error) 918 // Burnt queries the number of burnt tokens from the given contract id. 919 Burnt(ctx context.Context, in *QueryBurntRequest, opts ...grpc.CallOption) (*QueryBurntResponse, error) 920 // Contract queries an token metadata based on its contract id. 921 Contract(ctx context.Context, in *QueryContractRequest, opts ...grpc.CallOption) (*QueryContractResponse, error) 922 // GranteeGrants queries permissions on a given grantee. 923 GranteeGrants(ctx context.Context, in *QueryGranteeGrantsRequest, opts ...grpc.CallOption) (*QueryGranteeGrantsResponse, error) 924 // IsOperatorFor queries authorization on a given operator holder pair. 925 IsOperatorFor(ctx context.Context, in *QueryIsOperatorForRequest, opts ...grpc.CallOption) (*QueryIsOperatorForResponse, error) 926 // HoldersByOperator queries holders on a given operator. 927 HoldersByOperator(ctx context.Context, in *QueryHoldersByOperatorRequest, opts ...grpc.CallOption) (*QueryHoldersByOperatorResponse, error) 928 } 929 930 type queryClient struct { 931 cc grpc1.ClientConn 932 } 933 934 func NewQueryClient(cc grpc1.ClientConn) QueryClient { 935 return &queryClient{cc} 936 } 937 938 func (c *queryClient) Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, error) { 939 out := new(QueryBalanceResponse) 940 err := c.cc.Invoke(ctx, "/lbm.token.v1.Query/Balance", in, out, opts...) 941 if err != nil { 942 return nil, err 943 } 944 return out, nil 945 } 946 947 func (c *queryClient) Supply(ctx context.Context, in *QuerySupplyRequest, opts ...grpc.CallOption) (*QuerySupplyResponse, error) { 948 out := new(QuerySupplyResponse) 949 err := c.cc.Invoke(ctx, "/lbm.token.v1.Query/Supply", in, out, opts...) 950 if err != nil { 951 return nil, err 952 } 953 return out, nil 954 } 955 956 func (c *queryClient) Minted(ctx context.Context, in *QueryMintedRequest, opts ...grpc.CallOption) (*QueryMintedResponse, error) { 957 out := new(QueryMintedResponse) 958 err := c.cc.Invoke(ctx, "/lbm.token.v1.Query/Minted", in, out, opts...) 959 if err != nil { 960 return nil, err 961 } 962 return out, nil 963 } 964 965 func (c *queryClient) Burnt(ctx context.Context, in *QueryBurntRequest, opts ...grpc.CallOption) (*QueryBurntResponse, error) { 966 out := new(QueryBurntResponse) 967 err := c.cc.Invoke(ctx, "/lbm.token.v1.Query/Burnt", in, out, opts...) 968 if err != nil { 969 return nil, err 970 } 971 return out, nil 972 } 973 974 func (c *queryClient) Contract(ctx context.Context, in *QueryContractRequest, opts ...grpc.CallOption) (*QueryContractResponse, error) { 975 out := new(QueryContractResponse) 976 err := c.cc.Invoke(ctx, "/lbm.token.v1.Query/Contract", in, out, opts...) 977 if err != nil { 978 return nil, err 979 } 980 return out, nil 981 } 982 983 func (c *queryClient) GranteeGrants(ctx context.Context, in *QueryGranteeGrantsRequest, opts ...grpc.CallOption) (*QueryGranteeGrantsResponse, error) { 984 out := new(QueryGranteeGrantsResponse) 985 err := c.cc.Invoke(ctx, "/lbm.token.v1.Query/GranteeGrants", in, out, opts...) 986 if err != nil { 987 return nil, err 988 } 989 return out, nil 990 } 991 992 func (c *queryClient) IsOperatorFor(ctx context.Context, in *QueryIsOperatorForRequest, opts ...grpc.CallOption) (*QueryIsOperatorForResponse, error) { 993 out := new(QueryIsOperatorForResponse) 994 err := c.cc.Invoke(ctx, "/lbm.token.v1.Query/IsOperatorFor", in, out, opts...) 995 if err != nil { 996 return nil, err 997 } 998 return out, nil 999 } 1000 1001 func (c *queryClient) HoldersByOperator(ctx context.Context, in *QueryHoldersByOperatorRequest, opts ...grpc.CallOption) (*QueryHoldersByOperatorResponse, error) { 1002 out := new(QueryHoldersByOperatorResponse) 1003 err := c.cc.Invoke(ctx, "/lbm.token.v1.Query/HoldersByOperator", in, out, opts...) 1004 if err != nil { 1005 return nil, err 1006 } 1007 return out, nil 1008 } 1009 1010 // QueryServer is the server API for Query service. 1011 type QueryServer interface { 1012 // Balance queries the number of tokens of a given contract owned by the address. 1013 Balance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error) 1014 // Supply queries the number of tokens from the given contract id. 1015 Supply(context.Context, *QuerySupplyRequest) (*QuerySupplyResponse, error) 1016 // Minted queries the number of minted tokens from the given contract id. 1017 Minted(context.Context, *QueryMintedRequest) (*QueryMintedResponse, error) 1018 // Burnt queries the number of burnt tokens from the given contract id. 1019 Burnt(context.Context, *QueryBurntRequest) (*QueryBurntResponse, error) 1020 // Contract queries an token metadata based on its contract id. 1021 Contract(context.Context, *QueryContractRequest) (*QueryContractResponse, error) 1022 // GranteeGrants queries permissions on a given grantee. 1023 GranteeGrants(context.Context, *QueryGranteeGrantsRequest) (*QueryGranteeGrantsResponse, error) 1024 // IsOperatorFor queries authorization on a given operator holder pair. 1025 IsOperatorFor(context.Context, *QueryIsOperatorForRequest) (*QueryIsOperatorForResponse, error) 1026 // HoldersByOperator queries holders on a given operator. 1027 HoldersByOperator(context.Context, *QueryHoldersByOperatorRequest) (*QueryHoldersByOperatorResponse, error) 1028 } 1029 1030 // UnimplementedQueryServer can be embedded to have forward compatible implementations. 1031 type UnimplementedQueryServer struct { 1032 } 1033 1034 func (*UnimplementedQueryServer) Balance(ctx context.Context, req *QueryBalanceRequest) (*QueryBalanceResponse, error) { 1035 return nil, status.Errorf(codes.Unimplemented, "method Balance not implemented") 1036 } 1037 func (*UnimplementedQueryServer) Supply(ctx context.Context, req *QuerySupplyRequest) (*QuerySupplyResponse, error) { 1038 return nil, status.Errorf(codes.Unimplemented, "method Supply not implemented") 1039 } 1040 func (*UnimplementedQueryServer) Minted(ctx context.Context, req *QueryMintedRequest) (*QueryMintedResponse, error) { 1041 return nil, status.Errorf(codes.Unimplemented, "method Minted not implemented") 1042 } 1043 func (*UnimplementedQueryServer) Burnt(ctx context.Context, req *QueryBurntRequest) (*QueryBurntResponse, error) { 1044 return nil, status.Errorf(codes.Unimplemented, "method Burnt not implemented") 1045 } 1046 func (*UnimplementedQueryServer) Contract(ctx context.Context, req *QueryContractRequest) (*QueryContractResponse, error) { 1047 return nil, status.Errorf(codes.Unimplemented, "method Contract not implemented") 1048 } 1049 func (*UnimplementedQueryServer) GranteeGrants(ctx context.Context, req *QueryGranteeGrantsRequest) (*QueryGranteeGrantsResponse, error) { 1050 return nil, status.Errorf(codes.Unimplemented, "method GranteeGrants not implemented") 1051 } 1052 func (*UnimplementedQueryServer) IsOperatorFor(ctx context.Context, req *QueryIsOperatorForRequest) (*QueryIsOperatorForResponse, error) { 1053 return nil, status.Errorf(codes.Unimplemented, "method IsOperatorFor not implemented") 1054 } 1055 func (*UnimplementedQueryServer) HoldersByOperator(ctx context.Context, req *QueryHoldersByOperatorRequest) (*QueryHoldersByOperatorResponse, error) { 1056 return nil, status.Errorf(codes.Unimplemented, "method HoldersByOperator not implemented") 1057 } 1058 1059 func RegisterQueryServer(s grpc1.Server, srv QueryServer) { 1060 s.RegisterService(&_Query_serviceDesc, srv) 1061 } 1062 1063 func _Query_Balance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1064 in := new(QueryBalanceRequest) 1065 if err := dec(in); err != nil { 1066 return nil, err 1067 } 1068 if interceptor == nil { 1069 return srv.(QueryServer).Balance(ctx, in) 1070 } 1071 info := &grpc.UnaryServerInfo{ 1072 Server: srv, 1073 FullMethod: "/lbm.token.v1.Query/Balance", 1074 } 1075 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1076 return srv.(QueryServer).Balance(ctx, req.(*QueryBalanceRequest)) 1077 } 1078 return interceptor(ctx, in, info, handler) 1079 } 1080 1081 func _Query_Supply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1082 in := new(QuerySupplyRequest) 1083 if err := dec(in); err != nil { 1084 return nil, err 1085 } 1086 if interceptor == nil { 1087 return srv.(QueryServer).Supply(ctx, in) 1088 } 1089 info := &grpc.UnaryServerInfo{ 1090 Server: srv, 1091 FullMethod: "/lbm.token.v1.Query/Supply", 1092 } 1093 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1094 return srv.(QueryServer).Supply(ctx, req.(*QuerySupplyRequest)) 1095 } 1096 return interceptor(ctx, in, info, handler) 1097 } 1098 1099 func _Query_Minted_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1100 in := new(QueryMintedRequest) 1101 if err := dec(in); err != nil { 1102 return nil, err 1103 } 1104 if interceptor == nil { 1105 return srv.(QueryServer).Minted(ctx, in) 1106 } 1107 info := &grpc.UnaryServerInfo{ 1108 Server: srv, 1109 FullMethod: "/lbm.token.v1.Query/Minted", 1110 } 1111 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1112 return srv.(QueryServer).Minted(ctx, req.(*QueryMintedRequest)) 1113 } 1114 return interceptor(ctx, in, info, handler) 1115 } 1116 1117 func _Query_Burnt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1118 in := new(QueryBurntRequest) 1119 if err := dec(in); err != nil { 1120 return nil, err 1121 } 1122 if interceptor == nil { 1123 return srv.(QueryServer).Burnt(ctx, in) 1124 } 1125 info := &grpc.UnaryServerInfo{ 1126 Server: srv, 1127 FullMethod: "/lbm.token.v1.Query/Burnt", 1128 } 1129 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1130 return srv.(QueryServer).Burnt(ctx, req.(*QueryBurntRequest)) 1131 } 1132 return interceptor(ctx, in, info, handler) 1133 } 1134 1135 func _Query_Contract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1136 in := new(QueryContractRequest) 1137 if err := dec(in); err != nil { 1138 return nil, err 1139 } 1140 if interceptor == nil { 1141 return srv.(QueryServer).Contract(ctx, in) 1142 } 1143 info := &grpc.UnaryServerInfo{ 1144 Server: srv, 1145 FullMethod: "/lbm.token.v1.Query/Contract", 1146 } 1147 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1148 return srv.(QueryServer).Contract(ctx, req.(*QueryContractRequest)) 1149 } 1150 return interceptor(ctx, in, info, handler) 1151 } 1152 1153 func _Query_GranteeGrants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1154 in := new(QueryGranteeGrantsRequest) 1155 if err := dec(in); err != nil { 1156 return nil, err 1157 } 1158 if interceptor == nil { 1159 return srv.(QueryServer).GranteeGrants(ctx, in) 1160 } 1161 info := &grpc.UnaryServerInfo{ 1162 Server: srv, 1163 FullMethod: "/lbm.token.v1.Query/GranteeGrants", 1164 } 1165 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1166 return srv.(QueryServer).GranteeGrants(ctx, req.(*QueryGranteeGrantsRequest)) 1167 } 1168 return interceptor(ctx, in, info, handler) 1169 } 1170 1171 func _Query_IsOperatorFor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1172 in := new(QueryIsOperatorForRequest) 1173 if err := dec(in); err != nil { 1174 return nil, err 1175 } 1176 if interceptor == nil { 1177 return srv.(QueryServer).IsOperatorFor(ctx, in) 1178 } 1179 info := &grpc.UnaryServerInfo{ 1180 Server: srv, 1181 FullMethod: "/lbm.token.v1.Query/IsOperatorFor", 1182 } 1183 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1184 return srv.(QueryServer).IsOperatorFor(ctx, req.(*QueryIsOperatorForRequest)) 1185 } 1186 return interceptor(ctx, in, info, handler) 1187 } 1188 1189 func _Query_HoldersByOperator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1190 in := new(QueryHoldersByOperatorRequest) 1191 if err := dec(in); err != nil { 1192 return nil, err 1193 } 1194 if interceptor == nil { 1195 return srv.(QueryServer).HoldersByOperator(ctx, in) 1196 } 1197 info := &grpc.UnaryServerInfo{ 1198 Server: srv, 1199 FullMethod: "/lbm.token.v1.Query/HoldersByOperator", 1200 } 1201 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1202 return srv.(QueryServer).HoldersByOperator(ctx, req.(*QueryHoldersByOperatorRequest)) 1203 } 1204 return interceptor(ctx, in, info, handler) 1205 } 1206 1207 var _Query_serviceDesc = grpc.ServiceDesc{ 1208 ServiceName: "lbm.token.v1.Query", 1209 HandlerType: (*QueryServer)(nil), 1210 Methods: []grpc.MethodDesc{ 1211 { 1212 MethodName: "Balance", 1213 Handler: _Query_Balance_Handler, 1214 }, 1215 { 1216 MethodName: "Supply", 1217 Handler: _Query_Supply_Handler, 1218 }, 1219 { 1220 MethodName: "Minted", 1221 Handler: _Query_Minted_Handler, 1222 }, 1223 { 1224 MethodName: "Burnt", 1225 Handler: _Query_Burnt_Handler, 1226 }, 1227 { 1228 MethodName: "Contract", 1229 Handler: _Query_Contract_Handler, 1230 }, 1231 { 1232 MethodName: "GranteeGrants", 1233 Handler: _Query_GranteeGrants_Handler, 1234 }, 1235 { 1236 MethodName: "IsOperatorFor", 1237 Handler: _Query_IsOperatorFor_Handler, 1238 }, 1239 { 1240 MethodName: "HoldersByOperator", 1241 Handler: _Query_HoldersByOperator_Handler, 1242 }, 1243 }, 1244 Streams: []grpc.StreamDesc{}, 1245 Metadata: "lbm/token/v1/query.proto", 1246 } 1247 1248 func (m *QueryBalanceRequest) Marshal() (dAtA []byte, err error) { 1249 size := m.Size() 1250 dAtA = make([]byte, size) 1251 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1252 if err != nil { 1253 return nil, err 1254 } 1255 return dAtA[:n], nil 1256 } 1257 1258 func (m *QueryBalanceRequest) MarshalTo(dAtA []byte) (int, error) { 1259 size := m.Size() 1260 return m.MarshalToSizedBuffer(dAtA[:size]) 1261 } 1262 1263 func (m *QueryBalanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1264 i := len(dAtA) 1265 _ = i 1266 var l int 1267 _ = l 1268 if len(m.Address) > 0 { 1269 i -= len(m.Address) 1270 copy(dAtA[i:], m.Address) 1271 i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) 1272 i-- 1273 dAtA[i] = 0x12 1274 } 1275 if len(m.ContractId) > 0 { 1276 i -= len(m.ContractId) 1277 copy(dAtA[i:], m.ContractId) 1278 i = encodeVarintQuery(dAtA, i, uint64(len(m.ContractId))) 1279 i-- 1280 dAtA[i] = 0xa 1281 } 1282 return len(dAtA) - i, nil 1283 } 1284 1285 func (m *QueryBalanceResponse) Marshal() (dAtA []byte, err error) { 1286 size := m.Size() 1287 dAtA = make([]byte, size) 1288 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1289 if err != nil { 1290 return nil, err 1291 } 1292 return dAtA[:n], nil 1293 } 1294 1295 func (m *QueryBalanceResponse) MarshalTo(dAtA []byte) (int, error) { 1296 size := m.Size() 1297 return m.MarshalToSizedBuffer(dAtA[:size]) 1298 } 1299 1300 func (m *QueryBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1301 i := len(dAtA) 1302 _ = i 1303 var l int 1304 _ = l 1305 { 1306 size := m.Amount.Size() 1307 i -= size 1308 if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { 1309 return 0, err 1310 } 1311 i = encodeVarintQuery(dAtA, i, uint64(size)) 1312 } 1313 i-- 1314 dAtA[i] = 0xa 1315 return len(dAtA) - i, nil 1316 } 1317 1318 func (m *QuerySupplyRequest) Marshal() (dAtA []byte, err error) { 1319 size := m.Size() 1320 dAtA = make([]byte, size) 1321 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1322 if err != nil { 1323 return nil, err 1324 } 1325 return dAtA[:n], nil 1326 } 1327 1328 func (m *QuerySupplyRequest) MarshalTo(dAtA []byte) (int, error) { 1329 size := m.Size() 1330 return m.MarshalToSizedBuffer(dAtA[:size]) 1331 } 1332 1333 func (m *QuerySupplyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1334 i := len(dAtA) 1335 _ = i 1336 var l int 1337 _ = l 1338 if len(m.ContractId) > 0 { 1339 i -= len(m.ContractId) 1340 copy(dAtA[i:], m.ContractId) 1341 i = encodeVarintQuery(dAtA, i, uint64(len(m.ContractId))) 1342 i-- 1343 dAtA[i] = 0xa 1344 } 1345 return len(dAtA) - i, nil 1346 } 1347 1348 func (m *QuerySupplyResponse) Marshal() (dAtA []byte, err error) { 1349 size := m.Size() 1350 dAtA = make([]byte, size) 1351 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1352 if err != nil { 1353 return nil, err 1354 } 1355 return dAtA[:n], nil 1356 } 1357 1358 func (m *QuerySupplyResponse) MarshalTo(dAtA []byte) (int, error) { 1359 size := m.Size() 1360 return m.MarshalToSizedBuffer(dAtA[:size]) 1361 } 1362 1363 func (m *QuerySupplyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1364 i := len(dAtA) 1365 _ = i 1366 var l int 1367 _ = l 1368 { 1369 size := m.Amount.Size() 1370 i -= size 1371 if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { 1372 return 0, err 1373 } 1374 i = encodeVarintQuery(dAtA, i, uint64(size)) 1375 } 1376 i-- 1377 dAtA[i] = 0xa 1378 return len(dAtA) - i, nil 1379 } 1380 1381 func (m *QueryMintedRequest) Marshal() (dAtA []byte, err error) { 1382 size := m.Size() 1383 dAtA = make([]byte, size) 1384 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1385 if err != nil { 1386 return nil, err 1387 } 1388 return dAtA[:n], nil 1389 } 1390 1391 func (m *QueryMintedRequest) MarshalTo(dAtA []byte) (int, error) { 1392 size := m.Size() 1393 return m.MarshalToSizedBuffer(dAtA[:size]) 1394 } 1395 1396 func (m *QueryMintedRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1397 i := len(dAtA) 1398 _ = i 1399 var l int 1400 _ = l 1401 if len(m.ContractId) > 0 { 1402 i -= len(m.ContractId) 1403 copy(dAtA[i:], m.ContractId) 1404 i = encodeVarintQuery(dAtA, i, uint64(len(m.ContractId))) 1405 i-- 1406 dAtA[i] = 0xa 1407 } 1408 return len(dAtA) - i, nil 1409 } 1410 1411 func (m *QueryMintedResponse) Marshal() (dAtA []byte, err error) { 1412 size := m.Size() 1413 dAtA = make([]byte, size) 1414 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1415 if err != nil { 1416 return nil, err 1417 } 1418 return dAtA[:n], nil 1419 } 1420 1421 func (m *QueryMintedResponse) MarshalTo(dAtA []byte) (int, error) { 1422 size := m.Size() 1423 return m.MarshalToSizedBuffer(dAtA[:size]) 1424 } 1425 1426 func (m *QueryMintedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1427 i := len(dAtA) 1428 _ = i 1429 var l int 1430 _ = l 1431 { 1432 size := m.Amount.Size() 1433 i -= size 1434 if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { 1435 return 0, err 1436 } 1437 i = encodeVarintQuery(dAtA, i, uint64(size)) 1438 } 1439 i-- 1440 dAtA[i] = 0xa 1441 return len(dAtA) - i, nil 1442 } 1443 1444 func (m *QueryBurntRequest) Marshal() (dAtA []byte, err error) { 1445 size := m.Size() 1446 dAtA = make([]byte, size) 1447 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1448 if err != nil { 1449 return nil, err 1450 } 1451 return dAtA[:n], nil 1452 } 1453 1454 func (m *QueryBurntRequest) MarshalTo(dAtA []byte) (int, error) { 1455 size := m.Size() 1456 return m.MarshalToSizedBuffer(dAtA[:size]) 1457 } 1458 1459 func (m *QueryBurntRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1460 i := len(dAtA) 1461 _ = i 1462 var l int 1463 _ = l 1464 if len(m.ContractId) > 0 { 1465 i -= len(m.ContractId) 1466 copy(dAtA[i:], m.ContractId) 1467 i = encodeVarintQuery(dAtA, i, uint64(len(m.ContractId))) 1468 i-- 1469 dAtA[i] = 0xa 1470 } 1471 return len(dAtA) - i, nil 1472 } 1473 1474 func (m *QueryBurntResponse) Marshal() (dAtA []byte, err error) { 1475 size := m.Size() 1476 dAtA = make([]byte, size) 1477 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1478 if err != nil { 1479 return nil, err 1480 } 1481 return dAtA[:n], nil 1482 } 1483 1484 func (m *QueryBurntResponse) MarshalTo(dAtA []byte) (int, error) { 1485 size := m.Size() 1486 return m.MarshalToSizedBuffer(dAtA[:size]) 1487 } 1488 1489 func (m *QueryBurntResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1490 i := len(dAtA) 1491 _ = i 1492 var l int 1493 _ = l 1494 { 1495 size := m.Amount.Size() 1496 i -= size 1497 if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { 1498 return 0, err 1499 } 1500 i = encodeVarintQuery(dAtA, i, uint64(size)) 1501 } 1502 i-- 1503 dAtA[i] = 0xa 1504 return len(dAtA) - i, nil 1505 } 1506 1507 func (m *QueryContractRequest) Marshal() (dAtA []byte, err error) { 1508 size := m.Size() 1509 dAtA = make([]byte, size) 1510 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1511 if err != nil { 1512 return nil, err 1513 } 1514 return dAtA[:n], nil 1515 } 1516 1517 func (m *QueryContractRequest) MarshalTo(dAtA []byte) (int, error) { 1518 size := m.Size() 1519 return m.MarshalToSizedBuffer(dAtA[:size]) 1520 } 1521 1522 func (m *QueryContractRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1523 i := len(dAtA) 1524 _ = i 1525 var l int 1526 _ = l 1527 if len(m.ContractId) > 0 { 1528 i -= len(m.ContractId) 1529 copy(dAtA[i:], m.ContractId) 1530 i = encodeVarintQuery(dAtA, i, uint64(len(m.ContractId))) 1531 i-- 1532 dAtA[i] = 0xa 1533 } 1534 return len(dAtA) - i, nil 1535 } 1536 1537 func (m *QueryContractResponse) Marshal() (dAtA []byte, err error) { 1538 size := m.Size() 1539 dAtA = make([]byte, size) 1540 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1541 if err != nil { 1542 return nil, err 1543 } 1544 return dAtA[:n], nil 1545 } 1546 1547 func (m *QueryContractResponse) MarshalTo(dAtA []byte) (int, error) { 1548 size := m.Size() 1549 return m.MarshalToSizedBuffer(dAtA[:size]) 1550 } 1551 1552 func (m *QueryContractResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1553 i := len(dAtA) 1554 _ = i 1555 var l int 1556 _ = l 1557 { 1558 size, err := m.Contract.MarshalToSizedBuffer(dAtA[:i]) 1559 if err != nil { 1560 return 0, err 1561 } 1562 i -= size 1563 i = encodeVarintQuery(dAtA, i, uint64(size)) 1564 } 1565 i-- 1566 dAtA[i] = 0xa 1567 return len(dAtA) - i, nil 1568 } 1569 1570 func (m *QueryGranteeGrantsRequest) Marshal() (dAtA []byte, err error) { 1571 size := m.Size() 1572 dAtA = make([]byte, size) 1573 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1574 if err != nil { 1575 return nil, err 1576 } 1577 return dAtA[:n], nil 1578 } 1579 1580 func (m *QueryGranteeGrantsRequest) MarshalTo(dAtA []byte) (int, error) { 1581 size := m.Size() 1582 return m.MarshalToSizedBuffer(dAtA[:size]) 1583 } 1584 1585 func (m *QueryGranteeGrantsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1586 i := len(dAtA) 1587 _ = i 1588 var l int 1589 _ = l 1590 if m.Pagination != nil { 1591 { 1592 size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) 1593 if err != nil { 1594 return 0, err 1595 } 1596 i -= size 1597 i = encodeVarintQuery(dAtA, i, uint64(size)) 1598 } 1599 i-- 1600 dAtA[i] = 0x1a 1601 } 1602 if len(m.Grantee) > 0 { 1603 i -= len(m.Grantee) 1604 copy(dAtA[i:], m.Grantee) 1605 i = encodeVarintQuery(dAtA, i, uint64(len(m.Grantee))) 1606 i-- 1607 dAtA[i] = 0x12 1608 } 1609 if len(m.ContractId) > 0 { 1610 i -= len(m.ContractId) 1611 copy(dAtA[i:], m.ContractId) 1612 i = encodeVarintQuery(dAtA, i, uint64(len(m.ContractId))) 1613 i-- 1614 dAtA[i] = 0xa 1615 } 1616 return len(dAtA) - i, nil 1617 } 1618 1619 func (m *QueryGranteeGrantsResponse) Marshal() (dAtA []byte, err error) { 1620 size := m.Size() 1621 dAtA = make([]byte, size) 1622 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1623 if err != nil { 1624 return nil, err 1625 } 1626 return dAtA[:n], nil 1627 } 1628 1629 func (m *QueryGranteeGrantsResponse) MarshalTo(dAtA []byte) (int, error) { 1630 size := m.Size() 1631 return m.MarshalToSizedBuffer(dAtA[:size]) 1632 } 1633 1634 func (m *QueryGranteeGrantsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1635 i := len(dAtA) 1636 _ = i 1637 var l int 1638 _ = l 1639 if m.Pagination != nil { 1640 { 1641 size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) 1642 if err != nil { 1643 return 0, err 1644 } 1645 i -= size 1646 i = encodeVarintQuery(dAtA, i, uint64(size)) 1647 } 1648 i-- 1649 dAtA[i] = 0x12 1650 } 1651 if len(m.Grants) > 0 { 1652 for iNdEx := len(m.Grants) - 1; iNdEx >= 0; iNdEx-- { 1653 { 1654 size, err := m.Grants[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1655 if err != nil { 1656 return 0, err 1657 } 1658 i -= size 1659 i = encodeVarintQuery(dAtA, i, uint64(size)) 1660 } 1661 i-- 1662 dAtA[i] = 0xa 1663 } 1664 } 1665 return len(dAtA) - i, nil 1666 } 1667 1668 func (m *QueryIsOperatorForRequest) Marshal() (dAtA []byte, err error) { 1669 size := m.Size() 1670 dAtA = make([]byte, size) 1671 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1672 if err != nil { 1673 return nil, err 1674 } 1675 return dAtA[:n], nil 1676 } 1677 1678 func (m *QueryIsOperatorForRequest) MarshalTo(dAtA []byte) (int, error) { 1679 size := m.Size() 1680 return m.MarshalToSizedBuffer(dAtA[:size]) 1681 } 1682 1683 func (m *QueryIsOperatorForRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1684 i := len(dAtA) 1685 _ = i 1686 var l int 1687 _ = l 1688 if len(m.Holder) > 0 { 1689 i -= len(m.Holder) 1690 copy(dAtA[i:], m.Holder) 1691 i = encodeVarintQuery(dAtA, i, uint64(len(m.Holder))) 1692 i-- 1693 dAtA[i] = 0x1a 1694 } 1695 if len(m.Operator) > 0 { 1696 i -= len(m.Operator) 1697 copy(dAtA[i:], m.Operator) 1698 i = encodeVarintQuery(dAtA, i, uint64(len(m.Operator))) 1699 i-- 1700 dAtA[i] = 0x12 1701 } 1702 if len(m.ContractId) > 0 { 1703 i -= len(m.ContractId) 1704 copy(dAtA[i:], m.ContractId) 1705 i = encodeVarintQuery(dAtA, i, uint64(len(m.ContractId))) 1706 i-- 1707 dAtA[i] = 0xa 1708 } 1709 return len(dAtA) - i, nil 1710 } 1711 1712 func (m *QueryIsOperatorForResponse) Marshal() (dAtA []byte, err error) { 1713 size := m.Size() 1714 dAtA = make([]byte, size) 1715 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1716 if err != nil { 1717 return nil, err 1718 } 1719 return dAtA[:n], nil 1720 } 1721 1722 func (m *QueryIsOperatorForResponse) MarshalTo(dAtA []byte) (int, error) { 1723 size := m.Size() 1724 return m.MarshalToSizedBuffer(dAtA[:size]) 1725 } 1726 1727 func (m *QueryIsOperatorForResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1728 i := len(dAtA) 1729 _ = i 1730 var l int 1731 _ = l 1732 if m.Authorized { 1733 i-- 1734 if m.Authorized { 1735 dAtA[i] = 1 1736 } else { 1737 dAtA[i] = 0 1738 } 1739 i-- 1740 dAtA[i] = 0x8 1741 } 1742 return len(dAtA) - i, nil 1743 } 1744 1745 func (m *QueryHoldersByOperatorRequest) Marshal() (dAtA []byte, err error) { 1746 size := m.Size() 1747 dAtA = make([]byte, size) 1748 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1749 if err != nil { 1750 return nil, err 1751 } 1752 return dAtA[:n], nil 1753 } 1754 1755 func (m *QueryHoldersByOperatorRequest) MarshalTo(dAtA []byte) (int, error) { 1756 size := m.Size() 1757 return m.MarshalToSizedBuffer(dAtA[:size]) 1758 } 1759 1760 func (m *QueryHoldersByOperatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1761 i := len(dAtA) 1762 _ = i 1763 var l int 1764 _ = l 1765 if m.Pagination != nil { 1766 { 1767 size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) 1768 if err != nil { 1769 return 0, err 1770 } 1771 i -= size 1772 i = encodeVarintQuery(dAtA, i, uint64(size)) 1773 } 1774 i-- 1775 dAtA[i] = 0x1a 1776 } 1777 if len(m.Operator) > 0 { 1778 i -= len(m.Operator) 1779 copy(dAtA[i:], m.Operator) 1780 i = encodeVarintQuery(dAtA, i, uint64(len(m.Operator))) 1781 i-- 1782 dAtA[i] = 0x12 1783 } 1784 if len(m.ContractId) > 0 { 1785 i -= len(m.ContractId) 1786 copy(dAtA[i:], m.ContractId) 1787 i = encodeVarintQuery(dAtA, i, uint64(len(m.ContractId))) 1788 i-- 1789 dAtA[i] = 0xa 1790 } 1791 return len(dAtA) - i, nil 1792 } 1793 1794 func (m *QueryHoldersByOperatorResponse) Marshal() (dAtA []byte, err error) { 1795 size := m.Size() 1796 dAtA = make([]byte, size) 1797 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1798 if err != nil { 1799 return nil, err 1800 } 1801 return dAtA[:n], nil 1802 } 1803 1804 func (m *QueryHoldersByOperatorResponse) MarshalTo(dAtA []byte) (int, error) { 1805 size := m.Size() 1806 return m.MarshalToSizedBuffer(dAtA[:size]) 1807 } 1808 1809 func (m *QueryHoldersByOperatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1810 i := len(dAtA) 1811 _ = i 1812 var l int 1813 _ = l 1814 if m.Pagination != nil { 1815 { 1816 size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) 1817 if err != nil { 1818 return 0, err 1819 } 1820 i -= size 1821 i = encodeVarintQuery(dAtA, i, uint64(size)) 1822 } 1823 i-- 1824 dAtA[i] = 0x12 1825 } 1826 if len(m.Holders) > 0 { 1827 for iNdEx := len(m.Holders) - 1; iNdEx >= 0; iNdEx-- { 1828 i -= len(m.Holders[iNdEx]) 1829 copy(dAtA[i:], m.Holders[iNdEx]) 1830 i = encodeVarintQuery(dAtA, i, uint64(len(m.Holders[iNdEx]))) 1831 i-- 1832 dAtA[i] = 0xa 1833 } 1834 } 1835 return len(dAtA) - i, nil 1836 } 1837 1838 func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { 1839 offset -= sovQuery(v) 1840 base := offset 1841 for v >= 1<<7 { 1842 dAtA[offset] = uint8(v&0x7f | 0x80) 1843 v >>= 7 1844 offset++ 1845 } 1846 dAtA[offset] = uint8(v) 1847 return base 1848 } 1849 func (m *QueryBalanceRequest) Size() (n int) { 1850 if m == nil { 1851 return 0 1852 } 1853 var l int 1854 _ = l 1855 l = len(m.ContractId) 1856 if l > 0 { 1857 n += 1 + l + sovQuery(uint64(l)) 1858 } 1859 l = len(m.Address) 1860 if l > 0 { 1861 n += 1 + l + sovQuery(uint64(l)) 1862 } 1863 return n 1864 } 1865 1866 func (m *QueryBalanceResponse) Size() (n int) { 1867 if m == nil { 1868 return 0 1869 } 1870 var l int 1871 _ = l 1872 l = m.Amount.Size() 1873 n += 1 + l + sovQuery(uint64(l)) 1874 return n 1875 } 1876 1877 func (m *QuerySupplyRequest) Size() (n int) { 1878 if m == nil { 1879 return 0 1880 } 1881 var l int 1882 _ = l 1883 l = len(m.ContractId) 1884 if l > 0 { 1885 n += 1 + l + sovQuery(uint64(l)) 1886 } 1887 return n 1888 } 1889 1890 func (m *QuerySupplyResponse) Size() (n int) { 1891 if m == nil { 1892 return 0 1893 } 1894 var l int 1895 _ = l 1896 l = m.Amount.Size() 1897 n += 1 + l + sovQuery(uint64(l)) 1898 return n 1899 } 1900 1901 func (m *QueryMintedRequest) Size() (n int) { 1902 if m == nil { 1903 return 0 1904 } 1905 var l int 1906 _ = l 1907 l = len(m.ContractId) 1908 if l > 0 { 1909 n += 1 + l + sovQuery(uint64(l)) 1910 } 1911 return n 1912 } 1913 1914 func (m *QueryMintedResponse) Size() (n int) { 1915 if m == nil { 1916 return 0 1917 } 1918 var l int 1919 _ = l 1920 l = m.Amount.Size() 1921 n += 1 + l + sovQuery(uint64(l)) 1922 return n 1923 } 1924 1925 func (m *QueryBurntRequest) Size() (n int) { 1926 if m == nil { 1927 return 0 1928 } 1929 var l int 1930 _ = l 1931 l = len(m.ContractId) 1932 if l > 0 { 1933 n += 1 + l + sovQuery(uint64(l)) 1934 } 1935 return n 1936 } 1937 1938 func (m *QueryBurntResponse) Size() (n int) { 1939 if m == nil { 1940 return 0 1941 } 1942 var l int 1943 _ = l 1944 l = m.Amount.Size() 1945 n += 1 + l + sovQuery(uint64(l)) 1946 return n 1947 } 1948 1949 func (m *QueryContractRequest) Size() (n int) { 1950 if m == nil { 1951 return 0 1952 } 1953 var l int 1954 _ = l 1955 l = len(m.ContractId) 1956 if l > 0 { 1957 n += 1 + l + sovQuery(uint64(l)) 1958 } 1959 return n 1960 } 1961 1962 func (m *QueryContractResponse) Size() (n int) { 1963 if m == nil { 1964 return 0 1965 } 1966 var l int 1967 _ = l 1968 l = m.Contract.Size() 1969 n += 1 + l + sovQuery(uint64(l)) 1970 return n 1971 } 1972 1973 func (m *QueryGranteeGrantsRequest) Size() (n int) { 1974 if m == nil { 1975 return 0 1976 } 1977 var l int 1978 _ = l 1979 l = len(m.ContractId) 1980 if l > 0 { 1981 n += 1 + l + sovQuery(uint64(l)) 1982 } 1983 l = len(m.Grantee) 1984 if l > 0 { 1985 n += 1 + l + sovQuery(uint64(l)) 1986 } 1987 if m.Pagination != nil { 1988 l = m.Pagination.Size() 1989 n += 1 + l + sovQuery(uint64(l)) 1990 } 1991 return n 1992 } 1993 1994 func (m *QueryGranteeGrantsResponse) Size() (n int) { 1995 if m == nil { 1996 return 0 1997 } 1998 var l int 1999 _ = l 2000 if len(m.Grants) > 0 { 2001 for _, e := range m.Grants { 2002 l = e.Size() 2003 n += 1 + l + sovQuery(uint64(l)) 2004 } 2005 } 2006 if m.Pagination != nil { 2007 l = m.Pagination.Size() 2008 n += 1 + l + sovQuery(uint64(l)) 2009 } 2010 return n 2011 } 2012 2013 func (m *QueryIsOperatorForRequest) Size() (n int) { 2014 if m == nil { 2015 return 0 2016 } 2017 var l int 2018 _ = l 2019 l = len(m.ContractId) 2020 if l > 0 { 2021 n += 1 + l + sovQuery(uint64(l)) 2022 } 2023 l = len(m.Operator) 2024 if l > 0 { 2025 n += 1 + l + sovQuery(uint64(l)) 2026 } 2027 l = len(m.Holder) 2028 if l > 0 { 2029 n += 1 + l + sovQuery(uint64(l)) 2030 } 2031 return n 2032 } 2033 2034 func (m *QueryIsOperatorForResponse) Size() (n int) { 2035 if m == nil { 2036 return 0 2037 } 2038 var l int 2039 _ = l 2040 if m.Authorized { 2041 n += 2 2042 } 2043 return n 2044 } 2045 2046 func (m *QueryHoldersByOperatorRequest) Size() (n int) { 2047 if m == nil { 2048 return 0 2049 } 2050 var l int 2051 _ = l 2052 l = len(m.ContractId) 2053 if l > 0 { 2054 n += 1 + l + sovQuery(uint64(l)) 2055 } 2056 l = len(m.Operator) 2057 if l > 0 { 2058 n += 1 + l + sovQuery(uint64(l)) 2059 } 2060 if m.Pagination != nil { 2061 l = m.Pagination.Size() 2062 n += 1 + l + sovQuery(uint64(l)) 2063 } 2064 return n 2065 } 2066 2067 func (m *QueryHoldersByOperatorResponse) Size() (n int) { 2068 if m == nil { 2069 return 0 2070 } 2071 var l int 2072 _ = l 2073 if len(m.Holders) > 0 { 2074 for _, s := range m.Holders { 2075 l = len(s) 2076 n += 1 + l + sovQuery(uint64(l)) 2077 } 2078 } 2079 if m.Pagination != nil { 2080 l = m.Pagination.Size() 2081 n += 1 + l + sovQuery(uint64(l)) 2082 } 2083 return n 2084 } 2085 2086 func sovQuery(x uint64) (n int) { 2087 return (math_bits.Len64(x|1) + 6) / 7 2088 } 2089 func sozQuery(x uint64) (n int) { 2090 return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 2091 } 2092 func (m *QueryBalanceRequest) Unmarshal(dAtA []byte) error { 2093 l := len(dAtA) 2094 iNdEx := 0 2095 for iNdEx < l { 2096 preIndex := iNdEx 2097 var wire uint64 2098 for shift := uint(0); ; shift += 7 { 2099 if shift >= 64 { 2100 return ErrIntOverflowQuery 2101 } 2102 if iNdEx >= l { 2103 return io.ErrUnexpectedEOF 2104 } 2105 b := dAtA[iNdEx] 2106 iNdEx++ 2107 wire |= uint64(b&0x7F) << shift 2108 if b < 0x80 { 2109 break 2110 } 2111 } 2112 fieldNum := int32(wire >> 3) 2113 wireType := int(wire & 0x7) 2114 if wireType == 4 { 2115 return fmt.Errorf("proto: QueryBalanceRequest: wiretype end group for non-group") 2116 } 2117 if fieldNum <= 0 { 2118 return fmt.Errorf("proto: QueryBalanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2119 } 2120 switch fieldNum { 2121 case 1: 2122 if wireType != 2 { 2123 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 2124 } 2125 var stringLen uint64 2126 for shift := uint(0); ; shift += 7 { 2127 if shift >= 64 { 2128 return ErrIntOverflowQuery 2129 } 2130 if iNdEx >= l { 2131 return io.ErrUnexpectedEOF 2132 } 2133 b := dAtA[iNdEx] 2134 iNdEx++ 2135 stringLen |= uint64(b&0x7F) << shift 2136 if b < 0x80 { 2137 break 2138 } 2139 } 2140 intStringLen := int(stringLen) 2141 if intStringLen < 0 { 2142 return ErrInvalidLengthQuery 2143 } 2144 postIndex := iNdEx + intStringLen 2145 if postIndex < 0 { 2146 return ErrInvalidLengthQuery 2147 } 2148 if postIndex > l { 2149 return io.ErrUnexpectedEOF 2150 } 2151 m.ContractId = string(dAtA[iNdEx:postIndex]) 2152 iNdEx = postIndex 2153 case 2: 2154 if wireType != 2 { 2155 return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) 2156 } 2157 var stringLen uint64 2158 for shift := uint(0); ; shift += 7 { 2159 if shift >= 64 { 2160 return ErrIntOverflowQuery 2161 } 2162 if iNdEx >= l { 2163 return io.ErrUnexpectedEOF 2164 } 2165 b := dAtA[iNdEx] 2166 iNdEx++ 2167 stringLen |= uint64(b&0x7F) << shift 2168 if b < 0x80 { 2169 break 2170 } 2171 } 2172 intStringLen := int(stringLen) 2173 if intStringLen < 0 { 2174 return ErrInvalidLengthQuery 2175 } 2176 postIndex := iNdEx + intStringLen 2177 if postIndex < 0 { 2178 return ErrInvalidLengthQuery 2179 } 2180 if postIndex > l { 2181 return io.ErrUnexpectedEOF 2182 } 2183 m.Address = string(dAtA[iNdEx:postIndex]) 2184 iNdEx = postIndex 2185 default: 2186 iNdEx = preIndex 2187 skippy, err := skipQuery(dAtA[iNdEx:]) 2188 if err != nil { 2189 return err 2190 } 2191 if (skippy < 0) || (iNdEx+skippy) < 0 { 2192 return ErrInvalidLengthQuery 2193 } 2194 if (iNdEx + skippy) > l { 2195 return io.ErrUnexpectedEOF 2196 } 2197 iNdEx += skippy 2198 } 2199 } 2200 2201 if iNdEx > l { 2202 return io.ErrUnexpectedEOF 2203 } 2204 return nil 2205 } 2206 func (m *QueryBalanceResponse) Unmarshal(dAtA []byte) error { 2207 l := len(dAtA) 2208 iNdEx := 0 2209 for iNdEx < l { 2210 preIndex := iNdEx 2211 var wire uint64 2212 for shift := uint(0); ; shift += 7 { 2213 if shift >= 64 { 2214 return ErrIntOverflowQuery 2215 } 2216 if iNdEx >= l { 2217 return io.ErrUnexpectedEOF 2218 } 2219 b := dAtA[iNdEx] 2220 iNdEx++ 2221 wire |= uint64(b&0x7F) << shift 2222 if b < 0x80 { 2223 break 2224 } 2225 } 2226 fieldNum := int32(wire >> 3) 2227 wireType := int(wire & 0x7) 2228 if wireType == 4 { 2229 return fmt.Errorf("proto: QueryBalanceResponse: wiretype end group for non-group") 2230 } 2231 if fieldNum <= 0 { 2232 return fmt.Errorf("proto: QueryBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2233 } 2234 switch fieldNum { 2235 case 1: 2236 if wireType != 2 { 2237 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 2238 } 2239 var stringLen uint64 2240 for shift := uint(0); ; shift += 7 { 2241 if shift >= 64 { 2242 return ErrIntOverflowQuery 2243 } 2244 if iNdEx >= l { 2245 return io.ErrUnexpectedEOF 2246 } 2247 b := dAtA[iNdEx] 2248 iNdEx++ 2249 stringLen |= uint64(b&0x7F) << shift 2250 if b < 0x80 { 2251 break 2252 } 2253 } 2254 intStringLen := int(stringLen) 2255 if intStringLen < 0 { 2256 return ErrInvalidLengthQuery 2257 } 2258 postIndex := iNdEx + intStringLen 2259 if postIndex < 0 { 2260 return ErrInvalidLengthQuery 2261 } 2262 if postIndex > l { 2263 return io.ErrUnexpectedEOF 2264 } 2265 if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2266 return err 2267 } 2268 iNdEx = postIndex 2269 default: 2270 iNdEx = preIndex 2271 skippy, err := skipQuery(dAtA[iNdEx:]) 2272 if err != nil { 2273 return err 2274 } 2275 if (skippy < 0) || (iNdEx+skippy) < 0 { 2276 return ErrInvalidLengthQuery 2277 } 2278 if (iNdEx + skippy) > l { 2279 return io.ErrUnexpectedEOF 2280 } 2281 iNdEx += skippy 2282 } 2283 } 2284 2285 if iNdEx > l { 2286 return io.ErrUnexpectedEOF 2287 } 2288 return nil 2289 } 2290 func (m *QuerySupplyRequest) Unmarshal(dAtA []byte) error { 2291 l := len(dAtA) 2292 iNdEx := 0 2293 for iNdEx < l { 2294 preIndex := iNdEx 2295 var wire uint64 2296 for shift := uint(0); ; shift += 7 { 2297 if shift >= 64 { 2298 return ErrIntOverflowQuery 2299 } 2300 if iNdEx >= l { 2301 return io.ErrUnexpectedEOF 2302 } 2303 b := dAtA[iNdEx] 2304 iNdEx++ 2305 wire |= uint64(b&0x7F) << shift 2306 if b < 0x80 { 2307 break 2308 } 2309 } 2310 fieldNum := int32(wire >> 3) 2311 wireType := int(wire & 0x7) 2312 if wireType == 4 { 2313 return fmt.Errorf("proto: QuerySupplyRequest: wiretype end group for non-group") 2314 } 2315 if fieldNum <= 0 { 2316 return fmt.Errorf("proto: QuerySupplyRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2317 } 2318 switch fieldNum { 2319 case 1: 2320 if wireType != 2 { 2321 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 2322 } 2323 var stringLen uint64 2324 for shift := uint(0); ; shift += 7 { 2325 if shift >= 64 { 2326 return ErrIntOverflowQuery 2327 } 2328 if iNdEx >= l { 2329 return io.ErrUnexpectedEOF 2330 } 2331 b := dAtA[iNdEx] 2332 iNdEx++ 2333 stringLen |= uint64(b&0x7F) << shift 2334 if b < 0x80 { 2335 break 2336 } 2337 } 2338 intStringLen := int(stringLen) 2339 if intStringLen < 0 { 2340 return ErrInvalidLengthQuery 2341 } 2342 postIndex := iNdEx + intStringLen 2343 if postIndex < 0 { 2344 return ErrInvalidLengthQuery 2345 } 2346 if postIndex > l { 2347 return io.ErrUnexpectedEOF 2348 } 2349 m.ContractId = string(dAtA[iNdEx:postIndex]) 2350 iNdEx = postIndex 2351 default: 2352 iNdEx = preIndex 2353 skippy, err := skipQuery(dAtA[iNdEx:]) 2354 if err != nil { 2355 return err 2356 } 2357 if (skippy < 0) || (iNdEx+skippy) < 0 { 2358 return ErrInvalidLengthQuery 2359 } 2360 if (iNdEx + skippy) > l { 2361 return io.ErrUnexpectedEOF 2362 } 2363 iNdEx += skippy 2364 } 2365 } 2366 2367 if iNdEx > l { 2368 return io.ErrUnexpectedEOF 2369 } 2370 return nil 2371 } 2372 func (m *QuerySupplyResponse) Unmarshal(dAtA []byte) error { 2373 l := len(dAtA) 2374 iNdEx := 0 2375 for iNdEx < l { 2376 preIndex := iNdEx 2377 var wire uint64 2378 for shift := uint(0); ; shift += 7 { 2379 if shift >= 64 { 2380 return ErrIntOverflowQuery 2381 } 2382 if iNdEx >= l { 2383 return io.ErrUnexpectedEOF 2384 } 2385 b := dAtA[iNdEx] 2386 iNdEx++ 2387 wire |= uint64(b&0x7F) << shift 2388 if b < 0x80 { 2389 break 2390 } 2391 } 2392 fieldNum := int32(wire >> 3) 2393 wireType := int(wire & 0x7) 2394 if wireType == 4 { 2395 return fmt.Errorf("proto: QuerySupplyResponse: wiretype end group for non-group") 2396 } 2397 if fieldNum <= 0 { 2398 return fmt.Errorf("proto: QuerySupplyResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2399 } 2400 switch fieldNum { 2401 case 1: 2402 if wireType != 2 { 2403 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 2404 } 2405 var stringLen uint64 2406 for shift := uint(0); ; shift += 7 { 2407 if shift >= 64 { 2408 return ErrIntOverflowQuery 2409 } 2410 if iNdEx >= l { 2411 return io.ErrUnexpectedEOF 2412 } 2413 b := dAtA[iNdEx] 2414 iNdEx++ 2415 stringLen |= uint64(b&0x7F) << shift 2416 if b < 0x80 { 2417 break 2418 } 2419 } 2420 intStringLen := int(stringLen) 2421 if intStringLen < 0 { 2422 return ErrInvalidLengthQuery 2423 } 2424 postIndex := iNdEx + intStringLen 2425 if postIndex < 0 { 2426 return ErrInvalidLengthQuery 2427 } 2428 if postIndex > l { 2429 return io.ErrUnexpectedEOF 2430 } 2431 if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2432 return err 2433 } 2434 iNdEx = postIndex 2435 default: 2436 iNdEx = preIndex 2437 skippy, err := skipQuery(dAtA[iNdEx:]) 2438 if err != nil { 2439 return err 2440 } 2441 if (skippy < 0) || (iNdEx+skippy) < 0 { 2442 return ErrInvalidLengthQuery 2443 } 2444 if (iNdEx + skippy) > l { 2445 return io.ErrUnexpectedEOF 2446 } 2447 iNdEx += skippy 2448 } 2449 } 2450 2451 if iNdEx > l { 2452 return io.ErrUnexpectedEOF 2453 } 2454 return nil 2455 } 2456 func (m *QueryMintedRequest) Unmarshal(dAtA []byte) error { 2457 l := len(dAtA) 2458 iNdEx := 0 2459 for iNdEx < l { 2460 preIndex := iNdEx 2461 var wire uint64 2462 for shift := uint(0); ; shift += 7 { 2463 if shift >= 64 { 2464 return ErrIntOverflowQuery 2465 } 2466 if iNdEx >= l { 2467 return io.ErrUnexpectedEOF 2468 } 2469 b := dAtA[iNdEx] 2470 iNdEx++ 2471 wire |= uint64(b&0x7F) << shift 2472 if b < 0x80 { 2473 break 2474 } 2475 } 2476 fieldNum := int32(wire >> 3) 2477 wireType := int(wire & 0x7) 2478 if wireType == 4 { 2479 return fmt.Errorf("proto: QueryMintedRequest: wiretype end group for non-group") 2480 } 2481 if fieldNum <= 0 { 2482 return fmt.Errorf("proto: QueryMintedRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2483 } 2484 switch fieldNum { 2485 case 1: 2486 if wireType != 2 { 2487 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 2488 } 2489 var stringLen uint64 2490 for shift := uint(0); ; shift += 7 { 2491 if shift >= 64 { 2492 return ErrIntOverflowQuery 2493 } 2494 if iNdEx >= l { 2495 return io.ErrUnexpectedEOF 2496 } 2497 b := dAtA[iNdEx] 2498 iNdEx++ 2499 stringLen |= uint64(b&0x7F) << shift 2500 if b < 0x80 { 2501 break 2502 } 2503 } 2504 intStringLen := int(stringLen) 2505 if intStringLen < 0 { 2506 return ErrInvalidLengthQuery 2507 } 2508 postIndex := iNdEx + intStringLen 2509 if postIndex < 0 { 2510 return ErrInvalidLengthQuery 2511 } 2512 if postIndex > l { 2513 return io.ErrUnexpectedEOF 2514 } 2515 m.ContractId = string(dAtA[iNdEx:postIndex]) 2516 iNdEx = postIndex 2517 default: 2518 iNdEx = preIndex 2519 skippy, err := skipQuery(dAtA[iNdEx:]) 2520 if err != nil { 2521 return err 2522 } 2523 if (skippy < 0) || (iNdEx+skippy) < 0 { 2524 return ErrInvalidLengthQuery 2525 } 2526 if (iNdEx + skippy) > l { 2527 return io.ErrUnexpectedEOF 2528 } 2529 iNdEx += skippy 2530 } 2531 } 2532 2533 if iNdEx > l { 2534 return io.ErrUnexpectedEOF 2535 } 2536 return nil 2537 } 2538 func (m *QueryMintedResponse) Unmarshal(dAtA []byte) error { 2539 l := len(dAtA) 2540 iNdEx := 0 2541 for iNdEx < l { 2542 preIndex := iNdEx 2543 var wire uint64 2544 for shift := uint(0); ; shift += 7 { 2545 if shift >= 64 { 2546 return ErrIntOverflowQuery 2547 } 2548 if iNdEx >= l { 2549 return io.ErrUnexpectedEOF 2550 } 2551 b := dAtA[iNdEx] 2552 iNdEx++ 2553 wire |= uint64(b&0x7F) << shift 2554 if b < 0x80 { 2555 break 2556 } 2557 } 2558 fieldNum := int32(wire >> 3) 2559 wireType := int(wire & 0x7) 2560 if wireType == 4 { 2561 return fmt.Errorf("proto: QueryMintedResponse: wiretype end group for non-group") 2562 } 2563 if fieldNum <= 0 { 2564 return fmt.Errorf("proto: QueryMintedResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2565 } 2566 switch fieldNum { 2567 case 1: 2568 if wireType != 2 { 2569 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 2570 } 2571 var stringLen uint64 2572 for shift := uint(0); ; shift += 7 { 2573 if shift >= 64 { 2574 return ErrIntOverflowQuery 2575 } 2576 if iNdEx >= l { 2577 return io.ErrUnexpectedEOF 2578 } 2579 b := dAtA[iNdEx] 2580 iNdEx++ 2581 stringLen |= uint64(b&0x7F) << shift 2582 if b < 0x80 { 2583 break 2584 } 2585 } 2586 intStringLen := int(stringLen) 2587 if intStringLen < 0 { 2588 return ErrInvalidLengthQuery 2589 } 2590 postIndex := iNdEx + intStringLen 2591 if postIndex < 0 { 2592 return ErrInvalidLengthQuery 2593 } 2594 if postIndex > l { 2595 return io.ErrUnexpectedEOF 2596 } 2597 if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2598 return err 2599 } 2600 iNdEx = postIndex 2601 default: 2602 iNdEx = preIndex 2603 skippy, err := skipQuery(dAtA[iNdEx:]) 2604 if err != nil { 2605 return err 2606 } 2607 if (skippy < 0) || (iNdEx+skippy) < 0 { 2608 return ErrInvalidLengthQuery 2609 } 2610 if (iNdEx + skippy) > l { 2611 return io.ErrUnexpectedEOF 2612 } 2613 iNdEx += skippy 2614 } 2615 } 2616 2617 if iNdEx > l { 2618 return io.ErrUnexpectedEOF 2619 } 2620 return nil 2621 } 2622 func (m *QueryBurntRequest) Unmarshal(dAtA []byte) error { 2623 l := len(dAtA) 2624 iNdEx := 0 2625 for iNdEx < l { 2626 preIndex := iNdEx 2627 var wire uint64 2628 for shift := uint(0); ; shift += 7 { 2629 if shift >= 64 { 2630 return ErrIntOverflowQuery 2631 } 2632 if iNdEx >= l { 2633 return io.ErrUnexpectedEOF 2634 } 2635 b := dAtA[iNdEx] 2636 iNdEx++ 2637 wire |= uint64(b&0x7F) << shift 2638 if b < 0x80 { 2639 break 2640 } 2641 } 2642 fieldNum := int32(wire >> 3) 2643 wireType := int(wire & 0x7) 2644 if wireType == 4 { 2645 return fmt.Errorf("proto: QueryBurntRequest: wiretype end group for non-group") 2646 } 2647 if fieldNum <= 0 { 2648 return fmt.Errorf("proto: QueryBurntRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2649 } 2650 switch fieldNum { 2651 case 1: 2652 if wireType != 2 { 2653 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 2654 } 2655 var stringLen uint64 2656 for shift := uint(0); ; shift += 7 { 2657 if shift >= 64 { 2658 return ErrIntOverflowQuery 2659 } 2660 if iNdEx >= l { 2661 return io.ErrUnexpectedEOF 2662 } 2663 b := dAtA[iNdEx] 2664 iNdEx++ 2665 stringLen |= uint64(b&0x7F) << shift 2666 if b < 0x80 { 2667 break 2668 } 2669 } 2670 intStringLen := int(stringLen) 2671 if intStringLen < 0 { 2672 return ErrInvalidLengthQuery 2673 } 2674 postIndex := iNdEx + intStringLen 2675 if postIndex < 0 { 2676 return ErrInvalidLengthQuery 2677 } 2678 if postIndex > l { 2679 return io.ErrUnexpectedEOF 2680 } 2681 m.ContractId = string(dAtA[iNdEx:postIndex]) 2682 iNdEx = postIndex 2683 default: 2684 iNdEx = preIndex 2685 skippy, err := skipQuery(dAtA[iNdEx:]) 2686 if err != nil { 2687 return err 2688 } 2689 if (skippy < 0) || (iNdEx+skippy) < 0 { 2690 return ErrInvalidLengthQuery 2691 } 2692 if (iNdEx + skippy) > l { 2693 return io.ErrUnexpectedEOF 2694 } 2695 iNdEx += skippy 2696 } 2697 } 2698 2699 if iNdEx > l { 2700 return io.ErrUnexpectedEOF 2701 } 2702 return nil 2703 } 2704 func (m *QueryBurntResponse) Unmarshal(dAtA []byte) error { 2705 l := len(dAtA) 2706 iNdEx := 0 2707 for iNdEx < l { 2708 preIndex := iNdEx 2709 var wire uint64 2710 for shift := uint(0); ; shift += 7 { 2711 if shift >= 64 { 2712 return ErrIntOverflowQuery 2713 } 2714 if iNdEx >= l { 2715 return io.ErrUnexpectedEOF 2716 } 2717 b := dAtA[iNdEx] 2718 iNdEx++ 2719 wire |= uint64(b&0x7F) << shift 2720 if b < 0x80 { 2721 break 2722 } 2723 } 2724 fieldNum := int32(wire >> 3) 2725 wireType := int(wire & 0x7) 2726 if wireType == 4 { 2727 return fmt.Errorf("proto: QueryBurntResponse: wiretype end group for non-group") 2728 } 2729 if fieldNum <= 0 { 2730 return fmt.Errorf("proto: QueryBurntResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2731 } 2732 switch fieldNum { 2733 case 1: 2734 if wireType != 2 { 2735 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 2736 } 2737 var stringLen uint64 2738 for shift := uint(0); ; shift += 7 { 2739 if shift >= 64 { 2740 return ErrIntOverflowQuery 2741 } 2742 if iNdEx >= l { 2743 return io.ErrUnexpectedEOF 2744 } 2745 b := dAtA[iNdEx] 2746 iNdEx++ 2747 stringLen |= uint64(b&0x7F) << shift 2748 if b < 0x80 { 2749 break 2750 } 2751 } 2752 intStringLen := int(stringLen) 2753 if intStringLen < 0 { 2754 return ErrInvalidLengthQuery 2755 } 2756 postIndex := iNdEx + intStringLen 2757 if postIndex < 0 { 2758 return ErrInvalidLengthQuery 2759 } 2760 if postIndex > l { 2761 return io.ErrUnexpectedEOF 2762 } 2763 if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2764 return err 2765 } 2766 iNdEx = postIndex 2767 default: 2768 iNdEx = preIndex 2769 skippy, err := skipQuery(dAtA[iNdEx:]) 2770 if err != nil { 2771 return err 2772 } 2773 if (skippy < 0) || (iNdEx+skippy) < 0 { 2774 return ErrInvalidLengthQuery 2775 } 2776 if (iNdEx + skippy) > l { 2777 return io.ErrUnexpectedEOF 2778 } 2779 iNdEx += skippy 2780 } 2781 } 2782 2783 if iNdEx > l { 2784 return io.ErrUnexpectedEOF 2785 } 2786 return nil 2787 } 2788 func (m *QueryContractRequest) Unmarshal(dAtA []byte) error { 2789 l := len(dAtA) 2790 iNdEx := 0 2791 for iNdEx < l { 2792 preIndex := iNdEx 2793 var wire uint64 2794 for shift := uint(0); ; shift += 7 { 2795 if shift >= 64 { 2796 return ErrIntOverflowQuery 2797 } 2798 if iNdEx >= l { 2799 return io.ErrUnexpectedEOF 2800 } 2801 b := dAtA[iNdEx] 2802 iNdEx++ 2803 wire |= uint64(b&0x7F) << shift 2804 if b < 0x80 { 2805 break 2806 } 2807 } 2808 fieldNum := int32(wire >> 3) 2809 wireType := int(wire & 0x7) 2810 if wireType == 4 { 2811 return fmt.Errorf("proto: QueryContractRequest: wiretype end group for non-group") 2812 } 2813 if fieldNum <= 0 { 2814 return fmt.Errorf("proto: QueryContractRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2815 } 2816 switch fieldNum { 2817 case 1: 2818 if wireType != 2 { 2819 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 2820 } 2821 var stringLen uint64 2822 for shift := uint(0); ; shift += 7 { 2823 if shift >= 64 { 2824 return ErrIntOverflowQuery 2825 } 2826 if iNdEx >= l { 2827 return io.ErrUnexpectedEOF 2828 } 2829 b := dAtA[iNdEx] 2830 iNdEx++ 2831 stringLen |= uint64(b&0x7F) << shift 2832 if b < 0x80 { 2833 break 2834 } 2835 } 2836 intStringLen := int(stringLen) 2837 if intStringLen < 0 { 2838 return ErrInvalidLengthQuery 2839 } 2840 postIndex := iNdEx + intStringLen 2841 if postIndex < 0 { 2842 return ErrInvalidLengthQuery 2843 } 2844 if postIndex > l { 2845 return io.ErrUnexpectedEOF 2846 } 2847 m.ContractId = string(dAtA[iNdEx:postIndex]) 2848 iNdEx = postIndex 2849 default: 2850 iNdEx = preIndex 2851 skippy, err := skipQuery(dAtA[iNdEx:]) 2852 if err != nil { 2853 return err 2854 } 2855 if (skippy < 0) || (iNdEx+skippy) < 0 { 2856 return ErrInvalidLengthQuery 2857 } 2858 if (iNdEx + skippy) > l { 2859 return io.ErrUnexpectedEOF 2860 } 2861 iNdEx += skippy 2862 } 2863 } 2864 2865 if iNdEx > l { 2866 return io.ErrUnexpectedEOF 2867 } 2868 return nil 2869 } 2870 func (m *QueryContractResponse) Unmarshal(dAtA []byte) error { 2871 l := len(dAtA) 2872 iNdEx := 0 2873 for iNdEx < l { 2874 preIndex := iNdEx 2875 var wire uint64 2876 for shift := uint(0); ; shift += 7 { 2877 if shift >= 64 { 2878 return ErrIntOverflowQuery 2879 } 2880 if iNdEx >= l { 2881 return io.ErrUnexpectedEOF 2882 } 2883 b := dAtA[iNdEx] 2884 iNdEx++ 2885 wire |= uint64(b&0x7F) << shift 2886 if b < 0x80 { 2887 break 2888 } 2889 } 2890 fieldNum := int32(wire >> 3) 2891 wireType := int(wire & 0x7) 2892 if wireType == 4 { 2893 return fmt.Errorf("proto: QueryContractResponse: wiretype end group for non-group") 2894 } 2895 if fieldNum <= 0 { 2896 return fmt.Errorf("proto: QueryContractResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2897 } 2898 switch fieldNum { 2899 case 1: 2900 if wireType != 2 { 2901 return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) 2902 } 2903 var msglen int 2904 for shift := uint(0); ; shift += 7 { 2905 if shift >= 64 { 2906 return ErrIntOverflowQuery 2907 } 2908 if iNdEx >= l { 2909 return io.ErrUnexpectedEOF 2910 } 2911 b := dAtA[iNdEx] 2912 iNdEx++ 2913 msglen |= int(b&0x7F) << shift 2914 if b < 0x80 { 2915 break 2916 } 2917 } 2918 if msglen < 0 { 2919 return ErrInvalidLengthQuery 2920 } 2921 postIndex := iNdEx + msglen 2922 if postIndex < 0 { 2923 return ErrInvalidLengthQuery 2924 } 2925 if postIndex > l { 2926 return io.ErrUnexpectedEOF 2927 } 2928 if err := m.Contract.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2929 return err 2930 } 2931 iNdEx = postIndex 2932 default: 2933 iNdEx = preIndex 2934 skippy, err := skipQuery(dAtA[iNdEx:]) 2935 if err != nil { 2936 return err 2937 } 2938 if (skippy < 0) || (iNdEx+skippy) < 0 { 2939 return ErrInvalidLengthQuery 2940 } 2941 if (iNdEx + skippy) > l { 2942 return io.ErrUnexpectedEOF 2943 } 2944 iNdEx += skippy 2945 } 2946 } 2947 2948 if iNdEx > l { 2949 return io.ErrUnexpectedEOF 2950 } 2951 return nil 2952 } 2953 func (m *QueryGranteeGrantsRequest) Unmarshal(dAtA []byte) error { 2954 l := len(dAtA) 2955 iNdEx := 0 2956 for iNdEx < l { 2957 preIndex := iNdEx 2958 var wire uint64 2959 for shift := uint(0); ; shift += 7 { 2960 if shift >= 64 { 2961 return ErrIntOverflowQuery 2962 } 2963 if iNdEx >= l { 2964 return io.ErrUnexpectedEOF 2965 } 2966 b := dAtA[iNdEx] 2967 iNdEx++ 2968 wire |= uint64(b&0x7F) << shift 2969 if b < 0x80 { 2970 break 2971 } 2972 } 2973 fieldNum := int32(wire >> 3) 2974 wireType := int(wire & 0x7) 2975 if wireType == 4 { 2976 return fmt.Errorf("proto: QueryGranteeGrantsRequest: wiretype end group for non-group") 2977 } 2978 if fieldNum <= 0 { 2979 return fmt.Errorf("proto: QueryGranteeGrantsRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2980 } 2981 switch fieldNum { 2982 case 1: 2983 if wireType != 2 { 2984 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 2985 } 2986 var stringLen uint64 2987 for shift := uint(0); ; shift += 7 { 2988 if shift >= 64 { 2989 return ErrIntOverflowQuery 2990 } 2991 if iNdEx >= l { 2992 return io.ErrUnexpectedEOF 2993 } 2994 b := dAtA[iNdEx] 2995 iNdEx++ 2996 stringLen |= uint64(b&0x7F) << shift 2997 if b < 0x80 { 2998 break 2999 } 3000 } 3001 intStringLen := int(stringLen) 3002 if intStringLen < 0 { 3003 return ErrInvalidLengthQuery 3004 } 3005 postIndex := iNdEx + intStringLen 3006 if postIndex < 0 { 3007 return ErrInvalidLengthQuery 3008 } 3009 if postIndex > l { 3010 return io.ErrUnexpectedEOF 3011 } 3012 m.ContractId = string(dAtA[iNdEx:postIndex]) 3013 iNdEx = postIndex 3014 case 2: 3015 if wireType != 2 { 3016 return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) 3017 } 3018 var stringLen uint64 3019 for shift := uint(0); ; shift += 7 { 3020 if shift >= 64 { 3021 return ErrIntOverflowQuery 3022 } 3023 if iNdEx >= l { 3024 return io.ErrUnexpectedEOF 3025 } 3026 b := dAtA[iNdEx] 3027 iNdEx++ 3028 stringLen |= uint64(b&0x7F) << shift 3029 if b < 0x80 { 3030 break 3031 } 3032 } 3033 intStringLen := int(stringLen) 3034 if intStringLen < 0 { 3035 return ErrInvalidLengthQuery 3036 } 3037 postIndex := iNdEx + intStringLen 3038 if postIndex < 0 { 3039 return ErrInvalidLengthQuery 3040 } 3041 if postIndex > l { 3042 return io.ErrUnexpectedEOF 3043 } 3044 m.Grantee = string(dAtA[iNdEx:postIndex]) 3045 iNdEx = postIndex 3046 case 3: 3047 if wireType != 2 { 3048 return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) 3049 } 3050 var msglen int 3051 for shift := uint(0); ; shift += 7 { 3052 if shift >= 64 { 3053 return ErrIntOverflowQuery 3054 } 3055 if iNdEx >= l { 3056 return io.ErrUnexpectedEOF 3057 } 3058 b := dAtA[iNdEx] 3059 iNdEx++ 3060 msglen |= int(b&0x7F) << shift 3061 if b < 0x80 { 3062 break 3063 } 3064 } 3065 if msglen < 0 { 3066 return ErrInvalidLengthQuery 3067 } 3068 postIndex := iNdEx + msglen 3069 if postIndex < 0 { 3070 return ErrInvalidLengthQuery 3071 } 3072 if postIndex > l { 3073 return io.ErrUnexpectedEOF 3074 } 3075 if m.Pagination == nil { 3076 m.Pagination = &query.PageRequest{} 3077 } 3078 if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3079 return err 3080 } 3081 iNdEx = postIndex 3082 default: 3083 iNdEx = preIndex 3084 skippy, err := skipQuery(dAtA[iNdEx:]) 3085 if err != nil { 3086 return err 3087 } 3088 if (skippy < 0) || (iNdEx+skippy) < 0 { 3089 return ErrInvalidLengthQuery 3090 } 3091 if (iNdEx + skippy) > l { 3092 return io.ErrUnexpectedEOF 3093 } 3094 iNdEx += skippy 3095 } 3096 } 3097 3098 if iNdEx > l { 3099 return io.ErrUnexpectedEOF 3100 } 3101 return nil 3102 } 3103 func (m *QueryGranteeGrantsResponse) Unmarshal(dAtA []byte) error { 3104 l := len(dAtA) 3105 iNdEx := 0 3106 for iNdEx < l { 3107 preIndex := iNdEx 3108 var wire uint64 3109 for shift := uint(0); ; shift += 7 { 3110 if shift >= 64 { 3111 return ErrIntOverflowQuery 3112 } 3113 if iNdEx >= l { 3114 return io.ErrUnexpectedEOF 3115 } 3116 b := dAtA[iNdEx] 3117 iNdEx++ 3118 wire |= uint64(b&0x7F) << shift 3119 if b < 0x80 { 3120 break 3121 } 3122 } 3123 fieldNum := int32(wire >> 3) 3124 wireType := int(wire & 0x7) 3125 if wireType == 4 { 3126 return fmt.Errorf("proto: QueryGranteeGrantsResponse: wiretype end group for non-group") 3127 } 3128 if fieldNum <= 0 { 3129 return fmt.Errorf("proto: QueryGranteeGrantsResponse: illegal tag %d (wire type %d)", fieldNum, wire) 3130 } 3131 switch fieldNum { 3132 case 1: 3133 if wireType != 2 { 3134 return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType) 3135 } 3136 var msglen int 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 msglen |= int(b&0x7F) << shift 3147 if b < 0x80 { 3148 break 3149 } 3150 } 3151 if msglen < 0 { 3152 return ErrInvalidLengthQuery 3153 } 3154 postIndex := iNdEx + msglen 3155 if postIndex < 0 { 3156 return ErrInvalidLengthQuery 3157 } 3158 if postIndex > l { 3159 return io.ErrUnexpectedEOF 3160 } 3161 m.Grants = append(m.Grants, Grant{}) 3162 if err := m.Grants[len(m.Grants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3163 return err 3164 } 3165 iNdEx = postIndex 3166 case 2: 3167 if wireType != 2 { 3168 return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) 3169 } 3170 var msglen int 3171 for shift := uint(0); ; shift += 7 { 3172 if shift >= 64 { 3173 return ErrIntOverflowQuery 3174 } 3175 if iNdEx >= l { 3176 return io.ErrUnexpectedEOF 3177 } 3178 b := dAtA[iNdEx] 3179 iNdEx++ 3180 msglen |= int(b&0x7F) << shift 3181 if b < 0x80 { 3182 break 3183 } 3184 } 3185 if msglen < 0 { 3186 return ErrInvalidLengthQuery 3187 } 3188 postIndex := iNdEx + msglen 3189 if postIndex < 0 { 3190 return ErrInvalidLengthQuery 3191 } 3192 if postIndex > l { 3193 return io.ErrUnexpectedEOF 3194 } 3195 if m.Pagination == nil { 3196 m.Pagination = &query.PageResponse{} 3197 } 3198 if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3199 return err 3200 } 3201 iNdEx = postIndex 3202 default: 3203 iNdEx = preIndex 3204 skippy, err := skipQuery(dAtA[iNdEx:]) 3205 if err != nil { 3206 return err 3207 } 3208 if (skippy < 0) || (iNdEx+skippy) < 0 { 3209 return ErrInvalidLengthQuery 3210 } 3211 if (iNdEx + skippy) > l { 3212 return io.ErrUnexpectedEOF 3213 } 3214 iNdEx += skippy 3215 } 3216 } 3217 3218 if iNdEx > l { 3219 return io.ErrUnexpectedEOF 3220 } 3221 return nil 3222 } 3223 func (m *QueryIsOperatorForRequest) Unmarshal(dAtA []byte) error { 3224 l := len(dAtA) 3225 iNdEx := 0 3226 for iNdEx < l { 3227 preIndex := iNdEx 3228 var wire uint64 3229 for shift := uint(0); ; shift += 7 { 3230 if shift >= 64 { 3231 return ErrIntOverflowQuery 3232 } 3233 if iNdEx >= l { 3234 return io.ErrUnexpectedEOF 3235 } 3236 b := dAtA[iNdEx] 3237 iNdEx++ 3238 wire |= uint64(b&0x7F) << shift 3239 if b < 0x80 { 3240 break 3241 } 3242 } 3243 fieldNum := int32(wire >> 3) 3244 wireType := int(wire & 0x7) 3245 if wireType == 4 { 3246 return fmt.Errorf("proto: QueryIsOperatorForRequest: wiretype end group for non-group") 3247 } 3248 if fieldNum <= 0 { 3249 return fmt.Errorf("proto: QueryIsOperatorForRequest: illegal tag %d (wire type %d)", fieldNum, wire) 3250 } 3251 switch fieldNum { 3252 case 1: 3253 if wireType != 2 { 3254 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 3255 } 3256 var stringLen uint64 3257 for shift := uint(0); ; shift += 7 { 3258 if shift >= 64 { 3259 return ErrIntOverflowQuery 3260 } 3261 if iNdEx >= l { 3262 return io.ErrUnexpectedEOF 3263 } 3264 b := dAtA[iNdEx] 3265 iNdEx++ 3266 stringLen |= uint64(b&0x7F) << shift 3267 if b < 0x80 { 3268 break 3269 } 3270 } 3271 intStringLen := int(stringLen) 3272 if intStringLen < 0 { 3273 return ErrInvalidLengthQuery 3274 } 3275 postIndex := iNdEx + intStringLen 3276 if postIndex < 0 { 3277 return ErrInvalidLengthQuery 3278 } 3279 if postIndex > l { 3280 return io.ErrUnexpectedEOF 3281 } 3282 m.ContractId = string(dAtA[iNdEx:postIndex]) 3283 iNdEx = postIndex 3284 case 2: 3285 if wireType != 2 { 3286 return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) 3287 } 3288 var stringLen uint64 3289 for shift := uint(0); ; shift += 7 { 3290 if shift >= 64 { 3291 return ErrIntOverflowQuery 3292 } 3293 if iNdEx >= l { 3294 return io.ErrUnexpectedEOF 3295 } 3296 b := dAtA[iNdEx] 3297 iNdEx++ 3298 stringLen |= uint64(b&0x7F) << shift 3299 if b < 0x80 { 3300 break 3301 } 3302 } 3303 intStringLen := int(stringLen) 3304 if intStringLen < 0 { 3305 return ErrInvalidLengthQuery 3306 } 3307 postIndex := iNdEx + intStringLen 3308 if postIndex < 0 { 3309 return ErrInvalidLengthQuery 3310 } 3311 if postIndex > l { 3312 return io.ErrUnexpectedEOF 3313 } 3314 m.Operator = string(dAtA[iNdEx:postIndex]) 3315 iNdEx = postIndex 3316 case 3: 3317 if wireType != 2 { 3318 return fmt.Errorf("proto: wrong wireType = %d for field Holder", wireType) 3319 } 3320 var stringLen uint64 3321 for shift := uint(0); ; shift += 7 { 3322 if shift >= 64 { 3323 return ErrIntOverflowQuery 3324 } 3325 if iNdEx >= l { 3326 return io.ErrUnexpectedEOF 3327 } 3328 b := dAtA[iNdEx] 3329 iNdEx++ 3330 stringLen |= uint64(b&0x7F) << shift 3331 if b < 0x80 { 3332 break 3333 } 3334 } 3335 intStringLen := int(stringLen) 3336 if intStringLen < 0 { 3337 return ErrInvalidLengthQuery 3338 } 3339 postIndex := iNdEx + intStringLen 3340 if postIndex < 0 { 3341 return ErrInvalidLengthQuery 3342 } 3343 if postIndex > l { 3344 return io.ErrUnexpectedEOF 3345 } 3346 m.Holder = string(dAtA[iNdEx:postIndex]) 3347 iNdEx = postIndex 3348 default: 3349 iNdEx = preIndex 3350 skippy, err := skipQuery(dAtA[iNdEx:]) 3351 if err != nil { 3352 return err 3353 } 3354 if (skippy < 0) || (iNdEx+skippy) < 0 { 3355 return ErrInvalidLengthQuery 3356 } 3357 if (iNdEx + skippy) > l { 3358 return io.ErrUnexpectedEOF 3359 } 3360 iNdEx += skippy 3361 } 3362 } 3363 3364 if iNdEx > l { 3365 return io.ErrUnexpectedEOF 3366 } 3367 return nil 3368 } 3369 func (m *QueryIsOperatorForResponse) 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: QueryIsOperatorForResponse: wiretype end group for non-group") 3393 } 3394 if fieldNum <= 0 { 3395 return fmt.Errorf("proto: QueryIsOperatorForResponse: illegal tag %d (wire type %d)", fieldNum, wire) 3396 } 3397 switch fieldNum { 3398 case 1: 3399 if wireType != 0 { 3400 return fmt.Errorf("proto: wrong wireType = %d for field Authorized", wireType) 3401 } 3402 var v 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 v |= int(b&0x7F) << shift 3413 if b < 0x80 { 3414 break 3415 } 3416 } 3417 m.Authorized = bool(v != 0) 3418 default: 3419 iNdEx = preIndex 3420 skippy, err := skipQuery(dAtA[iNdEx:]) 3421 if err != nil { 3422 return err 3423 } 3424 if (skippy < 0) || (iNdEx+skippy) < 0 { 3425 return ErrInvalidLengthQuery 3426 } 3427 if (iNdEx + skippy) > l { 3428 return io.ErrUnexpectedEOF 3429 } 3430 iNdEx += skippy 3431 } 3432 } 3433 3434 if iNdEx > l { 3435 return io.ErrUnexpectedEOF 3436 } 3437 return nil 3438 } 3439 func (m *QueryHoldersByOperatorRequest) Unmarshal(dAtA []byte) error { 3440 l := len(dAtA) 3441 iNdEx := 0 3442 for iNdEx < l { 3443 preIndex := iNdEx 3444 var wire uint64 3445 for shift := uint(0); ; shift += 7 { 3446 if shift >= 64 { 3447 return ErrIntOverflowQuery 3448 } 3449 if iNdEx >= l { 3450 return io.ErrUnexpectedEOF 3451 } 3452 b := dAtA[iNdEx] 3453 iNdEx++ 3454 wire |= uint64(b&0x7F) << shift 3455 if b < 0x80 { 3456 break 3457 } 3458 } 3459 fieldNum := int32(wire >> 3) 3460 wireType := int(wire & 0x7) 3461 if wireType == 4 { 3462 return fmt.Errorf("proto: QueryHoldersByOperatorRequest: wiretype end group for non-group") 3463 } 3464 if fieldNum <= 0 { 3465 return fmt.Errorf("proto: QueryHoldersByOperatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) 3466 } 3467 switch fieldNum { 3468 case 1: 3469 if wireType != 2 { 3470 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 3471 } 3472 var stringLen uint64 3473 for shift := uint(0); ; shift += 7 { 3474 if shift >= 64 { 3475 return ErrIntOverflowQuery 3476 } 3477 if iNdEx >= l { 3478 return io.ErrUnexpectedEOF 3479 } 3480 b := dAtA[iNdEx] 3481 iNdEx++ 3482 stringLen |= uint64(b&0x7F) << shift 3483 if b < 0x80 { 3484 break 3485 } 3486 } 3487 intStringLen := int(stringLen) 3488 if intStringLen < 0 { 3489 return ErrInvalidLengthQuery 3490 } 3491 postIndex := iNdEx + intStringLen 3492 if postIndex < 0 { 3493 return ErrInvalidLengthQuery 3494 } 3495 if postIndex > l { 3496 return io.ErrUnexpectedEOF 3497 } 3498 m.ContractId = string(dAtA[iNdEx:postIndex]) 3499 iNdEx = postIndex 3500 case 2: 3501 if wireType != 2 { 3502 return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) 3503 } 3504 var stringLen uint64 3505 for shift := uint(0); ; shift += 7 { 3506 if shift >= 64 { 3507 return ErrIntOverflowQuery 3508 } 3509 if iNdEx >= l { 3510 return io.ErrUnexpectedEOF 3511 } 3512 b := dAtA[iNdEx] 3513 iNdEx++ 3514 stringLen |= uint64(b&0x7F) << shift 3515 if b < 0x80 { 3516 break 3517 } 3518 } 3519 intStringLen := int(stringLen) 3520 if intStringLen < 0 { 3521 return ErrInvalidLengthQuery 3522 } 3523 postIndex := iNdEx + intStringLen 3524 if postIndex < 0 { 3525 return ErrInvalidLengthQuery 3526 } 3527 if postIndex > l { 3528 return io.ErrUnexpectedEOF 3529 } 3530 m.Operator = string(dAtA[iNdEx:postIndex]) 3531 iNdEx = postIndex 3532 case 3: 3533 if wireType != 2 { 3534 return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) 3535 } 3536 var msglen int 3537 for shift := uint(0); ; shift += 7 { 3538 if shift >= 64 { 3539 return ErrIntOverflowQuery 3540 } 3541 if iNdEx >= l { 3542 return io.ErrUnexpectedEOF 3543 } 3544 b := dAtA[iNdEx] 3545 iNdEx++ 3546 msglen |= int(b&0x7F) << shift 3547 if b < 0x80 { 3548 break 3549 } 3550 } 3551 if msglen < 0 { 3552 return ErrInvalidLengthQuery 3553 } 3554 postIndex := iNdEx + msglen 3555 if postIndex < 0 { 3556 return ErrInvalidLengthQuery 3557 } 3558 if postIndex > l { 3559 return io.ErrUnexpectedEOF 3560 } 3561 if m.Pagination == nil { 3562 m.Pagination = &query.PageRequest{} 3563 } 3564 if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3565 return err 3566 } 3567 iNdEx = postIndex 3568 default: 3569 iNdEx = preIndex 3570 skippy, err := skipQuery(dAtA[iNdEx:]) 3571 if err != nil { 3572 return err 3573 } 3574 if (skippy < 0) || (iNdEx+skippy) < 0 { 3575 return ErrInvalidLengthQuery 3576 } 3577 if (iNdEx + skippy) > l { 3578 return io.ErrUnexpectedEOF 3579 } 3580 iNdEx += skippy 3581 } 3582 } 3583 3584 if iNdEx > l { 3585 return io.ErrUnexpectedEOF 3586 } 3587 return nil 3588 } 3589 func (m *QueryHoldersByOperatorResponse) Unmarshal(dAtA []byte) error { 3590 l := len(dAtA) 3591 iNdEx := 0 3592 for iNdEx < l { 3593 preIndex := iNdEx 3594 var wire uint64 3595 for shift := uint(0); ; shift += 7 { 3596 if shift >= 64 { 3597 return ErrIntOverflowQuery 3598 } 3599 if iNdEx >= l { 3600 return io.ErrUnexpectedEOF 3601 } 3602 b := dAtA[iNdEx] 3603 iNdEx++ 3604 wire |= uint64(b&0x7F) << shift 3605 if b < 0x80 { 3606 break 3607 } 3608 } 3609 fieldNum := int32(wire >> 3) 3610 wireType := int(wire & 0x7) 3611 if wireType == 4 { 3612 return fmt.Errorf("proto: QueryHoldersByOperatorResponse: wiretype end group for non-group") 3613 } 3614 if fieldNum <= 0 { 3615 return fmt.Errorf("proto: QueryHoldersByOperatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) 3616 } 3617 switch fieldNum { 3618 case 1: 3619 if wireType != 2 { 3620 return fmt.Errorf("proto: wrong wireType = %d for field Holders", wireType) 3621 } 3622 var stringLen uint64 3623 for shift := uint(0); ; shift += 7 { 3624 if shift >= 64 { 3625 return ErrIntOverflowQuery 3626 } 3627 if iNdEx >= l { 3628 return io.ErrUnexpectedEOF 3629 } 3630 b := dAtA[iNdEx] 3631 iNdEx++ 3632 stringLen |= uint64(b&0x7F) << shift 3633 if b < 0x80 { 3634 break 3635 } 3636 } 3637 intStringLen := int(stringLen) 3638 if intStringLen < 0 { 3639 return ErrInvalidLengthQuery 3640 } 3641 postIndex := iNdEx + intStringLen 3642 if postIndex < 0 { 3643 return ErrInvalidLengthQuery 3644 } 3645 if postIndex > l { 3646 return io.ErrUnexpectedEOF 3647 } 3648 m.Holders = append(m.Holders, string(dAtA[iNdEx:postIndex])) 3649 iNdEx = postIndex 3650 case 2: 3651 if wireType != 2 { 3652 return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) 3653 } 3654 var msglen int 3655 for shift := uint(0); ; shift += 7 { 3656 if shift >= 64 { 3657 return ErrIntOverflowQuery 3658 } 3659 if iNdEx >= l { 3660 return io.ErrUnexpectedEOF 3661 } 3662 b := dAtA[iNdEx] 3663 iNdEx++ 3664 msglen |= int(b&0x7F) << shift 3665 if b < 0x80 { 3666 break 3667 } 3668 } 3669 if msglen < 0 { 3670 return ErrInvalidLengthQuery 3671 } 3672 postIndex := iNdEx + msglen 3673 if postIndex < 0 { 3674 return ErrInvalidLengthQuery 3675 } 3676 if postIndex > l { 3677 return io.ErrUnexpectedEOF 3678 } 3679 if m.Pagination == nil { 3680 m.Pagination = &query.PageResponse{} 3681 } 3682 if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3683 return err 3684 } 3685 iNdEx = postIndex 3686 default: 3687 iNdEx = preIndex 3688 skippy, err := skipQuery(dAtA[iNdEx:]) 3689 if err != nil { 3690 return err 3691 } 3692 if (skippy < 0) || (iNdEx+skippy) < 0 { 3693 return ErrInvalidLengthQuery 3694 } 3695 if (iNdEx + skippy) > l { 3696 return io.ErrUnexpectedEOF 3697 } 3698 iNdEx += skippy 3699 } 3700 } 3701 3702 if iNdEx > l { 3703 return io.ErrUnexpectedEOF 3704 } 3705 return nil 3706 } 3707 func skipQuery(dAtA []byte) (n int, err error) { 3708 l := len(dAtA) 3709 iNdEx := 0 3710 depth := 0 3711 for iNdEx < l { 3712 var wire uint64 3713 for shift := uint(0); ; shift += 7 { 3714 if shift >= 64 { 3715 return 0, ErrIntOverflowQuery 3716 } 3717 if iNdEx >= l { 3718 return 0, io.ErrUnexpectedEOF 3719 } 3720 b := dAtA[iNdEx] 3721 iNdEx++ 3722 wire |= (uint64(b) & 0x7F) << shift 3723 if b < 0x80 { 3724 break 3725 } 3726 } 3727 wireType := int(wire & 0x7) 3728 switch wireType { 3729 case 0: 3730 for shift := uint(0); ; shift += 7 { 3731 if shift >= 64 { 3732 return 0, ErrIntOverflowQuery 3733 } 3734 if iNdEx >= l { 3735 return 0, io.ErrUnexpectedEOF 3736 } 3737 iNdEx++ 3738 if dAtA[iNdEx-1] < 0x80 { 3739 break 3740 } 3741 } 3742 case 1: 3743 iNdEx += 8 3744 case 2: 3745 var length int 3746 for shift := uint(0); ; shift += 7 { 3747 if shift >= 64 { 3748 return 0, ErrIntOverflowQuery 3749 } 3750 if iNdEx >= l { 3751 return 0, io.ErrUnexpectedEOF 3752 } 3753 b := dAtA[iNdEx] 3754 iNdEx++ 3755 length |= (int(b) & 0x7F) << shift 3756 if b < 0x80 { 3757 break 3758 } 3759 } 3760 if length < 0 { 3761 return 0, ErrInvalidLengthQuery 3762 } 3763 iNdEx += length 3764 case 3: 3765 depth++ 3766 case 4: 3767 if depth == 0 { 3768 return 0, ErrUnexpectedEndOfGroupQuery 3769 } 3770 depth-- 3771 case 5: 3772 iNdEx += 4 3773 default: 3774 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 3775 } 3776 if iNdEx < 0 { 3777 return 0, ErrInvalidLengthQuery 3778 } 3779 if depth == 0 { 3780 return iNdEx, nil 3781 } 3782 } 3783 return 0, io.ErrUnexpectedEOF 3784 } 3785 3786 var ( 3787 ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") 3788 ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") 3789 ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") 3790 )