github.com/cosmos/cosmos-sdk@v0.50.10/x/gov/types/v1beta1/gov.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/gov/v1beta1/gov.proto 3 4 package v1beta1 5 6 import ( 7 cosmossdk_io_math "cosmossdk.io/math" 8 fmt "fmt" 9 _ "github.com/cosmos/cosmos-proto" 10 types1 "github.com/cosmos/cosmos-sdk/codec/types" 11 github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" 12 types "github.com/cosmos/cosmos-sdk/types" 13 _ "github.com/cosmos/cosmos-sdk/types/tx/amino" 14 _ "github.com/cosmos/gogoproto/gogoproto" 15 proto "github.com/cosmos/gogoproto/proto" 16 github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" 17 _ "google.golang.org/protobuf/types/known/durationpb" 18 _ "google.golang.org/protobuf/types/known/timestamppb" 19 io "io" 20 math "math" 21 math_bits "math/bits" 22 time "time" 23 ) 24 25 // Reference imports to suppress errors if they are not otherwise used. 26 var _ = proto.Marshal 27 var _ = fmt.Errorf 28 var _ = math.Inf 29 var _ = time.Kitchen 30 31 // This is a compile-time assertion to ensure that this generated file 32 // is compatible with the proto package it is being compiled against. 33 // A compilation error at this line likely means your copy of the 34 // proto package needs to be updated. 35 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 36 37 // VoteOption enumerates the valid vote options for a given governance proposal. 38 type VoteOption int32 39 40 const ( 41 // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. 42 OptionEmpty VoteOption = 0 43 // VOTE_OPTION_YES defines a yes vote option. 44 OptionYes VoteOption = 1 45 // VOTE_OPTION_ABSTAIN defines an abstain vote option. 46 OptionAbstain VoteOption = 2 47 // VOTE_OPTION_NO defines a no vote option. 48 OptionNo VoteOption = 3 49 // VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. 50 OptionNoWithVeto VoteOption = 4 51 ) 52 53 var VoteOption_name = map[int32]string{ 54 0: "VOTE_OPTION_UNSPECIFIED", 55 1: "VOTE_OPTION_YES", 56 2: "VOTE_OPTION_ABSTAIN", 57 3: "VOTE_OPTION_NO", 58 4: "VOTE_OPTION_NO_WITH_VETO", 59 } 60 61 var VoteOption_value = map[string]int32{ 62 "VOTE_OPTION_UNSPECIFIED": 0, 63 "VOTE_OPTION_YES": 1, 64 "VOTE_OPTION_ABSTAIN": 2, 65 "VOTE_OPTION_NO": 3, 66 "VOTE_OPTION_NO_WITH_VETO": 4, 67 } 68 69 func (x VoteOption) String() string { 70 return proto.EnumName(VoteOption_name, int32(x)) 71 } 72 73 func (VoteOption) EnumDescriptor() ([]byte, []int) { 74 return fileDescriptor_6e82113c1a9a4b7c, []int{0} 75 } 76 77 // ProposalStatus enumerates the valid statuses of a proposal. 78 type ProposalStatus int32 79 80 const ( 81 // PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. 82 StatusNil ProposalStatus = 0 83 // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit 84 // period. 85 StatusDepositPeriod ProposalStatus = 1 86 // PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting 87 // period. 88 StatusVotingPeriod ProposalStatus = 2 89 // PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has 90 // passed. 91 StatusPassed ProposalStatus = 3 92 // PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has 93 // been rejected. 94 StatusRejected ProposalStatus = 4 95 // PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has 96 // failed. 97 StatusFailed ProposalStatus = 5 98 ) 99 100 var ProposalStatus_name = map[int32]string{ 101 0: "PROPOSAL_STATUS_UNSPECIFIED", 102 1: "PROPOSAL_STATUS_DEPOSIT_PERIOD", 103 2: "PROPOSAL_STATUS_VOTING_PERIOD", 104 3: "PROPOSAL_STATUS_PASSED", 105 4: "PROPOSAL_STATUS_REJECTED", 106 5: "PROPOSAL_STATUS_FAILED", 107 } 108 109 var ProposalStatus_value = map[string]int32{ 110 "PROPOSAL_STATUS_UNSPECIFIED": 0, 111 "PROPOSAL_STATUS_DEPOSIT_PERIOD": 1, 112 "PROPOSAL_STATUS_VOTING_PERIOD": 2, 113 "PROPOSAL_STATUS_PASSED": 3, 114 "PROPOSAL_STATUS_REJECTED": 4, 115 "PROPOSAL_STATUS_FAILED": 5, 116 } 117 118 func (x ProposalStatus) String() string { 119 return proto.EnumName(ProposalStatus_name, int32(x)) 120 } 121 122 func (ProposalStatus) EnumDescriptor() ([]byte, []int) { 123 return fileDescriptor_6e82113c1a9a4b7c, []int{1} 124 } 125 126 // WeightedVoteOption defines a unit of vote for vote split. 127 // 128 // Since: cosmos-sdk 0.43 129 type WeightedVoteOption struct { 130 // option defines the valid vote options, it must not contain duplicate vote options. 131 Option VoteOption `protobuf:"varint,1,opt,name=option,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"option,omitempty"` 132 // weight is the vote weight associated with the vote option. 133 Weight cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=weight,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"weight"` 134 } 135 136 func (m *WeightedVoteOption) Reset() { *m = WeightedVoteOption{} } 137 func (m *WeightedVoteOption) String() string { return proto.CompactTextString(m) } 138 func (*WeightedVoteOption) ProtoMessage() {} 139 func (*WeightedVoteOption) Descriptor() ([]byte, []int) { 140 return fileDescriptor_6e82113c1a9a4b7c, []int{0} 141 } 142 func (m *WeightedVoteOption) XXX_Unmarshal(b []byte) error { 143 return m.Unmarshal(b) 144 } 145 func (m *WeightedVoteOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 146 if deterministic { 147 return xxx_messageInfo_WeightedVoteOption.Marshal(b, m, deterministic) 148 } else { 149 b = b[:cap(b)] 150 n, err := m.MarshalToSizedBuffer(b) 151 if err != nil { 152 return nil, err 153 } 154 return b[:n], nil 155 } 156 } 157 func (m *WeightedVoteOption) XXX_Merge(src proto.Message) { 158 xxx_messageInfo_WeightedVoteOption.Merge(m, src) 159 } 160 func (m *WeightedVoteOption) XXX_Size() int { 161 return m.Size() 162 } 163 func (m *WeightedVoteOption) XXX_DiscardUnknown() { 164 xxx_messageInfo_WeightedVoteOption.DiscardUnknown(m) 165 } 166 167 var xxx_messageInfo_WeightedVoteOption proto.InternalMessageInfo 168 169 // TextProposal defines a standard text proposal whose changes need to be 170 // manually updated in case of approval. 171 type TextProposal struct { 172 // title of the proposal. 173 Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` 174 // description associated with the proposal. 175 Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` 176 } 177 178 func (m *TextProposal) Reset() { *m = TextProposal{} } 179 func (m *TextProposal) String() string { return proto.CompactTextString(m) } 180 func (*TextProposal) ProtoMessage() {} 181 func (*TextProposal) Descriptor() ([]byte, []int) { 182 return fileDescriptor_6e82113c1a9a4b7c, []int{1} 183 } 184 func (m *TextProposal) XXX_Unmarshal(b []byte) error { 185 return m.Unmarshal(b) 186 } 187 func (m *TextProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 188 if deterministic { 189 return xxx_messageInfo_TextProposal.Marshal(b, m, deterministic) 190 } else { 191 b = b[:cap(b)] 192 n, err := m.MarshalToSizedBuffer(b) 193 if err != nil { 194 return nil, err 195 } 196 return b[:n], nil 197 } 198 } 199 func (m *TextProposal) XXX_Merge(src proto.Message) { 200 xxx_messageInfo_TextProposal.Merge(m, src) 201 } 202 func (m *TextProposal) XXX_Size() int { 203 return m.Size() 204 } 205 func (m *TextProposal) XXX_DiscardUnknown() { 206 xxx_messageInfo_TextProposal.DiscardUnknown(m) 207 } 208 209 var xxx_messageInfo_TextProposal proto.InternalMessageInfo 210 211 // Deposit defines an amount deposited by an account address to an active 212 // proposal. 213 type Deposit struct { 214 // proposal_id defines the unique id of the proposal. 215 ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` 216 // depositor defines the deposit addresses from the proposals. 217 Depositor string `protobuf:"bytes,2,opt,name=depositor,proto3" json:"depositor,omitempty"` 218 // amount to be deposited by depositor. 219 Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` 220 } 221 222 func (m *Deposit) Reset() { *m = Deposit{} } 223 func (m *Deposit) String() string { return proto.CompactTextString(m) } 224 func (*Deposit) ProtoMessage() {} 225 func (*Deposit) Descriptor() ([]byte, []int) { 226 return fileDescriptor_6e82113c1a9a4b7c, []int{2} 227 } 228 func (m *Deposit) XXX_Unmarshal(b []byte) error { 229 return m.Unmarshal(b) 230 } 231 func (m *Deposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 232 if deterministic { 233 return xxx_messageInfo_Deposit.Marshal(b, m, deterministic) 234 } else { 235 b = b[:cap(b)] 236 n, err := m.MarshalToSizedBuffer(b) 237 if err != nil { 238 return nil, err 239 } 240 return b[:n], nil 241 } 242 } 243 func (m *Deposit) XXX_Merge(src proto.Message) { 244 xxx_messageInfo_Deposit.Merge(m, src) 245 } 246 func (m *Deposit) XXX_Size() int { 247 return m.Size() 248 } 249 func (m *Deposit) XXX_DiscardUnknown() { 250 xxx_messageInfo_Deposit.DiscardUnknown(m) 251 } 252 253 var xxx_messageInfo_Deposit proto.InternalMessageInfo 254 255 // Proposal defines the core field members of a governance proposal. 256 type Proposal struct { 257 // proposal_id defines the unique id of the proposal. 258 ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` 259 // content is the proposal's content. 260 Content *types1.Any `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` 261 // status defines the proposal status. 262 Status ProposalStatus `protobuf:"varint,3,opt,name=status,proto3,enum=cosmos.gov.v1beta1.ProposalStatus" json:"status,omitempty"` 263 // final_tally_result is the final tally result of the proposal. When 264 // querying a proposal via gRPC, this field is not populated until the 265 // proposal's voting period has ended. 266 FinalTallyResult TallyResult `protobuf:"bytes,4,opt,name=final_tally_result,json=finalTallyResult,proto3" json:"final_tally_result"` 267 // submit_time is the time of proposal submission. 268 SubmitTime time.Time `protobuf:"bytes,5,opt,name=submit_time,json=submitTime,proto3,stdtime" json:"submit_time"` 269 // deposit_end_time is the end time for deposition. 270 DepositEndTime time.Time `protobuf:"bytes,6,opt,name=deposit_end_time,json=depositEndTime,proto3,stdtime" json:"deposit_end_time"` 271 // total_deposit is the total deposit on the proposal. 272 TotalDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,7,rep,name=total_deposit,json=totalDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_deposit"` 273 // voting_start_time is the starting time to vote on a proposal. 274 VotingStartTime time.Time `protobuf:"bytes,8,opt,name=voting_start_time,json=votingStartTime,proto3,stdtime" json:"voting_start_time"` 275 // voting_end_time is the end time of voting on a proposal. 276 VotingEndTime time.Time `protobuf:"bytes,9,opt,name=voting_end_time,json=votingEndTime,proto3,stdtime" json:"voting_end_time"` 277 } 278 279 func (m *Proposal) Reset() { *m = Proposal{} } 280 func (m *Proposal) String() string { return proto.CompactTextString(m) } 281 func (*Proposal) ProtoMessage() {} 282 func (*Proposal) Descriptor() ([]byte, []int) { 283 return fileDescriptor_6e82113c1a9a4b7c, []int{3} 284 } 285 func (m *Proposal) XXX_Unmarshal(b []byte) error { 286 return m.Unmarshal(b) 287 } 288 func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 289 if deterministic { 290 return xxx_messageInfo_Proposal.Marshal(b, m, deterministic) 291 } else { 292 b = b[:cap(b)] 293 n, err := m.MarshalToSizedBuffer(b) 294 if err != nil { 295 return nil, err 296 } 297 return b[:n], nil 298 } 299 } 300 func (m *Proposal) XXX_Merge(src proto.Message) { 301 xxx_messageInfo_Proposal.Merge(m, src) 302 } 303 func (m *Proposal) XXX_Size() int { 304 return m.Size() 305 } 306 func (m *Proposal) XXX_DiscardUnknown() { 307 xxx_messageInfo_Proposal.DiscardUnknown(m) 308 } 309 310 var xxx_messageInfo_Proposal proto.InternalMessageInfo 311 312 // TallyResult defines a standard tally for a governance proposal. 313 type TallyResult struct { 314 // yes is the number of yes votes on a proposal. 315 Yes cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=yes,proto3,customtype=cosmossdk.io/math.Int" json:"yes"` 316 // abstain is the number of abstain votes on a proposal. 317 Abstain cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=abstain,proto3,customtype=cosmossdk.io/math.Int" json:"abstain"` 318 // no is the number of no votes on a proposal. 319 No cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=no,proto3,customtype=cosmossdk.io/math.Int" json:"no"` 320 // no_with_veto is the number of no with veto votes on a proposal. 321 NoWithVeto cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=no_with_veto,json=noWithVeto,proto3,customtype=cosmossdk.io/math.Int" json:"no_with_veto"` 322 } 323 324 func (m *TallyResult) Reset() { *m = TallyResult{} } 325 func (m *TallyResult) String() string { return proto.CompactTextString(m) } 326 func (*TallyResult) ProtoMessage() {} 327 func (*TallyResult) Descriptor() ([]byte, []int) { 328 return fileDescriptor_6e82113c1a9a4b7c, []int{4} 329 } 330 func (m *TallyResult) XXX_Unmarshal(b []byte) error { 331 return m.Unmarshal(b) 332 } 333 func (m *TallyResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 334 if deterministic { 335 return xxx_messageInfo_TallyResult.Marshal(b, m, deterministic) 336 } else { 337 b = b[:cap(b)] 338 n, err := m.MarshalToSizedBuffer(b) 339 if err != nil { 340 return nil, err 341 } 342 return b[:n], nil 343 } 344 } 345 func (m *TallyResult) XXX_Merge(src proto.Message) { 346 xxx_messageInfo_TallyResult.Merge(m, src) 347 } 348 func (m *TallyResult) XXX_Size() int { 349 return m.Size() 350 } 351 func (m *TallyResult) XXX_DiscardUnknown() { 352 xxx_messageInfo_TallyResult.DiscardUnknown(m) 353 } 354 355 var xxx_messageInfo_TallyResult proto.InternalMessageInfo 356 357 // Vote defines a vote on a governance proposal. 358 // A Vote consists of a proposal ID, the voter, and the vote option. 359 type Vote struct { 360 // proposal_id defines the unique id of the proposal. 361 ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"id"` 362 // voter is the voter address of the proposal. 363 Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` 364 // Deprecated: Prefer to use `options` instead. This field is set in queries 365 // if and only if `len(options) == 1` and that option has weight 1. In all 366 // other cases, this field will default to VOTE_OPTION_UNSPECIFIED. 367 Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"option,omitempty"` // Deprecated: Do not use. 368 // options is the weighted vote options. 369 // 370 // Since: cosmos-sdk 0.43 371 Options []WeightedVoteOption `protobuf:"bytes,4,rep,name=options,proto3" json:"options"` 372 } 373 374 func (m *Vote) Reset() { *m = Vote{} } 375 func (m *Vote) String() string { return proto.CompactTextString(m) } 376 func (*Vote) ProtoMessage() {} 377 func (*Vote) Descriptor() ([]byte, []int) { 378 return fileDescriptor_6e82113c1a9a4b7c, []int{5} 379 } 380 func (m *Vote) XXX_Unmarshal(b []byte) error { 381 return m.Unmarshal(b) 382 } 383 func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 384 if deterministic { 385 return xxx_messageInfo_Vote.Marshal(b, m, deterministic) 386 } else { 387 b = b[:cap(b)] 388 n, err := m.MarshalToSizedBuffer(b) 389 if err != nil { 390 return nil, err 391 } 392 return b[:n], nil 393 } 394 } 395 func (m *Vote) XXX_Merge(src proto.Message) { 396 xxx_messageInfo_Vote.Merge(m, src) 397 } 398 func (m *Vote) XXX_Size() int { 399 return m.Size() 400 } 401 func (m *Vote) XXX_DiscardUnknown() { 402 xxx_messageInfo_Vote.DiscardUnknown(m) 403 } 404 405 var xxx_messageInfo_Vote proto.InternalMessageInfo 406 407 // DepositParams defines the params for deposits on governance proposals. 408 type DepositParams struct { 409 // Minimum deposit for a proposal to enter voting period. 410 MinDeposit github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"min_deposit,omitempty"` 411 // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 412 // months. 413 MaxDepositPeriod time.Duration `protobuf:"bytes,2,opt,name=max_deposit_period,json=maxDepositPeriod,proto3,stdduration" json:"max_deposit_period,omitempty"` 414 } 415 416 func (m *DepositParams) Reset() { *m = DepositParams{} } 417 func (m *DepositParams) String() string { return proto.CompactTextString(m) } 418 func (*DepositParams) ProtoMessage() {} 419 func (*DepositParams) Descriptor() ([]byte, []int) { 420 return fileDescriptor_6e82113c1a9a4b7c, []int{6} 421 } 422 func (m *DepositParams) XXX_Unmarshal(b []byte) error { 423 return m.Unmarshal(b) 424 } 425 func (m *DepositParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 426 if deterministic { 427 return xxx_messageInfo_DepositParams.Marshal(b, m, deterministic) 428 } else { 429 b = b[:cap(b)] 430 n, err := m.MarshalToSizedBuffer(b) 431 if err != nil { 432 return nil, err 433 } 434 return b[:n], nil 435 } 436 } 437 func (m *DepositParams) XXX_Merge(src proto.Message) { 438 xxx_messageInfo_DepositParams.Merge(m, src) 439 } 440 func (m *DepositParams) XXX_Size() int { 441 return m.Size() 442 } 443 func (m *DepositParams) XXX_DiscardUnknown() { 444 xxx_messageInfo_DepositParams.DiscardUnknown(m) 445 } 446 447 var xxx_messageInfo_DepositParams proto.InternalMessageInfo 448 449 // VotingParams defines the params for voting on governance proposals. 450 type VotingParams struct { 451 // Duration of the voting period. 452 VotingPeriod time.Duration `protobuf:"bytes,1,opt,name=voting_period,json=votingPeriod,proto3,stdduration" json:"voting_period,omitempty"` 453 } 454 455 func (m *VotingParams) Reset() { *m = VotingParams{} } 456 func (m *VotingParams) String() string { return proto.CompactTextString(m) } 457 func (*VotingParams) ProtoMessage() {} 458 func (*VotingParams) Descriptor() ([]byte, []int) { 459 return fileDescriptor_6e82113c1a9a4b7c, []int{7} 460 } 461 func (m *VotingParams) XXX_Unmarshal(b []byte) error { 462 return m.Unmarshal(b) 463 } 464 func (m *VotingParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 465 if deterministic { 466 return xxx_messageInfo_VotingParams.Marshal(b, m, deterministic) 467 } else { 468 b = b[:cap(b)] 469 n, err := m.MarshalToSizedBuffer(b) 470 if err != nil { 471 return nil, err 472 } 473 return b[:n], nil 474 } 475 } 476 func (m *VotingParams) XXX_Merge(src proto.Message) { 477 xxx_messageInfo_VotingParams.Merge(m, src) 478 } 479 func (m *VotingParams) XXX_Size() int { 480 return m.Size() 481 } 482 func (m *VotingParams) XXX_DiscardUnknown() { 483 xxx_messageInfo_VotingParams.DiscardUnknown(m) 484 } 485 486 var xxx_messageInfo_VotingParams proto.InternalMessageInfo 487 488 // TallyParams defines the params for tallying votes on governance proposals. 489 type TallyParams struct { 490 // Minimum percentage of total stake needed to vote for a result to be 491 // considered valid. 492 Quorum cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=quorum,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"quorum,omitempty"` 493 // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. 494 Threshold cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=threshold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"threshold,omitempty"` 495 // Minimum value of Veto votes to Total votes ratio for proposal to be 496 // vetoed. Default value: 1/3. 497 VetoThreshold cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=veto_threshold,json=vetoThreshold,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"veto_threshold,omitempty"` 498 } 499 500 func (m *TallyParams) Reset() { *m = TallyParams{} } 501 func (m *TallyParams) String() string { return proto.CompactTextString(m) } 502 func (*TallyParams) ProtoMessage() {} 503 func (*TallyParams) Descriptor() ([]byte, []int) { 504 return fileDescriptor_6e82113c1a9a4b7c, []int{8} 505 } 506 func (m *TallyParams) XXX_Unmarshal(b []byte) error { 507 return m.Unmarshal(b) 508 } 509 func (m *TallyParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 510 if deterministic { 511 return xxx_messageInfo_TallyParams.Marshal(b, m, deterministic) 512 } else { 513 b = b[:cap(b)] 514 n, err := m.MarshalToSizedBuffer(b) 515 if err != nil { 516 return nil, err 517 } 518 return b[:n], nil 519 } 520 } 521 func (m *TallyParams) XXX_Merge(src proto.Message) { 522 xxx_messageInfo_TallyParams.Merge(m, src) 523 } 524 func (m *TallyParams) XXX_Size() int { 525 return m.Size() 526 } 527 func (m *TallyParams) XXX_DiscardUnknown() { 528 xxx_messageInfo_TallyParams.DiscardUnknown(m) 529 } 530 531 var xxx_messageInfo_TallyParams proto.InternalMessageInfo 532 533 func init() { 534 proto.RegisterEnum("cosmos.gov.v1beta1.VoteOption", VoteOption_name, VoteOption_value) 535 proto.RegisterEnum("cosmos.gov.v1beta1.ProposalStatus", ProposalStatus_name, ProposalStatus_value) 536 proto.RegisterType((*WeightedVoteOption)(nil), "cosmos.gov.v1beta1.WeightedVoteOption") 537 proto.RegisterType((*TextProposal)(nil), "cosmos.gov.v1beta1.TextProposal") 538 proto.RegisterType((*Deposit)(nil), "cosmos.gov.v1beta1.Deposit") 539 proto.RegisterType((*Proposal)(nil), "cosmos.gov.v1beta1.Proposal") 540 proto.RegisterType((*TallyResult)(nil), "cosmos.gov.v1beta1.TallyResult") 541 proto.RegisterType((*Vote)(nil), "cosmos.gov.v1beta1.Vote") 542 proto.RegisterType((*DepositParams)(nil), "cosmos.gov.v1beta1.DepositParams") 543 proto.RegisterType((*VotingParams)(nil), "cosmos.gov.v1beta1.VotingParams") 544 proto.RegisterType((*TallyParams)(nil), "cosmos.gov.v1beta1.TallyParams") 545 } 546 547 func init() { proto.RegisterFile("cosmos/gov/v1beta1/gov.proto", fileDescriptor_6e82113c1a9a4b7c) } 548 549 var fileDescriptor_6e82113c1a9a4b7c = []byte{ 550 // 1413 bytes of a gzipped FileDescriptorProto 551 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcf, 0x6f, 0x13, 0xc7, 552 0x17, 0xf7, 0xda, 0xce, 0xaf, 0xb1, 0x13, 0x96, 0x21, 0x10, 0x67, 0xe1, 0xeb, 0x5d, 0xf9, 0x2b, 553 0x55, 0x51, 0x4a, 0x6c, 0x08, 0x2a, 0x52, 0x83, 0x5a, 0xc9, 0xc6, 0x4b, 0x31, 0x05, 0xdb, 0x5d, 554 0x2f, 0xa1, 0x54, 0xaa, 0x56, 0x1b, 0xef, 0x60, 0x6f, 0xf1, 0xee, 0x18, 0xef, 0x38, 0xc4, 0x7f, 555 0x40, 0x2b, 0xe4, 0x13, 0xc7, 0x1e, 0x6a, 0x09, 0xb5, 0xaa, 0x54, 0xf5, 0xc4, 0x81, 0x3f, 0x02, 556 0xa1, 0x1e, 0x10, 0x87, 0xaa, 0xed, 0x21, 0xb4, 0x20, 0x15, 0xc4, 0x9f, 0xd0, 0x53, 0xb5, 0x33, 557 0xb3, 0xf1, 0xc6, 0x09, 0x24, 0x3e, 0xf4, 0x12, 0x6d, 0x66, 0x3e, 0x3f, 0xe6, 0xbd, 0x7d, 0xef, 558 0xed, 0x18, 0x9c, 0xaa, 0x63, 0xcf, 0xc1, 0x5e, 0xae, 0x81, 0x37, 0x73, 0x9b, 0x67, 0x37, 0x10, 559 0x31, 0xcf, 0xfa, 0xcf, 0xd9, 0x76, 0x07, 0x13, 0x0c, 0x21, 0xdb, 0xcd, 0xfa, 0x2b, 0x7c, 0x57, 560 0x4a, 0x73, 0xc6, 0x86, 0xe9, 0xa1, 0x1d, 0x4a, 0x1d, 0xdb, 0x2e, 0xe3, 0x48, 0xf3, 0x0d, 0xdc, 561 0xc0, 0xf4, 0x31, 0xe7, 0x3f, 0xf1, 0x55, 0xb9, 0x81, 0x71, 0xa3, 0x85, 0x72, 0xf4, 0xbf, 0x8d, 562 0xee, 0xad, 0x1c, 0xb1, 0x1d, 0xe4, 0x11, 0xd3, 0x69, 0x73, 0xc0, 0xe2, 0x28, 0xc0, 0x74, 0x7b, 563 0x7c, 0x2b, 0x3d, 0xba, 0x65, 0x75, 0x3b, 0x26, 0xb1, 0x71, 0xe0, 0xb8, 0xc8, 0x4e, 0x64, 0x30, 564 0x53, 0x7e, 0x64, 0xb6, 0x75, 0xd4, 0x74, 0x6c, 0x17, 0xe7, 0xe8, 0x5f, 0xb6, 0x94, 0xf9, 0x4e, 565 0x00, 0xf0, 0x06, 0xb2, 0x1b, 0x4d, 0x82, 0xac, 0x75, 0x4c, 0x50, 0xa5, 0xed, 0x4b, 0xc1, 0xf3, 566 0x60, 0x12, 0xd3, 0xa7, 0x94, 0xa0, 0x08, 0x4b, 0x73, 0xab, 0xe9, 0xec, 0xde, 0xd8, 0xb3, 0x43, 567 0xbc, 0xc6, 0xd1, 0xb0, 0x0c, 0x26, 0xef, 0x52, 0xb5, 0x54, 0x54, 0x11, 0x96, 0x66, 0x0a, 0xe7, 568 0x1f, 0x6f, 0xcb, 0x91, 0x3f, 0xb6, 0xe5, 0x93, 0x8c, 0xee, 0x59, 0xb7, 0xb3, 0x36, 0xce, 0x39, 569 0x26, 0x69, 0x66, 0xaf, 0xa2, 0x86, 0x59, 0xef, 0x15, 0x51, 0xfd, 0xd9, 0xa3, 0x15, 0xc0, 0xd5, 570 0x8b, 0xa8, 0xfe, 0xd3, 0xab, 0x87, 0xcb, 0x82, 0xc6, 0x55, 0x32, 0xdf, 0x08, 0x20, 0xa9, 0xa3, 571 0x2d, 0x52, 0xed, 0xe0, 0x36, 0xf6, 0xcc, 0x16, 0x9c, 0x07, 0x13, 0xc4, 0x26, 0x2d, 0x44, 0xcf, 572 0x35, 0xa3, 0xb1, 0x7f, 0xa0, 0x02, 0x12, 0x16, 0xf2, 0xea, 0x1d, 0x9b, 0x9d, 0x99, 0x7a, 0x6b, 573 0xe1, 0xa5, 0xb5, 0x8f, 0x5f, 0x3f, 0x90, 0x85, 0x27, 0x8f, 0x56, 0xa4, 0x7d, 0xe2, 0xb8, 0x88, 574 0x5d, 0x82, 0x5c, 0xd2, 0x7f, 0xf5, 0x70, 0x79, 0x81, 0x6d, 0xaf, 0x78, 0xd6, 0xed, 0x5c, 0xd8, 575 0x37, 0xf3, 0xab, 0x00, 0xa6, 0x8a, 0xa8, 0x8d, 0x3d, 0x9b, 0x40, 0x19, 0x24, 0xda, 0x7c, 0xdd, 576 0xb0, 0x2d, 0x7a, 0x92, 0xb8, 0x06, 0x82, 0xa5, 0x92, 0x05, 0xcf, 0x83, 0x19, 0x8b, 0x61, 0x71, 577 0x87, 0x27, 0x22, 0xf5, 0xec, 0xd1, 0xca, 0x3c, 0xf7, 0xce, 0x5b, 0x56, 0x07, 0x79, 0x5e, 0x8d, 578 0x74, 0x6c, 0xb7, 0xa1, 0x0d, 0xa1, 0xb0, 0x09, 0x26, 0x4d, 0x07, 0x77, 0x5d, 0x92, 0x8a, 0x29, 579 0xb1, 0xa5, 0xc4, 0xea, 0x62, 0x90, 0x75, 0xbf, 0xba, 0x42, 0xc7, 0xb5, 0xdd, 0xc2, 0x07, 0x7e, 580 0x62, 0x7f, 0x7e, 0x2e, 0x2f, 0x35, 0x6c, 0xd2, 0xec, 0x6e, 0x64, 0xeb, 0xd8, 0xe1, 0xef, 0x3a, 581 0x17, 0x0a, 0x81, 0xf4, 0xda, 0xc8, 0xa3, 0x04, 0x8f, 0xe7, 0x95, 0xe9, 0xaf, 0x4d, 0xdf, 0x7b, 582 0x20, 0x47, 0x5e, 0x3f, 0x90, 0x23, 0x99, 0xdf, 0x27, 0xc0, 0xf4, 0x4e, 0x76, 0x0f, 0x8c, 0xac, 583 0x0c, 0xa6, 0xea, 0x2c, 0x5b, 0x34, 0xae, 0xc4, 0xea, 0x7c, 0x96, 0x95, 0x63, 0x36, 0x28, 0xc7, 584 0x6c, 0xde, 0xed, 0x15, 0xd2, 0xef, 0xce, 0xb4, 0x16, 0x88, 0xc0, 0x35, 0x30, 0xe9, 0x11, 0x93, 585 0x74, 0xbd, 0x54, 0x8c, 0xd6, 0x59, 0x66, 0xbf, 0x3a, 0x0b, 0x8e, 0x57, 0xa3, 0x48, 0x8d, 0x33, 586 0xe0, 0xe7, 0x00, 0xde, 0xb2, 0x5d, 0xb3, 0x65, 0x10, 0xb3, 0xd5, 0xea, 0x19, 0x1d, 0xe4, 0x75, 587 0x5b, 0x24, 0x15, 0xa7, 0xc7, 0x92, 0xf7, 0xd3, 0xd1, 0x7d, 0x9c, 0x46, 0x61, 0x85, 0x19, 0x3f, 588 0x7f, 0x2c, 0x27, 0x22, 0x55, 0x09, 0x6d, 0xc2, 0x2b, 0x20, 0xe1, 0x75, 0x37, 0x1c, 0x9b, 0x18, 589 0x7e, 0x5f, 0xa6, 0x26, 0xa8, 0xa4, 0xb4, 0x27, 0x52, 0x3d, 0x68, 0xda, 0xc2, 0xac, 0xaf, 0x76, 590 0xff, 0xb9, 0x2c, 0x30, 0x45, 0xc0, 0xd8, 0xfe, 0x3e, 0xac, 0x01, 0x91, 0xbf, 0x60, 0x03, 0xb9, 591 0x16, 0x13, 0x9c, 0x1c, 0x57, 0x70, 0x8e, 0x4b, 0xa8, 0xae, 0x45, 0x45, 0xbb, 0x60, 0x96, 0x60, 592 0x62, 0xb6, 0x0c, 0xbe, 0x9e, 0x9a, 0xfa, 0x8f, 0xea, 0x25, 0x49, 0x6d, 0x82, 0xc2, 0xbf, 0x0e, 593 0x8e, 0x6e, 0x62, 0x62, 0xbb, 0x0d, 0xc3, 0x23, 0x66, 0x87, 0x67, 0x67, 0x7a, 0xdc, 0x60, 0x8e, 594 0x30, 0x8d, 0x9a, 0x2f, 0x41, 0xa3, 0xf9, 0x0c, 0xf0, 0xa5, 0x61, 0x86, 0x66, 0xc6, 0x15, 0x9d, 595 0x65, 0x0a, 0x3c, 0x41, 0x6b, 0x71, 0xbf, 0xdd, 0x33, 0x3f, 0x46, 0x41, 0x22, 0xfc, 0x5e, 0x3f, 596 0x02, 0xb1, 0x1e, 0xf2, 0xd8, 0xe8, 0x28, 0xbc, 0xcf, 0x47, 0xd3, 0xf1, 0xbd, 0xa3, 0xa9, 0xe4, 597 0x92, 0xd0, 0x50, 0x2a, 0xb9, 0x44, 0xf3, 0x79, 0x50, 0x05, 0x53, 0xe6, 0x86, 0x47, 0x4c, 0x9b, 598 0x4f, 0x98, 0xf1, 0x24, 0x02, 0x2e, 0xbc, 0x00, 0xa2, 0x2e, 0xa6, 0xf5, 0x3e, 0xa6, 0x42, 0xd4, 599 0xc5, 0xf0, 0x1a, 0x48, 0xba, 0xd8, 0xb8, 0x6b, 0x93, 0xa6, 0xb1, 0x89, 0x08, 0xa6, 0xe5, 0x3e, 600 0xa6, 0x0c, 0x70, 0xf1, 0x0d, 0x9b, 0x34, 0xd7, 0x11, 0xc1, 0x3c, 0x4f, 0xff, 0x08, 0x20, 0xee, 601 0x0f, 0x73, 0x78, 0x6e, 0x9f, 0xfe, 0x2f, 0xc0, 0x37, 0xdb, 0x72, 0xd4, 0xb6, 0xbe, 0x7f, 0xf5, 602 0x70, 0x39, 0x6a, 0x5b, 0xbc, 0xc2, 0x43, 0x33, 0x21, 0x0b, 0x26, 0x36, 0x31, 0x41, 0x07, 0x4f, 603 0x3a, 0x06, 0xf3, 0x7b, 0x9e, 0x7f, 0x5b, 0x62, 0x87, 0xf9, 0xb6, 0x14, 0xa2, 0x29, 0x61, 0xe7, 604 0xfb, 0xf2, 0x29, 0x98, 0x62, 0x4f, 0x5e, 0x2a, 0x4e, 0x4b, 0xfe, 0xbd, 0xfd, 0xc8, 0x7b, 0x3f, 605 0x68, 0xe1, 0x7e, 0x0f, 0x14, 0x68, 0xf0, 0x91, 0x4c, 0x3f, 0x0a, 0x66, 0x79, 0x81, 0x57, 0xcd, 606 0x8e, 0xe9, 0x78, 0xf0, 0x6b, 0x01, 0x24, 0x1c, 0xdb, 0xdd, 0x69, 0x2e, 0xe1, 0xa0, 0xe6, 0x2a, 607 0xf9, 0xe2, 0x6f, 0xb6, 0xe5, 0xe3, 0x21, 0xd6, 0x69, 0xec, 0xd8, 0x04, 0x39, 0x6d, 0xd2, 0x1b, 608 0xa7, 0xeb, 0x34, 0xe0, 0xd8, 0x6e, 0xd0, 0x6e, 0x77, 0x00, 0x74, 0xcc, 0xad, 0x40, 0xd0, 0x68, 609 0xa3, 0x8e, 0x8d, 0x2d, 0x3e, 0x77, 0x17, 0xf7, 0xb4, 0x46, 0x91, 0x5f, 0x03, 0x0a, 0x4b, 0xfc, 610 0x34, 0xa7, 0xf6, 0x92, 0x87, 0x87, 0xfa, 0xf6, 0xb9, 0x2c, 0x68, 0xa2, 0x63, 0x6e, 0x05, 0xa1, 611 0xd3, 0xfd, 0x8c, 0x07, 0x92, 0xeb, 0xb4, 0x91, 0x78, 0x2a, 0xea, 0x80, 0x37, 0x56, 0xe0, 0x2e, 612 0x1c, 0xe4, 0xfe, 0x7f, 0xee, 0xbe, 0xb0, 0x8b, 0x37, 0x62, 0x9c, 0x64, 0x9b, 0xdc, 0xf4, 0x49, 613 0xd0, 0xa6, 0xdc, 0xf4, 0x4b, 0x30, 0x79, 0xa7, 0x8b, 0x3b, 0x5d, 0x87, 0xba, 0x25, 0x0b, 0xea, 614 0x21, 0x2e, 0x11, 0x6f, 0xb6, 0x65, 0x91, 0x91, 0x86, 0x56, 0xbb, 0x2f, 0x16, 0x1a, 0x17, 0x85, 615 0xb7, 0xc0, 0x0c, 0x69, 0x76, 0x90, 0xd7, 0xc4, 0x2d, 0x96, 0xcd, 0x64, 0xe1, 0xf2, 0xe1, 0x1c, 616 0x8e, 0xed, 0xf0, 0xde, 0x6a, 0x32, 0x94, 0x86, 0x04, 0xcc, 0xf9, 0x2d, 0x6a, 0x0c, 0xcd, 0x62, 617 0xd4, 0xec, 0xda, 0xe1, 0xcc, 0x52, 0xbb, 0xc9, 0x6f, 0x75, 0x9c, 0xf5, 0x71, 0x7a, 0x00, 0x5b, 618 0xfe, 0x5b, 0x00, 0x20, 0x74, 0x91, 0x3b, 0x0d, 0x16, 0xd6, 0x2b, 0xba, 0x6a, 0x54, 0xaa, 0x7a, 619 0xa9, 0x52, 0x36, 0xae, 0x97, 0x6b, 0x55, 0xf5, 0x62, 0xe9, 0x52, 0x49, 0x2d, 0x8a, 0x11, 0xe9, 620 0x48, 0x7f, 0xa0, 0x24, 0x18, 0x50, 0xf5, 0x95, 0x61, 0x06, 0x1c, 0x09, 0xa3, 0x6f, 0xaa, 0x35, 621 0x51, 0x90, 0x66, 0xfb, 0x03, 0x65, 0x86, 0xa1, 0x6e, 0x22, 0x0f, 0x2e, 0x83, 0x63, 0x61, 0x4c, 622 0xbe, 0x50, 0xd3, 0xf3, 0xa5, 0xb2, 0x18, 0x95, 0x8e, 0xf6, 0x07, 0xca, 0x2c, 0xc3, 0xe5, 0xf9, 623 0xa8, 0x53, 0xc0, 0x5c, 0x18, 0x5b, 0xae, 0x88, 0x31, 0x29, 0xd9, 0x1f, 0x28, 0xd3, 0x0c, 0x56, 624 0xc6, 0x70, 0x15, 0xa4, 0x76, 0x23, 0x8c, 0x1b, 0x25, 0xfd, 0xb2, 0xb1, 0xae, 0xea, 0x15, 0x31, 625 0x2e, 0xcd, 0xf7, 0x07, 0x8a, 0x18, 0x60, 0x83, 0xa1, 0x25, 0xc5, 0xef, 0xfd, 0x90, 0x8e, 0x2c, 626 0xff, 0x12, 0x05, 0x73, 0xbb, 0x6f, 0x06, 0x30, 0x0b, 0x4e, 0x56, 0xb5, 0x4a, 0xb5, 0x52, 0xcb, 627 0x5f, 0x35, 0x6a, 0x7a, 0x5e, 0xbf, 0x5e, 0x1b, 0x09, 0x98, 0x86, 0xc2, 0xc0, 0x65, 0xbb, 0x05, 628 0x2f, 0x80, 0xf4, 0x28, 0xbe, 0xa8, 0x56, 0x2b, 0xb5, 0x92, 0x6e, 0x54, 0x55, 0xad, 0x54, 0x29, 629 0x8a, 0x82, 0xb4, 0xd0, 0x1f, 0x28, 0xc7, 0x18, 0x65, 0x57, 0xab, 0xc0, 0x0f, 0xc1, 0xff, 0x46, 630 0xc9, 0xeb, 0x15, 0xbd, 0x54, 0xfe, 0x24, 0xe0, 0x46, 0xa5, 0x13, 0xfd, 0x81, 0x02, 0x19, 0x77, 631 0x3d, 0x54, 0xf0, 0xf0, 0x34, 0x38, 0x31, 0x4a, 0xad, 0xe6, 0x6b, 0x35, 0xb5, 0x28, 0xc6, 0x24, 632 0xb1, 0x3f, 0x50, 0x92, 0x8c, 0x53, 0x35, 0x3d, 0x0f, 0x59, 0xf0, 0x0c, 0x48, 0x8d, 0xa2, 0x35, 633 0xf5, 0x8a, 0x7a, 0x51, 0x57, 0x8b, 0x62, 0x5c, 0x82, 0xfd, 0x81, 0x32, 0xc7, 0x6f, 0x46, 0xe8, 634 0x2b, 0x54, 0x27, 0x68, 0x5f, 0xfd, 0x4b, 0xf9, 0xd2, 0x55, 0xb5, 0x28, 0x4e, 0x84, 0xf5, 0x2f, 635 0x99, 0x76, 0x0b, 0x59, 0x2c, 0x9d, 0x85, 0xf2, 0xe3, 0xbf, 0xd2, 0x91, 0xc7, 0x2f, 0xd2, 0xc2, 636 0xd3, 0x17, 0x69, 0xe1, 0xcf, 0x17, 0x69, 0xe1, 0xfe, 0xcb, 0x74, 0xe4, 0xe9, 0xcb, 0x74, 0xe4, 637 0xb7, 0x97, 0xe9, 0xc8, 0x17, 0x67, 0xde, 0x39, 0xc0, 0xb6, 0xe8, 0x0f, 0x26, 0x3a, 0xc6, 0x82, 638 0xdf, 0x40, 0x1b, 0x93, 0x74, 0x34, 0x9c, 0xfb, 0x37, 0x00, 0x00, 0xff, 0xff, 0x15, 0xc3, 0xb3, 639 0x11, 0x53, 0x0d, 0x00, 0x00, 640 } 641 642 func (this *TextProposal) Equal(that interface{}) bool { 643 if that == nil { 644 return this == nil 645 } 646 647 that1, ok := that.(*TextProposal) 648 if !ok { 649 that2, ok := that.(TextProposal) 650 if ok { 651 that1 = &that2 652 } else { 653 return false 654 } 655 } 656 if that1 == nil { 657 return this == nil 658 } else if this == nil { 659 return false 660 } 661 if this.Title != that1.Title { 662 return false 663 } 664 if this.Description != that1.Description { 665 return false 666 } 667 return true 668 } 669 func (this *Proposal) Equal(that interface{}) bool { 670 if that == nil { 671 return this == nil 672 } 673 674 that1, ok := that.(*Proposal) 675 if !ok { 676 that2, ok := that.(Proposal) 677 if ok { 678 that1 = &that2 679 } else { 680 return false 681 } 682 } 683 if that1 == nil { 684 return this == nil 685 } else if this == nil { 686 return false 687 } 688 if this.ProposalId != that1.ProposalId { 689 return false 690 } 691 if !this.Content.Equal(that1.Content) { 692 return false 693 } 694 if this.Status != that1.Status { 695 return false 696 } 697 if !this.FinalTallyResult.Equal(&that1.FinalTallyResult) { 698 return false 699 } 700 if !this.SubmitTime.Equal(that1.SubmitTime) { 701 return false 702 } 703 if !this.DepositEndTime.Equal(that1.DepositEndTime) { 704 return false 705 } 706 if len(this.TotalDeposit) != len(that1.TotalDeposit) { 707 return false 708 } 709 for i := range this.TotalDeposit { 710 if !this.TotalDeposit[i].Equal(&that1.TotalDeposit[i]) { 711 return false 712 } 713 } 714 if !this.VotingStartTime.Equal(that1.VotingStartTime) { 715 return false 716 } 717 if !this.VotingEndTime.Equal(that1.VotingEndTime) { 718 return false 719 } 720 return true 721 } 722 func (this *TallyResult) Equal(that interface{}) bool { 723 if that == nil { 724 return this == nil 725 } 726 727 that1, ok := that.(*TallyResult) 728 if !ok { 729 that2, ok := that.(TallyResult) 730 if ok { 731 that1 = &that2 732 } else { 733 return false 734 } 735 } 736 if that1 == nil { 737 return this == nil 738 } else if this == nil { 739 return false 740 } 741 if !this.Yes.Equal(that1.Yes) { 742 return false 743 } 744 if !this.Abstain.Equal(that1.Abstain) { 745 return false 746 } 747 if !this.No.Equal(that1.No) { 748 return false 749 } 750 if !this.NoWithVeto.Equal(that1.NoWithVeto) { 751 return false 752 } 753 return true 754 } 755 func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) { 756 size := m.Size() 757 dAtA = make([]byte, size) 758 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 759 if err != nil { 760 return nil, err 761 } 762 return dAtA[:n], nil 763 } 764 765 func (m *WeightedVoteOption) MarshalTo(dAtA []byte) (int, error) { 766 size := m.Size() 767 return m.MarshalToSizedBuffer(dAtA[:size]) 768 } 769 770 func (m *WeightedVoteOption) MarshalToSizedBuffer(dAtA []byte) (int, error) { 771 i := len(dAtA) 772 _ = i 773 var l int 774 _ = l 775 { 776 size := m.Weight.Size() 777 i -= size 778 if _, err := m.Weight.MarshalTo(dAtA[i:]); err != nil { 779 return 0, err 780 } 781 i = encodeVarintGov(dAtA, i, uint64(size)) 782 } 783 i-- 784 dAtA[i] = 0x12 785 if m.Option != 0 { 786 i = encodeVarintGov(dAtA, i, uint64(m.Option)) 787 i-- 788 dAtA[i] = 0x8 789 } 790 return len(dAtA) - i, nil 791 } 792 793 func (m *TextProposal) Marshal() (dAtA []byte, err error) { 794 size := m.Size() 795 dAtA = make([]byte, size) 796 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 797 if err != nil { 798 return nil, err 799 } 800 return dAtA[:n], nil 801 } 802 803 func (m *TextProposal) MarshalTo(dAtA []byte) (int, error) { 804 size := m.Size() 805 return m.MarshalToSizedBuffer(dAtA[:size]) 806 } 807 808 func (m *TextProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 809 i := len(dAtA) 810 _ = i 811 var l int 812 _ = l 813 if len(m.Description) > 0 { 814 i -= len(m.Description) 815 copy(dAtA[i:], m.Description) 816 i = encodeVarintGov(dAtA, i, uint64(len(m.Description))) 817 i-- 818 dAtA[i] = 0x12 819 } 820 if len(m.Title) > 0 { 821 i -= len(m.Title) 822 copy(dAtA[i:], m.Title) 823 i = encodeVarintGov(dAtA, i, uint64(len(m.Title))) 824 i-- 825 dAtA[i] = 0xa 826 } 827 return len(dAtA) - i, nil 828 } 829 830 func (m *Deposit) Marshal() (dAtA []byte, err error) { 831 size := m.Size() 832 dAtA = make([]byte, size) 833 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 834 if err != nil { 835 return nil, err 836 } 837 return dAtA[:n], nil 838 } 839 840 func (m *Deposit) MarshalTo(dAtA []byte) (int, error) { 841 size := m.Size() 842 return m.MarshalToSizedBuffer(dAtA[:size]) 843 } 844 845 func (m *Deposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { 846 i := len(dAtA) 847 _ = i 848 var l int 849 _ = l 850 if len(m.Amount) > 0 { 851 for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { 852 { 853 size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 854 if err != nil { 855 return 0, err 856 } 857 i -= size 858 i = encodeVarintGov(dAtA, i, uint64(size)) 859 } 860 i-- 861 dAtA[i] = 0x1a 862 } 863 } 864 if len(m.Depositor) > 0 { 865 i -= len(m.Depositor) 866 copy(dAtA[i:], m.Depositor) 867 i = encodeVarintGov(dAtA, i, uint64(len(m.Depositor))) 868 i-- 869 dAtA[i] = 0x12 870 } 871 if m.ProposalId != 0 { 872 i = encodeVarintGov(dAtA, i, uint64(m.ProposalId)) 873 i-- 874 dAtA[i] = 0x8 875 } 876 return len(dAtA) - i, nil 877 } 878 879 func (m *Proposal) Marshal() (dAtA []byte, err error) { 880 size := m.Size() 881 dAtA = make([]byte, size) 882 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 883 if err != nil { 884 return nil, err 885 } 886 return dAtA[:n], nil 887 } 888 889 func (m *Proposal) MarshalTo(dAtA []byte) (int, error) { 890 size := m.Size() 891 return m.MarshalToSizedBuffer(dAtA[:size]) 892 } 893 894 func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 895 i := len(dAtA) 896 _ = i 897 var l int 898 _ = l 899 n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.VotingEndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.VotingEndTime):]) 900 if err1 != nil { 901 return 0, err1 902 } 903 i -= n1 904 i = encodeVarintGov(dAtA, i, uint64(n1)) 905 i-- 906 dAtA[i] = 0x4a 907 n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.VotingStartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.VotingStartTime):]) 908 if err2 != nil { 909 return 0, err2 910 } 911 i -= n2 912 i = encodeVarintGov(dAtA, i, uint64(n2)) 913 i-- 914 dAtA[i] = 0x42 915 if len(m.TotalDeposit) > 0 { 916 for iNdEx := len(m.TotalDeposit) - 1; iNdEx >= 0; iNdEx-- { 917 { 918 size, err := m.TotalDeposit[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 919 if err != nil { 920 return 0, err 921 } 922 i -= size 923 i = encodeVarintGov(dAtA, i, uint64(size)) 924 } 925 i-- 926 dAtA[i] = 0x3a 927 } 928 } 929 n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.DepositEndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.DepositEndTime):]) 930 if err3 != nil { 931 return 0, err3 932 } 933 i -= n3 934 i = encodeVarintGov(dAtA, i, uint64(n3)) 935 i-- 936 dAtA[i] = 0x32 937 n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.SubmitTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.SubmitTime):]) 938 if err4 != nil { 939 return 0, err4 940 } 941 i -= n4 942 i = encodeVarintGov(dAtA, i, uint64(n4)) 943 i-- 944 dAtA[i] = 0x2a 945 { 946 size, err := m.FinalTallyResult.MarshalToSizedBuffer(dAtA[:i]) 947 if err != nil { 948 return 0, err 949 } 950 i -= size 951 i = encodeVarintGov(dAtA, i, uint64(size)) 952 } 953 i-- 954 dAtA[i] = 0x22 955 if m.Status != 0 { 956 i = encodeVarintGov(dAtA, i, uint64(m.Status)) 957 i-- 958 dAtA[i] = 0x18 959 } 960 if m.Content != nil { 961 { 962 size, err := m.Content.MarshalToSizedBuffer(dAtA[:i]) 963 if err != nil { 964 return 0, err 965 } 966 i -= size 967 i = encodeVarintGov(dAtA, i, uint64(size)) 968 } 969 i-- 970 dAtA[i] = 0x12 971 } 972 if m.ProposalId != 0 { 973 i = encodeVarintGov(dAtA, i, uint64(m.ProposalId)) 974 i-- 975 dAtA[i] = 0x8 976 } 977 return len(dAtA) - i, nil 978 } 979 980 func (m *TallyResult) Marshal() (dAtA []byte, err error) { 981 size := m.Size() 982 dAtA = make([]byte, size) 983 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 984 if err != nil { 985 return nil, err 986 } 987 return dAtA[:n], nil 988 } 989 990 func (m *TallyResult) MarshalTo(dAtA []byte) (int, error) { 991 size := m.Size() 992 return m.MarshalToSizedBuffer(dAtA[:size]) 993 } 994 995 func (m *TallyResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { 996 i := len(dAtA) 997 _ = i 998 var l int 999 _ = l 1000 { 1001 size := m.NoWithVeto.Size() 1002 i -= size 1003 if _, err := m.NoWithVeto.MarshalTo(dAtA[i:]); err != nil { 1004 return 0, err 1005 } 1006 i = encodeVarintGov(dAtA, i, uint64(size)) 1007 } 1008 i-- 1009 dAtA[i] = 0x22 1010 { 1011 size := m.No.Size() 1012 i -= size 1013 if _, err := m.No.MarshalTo(dAtA[i:]); err != nil { 1014 return 0, err 1015 } 1016 i = encodeVarintGov(dAtA, i, uint64(size)) 1017 } 1018 i-- 1019 dAtA[i] = 0x1a 1020 { 1021 size := m.Abstain.Size() 1022 i -= size 1023 if _, err := m.Abstain.MarshalTo(dAtA[i:]); err != nil { 1024 return 0, err 1025 } 1026 i = encodeVarintGov(dAtA, i, uint64(size)) 1027 } 1028 i-- 1029 dAtA[i] = 0x12 1030 { 1031 size := m.Yes.Size() 1032 i -= size 1033 if _, err := m.Yes.MarshalTo(dAtA[i:]); err != nil { 1034 return 0, err 1035 } 1036 i = encodeVarintGov(dAtA, i, uint64(size)) 1037 } 1038 i-- 1039 dAtA[i] = 0xa 1040 return len(dAtA) - i, nil 1041 } 1042 1043 func (m *Vote) Marshal() (dAtA []byte, err error) { 1044 size := m.Size() 1045 dAtA = make([]byte, size) 1046 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1047 if err != nil { 1048 return nil, err 1049 } 1050 return dAtA[:n], nil 1051 } 1052 1053 func (m *Vote) MarshalTo(dAtA []byte) (int, error) { 1054 size := m.Size() 1055 return m.MarshalToSizedBuffer(dAtA[:size]) 1056 } 1057 1058 func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1059 i := len(dAtA) 1060 _ = i 1061 var l int 1062 _ = l 1063 if len(m.Options) > 0 { 1064 for iNdEx := len(m.Options) - 1; iNdEx >= 0; iNdEx-- { 1065 { 1066 size, err := m.Options[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1067 if err != nil { 1068 return 0, err 1069 } 1070 i -= size 1071 i = encodeVarintGov(dAtA, i, uint64(size)) 1072 } 1073 i-- 1074 dAtA[i] = 0x22 1075 } 1076 } 1077 if m.Option != 0 { 1078 i = encodeVarintGov(dAtA, i, uint64(m.Option)) 1079 i-- 1080 dAtA[i] = 0x18 1081 } 1082 if len(m.Voter) > 0 { 1083 i -= len(m.Voter) 1084 copy(dAtA[i:], m.Voter) 1085 i = encodeVarintGov(dAtA, i, uint64(len(m.Voter))) 1086 i-- 1087 dAtA[i] = 0x12 1088 } 1089 if m.ProposalId != 0 { 1090 i = encodeVarintGov(dAtA, i, uint64(m.ProposalId)) 1091 i-- 1092 dAtA[i] = 0x8 1093 } 1094 return len(dAtA) - i, nil 1095 } 1096 1097 func (m *DepositParams) Marshal() (dAtA []byte, err error) { 1098 size := m.Size() 1099 dAtA = make([]byte, size) 1100 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1101 if err != nil { 1102 return nil, err 1103 } 1104 return dAtA[:n], nil 1105 } 1106 1107 func (m *DepositParams) MarshalTo(dAtA []byte) (int, error) { 1108 size := m.Size() 1109 return m.MarshalToSizedBuffer(dAtA[:size]) 1110 } 1111 1112 func (m *DepositParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1113 i := len(dAtA) 1114 _ = i 1115 var l int 1116 _ = l 1117 n7, err7 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.MaxDepositPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.MaxDepositPeriod):]) 1118 if err7 != nil { 1119 return 0, err7 1120 } 1121 i -= n7 1122 i = encodeVarintGov(dAtA, i, uint64(n7)) 1123 i-- 1124 dAtA[i] = 0x12 1125 if len(m.MinDeposit) > 0 { 1126 for iNdEx := len(m.MinDeposit) - 1; iNdEx >= 0; iNdEx-- { 1127 { 1128 size, err := m.MinDeposit[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1129 if err != nil { 1130 return 0, err 1131 } 1132 i -= size 1133 i = encodeVarintGov(dAtA, i, uint64(size)) 1134 } 1135 i-- 1136 dAtA[i] = 0xa 1137 } 1138 } 1139 return len(dAtA) - i, nil 1140 } 1141 1142 func (m *VotingParams) Marshal() (dAtA []byte, err error) { 1143 size := m.Size() 1144 dAtA = make([]byte, size) 1145 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1146 if err != nil { 1147 return nil, err 1148 } 1149 return dAtA[:n], nil 1150 } 1151 1152 func (m *VotingParams) MarshalTo(dAtA []byte) (int, error) { 1153 size := m.Size() 1154 return m.MarshalToSizedBuffer(dAtA[:size]) 1155 } 1156 1157 func (m *VotingParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1158 i := len(dAtA) 1159 _ = i 1160 var l int 1161 _ = l 1162 n8, err8 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.VotingPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.VotingPeriod):]) 1163 if err8 != nil { 1164 return 0, err8 1165 } 1166 i -= n8 1167 i = encodeVarintGov(dAtA, i, uint64(n8)) 1168 i-- 1169 dAtA[i] = 0xa 1170 return len(dAtA) - i, nil 1171 } 1172 1173 func (m *TallyParams) Marshal() (dAtA []byte, err error) { 1174 size := m.Size() 1175 dAtA = make([]byte, size) 1176 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1177 if err != nil { 1178 return nil, err 1179 } 1180 return dAtA[:n], nil 1181 } 1182 1183 func (m *TallyParams) MarshalTo(dAtA []byte) (int, error) { 1184 size := m.Size() 1185 return m.MarshalToSizedBuffer(dAtA[:size]) 1186 } 1187 1188 func (m *TallyParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1189 i := len(dAtA) 1190 _ = i 1191 var l int 1192 _ = l 1193 { 1194 size := m.VetoThreshold.Size() 1195 i -= size 1196 if _, err := m.VetoThreshold.MarshalTo(dAtA[i:]); err != nil { 1197 return 0, err 1198 } 1199 i = encodeVarintGov(dAtA, i, uint64(size)) 1200 } 1201 i-- 1202 dAtA[i] = 0x1a 1203 { 1204 size := m.Threshold.Size() 1205 i -= size 1206 if _, err := m.Threshold.MarshalTo(dAtA[i:]); err != nil { 1207 return 0, err 1208 } 1209 i = encodeVarintGov(dAtA, i, uint64(size)) 1210 } 1211 i-- 1212 dAtA[i] = 0x12 1213 { 1214 size := m.Quorum.Size() 1215 i -= size 1216 if _, err := m.Quorum.MarshalTo(dAtA[i:]); err != nil { 1217 return 0, err 1218 } 1219 i = encodeVarintGov(dAtA, i, uint64(size)) 1220 } 1221 i-- 1222 dAtA[i] = 0xa 1223 return len(dAtA) - i, nil 1224 } 1225 1226 func encodeVarintGov(dAtA []byte, offset int, v uint64) int { 1227 offset -= sovGov(v) 1228 base := offset 1229 for v >= 1<<7 { 1230 dAtA[offset] = uint8(v&0x7f | 0x80) 1231 v >>= 7 1232 offset++ 1233 } 1234 dAtA[offset] = uint8(v) 1235 return base 1236 } 1237 func (m *WeightedVoteOption) Size() (n int) { 1238 if m == nil { 1239 return 0 1240 } 1241 var l int 1242 _ = l 1243 if m.Option != 0 { 1244 n += 1 + sovGov(uint64(m.Option)) 1245 } 1246 l = m.Weight.Size() 1247 n += 1 + l + sovGov(uint64(l)) 1248 return n 1249 } 1250 1251 func (m *TextProposal) Size() (n int) { 1252 if m == nil { 1253 return 0 1254 } 1255 var l int 1256 _ = l 1257 l = len(m.Title) 1258 if l > 0 { 1259 n += 1 + l + sovGov(uint64(l)) 1260 } 1261 l = len(m.Description) 1262 if l > 0 { 1263 n += 1 + l + sovGov(uint64(l)) 1264 } 1265 return n 1266 } 1267 1268 func (m *Deposit) Size() (n int) { 1269 if m == nil { 1270 return 0 1271 } 1272 var l int 1273 _ = l 1274 if m.ProposalId != 0 { 1275 n += 1 + sovGov(uint64(m.ProposalId)) 1276 } 1277 l = len(m.Depositor) 1278 if l > 0 { 1279 n += 1 + l + sovGov(uint64(l)) 1280 } 1281 if len(m.Amount) > 0 { 1282 for _, e := range m.Amount { 1283 l = e.Size() 1284 n += 1 + l + sovGov(uint64(l)) 1285 } 1286 } 1287 return n 1288 } 1289 1290 func (m *Proposal) Size() (n int) { 1291 if m == nil { 1292 return 0 1293 } 1294 var l int 1295 _ = l 1296 if m.ProposalId != 0 { 1297 n += 1 + sovGov(uint64(m.ProposalId)) 1298 } 1299 if m.Content != nil { 1300 l = m.Content.Size() 1301 n += 1 + l + sovGov(uint64(l)) 1302 } 1303 if m.Status != 0 { 1304 n += 1 + sovGov(uint64(m.Status)) 1305 } 1306 l = m.FinalTallyResult.Size() 1307 n += 1 + l + sovGov(uint64(l)) 1308 l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.SubmitTime) 1309 n += 1 + l + sovGov(uint64(l)) 1310 l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.DepositEndTime) 1311 n += 1 + l + sovGov(uint64(l)) 1312 if len(m.TotalDeposit) > 0 { 1313 for _, e := range m.TotalDeposit { 1314 l = e.Size() 1315 n += 1 + l + sovGov(uint64(l)) 1316 } 1317 } 1318 l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.VotingStartTime) 1319 n += 1 + l + sovGov(uint64(l)) 1320 l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.VotingEndTime) 1321 n += 1 + l + sovGov(uint64(l)) 1322 return n 1323 } 1324 1325 func (m *TallyResult) Size() (n int) { 1326 if m == nil { 1327 return 0 1328 } 1329 var l int 1330 _ = l 1331 l = m.Yes.Size() 1332 n += 1 + l + sovGov(uint64(l)) 1333 l = m.Abstain.Size() 1334 n += 1 + l + sovGov(uint64(l)) 1335 l = m.No.Size() 1336 n += 1 + l + sovGov(uint64(l)) 1337 l = m.NoWithVeto.Size() 1338 n += 1 + l + sovGov(uint64(l)) 1339 return n 1340 } 1341 1342 func (m *Vote) Size() (n int) { 1343 if m == nil { 1344 return 0 1345 } 1346 var l int 1347 _ = l 1348 if m.ProposalId != 0 { 1349 n += 1 + sovGov(uint64(m.ProposalId)) 1350 } 1351 l = len(m.Voter) 1352 if l > 0 { 1353 n += 1 + l + sovGov(uint64(l)) 1354 } 1355 if m.Option != 0 { 1356 n += 1 + sovGov(uint64(m.Option)) 1357 } 1358 if len(m.Options) > 0 { 1359 for _, e := range m.Options { 1360 l = e.Size() 1361 n += 1 + l + sovGov(uint64(l)) 1362 } 1363 } 1364 return n 1365 } 1366 1367 func (m *DepositParams) Size() (n int) { 1368 if m == nil { 1369 return 0 1370 } 1371 var l int 1372 _ = l 1373 if len(m.MinDeposit) > 0 { 1374 for _, e := range m.MinDeposit { 1375 l = e.Size() 1376 n += 1 + l + sovGov(uint64(l)) 1377 } 1378 } 1379 l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.MaxDepositPeriod) 1380 n += 1 + l + sovGov(uint64(l)) 1381 return n 1382 } 1383 1384 func (m *VotingParams) Size() (n int) { 1385 if m == nil { 1386 return 0 1387 } 1388 var l int 1389 _ = l 1390 l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.VotingPeriod) 1391 n += 1 + l + sovGov(uint64(l)) 1392 return n 1393 } 1394 1395 func (m *TallyParams) Size() (n int) { 1396 if m == nil { 1397 return 0 1398 } 1399 var l int 1400 _ = l 1401 l = m.Quorum.Size() 1402 n += 1 + l + sovGov(uint64(l)) 1403 l = m.Threshold.Size() 1404 n += 1 + l + sovGov(uint64(l)) 1405 l = m.VetoThreshold.Size() 1406 n += 1 + l + sovGov(uint64(l)) 1407 return n 1408 } 1409 1410 func sovGov(x uint64) (n int) { 1411 return (math_bits.Len64(x|1) + 6) / 7 1412 } 1413 func sozGov(x uint64) (n int) { 1414 return sovGov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1415 } 1416 func (m *WeightedVoteOption) Unmarshal(dAtA []byte) error { 1417 l := len(dAtA) 1418 iNdEx := 0 1419 for iNdEx < l { 1420 preIndex := iNdEx 1421 var wire uint64 1422 for shift := uint(0); ; shift += 7 { 1423 if shift >= 64 { 1424 return ErrIntOverflowGov 1425 } 1426 if iNdEx >= l { 1427 return io.ErrUnexpectedEOF 1428 } 1429 b := dAtA[iNdEx] 1430 iNdEx++ 1431 wire |= uint64(b&0x7F) << shift 1432 if b < 0x80 { 1433 break 1434 } 1435 } 1436 fieldNum := int32(wire >> 3) 1437 wireType := int(wire & 0x7) 1438 if wireType == 4 { 1439 return fmt.Errorf("proto: WeightedVoteOption: wiretype end group for non-group") 1440 } 1441 if fieldNum <= 0 { 1442 return fmt.Errorf("proto: WeightedVoteOption: illegal tag %d (wire type %d)", fieldNum, wire) 1443 } 1444 switch fieldNum { 1445 case 1: 1446 if wireType != 0 { 1447 return fmt.Errorf("proto: wrong wireType = %d for field Option", wireType) 1448 } 1449 m.Option = 0 1450 for shift := uint(0); ; shift += 7 { 1451 if shift >= 64 { 1452 return ErrIntOverflowGov 1453 } 1454 if iNdEx >= l { 1455 return io.ErrUnexpectedEOF 1456 } 1457 b := dAtA[iNdEx] 1458 iNdEx++ 1459 m.Option |= VoteOption(b&0x7F) << shift 1460 if b < 0x80 { 1461 break 1462 } 1463 } 1464 case 2: 1465 if wireType != 2 { 1466 return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) 1467 } 1468 var stringLen uint64 1469 for shift := uint(0); ; shift += 7 { 1470 if shift >= 64 { 1471 return ErrIntOverflowGov 1472 } 1473 if iNdEx >= l { 1474 return io.ErrUnexpectedEOF 1475 } 1476 b := dAtA[iNdEx] 1477 iNdEx++ 1478 stringLen |= uint64(b&0x7F) << shift 1479 if b < 0x80 { 1480 break 1481 } 1482 } 1483 intStringLen := int(stringLen) 1484 if intStringLen < 0 { 1485 return ErrInvalidLengthGov 1486 } 1487 postIndex := iNdEx + intStringLen 1488 if postIndex < 0 { 1489 return ErrInvalidLengthGov 1490 } 1491 if postIndex > l { 1492 return io.ErrUnexpectedEOF 1493 } 1494 if err := m.Weight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1495 return err 1496 } 1497 iNdEx = postIndex 1498 default: 1499 iNdEx = preIndex 1500 skippy, err := skipGov(dAtA[iNdEx:]) 1501 if err != nil { 1502 return err 1503 } 1504 if (skippy < 0) || (iNdEx+skippy) < 0 { 1505 return ErrInvalidLengthGov 1506 } 1507 if (iNdEx + skippy) > l { 1508 return io.ErrUnexpectedEOF 1509 } 1510 iNdEx += skippy 1511 } 1512 } 1513 1514 if iNdEx > l { 1515 return io.ErrUnexpectedEOF 1516 } 1517 return nil 1518 } 1519 func (m *TextProposal) Unmarshal(dAtA []byte) error { 1520 l := len(dAtA) 1521 iNdEx := 0 1522 for iNdEx < l { 1523 preIndex := iNdEx 1524 var wire uint64 1525 for shift := uint(0); ; shift += 7 { 1526 if shift >= 64 { 1527 return ErrIntOverflowGov 1528 } 1529 if iNdEx >= l { 1530 return io.ErrUnexpectedEOF 1531 } 1532 b := dAtA[iNdEx] 1533 iNdEx++ 1534 wire |= uint64(b&0x7F) << shift 1535 if b < 0x80 { 1536 break 1537 } 1538 } 1539 fieldNum := int32(wire >> 3) 1540 wireType := int(wire & 0x7) 1541 if wireType == 4 { 1542 return fmt.Errorf("proto: TextProposal: wiretype end group for non-group") 1543 } 1544 if fieldNum <= 0 { 1545 return fmt.Errorf("proto: TextProposal: illegal tag %d (wire type %d)", fieldNum, wire) 1546 } 1547 switch fieldNum { 1548 case 1: 1549 if wireType != 2 { 1550 return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) 1551 } 1552 var stringLen uint64 1553 for shift := uint(0); ; shift += 7 { 1554 if shift >= 64 { 1555 return ErrIntOverflowGov 1556 } 1557 if iNdEx >= l { 1558 return io.ErrUnexpectedEOF 1559 } 1560 b := dAtA[iNdEx] 1561 iNdEx++ 1562 stringLen |= uint64(b&0x7F) << shift 1563 if b < 0x80 { 1564 break 1565 } 1566 } 1567 intStringLen := int(stringLen) 1568 if intStringLen < 0 { 1569 return ErrInvalidLengthGov 1570 } 1571 postIndex := iNdEx + intStringLen 1572 if postIndex < 0 { 1573 return ErrInvalidLengthGov 1574 } 1575 if postIndex > l { 1576 return io.ErrUnexpectedEOF 1577 } 1578 m.Title = string(dAtA[iNdEx:postIndex]) 1579 iNdEx = postIndex 1580 case 2: 1581 if wireType != 2 { 1582 return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) 1583 } 1584 var stringLen uint64 1585 for shift := uint(0); ; shift += 7 { 1586 if shift >= 64 { 1587 return ErrIntOverflowGov 1588 } 1589 if iNdEx >= l { 1590 return io.ErrUnexpectedEOF 1591 } 1592 b := dAtA[iNdEx] 1593 iNdEx++ 1594 stringLen |= uint64(b&0x7F) << shift 1595 if b < 0x80 { 1596 break 1597 } 1598 } 1599 intStringLen := int(stringLen) 1600 if intStringLen < 0 { 1601 return ErrInvalidLengthGov 1602 } 1603 postIndex := iNdEx + intStringLen 1604 if postIndex < 0 { 1605 return ErrInvalidLengthGov 1606 } 1607 if postIndex > l { 1608 return io.ErrUnexpectedEOF 1609 } 1610 m.Description = string(dAtA[iNdEx:postIndex]) 1611 iNdEx = postIndex 1612 default: 1613 iNdEx = preIndex 1614 skippy, err := skipGov(dAtA[iNdEx:]) 1615 if err != nil { 1616 return err 1617 } 1618 if (skippy < 0) || (iNdEx+skippy) < 0 { 1619 return ErrInvalidLengthGov 1620 } 1621 if (iNdEx + skippy) > l { 1622 return io.ErrUnexpectedEOF 1623 } 1624 iNdEx += skippy 1625 } 1626 } 1627 1628 if iNdEx > l { 1629 return io.ErrUnexpectedEOF 1630 } 1631 return nil 1632 } 1633 func (m *Deposit) Unmarshal(dAtA []byte) error { 1634 l := len(dAtA) 1635 iNdEx := 0 1636 for iNdEx < l { 1637 preIndex := iNdEx 1638 var wire uint64 1639 for shift := uint(0); ; shift += 7 { 1640 if shift >= 64 { 1641 return ErrIntOverflowGov 1642 } 1643 if iNdEx >= l { 1644 return io.ErrUnexpectedEOF 1645 } 1646 b := dAtA[iNdEx] 1647 iNdEx++ 1648 wire |= uint64(b&0x7F) << shift 1649 if b < 0x80 { 1650 break 1651 } 1652 } 1653 fieldNum := int32(wire >> 3) 1654 wireType := int(wire & 0x7) 1655 if wireType == 4 { 1656 return fmt.Errorf("proto: Deposit: wiretype end group for non-group") 1657 } 1658 if fieldNum <= 0 { 1659 return fmt.Errorf("proto: Deposit: illegal tag %d (wire type %d)", fieldNum, wire) 1660 } 1661 switch fieldNum { 1662 case 1: 1663 if wireType != 0 { 1664 return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) 1665 } 1666 m.ProposalId = 0 1667 for shift := uint(0); ; shift += 7 { 1668 if shift >= 64 { 1669 return ErrIntOverflowGov 1670 } 1671 if iNdEx >= l { 1672 return io.ErrUnexpectedEOF 1673 } 1674 b := dAtA[iNdEx] 1675 iNdEx++ 1676 m.ProposalId |= uint64(b&0x7F) << shift 1677 if b < 0x80 { 1678 break 1679 } 1680 } 1681 case 2: 1682 if wireType != 2 { 1683 return fmt.Errorf("proto: wrong wireType = %d for field Depositor", wireType) 1684 } 1685 var stringLen uint64 1686 for shift := uint(0); ; shift += 7 { 1687 if shift >= 64 { 1688 return ErrIntOverflowGov 1689 } 1690 if iNdEx >= l { 1691 return io.ErrUnexpectedEOF 1692 } 1693 b := dAtA[iNdEx] 1694 iNdEx++ 1695 stringLen |= uint64(b&0x7F) << shift 1696 if b < 0x80 { 1697 break 1698 } 1699 } 1700 intStringLen := int(stringLen) 1701 if intStringLen < 0 { 1702 return ErrInvalidLengthGov 1703 } 1704 postIndex := iNdEx + intStringLen 1705 if postIndex < 0 { 1706 return ErrInvalidLengthGov 1707 } 1708 if postIndex > l { 1709 return io.ErrUnexpectedEOF 1710 } 1711 m.Depositor = string(dAtA[iNdEx:postIndex]) 1712 iNdEx = postIndex 1713 case 3: 1714 if wireType != 2 { 1715 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 1716 } 1717 var msglen int 1718 for shift := uint(0); ; shift += 7 { 1719 if shift >= 64 { 1720 return ErrIntOverflowGov 1721 } 1722 if iNdEx >= l { 1723 return io.ErrUnexpectedEOF 1724 } 1725 b := dAtA[iNdEx] 1726 iNdEx++ 1727 msglen |= int(b&0x7F) << shift 1728 if b < 0x80 { 1729 break 1730 } 1731 } 1732 if msglen < 0 { 1733 return ErrInvalidLengthGov 1734 } 1735 postIndex := iNdEx + msglen 1736 if postIndex < 0 { 1737 return ErrInvalidLengthGov 1738 } 1739 if postIndex > l { 1740 return io.ErrUnexpectedEOF 1741 } 1742 m.Amount = append(m.Amount, types.Coin{}) 1743 if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1744 return err 1745 } 1746 iNdEx = postIndex 1747 default: 1748 iNdEx = preIndex 1749 skippy, err := skipGov(dAtA[iNdEx:]) 1750 if err != nil { 1751 return err 1752 } 1753 if (skippy < 0) || (iNdEx+skippy) < 0 { 1754 return ErrInvalidLengthGov 1755 } 1756 if (iNdEx + skippy) > l { 1757 return io.ErrUnexpectedEOF 1758 } 1759 iNdEx += skippy 1760 } 1761 } 1762 1763 if iNdEx > l { 1764 return io.ErrUnexpectedEOF 1765 } 1766 return nil 1767 } 1768 func (m *Proposal) Unmarshal(dAtA []byte) error { 1769 l := len(dAtA) 1770 iNdEx := 0 1771 for iNdEx < l { 1772 preIndex := iNdEx 1773 var wire uint64 1774 for shift := uint(0); ; shift += 7 { 1775 if shift >= 64 { 1776 return ErrIntOverflowGov 1777 } 1778 if iNdEx >= l { 1779 return io.ErrUnexpectedEOF 1780 } 1781 b := dAtA[iNdEx] 1782 iNdEx++ 1783 wire |= uint64(b&0x7F) << shift 1784 if b < 0x80 { 1785 break 1786 } 1787 } 1788 fieldNum := int32(wire >> 3) 1789 wireType := int(wire & 0x7) 1790 if wireType == 4 { 1791 return fmt.Errorf("proto: Proposal: wiretype end group for non-group") 1792 } 1793 if fieldNum <= 0 { 1794 return fmt.Errorf("proto: Proposal: illegal tag %d (wire type %d)", fieldNum, wire) 1795 } 1796 switch fieldNum { 1797 case 1: 1798 if wireType != 0 { 1799 return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) 1800 } 1801 m.ProposalId = 0 1802 for shift := uint(0); ; shift += 7 { 1803 if shift >= 64 { 1804 return ErrIntOverflowGov 1805 } 1806 if iNdEx >= l { 1807 return io.ErrUnexpectedEOF 1808 } 1809 b := dAtA[iNdEx] 1810 iNdEx++ 1811 m.ProposalId |= uint64(b&0x7F) << shift 1812 if b < 0x80 { 1813 break 1814 } 1815 } 1816 case 2: 1817 if wireType != 2 { 1818 return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) 1819 } 1820 var msglen int 1821 for shift := uint(0); ; shift += 7 { 1822 if shift >= 64 { 1823 return ErrIntOverflowGov 1824 } 1825 if iNdEx >= l { 1826 return io.ErrUnexpectedEOF 1827 } 1828 b := dAtA[iNdEx] 1829 iNdEx++ 1830 msglen |= int(b&0x7F) << shift 1831 if b < 0x80 { 1832 break 1833 } 1834 } 1835 if msglen < 0 { 1836 return ErrInvalidLengthGov 1837 } 1838 postIndex := iNdEx + msglen 1839 if postIndex < 0 { 1840 return ErrInvalidLengthGov 1841 } 1842 if postIndex > l { 1843 return io.ErrUnexpectedEOF 1844 } 1845 if m.Content == nil { 1846 m.Content = &types1.Any{} 1847 } 1848 if err := m.Content.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1849 return err 1850 } 1851 iNdEx = postIndex 1852 case 3: 1853 if wireType != 0 { 1854 return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) 1855 } 1856 m.Status = 0 1857 for shift := uint(0); ; shift += 7 { 1858 if shift >= 64 { 1859 return ErrIntOverflowGov 1860 } 1861 if iNdEx >= l { 1862 return io.ErrUnexpectedEOF 1863 } 1864 b := dAtA[iNdEx] 1865 iNdEx++ 1866 m.Status |= ProposalStatus(b&0x7F) << shift 1867 if b < 0x80 { 1868 break 1869 } 1870 } 1871 case 4: 1872 if wireType != 2 { 1873 return fmt.Errorf("proto: wrong wireType = %d for field FinalTallyResult", wireType) 1874 } 1875 var msglen int 1876 for shift := uint(0); ; shift += 7 { 1877 if shift >= 64 { 1878 return ErrIntOverflowGov 1879 } 1880 if iNdEx >= l { 1881 return io.ErrUnexpectedEOF 1882 } 1883 b := dAtA[iNdEx] 1884 iNdEx++ 1885 msglen |= int(b&0x7F) << shift 1886 if b < 0x80 { 1887 break 1888 } 1889 } 1890 if msglen < 0 { 1891 return ErrInvalidLengthGov 1892 } 1893 postIndex := iNdEx + msglen 1894 if postIndex < 0 { 1895 return ErrInvalidLengthGov 1896 } 1897 if postIndex > l { 1898 return io.ErrUnexpectedEOF 1899 } 1900 if err := m.FinalTallyResult.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1901 return err 1902 } 1903 iNdEx = postIndex 1904 case 5: 1905 if wireType != 2 { 1906 return fmt.Errorf("proto: wrong wireType = %d for field SubmitTime", wireType) 1907 } 1908 var msglen int 1909 for shift := uint(0); ; shift += 7 { 1910 if shift >= 64 { 1911 return ErrIntOverflowGov 1912 } 1913 if iNdEx >= l { 1914 return io.ErrUnexpectedEOF 1915 } 1916 b := dAtA[iNdEx] 1917 iNdEx++ 1918 msglen |= int(b&0x7F) << shift 1919 if b < 0x80 { 1920 break 1921 } 1922 } 1923 if msglen < 0 { 1924 return ErrInvalidLengthGov 1925 } 1926 postIndex := iNdEx + msglen 1927 if postIndex < 0 { 1928 return ErrInvalidLengthGov 1929 } 1930 if postIndex > l { 1931 return io.ErrUnexpectedEOF 1932 } 1933 if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.SubmitTime, dAtA[iNdEx:postIndex]); err != nil { 1934 return err 1935 } 1936 iNdEx = postIndex 1937 case 6: 1938 if wireType != 2 { 1939 return fmt.Errorf("proto: wrong wireType = %d for field DepositEndTime", wireType) 1940 } 1941 var msglen int 1942 for shift := uint(0); ; shift += 7 { 1943 if shift >= 64 { 1944 return ErrIntOverflowGov 1945 } 1946 if iNdEx >= l { 1947 return io.ErrUnexpectedEOF 1948 } 1949 b := dAtA[iNdEx] 1950 iNdEx++ 1951 msglen |= int(b&0x7F) << shift 1952 if b < 0x80 { 1953 break 1954 } 1955 } 1956 if msglen < 0 { 1957 return ErrInvalidLengthGov 1958 } 1959 postIndex := iNdEx + msglen 1960 if postIndex < 0 { 1961 return ErrInvalidLengthGov 1962 } 1963 if postIndex > l { 1964 return io.ErrUnexpectedEOF 1965 } 1966 if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.DepositEndTime, dAtA[iNdEx:postIndex]); err != nil { 1967 return err 1968 } 1969 iNdEx = postIndex 1970 case 7: 1971 if wireType != 2 { 1972 return fmt.Errorf("proto: wrong wireType = %d for field TotalDeposit", wireType) 1973 } 1974 var msglen int 1975 for shift := uint(0); ; shift += 7 { 1976 if shift >= 64 { 1977 return ErrIntOverflowGov 1978 } 1979 if iNdEx >= l { 1980 return io.ErrUnexpectedEOF 1981 } 1982 b := dAtA[iNdEx] 1983 iNdEx++ 1984 msglen |= int(b&0x7F) << shift 1985 if b < 0x80 { 1986 break 1987 } 1988 } 1989 if msglen < 0 { 1990 return ErrInvalidLengthGov 1991 } 1992 postIndex := iNdEx + msglen 1993 if postIndex < 0 { 1994 return ErrInvalidLengthGov 1995 } 1996 if postIndex > l { 1997 return io.ErrUnexpectedEOF 1998 } 1999 m.TotalDeposit = append(m.TotalDeposit, types.Coin{}) 2000 if err := m.TotalDeposit[len(m.TotalDeposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2001 return err 2002 } 2003 iNdEx = postIndex 2004 case 8: 2005 if wireType != 2 { 2006 return fmt.Errorf("proto: wrong wireType = %d for field VotingStartTime", wireType) 2007 } 2008 var msglen int 2009 for shift := uint(0); ; shift += 7 { 2010 if shift >= 64 { 2011 return ErrIntOverflowGov 2012 } 2013 if iNdEx >= l { 2014 return io.ErrUnexpectedEOF 2015 } 2016 b := dAtA[iNdEx] 2017 iNdEx++ 2018 msglen |= int(b&0x7F) << shift 2019 if b < 0x80 { 2020 break 2021 } 2022 } 2023 if msglen < 0 { 2024 return ErrInvalidLengthGov 2025 } 2026 postIndex := iNdEx + msglen 2027 if postIndex < 0 { 2028 return ErrInvalidLengthGov 2029 } 2030 if postIndex > l { 2031 return io.ErrUnexpectedEOF 2032 } 2033 if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.VotingStartTime, dAtA[iNdEx:postIndex]); err != nil { 2034 return err 2035 } 2036 iNdEx = postIndex 2037 case 9: 2038 if wireType != 2 { 2039 return fmt.Errorf("proto: wrong wireType = %d for field VotingEndTime", wireType) 2040 } 2041 var msglen int 2042 for shift := uint(0); ; shift += 7 { 2043 if shift >= 64 { 2044 return ErrIntOverflowGov 2045 } 2046 if iNdEx >= l { 2047 return io.ErrUnexpectedEOF 2048 } 2049 b := dAtA[iNdEx] 2050 iNdEx++ 2051 msglen |= int(b&0x7F) << shift 2052 if b < 0x80 { 2053 break 2054 } 2055 } 2056 if msglen < 0 { 2057 return ErrInvalidLengthGov 2058 } 2059 postIndex := iNdEx + msglen 2060 if postIndex < 0 { 2061 return ErrInvalidLengthGov 2062 } 2063 if postIndex > l { 2064 return io.ErrUnexpectedEOF 2065 } 2066 if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.VotingEndTime, dAtA[iNdEx:postIndex]); err != nil { 2067 return err 2068 } 2069 iNdEx = postIndex 2070 default: 2071 iNdEx = preIndex 2072 skippy, err := skipGov(dAtA[iNdEx:]) 2073 if err != nil { 2074 return err 2075 } 2076 if (skippy < 0) || (iNdEx+skippy) < 0 { 2077 return ErrInvalidLengthGov 2078 } 2079 if (iNdEx + skippy) > l { 2080 return io.ErrUnexpectedEOF 2081 } 2082 iNdEx += skippy 2083 } 2084 } 2085 2086 if iNdEx > l { 2087 return io.ErrUnexpectedEOF 2088 } 2089 return nil 2090 } 2091 func (m *TallyResult) Unmarshal(dAtA []byte) error { 2092 l := len(dAtA) 2093 iNdEx := 0 2094 for iNdEx < l { 2095 preIndex := iNdEx 2096 var wire uint64 2097 for shift := uint(0); ; shift += 7 { 2098 if shift >= 64 { 2099 return ErrIntOverflowGov 2100 } 2101 if iNdEx >= l { 2102 return io.ErrUnexpectedEOF 2103 } 2104 b := dAtA[iNdEx] 2105 iNdEx++ 2106 wire |= uint64(b&0x7F) << shift 2107 if b < 0x80 { 2108 break 2109 } 2110 } 2111 fieldNum := int32(wire >> 3) 2112 wireType := int(wire & 0x7) 2113 if wireType == 4 { 2114 return fmt.Errorf("proto: TallyResult: wiretype end group for non-group") 2115 } 2116 if fieldNum <= 0 { 2117 return fmt.Errorf("proto: TallyResult: illegal tag %d (wire type %d)", fieldNum, wire) 2118 } 2119 switch fieldNum { 2120 case 1: 2121 if wireType != 2 { 2122 return fmt.Errorf("proto: wrong wireType = %d for field Yes", wireType) 2123 } 2124 var stringLen uint64 2125 for shift := uint(0); ; shift += 7 { 2126 if shift >= 64 { 2127 return ErrIntOverflowGov 2128 } 2129 if iNdEx >= l { 2130 return io.ErrUnexpectedEOF 2131 } 2132 b := dAtA[iNdEx] 2133 iNdEx++ 2134 stringLen |= uint64(b&0x7F) << shift 2135 if b < 0x80 { 2136 break 2137 } 2138 } 2139 intStringLen := int(stringLen) 2140 if intStringLen < 0 { 2141 return ErrInvalidLengthGov 2142 } 2143 postIndex := iNdEx + intStringLen 2144 if postIndex < 0 { 2145 return ErrInvalidLengthGov 2146 } 2147 if postIndex > l { 2148 return io.ErrUnexpectedEOF 2149 } 2150 if err := m.Yes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2151 return err 2152 } 2153 iNdEx = postIndex 2154 case 2: 2155 if wireType != 2 { 2156 return fmt.Errorf("proto: wrong wireType = %d for field Abstain", wireType) 2157 } 2158 var stringLen uint64 2159 for shift := uint(0); ; shift += 7 { 2160 if shift >= 64 { 2161 return ErrIntOverflowGov 2162 } 2163 if iNdEx >= l { 2164 return io.ErrUnexpectedEOF 2165 } 2166 b := dAtA[iNdEx] 2167 iNdEx++ 2168 stringLen |= uint64(b&0x7F) << shift 2169 if b < 0x80 { 2170 break 2171 } 2172 } 2173 intStringLen := int(stringLen) 2174 if intStringLen < 0 { 2175 return ErrInvalidLengthGov 2176 } 2177 postIndex := iNdEx + intStringLen 2178 if postIndex < 0 { 2179 return ErrInvalidLengthGov 2180 } 2181 if postIndex > l { 2182 return io.ErrUnexpectedEOF 2183 } 2184 if err := m.Abstain.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2185 return err 2186 } 2187 iNdEx = postIndex 2188 case 3: 2189 if wireType != 2 { 2190 return fmt.Errorf("proto: wrong wireType = %d for field No", wireType) 2191 } 2192 var stringLen uint64 2193 for shift := uint(0); ; shift += 7 { 2194 if shift >= 64 { 2195 return ErrIntOverflowGov 2196 } 2197 if iNdEx >= l { 2198 return io.ErrUnexpectedEOF 2199 } 2200 b := dAtA[iNdEx] 2201 iNdEx++ 2202 stringLen |= uint64(b&0x7F) << shift 2203 if b < 0x80 { 2204 break 2205 } 2206 } 2207 intStringLen := int(stringLen) 2208 if intStringLen < 0 { 2209 return ErrInvalidLengthGov 2210 } 2211 postIndex := iNdEx + intStringLen 2212 if postIndex < 0 { 2213 return ErrInvalidLengthGov 2214 } 2215 if postIndex > l { 2216 return io.ErrUnexpectedEOF 2217 } 2218 if err := m.No.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2219 return err 2220 } 2221 iNdEx = postIndex 2222 case 4: 2223 if wireType != 2 { 2224 return fmt.Errorf("proto: wrong wireType = %d for field NoWithVeto", wireType) 2225 } 2226 var stringLen uint64 2227 for shift := uint(0); ; shift += 7 { 2228 if shift >= 64 { 2229 return ErrIntOverflowGov 2230 } 2231 if iNdEx >= l { 2232 return io.ErrUnexpectedEOF 2233 } 2234 b := dAtA[iNdEx] 2235 iNdEx++ 2236 stringLen |= uint64(b&0x7F) << shift 2237 if b < 0x80 { 2238 break 2239 } 2240 } 2241 intStringLen := int(stringLen) 2242 if intStringLen < 0 { 2243 return ErrInvalidLengthGov 2244 } 2245 postIndex := iNdEx + intStringLen 2246 if postIndex < 0 { 2247 return ErrInvalidLengthGov 2248 } 2249 if postIndex > l { 2250 return io.ErrUnexpectedEOF 2251 } 2252 if err := m.NoWithVeto.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2253 return err 2254 } 2255 iNdEx = postIndex 2256 default: 2257 iNdEx = preIndex 2258 skippy, err := skipGov(dAtA[iNdEx:]) 2259 if err != nil { 2260 return err 2261 } 2262 if (skippy < 0) || (iNdEx+skippy) < 0 { 2263 return ErrInvalidLengthGov 2264 } 2265 if (iNdEx + skippy) > l { 2266 return io.ErrUnexpectedEOF 2267 } 2268 iNdEx += skippy 2269 } 2270 } 2271 2272 if iNdEx > l { 2273 return io.ErrUnexpectedEOF 2274 } 2275 return nil 2276 } 2277 func (m *Vote) Unmarshal(dAtA []byte) error { 2278 l := len(dAtA) 2279 iNdEx := 0 2280 for iNdEx < l { 2281 preIndex := iNdEx 2282 var wire uint64 2283 for shift := uint(0); ; shift += 7 { 2284 if shift >= 64 { 2285 return ErrIntOverflowGov 2286 } 2287 if iNdEx >= l { 2288 return io.ErrUnexpectedEOF 2289 } 2290 b := dAtA[iNdEx] 2291 iNdEx++ 2292 wire |= uint64(b&0x7F) << shift 2293 if b < 0x80 { 2294 break 2295 } 2296 } 2297 fieldNum := int32(wire >> 3) 2298 wireType := int(wire & 0x7) 2299 if wireType == 4 { 2300 return fmt.Errorf("proto: Vote: wiretype end group for non-group") 2301 } 2302 if fieldNum <= 0 { 2303 return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) 2304 } 2305 switch fieldNum { 2306 case 1: 2307 if wireType != 0 { 2308 return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) 2309 } 2310 m.ProposalId = 0 2311 for shift := uint(0); ; shift += 7 { 2312 if shift >= 64 { 2313 return ErrIntOverflowGov 2314 } 2315 if iNdEx >= l { 2316 return io.ErrUnexpectedEOF 2317 } 2318 b := dAtA[iNdEx] 2319 iNdEx++ 2320 m.ProposalId |= uint64(b&0x7F) << shift 2321 if b < 0x80 { 2322 break 2323 } 2324 } 2325 case 2: 2326 if wireType != 2 { 2327 return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) 2328 } 2329 var stringLen uint64 2330 for shift := uint(0); ; shift += 7 { 2331 if shift >= 64 { 2332 return ErrIntOverflowGov 2333 } 2334 if iNdEx >= l { 2335 return io.ErrUnexpectedEOF 2336 } 2337 b := dAtA[iNdEx] 2338 iNdEx++ 2339 stringLen |= uint64(b&0x7F) << shift 2340 if b < 0x80 { 2341 break 2342 } 2343 } 2344 intStringLen := int(stringLen) 2345 if intStringLen < 0 { 2346 return ErrInvalidLengthGov 2347 } 2348 postIndex := iNdEx + intStringLen 2349 if postIndex < 0 { 2350 return ErrInvalidLengthGov 2351 } 2352 if postIndex > l { 2353 return io.ErrUnexpectedEOF 2354 } 2355 m.Voter = string(dAtA[iNdEx:postIndex]) 2356 iNdEx = postIndex 2357 case 3: 2358 if wireType != 0 { 2359 return fmt.Errorf("proto: wrong wireType = %d for field Option", wireType) 2360 } 2361 m.Option = 0 2362 for shift := uint(0); ; shift += 7 { 2363 if shift >= 64 { 2364 return ErrIntOverflowGov 2365 } 2366 if iNdEx >= l { 2367 return io.ErrUnexpectedEOF 2368 } 2369 b := dAtA[iNdEx] 2370 iNdEx++ 2371 m.Option |= VoteOption(b&0x7F) << shift 2372 if b < 0x80 { 2373 break 2374 } 2375 } 2376 case 4: 2377 if wireType != 2 { 2378 return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) 2379 } 2380 var msglen int 2381 for shift := uint(0); ; shift += 7 { 2382 if shift >= 64 { 2383 return ErrIntOverflowGov 2384 } 2385 if iNdEx >= l { 2386 return io.ErrUnexpectedEOF 2387 } 2388 b := dAtA[iNdEx] 2389 iNdEx++ 2390 msglen |= int(b&0x7F) << shift 2391 if b < 0x80 { 2392 break 2393 } 2394 } 2395 if msglen < 0 { 2396 return ErrInvalidLengthGov 2397 } 2398 postIndex := iNdEx + msglen 2399 if postIndex < 0 { 2400 return ErrInvalidLengthGov 2401 } 2402 if postIndex > l { 2403 return io.ErrUnexpectedEOF 2404 } 2405 m.Options = append(m.Options, WeightedVoteOption{}) 2406 if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2407 return err 2408 } 2409 iNdEx = postIndex 2410 default: 2411 iNdEx = preIndex 2412 skippy, err := skipGov(dAtA[iNdEx:]) 2413 if err != nil { 2414 return err 2415 } 2416 if (skippy < 0) || (iNdEx+skippy) < 0 { 2417 return ErrInvalidLengthGov 2418 } 2419 if (iNdEx + skippy) > l { 2420 return io.ErrUnexpectedEOF 2421 } 2422 iNdEx += skippy 2423 } 2424 } 2425 2426 if iNdEx > l { 2427 return io.ErrUnexpectedEOF 2428 } 2429 return nil 2430 } 2431 func (m *DepositParams) Unmarshal(dAtA []byte) error { 2432 l := len(dAtA) 2433 iNdEx := 0 2434 for iNdEx < l { 2435 preIndex := iNdEx 2436 var wire uint64 2437 for shift := uint(0); ; shift += 7 { 2438 if shift >= 64 { 2439 return ErrIntOverflowGov 2440 } 2441 if iNdEx >= l { 2442 return io.ErrUnexpectedEOF 2443 } 2444 b := dAtA[iNdEx] 2445 iNdEx++ 2446 wire |= uint64(b&0x7F) << shift 2447 if b < 0x80 { 2448 break 2449 } 2450 } 2451 fieldNum := int32(wire >> 3) 2452 wireType := int(wire & 0x7) 2453 if wireType == 4 { 2454 return fmt.Errorf("proto: DepositParams: wiretype end group for non-group") 2455 } 2456 if fieldNum <= 0 { 2457 return fmt.Errorf("proto: DepositParams: illegal tag %d (wire type %d)", fieldNum, wire) 2458 } 2459 switch fieldNum { 2460 case 1: 2461 if wireType != 2 { 2462 return fmt.Errorf("proto: wrong wireType = %d for field MinDeposit", wireType) 2463 } 2464 var msglen int 2465 for shift := uint(0); ; shift += 7 { 2466 if shift >= 64 { 2467 return ErrIntOverflowGov 2468 } 2469 if iNdEx >= l { 2470 return io.ErrUnexpectedEOF 2471 } 2472 b := dAtA[iNdEx] 2473 iNdEx++ 2474 msglen |= int(b&0x7F) << shift 2475 if b < 0x80 { 2476 break 2477 } 2478 } 2479 if msglen < 0 { 2480 return ErrInvalidLengthGov 2481 } 2482 postIndex := iNdEx + msglen 2483 if postIndex < 0 { 2484 return ErrInvalidLengthGov 2485 } 2486 if postIndex > l { 2487 return io.ErrUnexpectedEOF 2488 } 2489 m.MinDeposit = append(m.MinDeposit, types.Coin{}) 2490 if err := m.MinDeposit[len(m.MinDeposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2491 return err 2492 } 2493 iNdEx = postIndex 2494 case 2: 2495 if wireType != 2 { 2496 return fmt.Errorf("proto: wrong wireType = %d for field MaxDepositPeriod", wireType) 2497 } 2498 var msglen int 2499 for shift := uint(0); ; shift += 7 { 2500 if shift >= 64 { 2501 return ErrIntOverflowGov 2502 } 2503 if iNdEx >= l { 2504 return io.ErrUnexpectedEOF 2505 } 2506 b := dAtA[iNdEx] 2507 iNdEx++ 2508 msglen |= int(b&0x7F) << shift 2509 if b < 0x80 { 2510 break 2511 } 2512 } 2513 if msglen < 0 { 2514 return ErrInvalidLengthGov 2515 } 2516 postIndex := iNdEx + msglen 2517 if postIndex < 0 { 2518 return ErrInvalidLengthGov 2519 } 2520 if postIndex > l { 2521 return io.ErrUnexpectedEOF 2522 } 2523 if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.MaxDepositPeriod, dAtA[iNdEx:postIndex]); err != nil { 2524 return err 2525 } 2526 iNdEx = postIndex 2527 default: 2528 iNdEx = preIndex 2529 skippy, err := skipGov(dAtA[iNdEx:]) 2530 if err != nil { 2531 return err 2532 } 2533 if (skippy < 0) || (iNdEx+skippy) < 0 { 2534 return ErrInvalidLengthGov 2535 } 2536 if (iNdEx + skippy) > l { 2537 return io.ErrUnexpectedEOF 2538 } 2539 iNdEx += skippy 2540 } 2541 } 2542 2543 if iNdEx > l { 2544 return io.ErrUnexpectedEOF 2545 } 2546 return nil 2547 } 2548 func (m *VotingParams) Unmarshal(dAtA []byte) error { 2549 l := len(dAtA) 2550 iNdEx := 0 2551 for iNdEx < l { 2552 preIndex := iNdEx 2553 var wire uint64 2554 for shift := uint(0); ; shift += 7 { 2555 if shift >= 64 { 2556 return ErrIntOverflowGov 2557 } 2558 if iNdEx >= l { 2559 return io.ErrUnexpectedEOF 2560 } 2561 b := dAtA[iNdEx] 2562 iNdEx++ 2563 wire |= uint64(b&0x7F) << shift 2564 if b < 0x80 { 2565 break 2566 } 2567 } 2568 fieldNum := int32(wire >> 3) 2569 wireType := int(wire & 0x7) 2570 if wireType == 4 { 2571 return fmt.Errorf("proto: VotingParams: wiretype end group for non-group") 2572 } 2573 if fieldNum <= 0 { 2574 return fmt.Errorf("proto: VotingParams: illegal tag %d (wire type %d)", fieldNum, wire) 2575 } 2576 switch fieldNum { 2577 case 1: 2578 if wireType != 2 { 2579 return fmt.Errorf("proto: wrong wireType = %d for field VotingPeriod", wireType) 2580 } 2581 var msglen int 2582 for shift := uint(0); ; shift += 7 { 2583 if shift >= 64 { 2584 return ErrIntOverflowGov 2585 } 2586 if iNdEx >= l { 2587 return io.ErrUnexpectedEOF 2588 } 2589 b := dAtA[iNdEx] 2590 iNdEx++ 2591 msglen |= int(b&0x7F) << shift 2592 if b < 0x80 { 2593 break 2594 } 2595 } 2596 if msglen < 0 { 2597 return ErrInvalidLengthGov 2598 } 2599 postIndex := iNdEx + msglen 2600 if postIndex < 0 { 2601 return ErrInvalidLengthGov 2602 } 2603 if postIndex > l { 2604 return io.ErrUnexpectedEOF 2605 } 2606 if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.VotingPeriod, dAtA[iNdEx:postIndex]); err != nil { 2607 return err 2608 } 2609 iNdEx = postIndex 2610 default: 2611 iNdEx = preIndex 2612 skippy, err := skipGov(dAtA[iNdEx:]) 2613 if err != nil { 2614 return err 2615 } 2616 if (skippy < 0) || (iNdEx+skippy) < 0 { 2617 return ErrInvalidLengthGov 2618 } 2619 if (iNdEx + skippy) > l { 2620 return io.ErrUnexpectedEOF 2621 } 2622 iNdEx += skippy 2623 } 2624 } 2625 2626 if iNdEx > l { 2627 return io.ErrUnexpectedEOF 2628 } 2629 return nil 2630 } 2631 func (m *TallyParams) Unmarshal(dAtA []byte) error { 2632 l := len(dAtA) 2633 iNdEx := 0 2634 for iNdEx < l { 2635 preIndex := iNdEx 2636 var wire uint64 2637 for shift := uint(0); ; shift += 7 { 2638 if shift >= 64 { 2639 return ErrIntOverflowGov 2640 } 2641 if iNdEx >= l { 2642 return io.ErrUnexpectedEOF 2643 } 2644 b := dAtA[iNdEx] 2645 iNdEx++ 2646 wire |= uint64(b&0x7F) << shift 2647 if b < 0x80 { 2648 break 2649 } 2650 } 2651 fieldNum := int32(wire >> 3) 2652 wireType := int(wire & 0x7) 2653 if wireType == 4 { 2654 return fmt.Errorf("proto: TallyParams: wiretype end group for non-group") 2655 } 2656 if fieldNum <= 0 { 2657 return fmt.Errorf("proto: TallyParams: illegal tag %d (wire type %d)", fieldNum, wire) 2658 } 2659 switch fieldNum { 2660 case 1: 2661 if wireType != 2 { 2662 return fmt.Errorf("proto: wrong wireType = %d for field Quorum", wireType) 2663 } 2664 var byteLen int 2665 for shift := uint(0); ; shift += 7 { 2666 if shift >= 64 { 2667 return ErrIntOverflowGov 2668 } 2669 if iNdEx >= l { 2670 return io.ErrUnexpectedEOF 2671 } 2672 b := dAtA[iNdEx] 2673 iNdEx++ 2674 byteLen |= int(b&0x7F) << shift 2675 if b < 0x80 { 2676 break 2677 } 2678 } 2679 if byteLen < 0 { 2680 return ErrInvalidLengthGov 2681 } 2682 postIndex := iNdEx + byteLen 2683 if postIndex < 0 { 2684 return ErrInvalidLengthGov 2685 } 2686 if postIndex > l { 2687 return io.ErrUnexpectedEOF 2688 } 2689 if err := m.Quorum.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2690 return err 2691 } 2692 iNdEx = postIndex 2693 case 2: 2694 if wireType != 2 { 2695 return fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) 2696 } 2697 var byteLen int 2698 for shift := uint(0); ; shift += 7 { 2699 if shift >= 64 { 2700 return ErrIntOverflowGov 2701 } 2702 if iNdEx >= l { 2703 return io.ErrUnexpectedEOF 2704 } 2705 b := dAtA[iNdEx] 2706 iNdEx++ 2707 byteLen |= int(b&0x7F) << shift 2708 if b < 0x80 { 2709 break 2710 } 2711 } 2712 if byteLen < 0 { 2713 return ErrInvalidLengthGov 2714 } 2715 postIndex := iNdEx + byteLen 2716 if postIndex < 0 { 2717 return ErrInvalidLengthGov 2718 } 2719 if postIndex > l { 2720 return io.ErrUnexpectedEOF 2721 } 2722 if err := m.Threshold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2723 return err 2724 } 2725 iNdEx = postIndex 2726 case 3: 2727 if wireType != 2 { 2728 return fmt.Errorf("proto: wrong wireType = %d for field VetoThreshold", wireType) 2729 } 2730 var byteLen int 2731 for shift := uint(0); ; shift += 7 { 2732 if shift >= 64 { 2733 return ErrIntOverflowGov 2734 } 2735 if iNdEx >= l { 2736 return io.ErrUnexpectedEOF 2737 } 2738 b := dAtA[iNdEx] 2739 iNdEx++ 2740 byteLen |= int(b&0x7F) << shift 2741 if b < 0x80 { 2742 break 2743 } 2744 } 2745 if byteLen < 0 { 2746 return ErrInvalidLengthGov 2747 } 2748 postIndex := iNdEx + byteLen 2749 if postIndex < 0 { 2750 return ErrInvalidLengthGov 2751 } 2752 if postIndex > l { 2753 return io.ErrUnexpectedEOF 2754 } 2755 if err := m.VetoThreshold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2756 return err 2757 } 2758 iNdEx = postIndex 2759 default: 2760 iNdEx = preIndex 2761 skippy, err := skipGov(dAtA[iNdEx:]) 2762 if err != nil { 2763 return err 2764 } 2765 if (skippy < 0) || (iNdEx+skippy) < 0 { 2766 return ErrInvalidLengthGov 2767 } 2768 if (iNdEx + skippy) > l { 2769 return io.ErrUnexpectedEOF 2770 } 2771 iNdEx += skippy 2772 } 2773 } 2774 2775 if iNdEx > l { 2776 return io.ErrUnexpectedEOF 2777 } 2778 return nil 2779 } 2780 func skipGov(dAtA []byte) (n int, err error) { 2781 l := len(dAtA) 2782 iNdEx := 0 2783 depth := 0 2784 for iNdEx < l { 2785 var wire uint64 2786 for shift := uint(0); ; shift += 7 { 2787 if shift >= 64 { 2788 return 0, ErrIntOverflowGov 2789 } 2790 if iNdEx >= l { 2791 return 0, io.ErrUnexpectedEOF 2792 } 2793 b := dAtA[iNdEx] 2794 iNdEx++ 2795 wire |= (uint64(b) & 0x7F) << shift 2796 if b < 0x80 { 2797 break 2798 } 2799 } 2800 wireType := int(wire & 0x7) 2801 switch wireType { 2802 case 0: 2803 for shift := uint(0); ; shift += 7 { 2804 if shift >= 64 { 2805 return 0, ErrIntOverflowGov 2806 } 2807 if iNdEx >= l { 2808 return 0, io.ErrUnexpectedEOF 2809 } 2810 iNdEx++ 2811 if dAtA[iNdEx-1] < 0x80 { 2812 break 2813 } 2814 } 2815 case 1: 2816 iNdEx += 8 2817 case 2: 2818 var length int 2819 for shift := uint(0); ; shift += 7 { 2820 if shift >= 64 { 2821 return 0, ErrIntOverflowGov 2822 } 2823 if iNdEx >= l { 2824 return 0, io.ErrUnexpectedEOF 2825 } 2826 b := dAtA[iNdEx] 2827 iNdEx++ 2828 length |= (int(b) & 0x7F) << shift 2829 if b < 0x80 { 2830 break 2831 } 2832 } 2833 if length < 0 { 2834 return 0, ErrInvalidLengthGov 2835 } 2836 iNdEx += length 2837 case 3: 2838 depth++ 2839 case 4: 2840 if depth == 0 { 2841 return 0, ErrUnexpectedEndOfGroupGov 2842 } 2843 depth-- 2844 case 5: 2845 iNdEx += 4 2846 default: 2847 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 2848 } 2849 if iNdEx < 0 { 2850 return 0, ErrInvalidLengthGov 2851 } 2852 if depth == 0 { 2853 return iNdEx, nil 2854 } 2855 } 2856 return 0, io.ErrUnexpectedEOF 2857 } 2858 2859 var ( 2860 ErrInvalidLengthGov = fmt.Errorf("proto: negative length found during unmarshaling") 2861 ErrIntOverflowGov = fmt.Errorf("proto: integer overflow") 2862 ErrUnexpectedEndOfGroupGov = fmt.Errorf("proto: unexpected end of group") 2863 )