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