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