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