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