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