github.com/cosmos/cosmos-sdk@v0.50.10/x/distribution/types/distribution.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/distribution/v1beta1/distribution.proto 3 4 package types 5 6 import ( 7 cosmossdk_io_math "cosmossdk.io/math" 8 fmt "fmt" 9 _ "github.com/cosmos/cosmos-proto" 10 github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" 11 types "github.com/cosmos/cosmos-sdk/types" 12 _ "github.com/cosmos/cosmos-sdk/types/tx/amino" 13 _ "github.com/cosmos/gogoproto/gogoproto" 14 proto "github.com/cosmos/gogoproto/proto" 15 io "io" 16 math "math" 17 math_bits "math/bits" 18 ) 19 20 // Reference imports to suppress errors if they are not otherwise used. 21 var _ = proto.Marshal 22 var _ = fmt.Errorf 23 var _ = math.Inf 24 25 // This is a compile-time assertion to ensure that this generated file 26 // is compatible with the proto package it is being compiled against. 27 // A compilation error at this line likely means your copy of the 28 // proto package needs to be updated. 29 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 30 31 // Params defines the set of params for the distribution module. 32 type Params struct { 33 CommunityTax cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=community_tax,json=communityTax,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"community_tax"` 34 // Deprecated: The base_proposer_reward field is deprecated and is no longer used 35 // in the x/distribution module's reward mechanism. 36 BaseProposerReward cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=base_proposer_reward,json=baseProposerReward,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"base_proposer_reward"` // Deprecated: Do not use. 37 // Deprecated: The bonus_proposer_reward field is deprecated and is no longer used 38 // in the x/distribution module's reward mechanism. 39 BonusProposerReward cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=bonus_proposer_reward,json=bonusProposerReward,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"bonus_proposer_reward"` // Deprecated: Do not use. 40 WithdrawAddrEnabled bool `protobuf:"varint,4,opt,name=withdraw_addr_enabled,json=withdrawAddrEnabled,proto3" json:"withdraw_addr_enabled,omitempty"` 41 } 42 43 func (m *Params) Reset() { *m = Params{} } 44 func (m *Params) String() string { return proto.CompactTextString(m) } 45 func (*Params) ProtoMessage() {} 46 func (*Params) Descriptor() ([]byte, []int) { 47 return fileDescriptor_cd78a31ea281a992, []int{0} 48 } 49 func (m *Params) XXX_Unmarshal(b []byte) error { 50 return m.Unmarshal(b) 51 } 52 func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 53 if deterministic { 54 return xxx_messageInfo_Params.Marshal(b, m, deterministic) 55 } else { 56 b = b[:cap(b)] 57 n, err := m.MarshalToSizedBuffer(b) 58 if err != nil { 59 return nil, err 60 } 61 return b[:n], nil 62 } 63 } 64 func (m *Params) XXX_Merge(src proto.Message) { 65 xxx_messageInfo_Params.Merge(m, src) 66 } 67 func (m *Params) XXX_Size() int { 68 return m.Size() 69 } 70 func (m *Params) XXX_DiscardUnknown() { 71 xxx_messageInfo_Params.DiscardUnknown(m) 72 } 73 74 var xxx_messageInfo_Params proto.InternalMessageInfo 75 76 func (m *Params) GetWithdrawAddrEnabled() bool { 77 if m != nil { 78 return m.WithdrawAddrEnabled 79 } 80 return false 81 } 82 83 // ValidatorHistoricalRewards represents historical rewards for a validator. 84 // Height is implicit within the store key. 85 // Cumulative reward ratio is the sum from the zeroeth period 86 // until this period of rewards / tokens, per the spec. 87 // The reference count indicates the number of objects 88 // which might need to reference this historical entry at any point. 89 // ReferenceCount = 90 // 91 // number of outstanding delegations which ended the associated period (and 92 // might need to read that record) 93 // + number of slashes which ended the associated period (and might need to 94 // read that record) 95 // + one per validator for the zeroeth period, set on initialization 96 type ValidatorHistoricalRewards struct { 97 CumulativeRewardRatio github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=cumulative_reward_ratio,json=cumulativeRewardRatio,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"cumulative_reward_ratio"` 98 ReferenceCount uint32 `protobuf:"varint,2,opt,name=reference_count,json=referenceCount,proto3" json:"reference_count,omitempty"` 99 } 100 101 func (m *ValidatorHistoricalRewards) Reset() { *m = ValidatorHistoricalRewards{} } 102 func (m *ValidatorHistoricalRewards) String() string { return proto.CompactTextString(m) } 103 func (*ValidatorHistoricalRewards) ProtoMessage() {} 104 func (*ValidatorHistoricalRewards) Descriptor() ([]byte, []int) { 105 return fileDescriptor_cd78a31ea281a992, []int{1} 106 } 107 func (m *ValidatorHistoricalRewards) XXX_Unmarshal(b []byte) error { 108 return m.Unmarshal(b) 109 } 110 func (m *ValidatorHistoricalRewards) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 111 if deterministic { 112 return xxx_messageInfo_ValidatorHistoricalRewards.Marshal(b, m, deterministic) 113 } else { 114 b = b[:cap(b)] 115 n, err := m.MarshalToSizedBuffer(b) 116 if err != nil { 117 return nil, err 118 } 119 return b[:n], nil 120 } 121 } 122 func (m *ValidatorHistoricalRewards) XXX_Merge(src proto.Message) { 123 xxx_messageInfo_ValidatorHistoricalRewards.Merge(m, src) 124 } 125 func (m *ValidatorHistoricalRewards) XXX_Size() int { 126 return m.Size() 127 } 128 func (m *ValidatorHistoricalRewards) XXX_DiscardUnknown() { 129 xxx_messageInfo_ValidatorHistoricalRewards.DiscardUnknown(m) 130 } 131 132 var xxx_messageInfo_ValidatorHistoricalRewards proto.InternalMessageInfo 133 134 func (m *ValidatorHistoricalRewards) GetCumulativeRewardRatio() github_com_cosmos_cosmos_sdk_types.DecCoins { 135 if m != nil { 136 return m.CumulativeRewardRatio 137 } 138 return nil 139 } 140 141 func (m *ValidatorHistoricalRewards) GetReferenceCount() uint32 { 142 if m != nil { 143 return m.ReferenceCount 144 } 145 return 0 146 } 147 148 // ValidatorCurrentRewards represents current rewards and current 149 // period for a validator kept as a running counter and incremented 150 // each block as long as the validator's tokens remain constant. 151 type ValidatorCurrentRewards struct { 152 Rewards github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=rewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"rewards"` 153 Period uint64 `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"` 154 } 155 156 func (m *ValidatorCurrentRewards) Reset() { *m = ValidatorCurrentRewards{} } 157 func (m *ValidatorCurrentRewards) String() string { return proto.CompactTextString(m) } 158 func (*ValidatorCurrentRewards) ProtoMessage() {} 159 func (*ValidatorCurrentRewards) Descriptor() ([]byte, []int) { 160 return fileDescriptor_cd78a31ea281a992, []int{2} 161 } 162 func (m *ValidatorCurrentRewards) XXX_Unmarshal(b []byte) error { 163 return m.Unmarshal(b) 164 } 165 func (m *ValidatorCurrentRewards) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 166 if deterministic { 167 return xxx_messageInfo_ValidatorCurrentRewards.Marshal(b, m, deterministic) 168 } else { 169 b = b[:cap(b)] 170 n, err := m.MarshalToSizedBuffer(b) 171 if err != nil { 172 return nil, err 173 } 174 return b[:n], nil 175 } 176 } 177 func (m *ValidatorCurrentRewards) XXX_Merge(src proto.Message) { 178 xxx_messageInfo_ValidatorCurrentRewards.Merge(m, src) 179 } 180 func (m *ValidatorCurrentRewards) XXX_Size() int { 181 return m.Size() 182 } 183 func (m *ValidatorCurrentRewards) XXX_DiscardUnknown() { 184 xxx_messageInfo_ValidatorCurrentRewards.DiscardUnknown(m) 185 } 186 187 var xxx_messageInfo_ValidatorCurrentRewards proto.InternalMessageInfo 188 189 func (m *ValidatorCurrentRewards) GetRewards() github_com_cosmos_cosmos_sdk_types.DecCoins { 190 if m != nil { 191 return m.Rewards 192 } 193 return nil 194 } 195 196 func (m *ValidatorCurrentRewards) GetPeriod() uint64 { 197 if m != nil { 198 return m.Period 199 } 200 return 0 201 } 202 203 // ValidatorAccumulatedCommission represents accumulated commission 204 // for a validator kept as a running counter, can be withdrawn at any time. 205 type ValidatorAccumulatedCommission struct { 206 Commission github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=commission,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"commission"` 207 } 208 209 func (m *ValidatorAccumulatedCommission) Reset() { *m = ValidatorAccumulatedCommission{} } 210 func (m *ValidatorAccumulatedCommission) String() string { return proto.CompactTextString(m) } 211 func (*ValidatorAccumulatedCommission) ProtoMessage() {} 212 func (*ValidatorAccumulatedCommission) Descriptor() ([]byte, []int) { 213 return fileDescriptor_cd78a31ea281a992, []int{3} 214 } 215 func (m *ValidatorAccumulatedCommission) XXX_Unmarshal(b []byte) error { 216 return m.Unmarshal(b) 217 } 218 func (m *ValidatorAccumulatedCommission) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 219 if deterministic { 220 return xxx_messageInfo_ValidatorAccumulatedCommission.Marshal(b, m, deterministic) 221 } else { 222 b = b[:cap(b)] 223 n, err := m.MarshalToSizedBuffer(b) 224 if err != nil { 225 return nil, err 226 } 227 return b[:n], nil 228 } 229 } 230 func (m *ValidatorAccumulatedCommission) XXX_Merge(src proto.Message) { 231 xxx_messageInfo_ValidatorAccumulatedCommission.Merge(m, src) 232 } 233 func (m *ValidatorAccumulatedCommission) XXX_Size() int { 234 return m.Size() 235 } 236 func (m *ValidatorAccumulatedCommission) XXX_DiscardUnknown() { 237 xxx_messageInfo_ValidatorAccumulatedCommission.DiscardUnknown(m) 238 } 239 240 var xxx_messageInfo_ValidatorAccumulatedCommission proto.InternalMessageInfo 241 242 func (m *ValidatorAccumulatedCommission) GetCommission() github_com_cosmos_cosmos_sdk_types.DecCoins { 243 if m != nil { 244 return m.Commission 245 } 246 return nil 247 } 248 249 // ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards 250 // for a validator inexpensive to track, allows simple sanity checks. 251 type ValidatorOutstandingRewards struct { 252 Rewards github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=rewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"rewards"` 253 } 254 255 func (m *ValidatorOutstandingRewards) Reset() { *m = ValidatorOutstandingRewards{} } 256 func (m *ValidatorOutstandingRewards) String() string { return proto.CompactTextString(m) } 257 func (*ValidatorOutstandingRewards) ProtoMessage() {} 258 func (*ValidatorOutstandingRewards) Descriptor() ([]byte, []int) { 259 return fileDescriptor_cd78a31ea281a992, []int{4} 260 } 261 func (m *ValidatorOutstandingRewards) XXX_Unmarshal(b []byte) error { 262 return m.Unmarshal(b) 263 } 264 func (m *ValidatorOutstandingRewards) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 265 if deterministic { 266 return xxx_messageInfo_ValidatorOutstandingRewards.Marshal(b, m, deterministic) 267 } else { 268 b = b[:cap(b)] 269 n, err := m.MarshalToSizedBuffer(b) 270 if err != nil { 271 return nil, err 272 } 273 return b[:n], nil 274 } 275 } 276 func (m *ValidatorOutstandingRewards) XXX_Merge(src proto.Message) { 277 xxx_messageInfo_ValidatorOutstandingRewards.Merge(m, src) 278 } 279 func (m *ValidatorOutstandingRewards) XXX_Size() int { 280 return m.Size() 281 } 282 func (m *ValidatorOutstandingRewards) XXX_DiscardUnknown() { 283 xxx_messageInfo_ValidatorOutstandingRewards.DiscardUnknown(m) 284 } 285 286 var xxx_messageInfo_ValidatorOutstandingRewards proto.InternalMessageInfo 287 288 func (m *ValidatorOutstandingRewards) GetRewards() github_com_cosmos_cosmos_sdk_types.DecCoins { 289 if m != nil { 290 return m.Rewards 291 } 292 return nil 293 } 294 295 // ValidatorSlashEvent represents a validator slash event. 296 // Height is implicit within the store key. 297 // This is needed to calculate appropriate amount of staking tokens 298 // for delegations which are withdrawn after a slash has occurred. 299 type ValidatorSlashEvent struct { 300 ValidatorPeriod uint64 `protobuf:"varint,1,opt,name=validator_period,json=validatorPeriod,proto3" json:"validator_period,omitempty"` 301 Fraction cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=fraction,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"fraction"` 302 } 303 304 func (m *ValidatorSlashEvent) Reset() { *m = ValidatorSlashEvent{} } 305 func (m *ValidatorSlashEvent) String() string { return proto.CompactTextString(m) } 306 func (*ValidatorSlashEvent) ProtoMessage() {} 307 func (*ValidatorSlashEvent) Descriptor() ([]byte, []int) { 308 return fileDescriptor_cd78a31ea281a992, []int{5} 309 } 310 func (m *ValidatorSlashEvent) XXX_Unmarshal(b []byte) error { 311 return m.Unmarshal(b) 312 } 313 func (m *ValidatorSlashEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 314 if deterministic { 315 return xxx_messageInfo_ValidatorSlashEvent.Marshal(b, m, deterministic) 316 } else { 317 b = b[:cap(b)] 318 n, err := m.MarshalToSizedBuffer(b) 319 if err != nil { 320 return nil, err 321 } 322 return b[:n], nil 323 } 324 } 325 func (m *ValidatorSlashEvent) XXX_Merge(src proto.Message) { 326 xxx_messageInfo_ValidatorSlashEvent.Merge(m, src) 327 } 328 func (m *ValidatorSlashEvent) XXX_Size() int { 329 return m.Size() 330 } 331 func (m *ValidatorSlashEvent) XXX_DiscardUnknown() { 332 xxx_messageInfo_ValidatorSlashEvent.DiscardUnknown(m) 333 } 334 335 var xxx_messageInfo_ValidatorSlashEvent proto.InternalMessageInfo 336 337 func (m *ValidatorSlashEvent) GetValidatorPeriod() uint64 { 338 if m != nil { 339 return m.ValidatorPeriod 340 } 341 return 0 342 } 343 344 // ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. 345 type ValidatorSlashEvents struct { 346 ValidatorSlashEvents []ValidatorSlashEvent `protobuf:"bytes,1,rep,name=validator_slash_events,json=validatorSlashEvents,proto3" json:"validator_slash_events"` 347 } 348 349 func (m *ValidatorSlashEvents) Reset() { *m = ValidatorSlashEvents{} } 350 func (m *ValidatorSlashEvents) String() string { return proto.CompactTextString(m) } 351 func (*ValidatorSlashEvents) ProtoMessage() {} 352 func (*ValidatorSlashEvents) Descriptor() ([]byte, []int) { 353 return fileDescriptor_cd78a31ea281a992, []int{6} 354 } 355 func (m *ValidatorSlashEvents) XXX_Unmarshal(b []byte) error { 356 return m.Unmarshal(b) 357 } 358 func (m *ValidatorSlashEvents) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 359 if deterministic { 360 return xxx_messageInfo_ValidatorSlashEvents.Marshal(b, m, deterministic) 361 } else { 362 b = b[:cap(b)] 363 n, err := m.MarshalToSizedBuffer(b) 364 if err != nil { 365 return nil, err 366 } 367 return b[:n], nil 368 } 369 } 370 func (m *ValidatorSlashEvents) XXX_Merge(src proto.Message) { 371 xxx_messageInfo_ValidatorSlashEvents.Merge(m, src) 372 } 373 func (m *ValidatorSlashEvents) XXX_Size() int { 374 return m.Size() 375 } 376 func (m *ValidatorSlashEvents) XXX_DiscardUnknown() { 377 xxx_messageInfo_ValidatorSlashEvents.DiscardUnknown(m) 378 } 379 380 var xxx_messageInfo_ValidatorSlashEvents proto.InternalMessageInfo 381 382 func (m *ValidatorSlashEvents) GetValidatorSlashEvents() []ValidatorSlashEvent { 383 if m != nil { 384 return m.ValidatorSlashEvents 385 } 386 return nil 387 } 388 389 // FeePool is the global fee pool for distribution. 390 type FeePool struct { 391 CommunityPool github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=community_pool,json=communityPool,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"community_pool"` 392 } 393 394 func (m *FeePool) Reset() { *m = FeePool{} } 395 func (m *FeePool) String() string { return proto.CompactTextString(m) } 396 func (*FeePool) ProtoMessage() {} 397 func (*FeePool) Descriptor() ([]byte, []int) { 398 return fileDescriptor_cd78a31ea281a992, []int{7} 399 } 400 func (m *FeePool) XXX_Unmarshal(b []byte) error { 401 return m.Unmarshal(b) 402 } 403 func (m *FeePool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 404 if deterministic { 405 return xxx_messageInfo_FeePool.Marshal(b, m, deterministic) 406 } else { 407 b = b[:cap(b)] 408 n, err := m.MarshalToSizedBuffer(b) 409 if err != nil { 410 return nil, err 411 } 412 return b[:n], nil 413 } 414 } 415 func (m *FeePool) XXX_Merge(src proto.Message) { 416 xxx_messageInfo_FeePool.Merge(m, src) 417 } 418 func (m *FeePool) XXX_Size() int { 419 return m.Size() 420 } 421 func (m *FeePool) XXX_DiscardUnknown() { 422 xxx_messageInfo_FeePool.DiscardUnknown(m) 423 } 424 425 var xxx_messageInfo_FeePool proto.InternalMessageInfo 426 427 func (m *FeePool) GetCommunityPool() github_com_cosmos_cosmos_sdk_types.DecCoins { 428 if m != nil { 429 return m.CommunityPool 430 } 431 return nil 432 } 433 434 // CommunityPoolSpendProposal details a proposal for use of community funds, 435 // together with how many coins are proposed to be spent, and to which 436 // recipient account. 437 // 438 // Deprecated: Do not use. As of the Cosmos SDK release v0.47.x, there is no 439 // longer a need for an explicit CommunityPoolSpendProposal. To spend community 440 // pool funds, a simple MsgCommunityPoolSpend can be invoked from the x/gov 441 // module via a v1 governance proposal. 442 // 443 // Deprecated: Do not use. 444 type CommunityPoolSpendProposal struct { 445 Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` 446 Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` 447 Recipient string `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"` 448 Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` 449 } 450 451 func (m *CommunityPoolSpendProposal) Reset() { *m = CommunityPoolSpendProposal{} } 452 func (m *CommunityPoolSpendProposal) String() string { return proto.CompactTextString(m) } 453 func (*CommunityPoolSpendProposal) ProtoMessage() {} 454 func (*CommunityPoolSpendProposal) Descriptor() ([]byte, []int) { 455 return fileDescriptor_cd78a31ea281a992, []int{8} 456 } 457 func (m *CommunityPoolSpendProposal) XXX_Unmarshal(b []byte) error { 458 return m.Unmarshal(b) 459 } 460 func (m *CommunityPoolSpendProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 461 if deterministic { 462 return xxx_messageInfo_CommunityPoolSpendProposal.Marshal(b, m, deterministic) 463 } else { 464 b = b[:cap(b)] 465 n, err := m.MarshalToSizedBuffer(b) 466 if err != nil { 467 return nil, err 468 } 469 return b[:n], nil 470 } 471 } 472 func (m *CommunityPoolSpendProposal) XXX_Merge(src proto.Message) { 473 xxx_messageInfo_CommunityPoolSpendProposal.Merge(m, src) 474 } 475 func (m *CommunityPoolSpendProposal) XXX_Size() int { 476 return m.Size() 477 } 478 func (m *CommunityPoolSpendProposal) XXX_DiscardUnknown() { 479 xxx_messageInfo_CommunityPoolSpendProposal.DiscardUnknown(m) 480 } 481 482 var xxx_messageInfo_CommunityPoolSpendProposal proto.InternalMessageInfo 483 484 // DelegatorStartingInfo represents the starting info for a delegator reward 485 // period. It tracks the previous validator period, the delegation's amount of 486 // staking token, and the creation height (to check later on if any slashes have 487 // occurred). NOTE: Even though validators are slashed to whole staking tokens, 488 // the delegators within the validator may be left with less than a full token, 489 // thus sdk.Dec is used. 490 type DelegatorStartingInfo struct { 491 PreviousPeriod uint64 `protobuf:"varint,1,opt,name=previous_period,json=previousPeriod,proto3" json:"previous_period,omitempty"` 492 Stake cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=stake,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"stake"` 493 Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"creation_height"` 494 } 495 496 func (m *DelegatorStartingInfo) Reset() { *m = DelegatorStartingInfo{} } 497 func (m *DelegatorStartingInfo) String() string { return proto.CompactTextString(m) } 498 func (*DelegatorStartingInfo) ProtoMessage() {} 499 func (*DelegatorStartingInfo) Descriptor() ([]byte, []int) { 500 return fileDescriptor_cd78a31ea281a992, []int{9} 501 } 502 func (m *DelegatorStartingInfo) XXX_Unmarshal(b []byte) error { 503 return m.Unmarshal(b) 504 } 505 func (m *DelegatorStartingInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 506 if deterministic { 507 return xxx_messageInfo_DelegatorStartingInfo.Marshal(b, m, deterministic) 508 } else { 509 b = b[:cap(b)] 510 n, err := m.MarshalToSizedBuffer(b) 511 if err != nil { 512 return nil, err 513 } 514 return b[:n], nil 515 } 516 } 517 func (m *DelegatorStartingInfo) XXX_Merge(src proto.Message) { 518 xxx_messageInfo_DelegatorStartingInfo.Merge(m, src) 519 } 520 func (m *DelegatorStartingInfo) XXX_Size() int { 521 return m.Size() 522 } 523 func (m *DelegatorStartingInfo) XXX_DiscardUnknown() { 524 xxx_messageInfo_DelegatorStartingInfo.DiscardUnknown(m) 525 } 526 527 var xxx_messageInfo_DelegatorStartingInfo proto.InternalMessageInfo 528 529 func (m *DelegatorStartingInfo) GetPreviousPeriod() uint64 { 530 if m != nil { 531 return m.PreviousPeriod 532 } 533 return 0 534 } 535 536 func (m *DelegatorStartingInfo) GetHeight() uint64 { 537 if m != nil { 538 return m.Height 539 } 540 return 0 541 } 542 543 // DelegationDelegatorReward represents the properties 544 // of a delegator's delegation reward. 545 type DelegationDelegatorReward struct { 546 ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` 547 Reward github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,2,rep,name=reward,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"reward"` 548 } 549 550 func (m *DelegationDelegatorReward) Reset() { *m = DelegationDelegatorReward{} } 551 func (m *DelegationDelegatorReward) String() string { return proto.CompactTextString(m) } 552 func (*DelegationDelegatorReward) ProtoMessage() {} 553 func (*DelegationDelegatorReward) Descriptor() ([]byte, []int) { 554 return fileDescriptor_cd78a31ea281a992, []int{10} 555 } 556 func (m *DelegationDelegatorReward) XXX_Unmarshal(b []byte) error { 557 return m.Unmarshal(b) 558 } 559 func (m *DelegationDelegatorReward) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 560 if deterministic { 561 return xxx_messageInfo_DelegationDelegatorReward.Marshal(b, m, deterministic) 562 } else { 563 b = b[:cap(b)] 564 n, err := m.MarshalToSizedBuffer(b) 565 if err != nil { 566 return nil, err 567 } 568 return b[:n], nil 569 } 570 } 571 func (m *DelegationDelegatorReward) XXX_Merge(src proto.Message) { 572 xxx_messageInfo_DelegationDelegatorReward.Merge(m, src) 573 } 574 func (m *DelegationDelegatorReward) XXX_Size() int { 575 return m.Size() 576 } 577 func (m *DelegationDelegatorReward) XXX_DiscardUnknown() { 578 xxx_messageInfo_DelegationDelegatorReward.DiscardUnknown(m) 579 } 580 581 var xxx_messageInfo_DelegationDelegatorReward proto.InternalMessageInfo 582 583 // CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal 584 // with a deposit 585 type CommunityPoolSpendProposalWithDeposit struct { 586 Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` 587 Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` 588 Recipient string `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"` 589 Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` 590 Deposit string `protobuf:"bytes,5,opt,name=deposit,proto3" json:"deposit,omitempty"` 591 } 592 593 func (m *CommunityPoolSpendProposalWithDeposit) Reset() { *m = CommunityPoolSpendProposalWithDeposit{} } 594 func (m *CommunityPoolSpendProposalWithDeposit) String() string { return proto.CompactTextString(m) } 595 func (*CommunityPoolSpendProposalWithDeposit) ProtoMessage() {} 596 func (*CommunityPoolSpendProposalWithDeposit) Descriptor() ([]byte, []int) { 597 return fileDescriptor_cd78a31ea281a992, []int{11} 598 } 599 func (m *CommunityPoolSpendProposalWithDeposit) XXX_Unmarshal(b []byte) error { 600 return m.Unmarshal(b) 601 } 602 func (m *CommunityPoolSpendProposalWithDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 603 if deterministic { 604 return xxx_messageInfo_CommunityPoolSpendProposalWithDeposit.Marshal(b, m, deterministic) 605 } else { 606 b = b[:cap(b)] 607 n, err := m.MarshalToSizedBuffer(b) 608 if err != nil { 609 return nil, err 610 } 611 return b[:n], nil 612 } 613 } 614 func (m *CommunityPoolSpendProposalWithDeposit) XXX_Merge(src proto.Message) { 615 xxx_messageInfo_CommunityPoolSpendProposalWithDeposit.Merge(m, src) 616 } 617 func (m *CommunityPoolSpendProposalWithDeposit) XXX_Size() int { 618 return m.Size() 619 } 620 func (m *CommunityPoolSpendProposalWithDeposit) XXX_DiscardUnknown() { 621 xxx_messageInfo_CommunityPoolSpendProposalWithDeposit.DiscardUnknown(m) 622 } 623 624 var xxx_messageInfo_CommunityPoolSpendProposalWithDeposit proto.InternalMessageInfo 625 626 func init() { 627 proto.RegisterType((*Params)(nil), "cosmos.distribution.v1beta1.Params") 628 proto.RegisterType((*ValidatorHistoricalRewards)(nil), "cosmos.distribution.v1beta1.ValidatorHistoricalRewards") 629 proto.RegisterType((*ValidatorCurrentRewards)(nil), "cosmos.distribution.v1beta1.ValidatorCurrentRewards") 630 proto.RegisterType((*ValidatorAccumulatedCommission)(nil), "cosmos.distribution.v1beta1.ValidatorAccumulatedCommission") 631 proto.RegisterType((*ValidatorOutstandingRewards)(nil), "cosmos.distribution.v1beta1.ValidatorOutstandingRewards") 632 proto.RegisterType((*ValidatorSlashEvent)(nil), "cosmos.distribution.v1beta1.ValidatorSlashEvent") 633 proto.RegisterType((*ValidatorSlashEvents)(nil), "cosmos.distribution.v1beta1.ValidatorSlashEvents") 634 proto.RegisterType((*FeePool)(nil), "cosmos.distribution.v1beta1.FeePool") 635 proto.RegisterType((*CommunityPoolSpendProposal)(nil), "cosmos.distribution.v1beta1.CommunityPoolSpendProposal") 636 proto.RegisterType((*DelegatorStartingInfo)(nil), "cosmos.distribution.v1beta1.DelegatorStartingInfo") 637 proto.RegisterType((*DelegationDelegatorReward)(nil), "cosmos.distribution.v1beta1.DelegationDelegatorReward") 638 proto.RegisterType((*CommunityPoolSpendProposalWithDeposit)(nil), "cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit") 639 } 640 641 func init() { 642 proto.RegisterFile("cosmos/distribution/v1beta1/distribution.proto", fileDescriptor_cd78a31ea281a992) 643 } 644 645 var fileDescriptor_cd78a31ea281a992 = []byte{ 646 // 1012 bytes of a gzipped FileDescriptorProto 647 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x41, 0x6f, 0x1b, 0x45, 648 0x14, 0xf6, 0x34, 0x89, 0xd3, 0x4c, 0xdb, 0x84, 0x4e, 0x9c, 0xd4, 0x71, 0x8b, 0x6d, 0x56, 0xaa, 649 0x30, 0x81, 0xd8, 0xa4, 0x48, 0x08, 0xe5, 0xd6, 0xd8, 0xad, 0x40, 0x2a, 0x34, 0xda, 0x20, 0x90, 650 0xe0, 0xb0, 0x1a, 0xef, 0x4e, 0xec, 0x21, 0xbb, 0x33, 0xcb, 0xcc, 0xd8, 0x49, 0x0e, 0xdc, 0x03, 651 0x07, 0xe0, 0x06, 0xea, 0xa9, 0x82, 0x4b, 0xc5, 0x29, 0x87, 0xfc, 0x88, 0x8a, 0x53, 0x55, 0x10, 652 0x42, 0x1c, 0x02, 0x24, 0x87, 0x20, 0x7e, 0x05, 0x9a, 0x9d, 0xf1, 0xae, 0x13, 0x42, 0x81, 0x22, 653 0x8b, 0x4b, 0x94, 0x79, 0x6f, 0xf6, 0x7d, 0xdf, 0xf7, 0xe6, 0x9b, 0x37, 0x86, 0x75, 0x9f, 0xcb, 654 0x88, 0xcb, 0x46, 0x40, 0xa5, 0x12, 0xb4, 0xdd, 0x53, 0x94, 0xb3, 0x46, 0x7f, 0xb9, 0x4d, 0x14, 655 0x5e, 0x3e, 0x11, 0xac, 0xc7, 0x82, 0x2b, 0x8e, 0xae, 0x9a, 0xfd, 0xf5, 0x13, 0x29, 0xbb, 0xbf, 656 0x54, 0xe8, 0xf0, 0x0e, 0x4f, 0xf6, 0x35, 0xf4, 0x7f, 0xe6, 0x93, 0x52, 0xd9, 0x42, 0xb4, 0xb1, 657 0x24, 0x69, 0x69, 0x9f, 0x53, 0x5b, 0xb2, 0xb4, 0x60, 0xf2, 0x9e, 0xf9, 0xd0, 0xd6, 0x37, 0xa9, 658 0xcb, 0x38, 0xa2, 0x8c, 0x37, 0x92, 0xbf, 0x26, 0xe4, 0xdc, 0x1b, 0x83, 0xf9, 0x35, 0x2c, 0x70, 659 0x24, 0xd1, 0xfb, 0xf0, 0x92, 0xcf, 0xa3, 0xa8, 0xc7, 0xa8, 0xda, 0xf1, 0x14, 0xde, 0x2e, 0x82, 660 0x2a, 0xa8, 0x4d, 0xad, 0xbe, 0xfa, 0xf0, 0xa0, 0x92, 0xfb, 0xe9, 0xa0, 0x62, 0xa9, 0xca, 0x60, 661 0xb3, 0x4e, 0x79, 0x23, 0xc2, 0xaa, 0x5b, 0xbf, 0x43, 0x3a, 0xd8, 0xdf, 0x69, 0x11, 0xff, 0xf1, 662 0xfe, 0x12, 0xb4, 0x48, 0x2d, 0xe2, 0x3f, 0x38, 0xde, 0x5b, 0x04, 0xee, 0xc5, 0xb4, 0xd8, 0xdb, 663 0x78, 0x1b, 0x7d, 0x00, 0x0b, 0x9a, 0xb0, 0x66, 0x15, 0x73, 0x49, 0x84, 0x27, 0xc8, 0x16, 0x16, 664 0x41, 0xf1, 0x5c, 0x82, 0xf1, 0xda, 0xd3, 0x61, 0x14, 0x81, 0x8b, 0x74, 0xd5, 0x35, 0x5b, 0xd4, 665 0x4d, 0x6a, 0xa2, 0x10, 0xce, 0xb5, 0x39, 0xeb, 0xc9, 0x3f, 0x81, 0x8d, 0xfd, 0x47, 0xb0, 0xd9, 666 0xa4, 0xec, 0x29, 0xb4, 0x1b, 0x70, 0x6e, 0x8b, 0xaa, 0x6e, 0x20, 0xf0, 0x96, 0x87, 0x83, 0x40, 667 0x78, 0x84, 0xe1, 0x76, 0x48, 0x82, 0xe2, 0x78, 0x15, 0xd4, 0xce, 0xbb, 0xb3, 0x83, 0xe4, 0xcd, 668 0x20, 0x10, 0xb7, 0x4c, 0x6a, 0xe5, 0xfa, 0x27, 0xc7, 0x7b, 0x8b, 0x55, 0x03, 0xb0, 0x24, 0x83, 669 0xcd, 0xc6, 0xf6, 0x49, 0xc7, 0x98, 0x13, 0x71, 0x7e, 0x00, 0xb0, 0xf4, 0x0e, 0x0e, 0x69, 0x80, 670 0x15, 0x17, 0xaf, 0x53, 0xa9, 0xb8, 0xa0, 0x3e, 0x0e, 0x0d, 0xb0, 0x44, 0x9f, 0x02, 0x78, 0xc5, 671 0xef, 0x45, 0xbd, 0x10, 0x2b, 0xda, 0x27, 0x56, 0xa4, 0x27, 0xb0, 0xa2, 0xbc, 0x08, 0xaa, 0x63, 672 0xb5, 0x0b, 0x37, 0xae, 0x59, 0x3f, 0xd6, 0x75, 0x97, 0x06, 0xbe, 0xd2, 0x8a, 0x9a, 0x9c, 0x32, 673 0xd3, 0x88, 0x6f, 0x7e, 0xae, 0xbc, 0xd8, 0xa1, 0xaa, 0xdb, 0x6b, 0xd7, 0x7d, 0x1e, 0x59, 0xbf, 674 0x34, 0x86, 0xa8, 0xa9, 0x9d, 0x98, 0xc8, 0xc1, 0x37, 0xd2, 0x9c, 0xed, 0x5c, 0x06, 0x6b, 0xc8, 675 0xb8, 0x1a, 0x14, 0x3d, 0x0f, 0x67, 0x04, 0xd9, 0x20, 0x82, 0x30, 0x9f, 0x78, 0x3e, 0xef, 0x31, 676 0x95, 0x9c, 0xef, 0x25, 0x77, 0x3a, 0x0d, 0x37, 0x75, 0xd4, 0xf9, 0x1a, 0xc0, 0x2b, 0xa9, 0xb0, 677 0x66, 0x4f, 0x08, 0xc2, 0xd4, 0x40, 0x55, 0x0c, 0x27, 0x8d, 0x12, 0x39, 0x62, 0x11, 0x03, 0x18, 678 0x34, 0x0f, 0xf3, 0x31, 0x11, 0x94, 0x1b, 0x37, 0x8e, 0xbb, 0x76, 0xe5, 0x7c, 0x09, 0x60, 0x39, 679 0x65, 0x79, 0xd3, 0xb7, 0x9a, 0x49, 0xd0, 0xe4, 0x51, 0x44, 0xa5, 0xa4, 0x9c, 0xa1, 0x3e, 0x84, 680 0x7e, 0xba, 0x1a, 0x31, 0xdf, 0x21, 0x24, 0xe7, 0x33, 0x00, 0xaf, 0xa6, 0xd4, 0xee, 0xf6, 0x94, 681 0x54, 0x98, 0x05, 0x94, 0x75, 0xfe, 0xb7, 0x26, 0x6a, 0x46, 0xb3, 0x29, 0xa3, 0xf5, 0x10, 0xcb, 682 0xee, 0xad, 0x3e, 0x61, 0x0a, 0xbd, 0x00, 0x9f, 0xe9, 0x0f, 0xc2, 0x9e, 0x6d, 0x33, 0x48, 0xda, 683 0x3c, 0x93, 0xc6, 0xd7, 0x92, 0x30, 0x7a, 0x13, 0x9e, 0xdf, 0x10, 0xd8, 0xd7, 0x37, 0xc0, 0xce, 684 0x85, 0xe5, 0x7f, 0x7d, 0x55, 0xdd, 0xb4, 0x84, 0xf3, 0x31, 0x80, 0x85, 0x33, 0x18, 0x49, 0xf4, 685 0x21, 0x9c, 0xcf, 0x28, 0x49, 0x9d, 0xf0, 0x48, 0x92, 0xb1, 0xbd, 0x7a, 0xb9, 0xfe, 0x84, 0xa9, 686 0x5c, 0x3f, 0xa3, 0xe4, 0xea, 0x94, 0xe6, 0x69, 0x1a, 0x52, 0xe8, 0x9f, 0x01, 0xe9, 0xec, 0x02, 687 0x38, 0x79, 0x9b, 0x90, 0x35, 0xce, 0x43, 0xf4, 0x11, 0x9c, 0xce, 0xe6, 0x6c, 0xcc, 0x79, 0x38, 688 0xe2, 0x23, 0xca, 0xa6, 0xba, 0x86, 0x77, 0xbe, 0x38, 0x07, 0x4b, 0xcd, 0xe1, 0xc8, 0x7a, 0x4c, 689 0x58, 0x60, 0x86, 0x1a, 0x0e, 0x51, 0x01, 0x4e, 0x28, 0xaa, 0x42, 0x62, 0xa6, 0xbf, 0x6b, 0x16, 690 0xa8, 0x0a, 0x2f, 0x04, 0x44, 0xfa, 0x82, 0xc6, 0xd9, 0xe9, 0xb8, 0xc3, 0x21, 0x74, 0x0d, 0x4e, 691 0x09, 0xe2, 0xd3, 0x98, 0x12, 0xa6, 0xcc, 0xa0, 0x75, 0xb3, 0x00, 0xda, 0x81, 0x79, 0x1c, 0x25, 692 0x03, 0x61, 0x3c, 0xd1, 0xba, 0x70, 0xa6, 0xd6, 0x44, 0xe8, 0x6d, 0x2b, 0xb4, 0xf6, 0x0f, 0x84, 693 0x26, 0x2a, 0xef, 0x1d, 0xef, 0x2d, 0x5e, 0x0c, 0x13, 0x3b, 0x78, 0x7e, 0x26, 0xdb, 0x02, 0xae, 694 0xd4, 0x76, 0xef, 0x57, 0x72, 0xbf, 0xdd, 0xaf, 0xe4, 0xbe, 0xdd, 0x5f, 0x2a, 0x59, 0xd4, 0x0e, 695 0xef, 0x0f, 0x81, 0x32, 0xa5, 0x39, 0x03, 0xe7, 0x7b, 0x00, 0xe7, 0x5a, 0x44, 0x57, 0xd2, 0xa7, 696 0xa7, 0xb0, 0x50, 0x94, 0x75, 0xde, 0x60, 0x1b, 0xc9, 0x60, 0x8b, 0x05, 0xe9, 0x53, 0xae, 0x1f, 697 0x95, 0x61, 0x0f, 0x4f, 0x0f, 0xc2, 0xd6, 0xc2, 0x77, 0xe0, 0x84, 0x54, 0x78, 0x93, 0x58, 0xff, 698 0x3e, 0xed, 0xdb, 0x69, 0x8a, 0xa0, 0x16, 0xcc, 0x77, 0x09, 0xed, 0x74, 0x4d, 0x43, 0xc7, 0x57, 699 0x5f, 0xfa, 0xfd, 0xa0, 0x32, 0xe3, 0x0b, 0xa2, 0x87, 0x2d, 0xf3, 0x4c, 0xea, 0xab, 0xe3, 0xbd, 700 0xc5, 0xd3, 0x31, 0xdb, 0x00, 0xb3, 0x70, 0x7e, 0x05, 0x70, 0xc1, 0xca, 0xa2, 0x9c, 0xa5, 0x02, 701 0xed, 0xf3, 0xf5, 0x16, 0xbc, 0x9c, 0x5d, 0x06, 0xfd, 0x7e, 0x11, 0x29, 0xed, 0xcb, 0xff, 0xdc, 702 0xe3, 0xfd, 0xa5, 0x67, 0x2d, 0xb5, 0x6c, 0x0e, 0x9a, 0x2d, 0xeb, 0x4a, 0xe8, 0x71, 0x93, 0xdd, 703 0x6d, 0x1b, 0x47, 0x0c, 0xe6, 0xd3, 0xa7, 0x7d, 0x94, 0xae, 0xb6, 0x28, 0x2b, 0xe3, 0xfa, 0x78, 704 0x9d, 0xef, 0x00, 0xbc, 0xfe, 0xd7, 0xa6, 0x7e, 0x97, 0xaa, 0x6e, 0x8b, 0xc4, 0x5c, 0x52, 0x35, 705 0x22, 0x7f, 0xcf, 0x0f, 0xf9, 0x5b, 0xa7, 0xec, 0x0a, 0x15, 0xe1, 0x64, 0x60, 0x80, 0x8b, 0x13, 706 0x49, 0x62, 0xb0, 0x5c, 0x71, 0x76, 0xff, 0xd6, 0x92, 0xab, 0x77, 0x1f, 0x1c, 0x96, 0xc1, 0xc3, 707 0xc3, 0x32, 0x78, 0x74, 0x58, 0x06, 0xbf, 0x1c, 0x96, 0xc1, 0xe7, 0x47, 0xe5, 0xdc, 0xa3, 0xa3, 708 0x72, 0xee, 0xc7, 0xa3, 0x72, 0xee, 0xbd, 0xe5, 0x27, 0xf6, 0xec, 0xd4, 0x2f, 0x8a, 0xa4, 0x85, 709 0xed, 0x7c, 0xf2, 0xa3, 0xef, 0x95, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x78, 0xae, 0xbc, 0xbc, 710 0xa7, 0x0a, 0x00, 0x00, 711 } 712 713 func (this *Params) Equal(that interface{}) bool { 714 if that == nil { 715 return this == nil 716 } 717 718 that1, ok := that.(*Params) 719 if !ok { 720 that2, ok := that.(Params) 721 if ok { 722 that1 = &that2 723 } else { 724 return false 725 } 726 } 727 if that1 == nil { 728 return this == nil 729 } else if this == nil { 730 return false 731 } 732 if !this.CommunityTax.Equal(that1.CommunityTax) { 733 return false 734 } 735 if !this.BaseProposerReward.Equal(that1.BaseProposerReward) { 736 return false 737 } 738 if !this.BonusProposerReward.Equal(that1.BonusProposerReward) { 739 return false 740 } 741 if this.WithdrawAddrEnabled != that1.WithdrawAddrEnabled { 742 return false 743 } 744 return true 745 } 746 func (this *ValidatorHistoricalRewards) Equal(that interface{}) bool { 747 if that == nil { 748 return this == nil 749 } 750 751 that1, ok := that.(*ValidatorHistoricalRewards) 752 if !ok { 753 that2, ok := that.(ValidatorHistoricalRewards) 754 if ok { 755 that1 = &that2 756 } else { 757 return false 758 } 759 } 760 if that1 == nil { 761 return this == nil 762 } else if this == nil { 763 return false 764 } 765 if len(this.CumulativeRewardRatio) != len(that1.CumulativeRewardRatio) { 766 return false 767 } 768 for i := range this.CumulativeRewardRatio { 769 if !this.CumulativeRewardRatio[i].Equal(&that1.CumulativeRewardRatio[i]) { 770 return false 771 } 772 } 773 if this.ReferenceCount != that1.ReferenceCount { 774 return false 775 } 776 return true 777 } 778 func (this *ValidatorCurrentRewards) Equal(that interface{}) bool { 779 if that == nil { 780 return this == nil 781 } 782 783 that1, ok := that.(*ValidatorCurrentRewards) 784 if !ok { 785 that2, ok := that.(ValidatorCurrentRewards) 786 if ok { 787 that1 = &that2 788 } else { 789 return false 790 } 791 } 792 if that1 == nil { 793 return this == nil 794 } else if this == nil { 795 return false 796 } 797 if len(this.Rewards) != len(that1.Rewards) { 798 return false 799 } 800 for i := range this.Rewards { 801 if !this.Rewards[i].Equal(&that1.Rewards[i]) { 802 return false 803 } 804 } 805 if this.Period != that1.Period { 806 return false 807 } 808 return true 809 } 810 func (this *ValidatorAccumulatedCommission) Equal(that interface{}) bool { 811 if that == nil { 812 return this == nil 813 } 814 815 that1, ok := that.(*ValidatorAccumulatedCommission) 816 if !ok { 817 that2, ok := that.(ValidatorAccumulatedCommission) 818 if ok { 819 that1 = &that2 820 } else { 821 return false 822 } 823 } 824 if that1 == nil { 825 return this == nil 826 } else if this == nil { 827 return false 828 } 829 if len(this.Commission) != len(that1.Commission) { 830 return false 831 } 832 for i := range this.Commission { 833 if !this.Commission[i].Equal(&that1.Commission[i]) { 834 return false 835 } 836 } 837 return true 838 } 839 func (this *ValidatorOutstandingRewards) Equal(that interface{}) bool { 840 if that == nil { 841 return this == nil 842 } 843 844 that1, ok := that.(*ValidatorOutstandingRewards) 845 if !ok { 846 that2, ok := that.(ValidatorOutstandingRewards) 847 if ok { 848 that1 = &that2 849 } else { 850 return false 851 } 852 } 853 if that1 == nil { 854 return this == nil 855 } else if this == nil { 856 return false 857 } 858 if len(this.Rewards) != len(that1.Rewards) { 859 return false 860 } 861 for i := range this.Rewards { 862 if !this.Rewards[i].Equal(&that1.Rewards[i]) { 863 return false 864 } 865 } 866 return true 867 } 868 func (this *ValidatorSlashEvent) Equal(that interface{}) bool { 869 if that == nil { 870 return this == nil 871 } 872 873 that1, ok := that.(*ValidatorSlashEvent) 874 if !ok { 875 that2, ok := that.(ValidatorSlashEvent) 876 if ok { 877 that1 = &that2 878 } else { 879 return false 880 } 881 } 882 if that1 == nil { 883 return this == nil 884 } else if this == nil { 885 return false 886 } 887 if this.ValidatorPeriod != that1.ValidatorPeriod { 888 return false 889 } 890 if !this.Fraction.Equal(that1.Fraction) { 891 return false 892 } 893 return true 894 } 895 func (this *ValidatorSlashEvents) Equal(that interface{}) bool { 896 if that == nil { 897 return this == nil 898 } 899 900 that1, ok := that.(*ValidatorSlashEvents) 901 if !ok { 902 that2, ok := that.(ValidatorSlashEvents) 903 if ok { 904 that1 = &that2 905 } else { 906 return false 907 } 908 } 909 if that1 == nil { 910 return this == nil 911 } else if this == nil { 912 return false 913 } 914 if len(this.ValidatorSlashEvents) != len(that1.ValidatorSlashEvents) { 915 return false 916 } 917 for i := range this.ValidatorSlashEvents { 918 if !this.ValidatorSlashEvents[i].Equal(&that1.ValidatorSlashEvents[i]) { 919 return false 920 } 921 } 922 return true 923 } 924 func (this *FeePool) Equal(that interface{}) bool { 925 if that == nil { 926 return this == nil 927 } 928 929 that1, ok := that.(*FeePool) 930 if !ok { 931 that2, ok := that.(FeePool) 932 if ok { 933 that1 = &that2 934 } else { 935 return false 936 } 937 } 938 if that1 == nil { 939 return this == nil 940 } else if this == nil { 941 return false 942 } 943 if len(this.CommunityPool) != len(that1.CommunityPool) { 944 return false 945 } 946 for i := range this.CommunityPool { 947 if !this.CommunityPool[i].Equal(&that1.CommunityPool[i]) { 948 return false 949 } 950 } 951 return true 952 } 953 func (this *DelegatorStartingInfo) Equal(that interface{}) bool { 954 if that == nil { 955 return this == nil 956 } 957 958 that1, ok := that.(*DelegatorStartingInfo) 959 if !ok { 960 that2, ok := that.(DelegatorStartingInfo) 961 if ok { 962 that1 = &that2 963 } else { 964 return false 965 } 966 } 967 if that1 == nil { 968 return this == nil 969 } else if this == nil { 970 return false 971 } 972 if this.PreviousPeriod != that1.PreviousPeriod { 973 return false 974 } 975 if !this.Stake.Equal(that1.Stake) { 976 return false 977 } 978 if this.Height != that1.Height { 979 return false 980 } 981 return true 982 } 983 func (this *DelegationDelegatorReward) Equal(that interface{}) bool { 984 if that == nil { 985 return this == nil 986 } 987 988 that1, ok := that.(*DelegationDelegatorReward) 989 if !ok { 990 that2, ok := that.(DelegationDelegatorReward) 991 if ok { 992 that1 = &that2 993 } else { 994 return false 995 } 996 } 997 if that1 == nil { 998 return this == nil 999 } else if this == nil { 1000 return false 1001 } 1002 if this.ValidatorAddress != that1.ValidatorAddress { 1003 return false 1004 } 1005 if len(this.Reward) != len(that1.Reward) { 1006 return false 1007 } 1008 for i := range this.Reward { 1009 if !this.Reward[i].Equal(&that1.Reward[i]) { 1010 return false 1011 } 1012 } 1013 return true 1014 } 1015 func (this *CommunityPoolSpendProposalWithDeposit) Equal(that interface{}) bool { 1016 if that == nil { 1017 return this == nil 1018 } 1019 1020 that1, ok := that.(*CommunityPoolSpendProposalWithDeposit) 1021 if !ok { 1022 that2, ok := that.(CommunityPoolSpendProposalWithDeposit) 1023 if ok { 1024 that1 = &that2 1025 } else { 1026 return false 1027 } 1028 } 1029 if that1 == nil { 1030 return this == nil 1031 } else if this == nil { 1032 return false 1033 } 1034 if this.Title != that1.Title { 1035 return false 1036 } 1037 if this.Description != that1.Description { 1038 return false 1039 } 1040 if this.Recipient != that1.Recipient { 1041 return false 1042 } 1043 if this.Amount != that1.Amount { 1044 return false 1045 } 1046 if this.Deposit != that1.Deposit { 1047 return false 1048 } 1049 return true 1050 } 1051 func (m *Params) Marshal() (dAtA []byte, err error) { 1052 size := m.Size() 1053 dAtA = make([]byte, size) 1054 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1055 if err != nil { 1056 return nil, err 1057 } 1058 return dAtA[:n], nil 1059 } 1060 1061 func (m *Params) MarshalTo(dAtA []byte) (int, error) { 1062 size := m.Size() 1063 return m.MarshalToSizedBuffer(dAtA[:size]) 1064 } 1065 1066 func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1067 i := len(dAtA) 1068 _ = i 1069 var l int 1070 _ = l 1071 if m.WithdrawAddrEnabled { 1072 i-- 1073 if m.WithdrawAddrEnabled { 1074 dAtA[i] = 1 1075 } else { 1076 dAtA[i] = 0 1077 } 1078 i-- 1079 dAtA[i] = 0x20 1080 } 1081 { 1082 size := m.BonusProposerReward.Size() 1083 i -= size 1084 if _, err := m.BonusProposerReward.MarshalTo(dAtA[i:]); err != nil { 1085 return 0, err 1086 } 1087 i = encodeVarintDistribution(dAtA, i, uint64(size)) 1088 } 1089 i-- 1090 dAtA[i] = 0x1a 1091 { 1092 size := m.BaseProposerReward.Size() 1093 i -= size 1094 if _, err := m.BaseProposerReward.MarshalTo(dAtA[i:]); err != nil { 1095 return 0, err 1096 } 1097 i = encodeVarintDistribution(dAtA, i, uint64(size)) 1098 } 1099 i-- 1100 dAtA[i] = 0x12 1101 { 1102 size := m.CommunityTax.Size() 1103 i -= size 1104 if _, err := m.CommunityTax.MarshalTo(dAtA[i:]); err != nil { 1105 return 0, err 1106 } 1107 i = encodeVarintDistribution(dAtA, i, uint64(size)) 1108 } 1109 i-- 1110 dAtA[i] = 0xa 1111 return len(dAtA) - i, nil 1112 } 1113 1114 func (m *ValidatorHistoricalRewards) Marshal() (dAtA []byte, err error) { 1115 size := m.Size() 1116 dAtA = make([]byte, size) 1117 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1118 if err != nil { 1119 return nil, err 1120 } 1121 return dAtA[:n], nil 1122 } 1123 1124 func (m *ValidatorHistoricalRewards) MarshalTo(dAtA []byte) (int, error) { 1125 size := m.Size() 1126 return m.MarshalToSizedBuffer(dAtA[:size]) 1127 } 1128 1129 func (m *ValidatorHistoricalRewards) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1130 i := len(dAtA) 1131 _ = i 1132 var l int 1133 _ = l 1134 if m.ReferenceCount != 0 { 1135 i = encodeVarintDistribution(dAtA, i, uint64(m.ReferenceCount)) 1136 i-- 1137 dAtA[i] = 0x10 1138 } 1139 if len(m.CumulativeRewardRatio) > 0 { 1140 for iNdEx := len(m.CumulativeRewardRatio) - 1; iNdEx >= 0; iNdEx-- { 1141 { 1142 size, err := m.CumulativeRewardRatio[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1143 if err != nil { 1144 return 0, err 1145 } 1146 i -= size 1147 i = encodeVarintDistribution(dAtA, i, uint64(size)) 1148 } 1149 i-- 1150 dAtA[i] = 0xa 1151 } 1152 } 1153 return len(dAtA) - i, nil 1154 } 1155 1156 func (m *ValidatorCurrentRewards) Marshal() (dAtA []byte, err error) { 1157 size := m.Size() 1158 dAtA = make([]byte, size) 1159 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1160 if err != nil { 1161 return nil, err 1162 } 1163 return dAtA[:n], nil 1164 } 1165 1166 func (m *ValidatorCurrentRewards) MarshalTo(dAtA []byte) (int, error) { 1167 size := m.Size() 1168 return m.MarshalToSizedBuffer(dAtA[:size]) 1169 } 1170 1171 func (m *ValidatorCurrentRewards) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1172 i := len(dAtA) 1173 _ = i 1174 var l int 1175 _ = l 1176 if m.Period != 0 { 1177 i = encodeVarintDistribution(dAtA, i, uint64(m.Period)) 1178 i-- 1179 dAtA[i] = 0x10 1180 } 1181 if len(m.Rewards) > 0 { 1182 for iNdEx := len(m.Rewards) - 1; iNdEx >= 0; iNdEx-- { 1183 { 1184 size, err := m.Rewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1185 if err != nil { 1186 return 0, err 1187 } 1188 i -= size 1189 i = encodeVarintDistribution(dAtA, i, uint64(size)) 1190 } 1191 i-- 1192 dAtA[i] = 0xa 1193 } 1194 } 1195 return len(dAtA) - i, nil 1196 } 1197 1198 func (m *ValidatorAccumulatedCommission) Marshal() (dAtA []byte, err error) { 1199 size := m.Size() 1200 dAtA = make([]byte, size) 1201 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1202 if err != nil { 1203 return nil, err 1204 } 1205 return dAtA[:n], nil 1206 } 1207 1208 func (m *ValidatorAccumulatedCommission) MarshalTo(dAtA []byte) (int, error) { 1209 size := m.Size() 1210 return m.MarshalToSizedBuffer(dAtA[:size]) 1211 } 1212 1213 func (m *ValidatorAccumulatedCommission) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1214 i := len(dAtA) 1215 _ = i 1216 var l int 1217 _ = l 1218 if len(m.Commission) > 0 { 1219 for iNdEx := len(m.Commission) - 1; iNdEx >= 0; iNdEx-- { 1220 { 1221 size, err := m.Commission[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1222 if err != nil { 1223 return 0, err 1224 } 1225 i -= size 1226 i = encodeVarintDistribution(dAtA, i, uint64(size)) 1227 } 1228 i-- 1229 dAtA[i] = 0xa 1230 } 1231 } 1232 return len(dAtA) - i, nil 1233 } 1234 1235 func (m *ValidatorOutstandingRewards) Marshal() (dAtA []byte, err error) { 1236 size := m.Size() 1237 dAtA = make([]byte, size) 1238 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1239 if err != nil { 1240 return nil, err 1241 } 1242 return dAtA[:n], nil 1243 } 1244 1245 func (m *ValidatorOutstandingRewards) MarshalTo(dAtA []byte) (int, error) { 1246 size := m.Size() 1247 return m.MarshalToSizedBuffer(dAtA[:size]) 1248 } 1249 1250 func (m *ValidatorOutstandingRewards) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1251 i := len(dAtA) 1252 _ = i 1253 var l int 1254 _ = l 1255 if len(m.Rewards) > 0 { 1256 for iNdEx := len(m.Rewards) - 1; iNdEx >= 0; iNdEx-- { 1257 { 1258 size, err := m.Rewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1259 if err != nil { 1260 return 0, err 1261 } 1262 i -= size 1263 i = encodeVarintDistribution(dAtA, i, uint64(size)) 1264 } 1265 i-- 1266 dAtA[i] = 0xa 1267 } 1268 } 1269 return len(dAtA) - i, nil 1270 } 1271 1272 func (m *ValidatorSlashEvent) Marshal() (dAtA []byte, err error) { 1273 size := m.Size() 1274 dAtA = make([]byte, size) 1275 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1276 if err != nil { 1277 return nil, err 1278 } 1279 return dAtA[:n], nil 1280 } 1281 1282 func (m *ValidatorSlashEvent) MarshalTo(dAtA []byte) (int, error) { 1283 size := m.Size() 1284 return m.MarshalToSizedBuffer(dAtA[:size]) 1285 } 1286 1287 func (m *ValidatorSlashEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1288 i := len(dAtA) 1289 _ = i 1290 var l int 1291 _ = l 1292 { 1293 size := m.Fraction.Size() 1294 i -= size 1295 if _, err := m.Fraction.MarshalTo(dAtA[i:]); err != nil { 1296 return 0, err 1297 } 1298 i = encodeVarintDistribution(dAtA, i, uint64(size)) 1299 } 1300 i-- 1301 dAtA[i] = 0x12 1302 if m.ValidatorPeriod != 0 { 1303 i = encodeVarintDistribution(dAtA, i, uint64(m.ValidatorPeriod)) 1304 i-- 1305 dAtA[i] = 0x8 1306 } 1307 return len(dAtA) - i, nil 1308 } 1309 1310 func (m *ValidatorSlashEvents) Marshal() (dAtA []byte, err error) { 1311 size := m.Size() 1312 dAtA = make([]byte, size) 1313 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1314 if err != nil { 1315 return nil, err 1316 } 1317 return dAtA[:n], nil 1318 } 1319 1320 func (m *ValidatorSlashEvents) MarshalTo(dAtA []byte) (int, error) { 1321 size := m.Size() 1322 return m.MarshalToSizedBuffer(dAtA[:size]) 1323 } 1324 1325 func (m *ValidatorSlashEvents) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1326 i := len(dAtA) 1327 _ = i 1328 var l int 1329 _ = l 1330 if len(m.ValidatorSlashEvents) > 0 { 1331 for iNdEx := len(m.ValidatorSlashEvents) - 1; iNdEx >= 0; iNdEx-- { 1332 { 1333 size, err := m.ValidatorSlashEvents[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1334 if err != nil { 1335 return 0, err 1336 } 1337 i -= size 1338 i = encodeVarintDistribution(dAtA, i, uint64(size)) 1339 } 1340 i-- 1341 dAtA[i] = 0xa 1342 } 1343 } 1344 return len(dAtA) - i, nil 1345 } 1346 1347 func (m *FeePool) Marshal() (dAtA []byte, err error) { 1348 size := m.Size() 1349 dAtA = make([]byte, size) 1350 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1351 if err != nil { 1352 return nil, err 1353 } 1354 return dAtA[:n], nil 1355 } 1356 1357 func (m *FeePool) MarshalTo(dAtA []byte) (int, error) { 1358 size := m.Size() 1359 return m.MarshalToSizedBuffer(dAtA[:size]) 1360 } 1361 1362 func (m *FeePool) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1363 i := len(dAtA) 1364 _ = i 1365 var l int 1366 _ = l 1367 if len(m.CommunityPool) > 0 { 1368 for iNdEx := len(m.CommunityPool) - 1; iNdEx >= 0; iNdEx-- { 1369 { 1370 size, err := m.CommunityPool[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1371 if err != nil { 1372 return 0, err 1373 } 1374 i -= size 1375 i = encodeVarintDistribution(dAtA, i, uint64(size)) 1376 } 1377 i-- 1378 dAtA[i] = 0xa 1379 } 1380 } 1381 return len(dAtA) - i, nil 1382 } 1383 1384 func (m *CommunityPoolSpendProposal) Marshal() (dAtA []byte, err error) { 1385 size := m.Size() 1386 dAtA = make([]byte, size) 1387 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1388 if err != nil { 1389 return nil, err 1390 } 1391 return dAtA[:n], nil 1392 } 1393 1394 func (m *CommunityPoolSpendProposal) MarshalTo(dAtA []byte) (int, error) { 1395 size := m.Size() 1396 return m.MarshalToSizedBuffer(dAtA[:size]) 1397 } 1398 1399 func (m *CommunityPoolSpendProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1400 i := len(dAtA) 1401 _ = i 1402 var l int 1403 _ = l 1404 if len(m.Amount) > 0 { 1405 for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { 1406 { 1407 size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1408 if err != nil { 1409 return 0, err 1410 } 1411 i -= size 1412 i = encodeVarintDistribution(dAtA, i, uint64(size)) 1413 } 1414 i-- 1415 dAtA[i] = 0x22 1416 } 1417 } 1418 if len(m.Recipient) > 0 { 1419 i -= len(m.Recipient) 1420 copy(dAtA[i:], m.Recipient) 1421 i = encodeVarintDistribution(dAtA, i, uint64(len(m.Recipient))) 1422 i-- 1423 dAtA[i] = 0x1a 1424 } 1425 if len(m.Description) > 0 { 1426 i -= len(m.Description) 1427 copy(dAtA[i:], m.Description) 1428 i = encodeVarintDistribution(dAtA, i, uint64(len(m.Description))) 1429 i-- 1430 dAtA[i] = 0x12 1431 } 1432 if len(m.Title) > 0 { 1433 i -= len(m.Title) 1434 copy(dAtA[i:], m.Title) 1435 i = encodeVarintDistribution(dAtA, i, uint64(len(m.Title))) 1436 i-- 1437 dAtA[i] = 0xa 1438 } 1439 return len(dAtA) - i, nil 1440 } 1441 1442 func (m *DelegatorStartingInfo) Marshal() (dAtA []byte, err error) { 1443 size := m.Size() 1444 dAtA = make([]byte, size) 1445 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1446 if err != nil { 1447 return nil, err 1448 } 1449 return dAtA[:n], nil 1450 } 1451 1452 func (m *DelegatorStartingInfo) MarshalTo(dAtA []byte) (int, error) { 1453 size := m.Size() 1454 return m.MarshalToSizedBuffer(dAtA[:size]) 1455 } 1456 1457 func (m *DelegatorStartingInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1458 i := len(dAtA) 1459 _ = i 1460 var l int 1461 _ = l 1462 if m.Height != 0 { 1463 i = encodeVarintDistribution(dAtA, i, uint64(m.Height)) 1464 i-- 1465 dAtA[i] = 0x18 1466 } 1467 { 1468 size := m.Stake.Size() 1469 i -= size 1470 if _, err := m.Stake.MarshalTo(dAtA[i:]); err != nil { 1471 return 0, err 1472 } 1473 i = encodeVarintDistribution(dAtA, i, uint64(size)) 1474 } 1475 i-- 1476 dAtA[i] = 0x12 1477 if m.PreviousPeriod != 0 { 1478 i = encodeVarintDistribution(dAtA, i, uint64(m.PreviousPeriod)) 1479 i-- 1480 dAtA[i] = 0x8 1481 } 1482 return len(dAtA) - i, nil 1483 } 1484 1485 func (m *DelegationDelegatorReward) Marshal() (dAtA []byte, err error) { 1486 size := m.Size() 1487 dAtA = make([]byte, size) 1488 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1489 if err != nil { 1490 return nil, err 1491 } 1492 return dAtA[:n], nil 1493 } 1494 1495 func (m *DelegationDelegatorReward) MarshalTo(dAtA []byte) (int, error) { 1496 size := m.Size() 1497 return m.MarshalToSizedBuffer(dAtA[:size]) 1498 } 1499 1500 func (m *DelegationDelegatorReward) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1501 i := len(dAtA) 1502 _ = i 1503 var l int 1504 _ = l 1505 if len(m.Reward) > 0 { 1506 for iNdEx := len(m.Reward) - 1; iNdEx >= 0; iNdEx-- { 1507 { 1508 size, err := m.Reward[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1509 if err != nil { 1510 return 0, err 1511 } 1512 i -= size 1513 i = encodeVarintDistribution(dAtA, i, uint64(size)) 1514 } 1515 i-- 1516 dAtA[i] = 0x12 1517 } 1518 } 1519 if len(m.ValidatorAddress) > 0 { 1520 i -= len(m.ValidatorAddress) 1521 copy(dAtA[i:], m.ValidatorAddress) 1522 i = encodeVarintDistribution(dAtA, i, uint64(len(m.ValidatorAddress))) 1523 i-- 1524 dAtA[i] = 0xa 1525 } 1526 return len(dAtA) - i, nil 1527 } 1528 1529 func (m *CommunityPoolSpendProposalWithDeposit) Marshal() (dAtA []byte, err error) { 1530 size := m.Size() 1531 dAtA = make([]byte, size) 1532 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1533 if err != nil { 1534 return nil, err 1535 } 1536 return dAtA[:n], nil 1537 } 1538 1539 func (m *CommunityPoolSpendProposalWithDeposit) MarshalTo(dAtA []byte) (int, error) { 1540 size := m.Size() 1541 return m.MarshalToSizedBuffer(dAtA[:size]) 1542 } 1543 1544 func (m *CommunityPoolSpendProposalWithDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1545 i := len(dAtA) 1546 _ = i 1547 var l int 1548 _ = l 1549 if len(m.Deposit) > 0 { 1550 i -= len(m.Deposit) 1551 copy(dAtA[i:], m.Deposit) 1552 i = encodeVarintDistribution(dAtA, i, uint64(len(m.Deposit))) 1553 i-- 1554 dAtA[i] = 0x2a 1555 } 1556 if len(m.Amount) > 0 { 1557 i -= len(m.Amount) 1558 copy(dAtA[i:], m.Amount) 1559 i = encodeVarintDistribution(dAtA, i, uint64(len(m.Amount))) 1560 i-- 1561 dAtA[i] = 0x22 1562 } 1563 if len(m.Recipient) > 0 { 1564 i -= len(m.Recipient) 1565 copy(dAtA[i:], m.Recipient) 1566 i = encodeVarintDistribution(dAtA, i, uint64(len(m.Recipient))) 1567 i-- 1568 dAtA[i] = 0x1a 1569 } 1570 if len(m.Description) > 0 { 1571 i -= len(m.Description) 1572 copy(dAtA[i:], m.Description) 1573 i = encodeVarintDistribution(dAtA, i, uint64(len(m.Description))) 1574 i-- 1575 dAtA[i] = 0x12 1576 } 1577 if len(m.Title) > 0 { 1578 i -= len(m.Title) 1579 copy(dAtA[i:], m.Title) 1580 i = encodeVarintDistribution(dAtA, i, uint64(len(m.Title))) 1581 i-- 1582 dAtA[i] = 0xa 1583 } 1584 return len(dAtA) - i, nil 1585 } 1586 1587 func encodeVarintDistribution(dAtA []byte, offset int, v uint64) int { 1588 offset -= sovDistribution(v) 1589 base := offset 1590 for v >= 1<<7 { 1591 dAtA[offset] = uint8(v&0x7f | 0x80) 1592 v >>= 7 1593 offset++ 1594 } 1595 dAtA[offset] = uint8(v) 1596 return base 1597 } 1598 func (m *Params) Size() (n int) { 1599 if m == nil { 1600 return 0 1601 } 1602 var l int 1603 _ = l 1604 l = m.CommunityTax.Size() 1605 n += 1 + l + sovDistribution(uint64(l)) 1606 l = m.BaseProposerReward.Size() 1607 n += 1 + l + sovDistribution(uint64(l)) 1608 l = m.BonusProposerReward.Size() 1609 n += 1 + l + sovDistribution(uint64(l)) 1610 if m.WithdrawAddrEnabled { 1611 n += 2 1612 } 1613 return n 1614 } 1615 1616 func (m *ValidatorHistoricalRewards) Size() (n int) { 1617 if m == nil { 1618 return 0 1619 } 1620 var l int 1621 _ = l 1622 if len(m.CumulativeRewardRatio) > 0 { 1623 for _, e := range m.CumulativeRewardRatio { 1624 l = e.Size() 1625 n += 1 + l + sovDistribution(uint64(l)) 1626 } 1627 } 1628 if m.ReferenceCount != 0 { 1629 n += 1 + sovDistribution(uint64(m.ReferenceCount)) 1630 } 1631 return n 1632 } 1633 1634 func (m *ValidatorCurrentRewards) Size() (n int) { 1635 if m == nil { 1636 return 0 1637 } 1638 var l int 1639 _ = l 1640 if len(m.Rewards) > 0 { 1641 for _, e := range m.Rewards { 1642 l = e.Size() 1643 n += 1 + l + sovDistribution(uint64(l)) 1644 } 1645 } 1646 if m.Period != 0 { 1647 n += 1 + sovDistribution(uint64(m.Period)) 1648 } 1649 return n 1650 } 1651 1652 func (m *ValidatorAccumulatedCommission) Size() (n int) { 1653 if m == nil { 1654 return 0 1655 } 1656 var l int 1657 _ = l 1658 if len(m.Commission) > 0 { 1659 for _, e := range m.Commission { 1660 l = e.Size() 1661 n += 1 + l + sovDistribution(uint64(l)) 1662 } 1663 } 1664 return n 1665 } 1666 1667 func (m *ValidatorOutstandingRewards) Size() (n int) { 1668 if m == nil { 1669 return 0 1670 } 1671 var l int 1672 _ = l 1673 if len(m.Rewards) > 0 { 1674 for _, e := range m.Rewards { 1675 l = e.Size() 1676 n += 1 + l + sovDistribution(uint64(l)) 1677 } 1678 } 1679 return n 1680 } 1681 1682 func (m *ValidatorSlashEvent) Size() (n int) { 1683 if m == nil { 1684 return 0 1685 } 1686 var l int 1687 _ = l 1688 if m.ValidatorPeriod != 0 { 1689 n += 1 + sovDistribution(uint64(m.ValidatorPeriod)) 1690 } 1691 l = m.Fraction.Size() 1692 n += 1 + l + sovDistribution(uint64(l)) 1693 return n 1694 } 1695 1696 func (m *ValidatorSlashEvents) Size() (n int) { 1697 if m == nil { 1698 return 0 1699 } 1700 var l int 1701 _ = l 1702 if len(m.ValidatorSlashEvents) > 0 { 1703 for _, e := range m.ValidatorSlashEvents { 1704 l = e.Size() 1705 n += 1 + l + sovDistribution(uint64(l)) 1706 } 1707 } 1708 return n 1709 } 1710 1711 func (m *FeePool) Size() (n int) { 1712 if m == nil { 1713 return 0 1714 } 1715 var l int 1716 _ = l 1717 if len(m.CommunityPool) > 0 { 1718 for _, e := range m.CommunityPool { 1719 l = e.Size() 1720 n += 1 + l + sovDistribution(uint64(l)) 1721 } 1722 } 1723 return n 1724 } 1725 1726 func (m *CommunityPoolSpendProposal) Size() (n int) { 1727 if m == nil { 1728 return 0 1729 } 1730 var l int 1731 _ = l 1732 l = len(m.Title) 1733 if l > 0 { 1734 n += 1 + l + sovDistribution(uint64(l)) 1735 } 1736 l = len(m.Description) 1737 if l > 0 { 1738 n += 1 + l + sovDistribution(uint64(l)) 1739 } 1740 l = len(m.Recipient) 1741 if l > 0 { 1742 n += 1 + l + sovDistribution(uint64(l)) 1743 } 1744 if len(m.Amount) > 0 { 1745 for _, e := range m.Amount { 1746 l = e.Size() 1747 n += 1 + l + sovDistribution(uint64(l)) 1748 } 1749 } 1750 return n 1751 } 1752 1753 func (m *DelegatorStartingInfo) Size() (n int) { 1754 if m == nil { 1755 return 0 1756 } 1757 var l int 1758 _ = l 1759 if m.PreviousPeriod != 0 { 1760 n += 1 + sovDistribution(uint64(m.PreviousPeriod)) 1761 } 1762 l = m.Stake.Size() 1763 n += 1 + l + sovDistribution(uint64(l)) 1764 if m.Height != 0 { 1765 n += 1 + sovDistribution(uint64(m.Height)) 1766 } 1767 return n 1768 } 1769 1770 func (m *DelegationDelegatorReward) Size() (n int) { 1771 if m == nil { 1772 return 0 1773 } 1774 var l int 1775 _ = l 1776 l = len(m.ValidatorAddress) 1777 if l > 0 { 1778 n += 1 + l + sovDistribution(uint64(l)) 1779 } 1780 if len(m.Reward) > 0 { 1781 for _, e := range m.Reward { 1782 l = e.Size() 1783 n += 1 + l + sovDistribution(uint64(l)) 1784 } 1785 } 1786 return n 1787 } 1788 1789 func (m *CommunityPoolSpendProposalWithDeposit) Size() (n int) { 1790 if m == nil { 1791 return 0 1792 } 1793 var l int 1794 _ = l 1795 l = len(m.Title) 1796 if l > 0 { 1797 n += 1 + l + sovDistribution(uint64(l)) 1798 } 1799 l = len(m.Description) 1800 if l > 0 { 1801 n += 1 + l + sovDistribution(uint64(l)) 1802 } 1803 l = len(m.Recipient) 1804 if l > 0 { 1805 n += 1 + l + sovDistribution(uint64(l)) 1806 } 1807 l = len(m.Amount) 1808 if l > 0 { 1809 n += 1 + l + sovDistribution(uint64(l)) 1810 } 1811 l = len(m.Deposit) 1812 if l > 0 { 1813 n += 1 + l + sovDistribution(uint64(l)) 1814 } 1815 return n 1816 } 1817 1818 func sovDistribution(x uint64) (n int) { 1819 return (math_bits.Len64(x|1) + 6) / 7 1820 } 1821 func sozDistribution(x uint64) (n int) { 1822 return sovDistribution(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1823 } 1824 func (m *Params) Unmarshal(dAtA []byte) error { 1825 l := len(dAtA) 1826 iNdEx := 0 1827 for iNdEx < l { 1828 preIndex := iNdEx 1829 var wire uint64 1830 for shift := uint(0); ; shift += 7 { 1831 if shift >= 64 { 1832 return ErrIntOverflowDistribution 1833 } 1834 if iNdEx >= l { 1835 return io.ErrUnexpectedEOF 1836 } 1837 b := dAtA[iNdEx] 1838 iNdEx++ 1839 wire |= uint64(b&0x7F) << shift 1840 if b < 0x80 { 1841 break 1842 } 1843 } 1844 fieldNum := int32(wire >> 3) 1845 wireType := int(wire & 0x7) 1846 if wireType == 4 { 1847 return fmt.Errorf("proto: Params: wiretype end group for non-group") 1848 } 1849 if fieldNum <= 0 { 1850 return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) 1851 } 1852 switch fieldNum { 1853 case 1: 1854 if wireType != 2 { 1855 return fmt.Errorf("proto: wrong wireType = %d for field CommunityTax", wireType) 1856 } 1857 var stringLen uint64 1858 for shift := uint(0); ; shift += 7 { 1859 if shift >= 64 { 1860 return ErrIntOverflowDistribution 1861 } 1862 if iNdEx >= l { 1863 return io.ErrUnexpectedEOF 1864 } 1865 b := dAtA[iNdEx] 1866 iNdEx++ 1867 stringLen |= uint64(b&0x7F) << shift 1868 if b < 0x80 { 1869 break 1870 } 1871 } 1872 intStringLen := int(stringLen) 1873 if intStringLen < 0 { 1874 return ErrInvalidLengthDistribution 1875 } 1876 postIndex := iNdEx + intStringLen 1877 if postIndex < 0 { 1878 return ErrInvalidLengthDistribution 1879 } 1880 if postIndex > l { 1881 return io.ErrUnexpectedEOF 1882 } 1883 if err := m.CommunityTax.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1884 return err 1885 } 1886 iNdEx = postIndex 1887 case 2: 1888 if wireType != 2 { 1889 return fmt.Errorf("proto: wrong wireType = %d for field BaseProposerReward", wireType) 1890 } 1891 var stringLen uint64 1892 for shift := uint(0); ; shift += 7 { 1893 if shift >= 64 { 1894 return ErrIntOverflowDistribution 1895 } 1896 if iNdEx >= l { 1897 return io.ErrUnexpectedEOF 1898 } 1899 b := dAtA[iNdEx] 1900 iNdEx++ 1901 stringLen |= uint64(b&0x7F) << shift 1902 if b < 0x80 { 1903 break 1904 } 1905 } 1906 intStringLen := int(stringLen) 1907 if intStringLen < 0 { 1908 return ErrInvalidLengthDistribution 1909 } 1910 postIndex := iNdEx + intStringLen 1911 if postIndex < 0 { 1912 return ErrInvalidLengthDistribution 1913 } 1914 if postIndex > l { 1915 return io.ErrUnexpectedEOF 1916 } 1917 if err := m.BaseProposerReward.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1918 return err 1919 } 1920 iNdEx = postIndex 1921 case 3: 1922 if wireType != 2 { 1923 return fmt.Errorf("proto: wrong wireType = %d for field BonusProposerReward", wireType) 1924 } 1925 var stringLen uint64 1926 for shift := uint(0); ; shift += 7 { 1927 if shift >= 64 { 1928 return ErrIntOverflowDistribution 1929 } 1930 if iNdEx >= l { 1931 return io.ErrUnexpectedEOF 1932 } 1933 b := dAtA[iNdEx] 1934 iNdEx++ 1935 stringLen |= uint64(b&0x7F) << shift 1936 if b < 0x80 { 1937 break 1938 } 1939 } 1940 intStringLen := int(stringLen) 1941 if intStringLen < 0 { 1942 return ErrInvalidLengthDistribution 1943 } 1944 postIndex := iNdEx + intStringLen 1945 if postIndex < 0 { 1946 return ErrInvalidLengthDistribution 1947 } 1948 if postIndex > l { 1949 return io.ErrUnexpectedEOF 1950 } 1951 if err := m.BonusProposerReward.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1952 return err 1953 } 1954 iNdEx = postIndex 1955 case 4: 1956 if wireType != 0 { 1957 return fmt.Errorf("proto: wrong wireType = %d for field WithdrawAddrEnabled", wireType) 1958 } 1959 var v int 1960 for shift := uint(0); ; shift += 7 { 1961 if shift >= 64 { 1962 return ErrIntOverflowDistribution 1963 } 1964 if iNdEx >= l { 1965 return io.ErrUnexpectedEOF 1966 } 1967 b := dAtA[iNdEx] 1968 iNdEx++ 1969 v |= int(b&0x7F) << shift 1970 if b < 0x80 { 1971 break 1972 } 1973 } 1974 m.WithdrawAddrEnabled = bool(v != 0) 1975 default: 1976 iNdEx = preIndex 1977 skippy, err := skipDistribution(dAtA[iNdEx:]) 1978 if err != nil { 1979 return err 1980 } 1981 if (skippy < 0) || (iNdEx+skippy) < 0 { 1982 return ErrInvalidLengthDistribution 1983 } 1984 if (iNdEx + skippy) > l { 1985 return io.ErrUnexpectedEOF 1986 } 1987 iNdEx += skippy 1988 } 1989 } 1990 1991 if iNdEx > l { 1992 return io.ErrUnexpectedEOF 1993 } 1994 return nil 1995 } 1996 func (m *ValidatorHistoricalRewards) Unmarshal(dAtA []byte) error { 1997 l := len(dAtA) 1998 iNdEx := 0 1999 for iNdEx < l { 2000 preIndex := iNdEx 2001 var wire uint64 2002 for shift := uint(0); ; shift += 7 { 2003 if shift >= 64 { 2004 return ErrIntOverflowDistribution 2005 } 2006 if iNdEx >= l { 2007 return io.ErrUnexpectedEOF 2008 } 2009 b := dAtA[iNdEx] 2010 iNdEx++ 2011 wire |= uint64(b&0x7F) << shift 2012 if b < 0x80 { 2013 break 2014 } 2015 } 2016 fieldNum := int32(wire >> 3) 2017 wireType := int(wire & 0x7) 2018 if wireType == 4 { 2019 return fmt.Errorf("proto: ValidatorHistoricalRewards: wiretype end group for non-group") 2020 } 2021 if fieldNum <= 0 { 2022 return fmt.Errorf("proto: ValidatorHistoricalRewards: illegal tag %d (wire type %d)", fieldNum, wire) 2023 } 2024 switch fieldNum { 2025 case 1: 2026 if wireType != 2 { 2027 return fmt.Errorf("proto: wrong wireType = %d for field CumulativeRewardRatio", wireType) 2028 } 2029 var msglen int 2030 for shift := uint(0); ; shift += 7 { 2031 if shift >= 64 { 2032 return ErrIntOverflowDistribution 2033 } 2034 if iNdEx >= l { 2035 return io.ErrUnexpectedEOF 2036 } 2037 b := dAtA[iNdEx] 2038 iNdEx++ 2039 msglen |= int(b&0x7F) << shift 2040 if b < 0x80 { 2041 break 2042 } 2043 } 2044 if msglen < 0 { 2045 return ErrInvalidLengthDistribution 2046 } 2047 postIndex := iNdEx + msglen 2048 if postIndex < 0 { 2049 return ErrInvalidLengthDistribution 2050 } 2051 if postIndex > l { 2052 return io.ErrUnexpectedEOF 2053 } 2054 m.CumulativeRewardRatio = append(m.CumulativeRewardRatio, types.DecCoin{}) 2055 if err := m.CumulativeRewardRatio[len(m.CumulativeRewardRatio)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2056 return err 2057 } 2058 iNdEx = postIndex 2059 case 2: 2060 if wireType != 0 { 2061 return fmt.Errorf("proto: wrong wireType = %d for field ReferenceCount", wireType) 2062 } 2063 m.ReferenceCount = 0 2064 for shift := uint(0); ; shift += 7 { 2065 if shift >= 64 { 2066 return ErrIntOverflowDistribution 2067 } 2068 if iNdEx >= l { 2069 return io.ErrUnexpectedEOF 2070 } 2071 b := dAtA[iNdEx] 2072 iNdEx++ 2073 m.ReferenceCount |= uint32(b&0x7F) << shift 2074 if b < 0x80 { 2075 break 2076 } 2077 } 2078 default: 2079 iNdEx = preIndex 2080 skippy, err := skipDistribution(dAtA[iNdEx:]) 2081 if err != nil { 2082 return err 2083 } 2084 if (skippy < 0) || (iNdEx+skippy) < 0 { 2085 return ErrInvalidLengthDistribution 2086 } 2087 if (iNdEx + skippy) > l { 2088 return io.ErrUnexpectedEOF 2089 } 2090 iNdEx += skippy 2091 } 2092 } 2093 2094 if iNdEx > l { 2095 return io.ErrUnexpectedEOF 2096 } 2097 return nil 2098 } 2099 func (m *ValidatorCurrentRewards) Unmarshal(dAtA []byte) error { 2100 l := len(dAtA) 2101 iNdEx := 0 2102 for iNdEx < l { 2103 preIndex := iNdEx 2104 var wire uint64 2105 for shift := uint(0); ; shift += 7 { 2106 if shift >= 64 { 2107 return ErrIntOverflowDistribution 2108 } 2109 if iNdEx >= l { 2110 return io.ErrUnexpectedEOF 2111 } 2112 b := dAtA[iNdEx] 2113 iNdEx++ 2114 wire |= uint64(b&0x7F) << shift 2115 if b < 0x80 { 2116 break 2117 } 2118 } 2119 fieldNum := int32(wire >> 3) 2120 wireType := int(wire & 0x7) 2121 if wireType == 4 { 2122 return fmt.Errorf("proto: ValidatorCurrentRewards: wiretype end group for non-group") 2123 } 2124 if fieldNum <= 0 { 2125 return fmt.Errorf("proto: ValidatorCurrentRewards: illegal tag %d (wire type %d)", fieldNum, wire) 2126 } 2127 switch fieldNum { 2128 case 1: 2129 if wireType != 2 { 2130 return fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) 2131 } 2132 var msglen int 2133 for shift := uint(0); ; shift += 7 { 2134 if shift >= 64 { 2135 return ErrIntOverflowDistribution 2136 } 2137 if iNdEx >= l { 2138 return io.ErrUnexpectedEOF 2139 } 2140 b := dAtA[iNdEx] 2141 iNdEx++ 2142 msglen |= int(b&0x7F) << shift 2143 if b < 0x80 { 2144 break 2145 } 2146 } 2147 if msglen < 0 { 2148 return ErrInvalidLengthDistribution 2149 } 2150 postIndex := iNdEx + msglen 2151 if postIndex < 0 { 2152 return ErrInvalidLengthDistribution 2153 } 2154 if postIndex > l { 2155 return io.ErrUnexpectedEOF 2156 } 2157 m.Rewards = append(m.Rewards, types.DecCoin{}) 2158 if err := m.Rewards[len(m.Rewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2159 return err 2160 } 2161 iNdEx = postIndex 2162 case 2: 2163 if wireType != 0 { 2164 return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) 2165 } 2166 m.Period = 0 2167 for shift := uint(0); ; shift += 7 { 2168 if shift >= 64 { 2169 return ErrIntOverflowDistribution 2170 } 2171 if iNdEx >= l { 2172 return io.ErrUnexpectedEOF 2173 } 2174 b := dAtA[iNdEx] 2175 iNdEx++ 2176 m.Period |= uint64(b&0x7F) << shift 2177 if b < 0x80 { 2178 break 2179 } 2180 } 2181 default: 2182 iNdEx = preIndex 2183 skippy, err := skipDistribution(dAtA[iNdEx:]) 2184 if err != nil { 2185 return err 2186 } 2187 if (skippy < 0) || (iNdEx+skippy) < 0 { 2188 return ErrInvalidLengthDistribution 2189 } 2190 if (iNdEx + skippy) > l { 2191 return io.ErrUnexpectedEOF 2192 } 2193 iNdEx += skippy 2194 } 2195 } 2196 2197 if iNdEx > l { 2198 return io.ErrUnexpectedEOF 2199 } 2200 return nil 2201 } 2202 func (m *ValidatorAccumulatedCommission) Unmarshal(dAtA []byte) error { 2203 l := len(dAtA) 2204 iNdEx := 0 2205 for iNdEx < l { 2206 preIndex := iNdEx 2207 var wire uint64 2208 for shift := uint(0); ; shift += 7 { 2209 if shift >= 64 { 2210 return ErrIntOverflowDistribution 2211 } 2212 if iNdEx >= l { 2213 return io.ErrUnexpectedEOF 2214 } 2215 b := dAtA[iNdEx] 2216 iNdEx++ 2217 wire |= uint64(b&0x7F) << shift 2218 if b < 0x80 { 2219 break 2220 } 2221 } 2222 fieldNum := int32(wire >> 3) 2223 wireType := int(wire & 0x7) 2224 if wireType == 4 { 2225 return fmt.Errorf("proto: ValidatorAccumulatedCommission: wiretype end group for non-group") 2226 } 2227 if fieldNum <= 0 { 2228 return fmt.Errorf("proto: ValidatorAccumulatedCommission: illegal tag %d (wire type %d)", fieldNum, wire) 2229 } 2230 switch fieldNum { 2231 case 1: 2232 if wireType != 2 { 2233 return fmt.Errorf("proto: wrong wireType = %d for field Commission", wireType) 2234 } 2235 var msglen int 2236 for shift := uint(0); ; shift += 7 { 2237 if shift >= 64 { 2238 return ErrIntOverflowDistribution 2239 } 2240 if iNdEx >= l { 2241 return io.ErrUnexpectedEOF 2242 } 2243 b := dAtA[iNdEx] 2244 iNdEx++ 2245 msglen |= int(b&0x7F) << shift 2246 if b < 0x80 { 2247 break 2248 } 2249 } 2250 if msglen < 0 { 2251 return ErrInvalidLengthDistribution 2252 } 2253 postIndex := iNdEx + msglen 2254 if postIndex < 0 { 2255 return ErrInvalidLengthDistribution 2256 } 2257 if postIndex > l { 2258 return io.ErrUnexpectedEOF 2259 } 2260 m.Commission = append(m.Commission, types.DecCoin{}) 2261 if err := m.Commission[len(m.Commission)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2262 return err 2263 } 2264 iNdEx = postIndex 2265 default: 2266 iNdEx = preIndex 2267 skippy, err := skipDistribution(dAtA[iNdEx:]) 2268 if err != nil { 2269 return err 2270 } 2271 if (skippy < 0) || (iNdEx+skippy) < 0 { 2272 return ErrInvalidLengthDistribution 2273 } 2274 if (iNdEx + skippy) > l { 2275 return io.ErrUnexpectedEOF 2276 } 2277 iNdEx += skippy 2278 } 2279 } 2280 2281 if iNdEx > l { 2282 return io.ErrUnexpectedEOF 2283 } 2284 return nil 2285 } 2286 func (m *ValidatorOutstandingRewards) Unmarshal(dAtA []byte) error { 2287 l := len(dAtA) 2288 iNdEx := 0 2289 for iNdEx < l { 2290 preIndex := iNdEx 2291 var wire uint64 2292 for shift := uint(0); ; shift += 7 { 2293 if shift >= 64 { 2294 return ErrIntOverflowDistribution 2295 } 2296 if iNdEx >= l { 2297 return io.ErrUnexpectedEOF 2298 } 2299 b := dAtA[iNdEx] 2300 iNdEx++ 2301 wire |= uint64(b&0x7F) << shift 2302 if b < 0x80 { 2303 break 2304 } 2305 } 2306 fieldNum := int32(wire >> 3) 2307 wireType := int(wire & 0x7) 2308 if wireType == 4 { 2309 return fmt.Errorf("proto: ValidatorOutstandingRewards: wiretype end group for non-group") 2310 } 2311 if fieldNum <= 0 { 2312 return fmt.Errorf("proto: ValidatorOutstandingRewards: illegal tag %d (wire type %d)", fieldNum, wire) 2313 } 2314 switch fieldNum { 2315 case 1: 2316 if wireType != 2 { 2317 return fmt.Errorf("proto: wrong wireType = %d for field Rewards", wireType) 2318 } 2319 var msglen int 2320 for shift := uint(0); ; shift += 7 { 2321 if shift >= 64 { 2322 return ErrIntOverflowDistribution 2323 } 2324 if iNdEx >= l { 2325 return io.ErrUnexpectedEOF 2326 } 2327 b := dAtA[iNdEx] 2328 iNdEx++ 2329 msglen |= int(b&0x7F) << shift 2330 if b < 0x80 { 2331 break 2332 } 2333 } 2334 if msglen < 0 { 2335 return ErrInvalidLengthDistribution 2336 } 2337 postIndex := iNdEx + msglen 2338 if postIndex < 0 { 2339 return ErrInvalidLengthDistribution 2340 } 2341 if postIndex > l { 2342 return io.ErrUnexpectedEOF 2343 } 2344 m.Rewards = append(m.Rewards, types.DecCoin{}) 2345 if err := m.Rewards[len(m.Rewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2346 return err 2347 } 2348 iNdEx = postIndex 2349 default: 2350 iNdEx = preIndex 2351 skippy, err := skipDistribution(dAtA[iNdEx:]) 2352 if err != nil { 2353 return err 2354 } 2355 if (skippy < 0) || (iNdEx+skippy) < 0 { 2356 return ErrInvalidLengthDistribution 2357 } 2358 if (iNdEx + skippy) > l { 2359 return io.ErrUnexpectedEOF 2360 } 2361 iNdEx += skippy 2362 } 2363 } 2364 2365 if iNdEx > l { 2366 return io.ErrUnexpectedEOF 2367 } 2368 return nil 2369 } 2370 func (m *ValidatorSlashEvent) Unmarshal(dAtA []byte) error { 2371 l := len(dAtA) 2372 iNdEx := 0 2373 for iNdEx < l { 2374 preIndex := iNdEx 2375 var wire uint64 2376 for shift := uint(0); ; shift += 7 { 2377 if shift >= 64 { 2378 return ErrIntOverflowDistribution 2379 } 2380 if iNdEx >= l { 2381 return io.ErrUnexpectedEOF 2382 } 2383 b := dAtA[iNdEx] 2384 iNdEx++ 2385 wire |= uint64(b&0x7F) << shift 2386 if b < 0x80 { 2387 break 2388 } 2389 } 2390 fieldNum := int32(wire >> 3) 2391 wireType := int(wire & 0x7) 2392 if wireType == 4 { 2393 return fmt.Errorf("proto: ValidatorSlashEvent: wiretype end group for non-group") 2394 } 2395 if fieldNum <= 0 { 2396 return fmt.Errorf("proto: ValidatorSlashEvent: illegal tag %d (wire type %d)", fieldNum, wire) 2397 } 2398 switch fieldNum { 2399 case 1: 2400 if wireType != 0 { 2401 return fmt.Errorf("proto: wrong wireType = %d for field ValidatorPeriod", wireType) 2402 } 2403 m.ValidatorPeriod = 0 2404 for shift := uint(0); ; shift += 7 { 2405 if shift >= 64 { 2406 return ErrIntOverflowDistribution 2407 } 2408 if iNdEx >= l { 2409 return io.ErrUnexpectedEOF 2410 } 2411 b := dAtA[iNdEx] 2412 iNdEx++ 2413 m.ValidatorPeriod |= uint64(b&0x7F) << shift 2414 if b < 0x80 { 2415 break 2416 } 2417 } 2418 case 2: 2419 if wireType != 2 { 2420 return fmt.Errorf("proto: wrong wireType = %d for field Fraction", wireType) 2421 } 2422 var stringLen uint64 2423 for shift := uint(0); ; shift += 7 { 2424 if shift >= 64 { 2425 return ErrIntOverflowDistribution 2426 } 2427 if iNdEx >= l { 2428 return io.ErrUnexpectedEOF 2429 } 2430 b := dAtA[iNdEx] 2431 iNdEx++ 2432 stringLen |= uint64(b&0x7F) << shift 2433 if b < 0x80 { 2434 break 2435 } 2436 } 2437 intStringLen := int(stringLen) 2438 if intStringLen < 0 { 2439 return ErrInvalidLengthDistribution 2440 } 2441 postIndex := iNdEx + intStringLen 2442 if postIndex < 0 { 2443 return ErrInvalidLengthDistribution 2444 } 2445 if postIndex > l { 2446 return io.ErrUnexpectedEOF 2447 } 2448 if err := m.Fraction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2449 return err 2450 } 2451 iNdEx = postIndex 2452 default: 2453 iNdEx = preIndex 2454 skippy, err := skipDistribution(dAtA[iNdEx:]) 2455 if err != nil { 2456 return err 2457 } 2458 if (skippy < 0) || (iNdEx+skippy) < 0 { 2459 return ErrInvalidLengthDistribution 2460 } 2461 if (iNdEx + skippy) > l { 2462 return io.ErrUnexpectedEOF 2463 } 2464 iNdEx += skippy 2465 } 2466 } 2467 2468 if iNdEx > l { 2469 return io.ErrUnexpectedEOF 2470 } 2471 return nil 2472 } 2473 func (m *ValidatorSlashEvents) Unmarshal(dAtA []byte) error { 2474 l := len(dAtA) 2475 iNdEx := 0 2476 for iNdEx < l { 2477 preIndex := iNdEx 2478 var wire uint64 2479 for shift := uint(0); ; shift += 7 { 2480 if shift >= 64 { 2481 return ErrIntOverflowDistribution 2482 } 2483 if iNdEx >= l { 2484 return io.ErrUnexpectedEOF 2485 } 2486 b := dAtA[iNdEx] 2487 iNdEx++ 2488 wire |= uint64(b&0x7F) << shift 2489 if b < 0x80 { 2490 break 2491 } 2492 } 2493 fieldNum := int32(wire >> 3) 2494 wireType := int(wire & 0x7) 2495 if wireType == 4 { 2496 return fmt.Errorf("proto: ValidatorSlashEvents: wiretype end group for non-group") 2497 } 2498 if fieldNum <= 0 { 2499 return fmt.Errorf("proto: ValidatorSlashEvents: illegal tag %d (wire type %d)", fieldNum, wire) 2500 } 2501 switch fieldNum { 2502 case 1: 2503 if wireType != 2 { 2504 return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSlashEvents", wireType) 2505 } 2506 var msglen int 2507 for shift := uint(0); ; shift += 7 { 2508 if shift >= 64 { 2509 return ErrIntOverflowDistribution 2510 } 2511 if iNdEx >= l { 2512 return io.ErrUnexpectedEOF 2513 } 2514 b := dAtA[iNdEx] 2515 iNdEx++ 2516 msglen |= int(b&0x7F) << shift 2517 if b < 0x80 { 2518 break 2519 } 2520 } 2521 if msglen < 0 { 2522 return ErrInvalidLengthDistribution 2523 } 2524 postIndex := iNdEx + msglen 2525 if postIndex < 0 { 2526 return ErrInvalidLengthDistribution 2527 } 2528 if postIndex > l { 2529 return io.ErrUnexpectedEOF 2530 } 2531 m.ValidatorSlashEvents = append(m.ValidatorSlashEvents, ValidatorSlashEvent{}) 2532 if err := m.ValidatorSlashEvents[len(m.ValidatorSlashEvents)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2533 return err 2534 } 2535 iNdEx = postIndex 2536 default: 2537 iNdEx = preIndex 2538 skippy, err := skipDistribution(dAtA[iNdEx:]) 2539 if err != nil { 2540 return err 2541 } 2542 if (skippy < 0) || (iNdEx+skippy) < 0 { 2543 return ErrInvalidLengthDistribution 2544 } 2545 if (iNdEx + skippy) > l { 2546 return io.ErrUnexpectedEOF 2547 } 2548 iNdEx += skippy 2549 } 2550 } 2551 2552 if iNdEx > l { 2553 return io.ErrUnexpectedEOF 2554 } 2555 return nil 2556 } 2557 func (m *FeePool) Unmarshal(dAtA []byte) error { 2558 l := len(dAtA) 2559 iNdEx := 0 2560 for iNdEx < l { 2561 preIndex := iNdEx 2562 var wire uint64 2563 for shift := uint(0); ; shift += 7 { 2564 if shift >= 64 { 2565 return ErrIntOverflowDistribution 2566 } 2567 if iNdEx >= l { 2568 return io.ErrUnexpectedEOF 2569 } 2570 b := dAtA[iNdEx] 2571 iNdEx++ 2572 wire |= uint64(b&0x7F) << shift 2573 if b < 0x80 { 2574 break 2575 } 2576 } 2577 fieldNum := int32(wire >> 3) 2578 wireType := int(wire & 0x7) 2579 if wireType == 4 { 2580 return fmt.Errorf("proto: FeePool: wiretype end group for non-group") 2581 } 2582 if fieldNum <= 0 { 2583 return fmt.Errorf("proto: FeePool: illegal tag %d (wire type %d)", fieldNum, wire) 2584 } 2585 switch fieldNum { 2586 case 1: 2587 if wireType != 2 { 2588 return fmt.Errorf("proto: wrong wireType = %d for field CommunityPool", wireType) 2589 } 2590 var msglen int 2591 for shift := uint(0); ; shift += 7 { 2592 if shift >= 64 { 2593 return ErrIntOverflowDistribution 2594 } 2595 if iNdEx >= l { 2596 return io.ErrUnexpectedEOF 2597 } 2598 b := dAtA[iNdEx] 2599 iNdEx++ 2600 msglen |= int(b&0x7F) << shift 2601 if b < 0x80 { 2602 break 2603 } 2604 } 2605 if msglen < 0 { 2606 return ErrInvalidLengthDistribution 2607 } 2608 postIndex := iNdEx + msglen 2609 if postIndex < 0 { 2610 return ErrInvalidLengthDistribution 2611 } 2612 if postIndex > l { 2613 return io.ErrUnexpectedEOF 2614 } 2615 m.CommunityPool = append(m.CommunityPool, types.DecCoin{}) 2616 if err := m.CommunityPool[len(m.CommunityPool)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2617 return err 2618 } 2619 iNdEx = postIndex 2620 default: 2621 iNdEx = preIndex 2622 skippy, err := skipDistribution(dAtA[iNdEx:]) 2623 if err != nil { 2624 return err 2625 } 2626 if (skippy < 0) || (iNdEx+skippy) < 0 { 2627 return ErrInvalidLengthDistribution 2628 } 2629 if (iNdEx + skippy) > l { 2630 return io.ErrUnexpectedEOF 2631 } 2632 iNdEx += skippy 2633 } 2634 } 2635 2636 if iNdEx > l { 2637 return io.ErrUnexpectedEOF 2638 } 2639 return nil 2640 } 2641 func (m *CommunityPoolSpendProposal) Unmarshal(dAtA []byte) error { 2642 l := len(dAtA) 2643 iNdEx := 0 2644 for iNdEx < l { 2645 preIndex := iNdEx 2646 var wire uint64 2647 for shift := uint(0); ; shift += 7 { 2648 if shift >= 64 { 2649 return ErrIntOverflowDistribution 2650 } 2651 if iNdEx >= l { 2652 return io.ErrUnexpectedEOF 2653 } 2654 b := dAtA[iNdEx] 2655 iNdEx++ 2656 wire |= uint64(b&0x7F) << shift 2657 if b < 0x80 { 2658 break 2659 } 2660 } 2661 fieldNum := int32(wire >> 3) 2662 wireType := int(wire & 0x7) 2663 if wireType == 4 { 2664 return fmt.Errorf("proto: CommunityPoolSpendProposal: wiretype end group for non-group") 2665 } 2666 if fieldNum <= 0 { 2667 return fmt.Errorf("proto: CommunityPoolSpendProposal: illegal tag %d (wire type %d)", fieldNum, wire) 2668 } 2669 switch fieldNum { 2670 case 1: 2671 if wireType != 2 { 2672 return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) 2673 } 2674 var stringLen uint64 2675 for shift := uint(0); ; shift += 7 { 2676 if shift >= 64 { 2677 return ErrIntOverflowDistribution 2678 } 2679 if iNdEx >= l { 2680 return io.ErrUnexpectedEOF 2681 } 2682 b := dAtA[iNdEx] 2683 iNdEx++ 2684 stringLen |= uint64(b&0x7F) << shift 2685 if b < 0x80 { 2686 break 2687 } 2688 } 2689 intStringLen := int(stringLen) 2690 if intStringLen < 0 { 2691 return ErrInvalidLengthDistribution 2692 } 2693 postIndex := iNdEx + intStringLen 2694 if postIndex < 0 { 2695 return ErrInvalidLengthDistribution 2696 } 2697 if postIndex > l { 2698 return io.ErrUnexpectedEOF 2699 } 2700 m.Title = string(dAtA[iNdEx:postIndex]) 2701 iNdEx = postIndex 2702 case 2: 2703 if wireType != 2 { 2704 return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) 2705 } 2706 var stringLen uint64 2707 for shift := uint(0); ; shift += 7 { 2708 if shift >= 64 { 2709 return ErrIntOverflowDistribution 2710 } 2711 if iNdEx >= l { 2712 return io.ErrUnexpectedEOF 2713 } 2714 b := dAtA[iNdEx] 2715 iNdEx++ 2716 stringLen |= uint64(b&0x7F) << shift 2717 if b < 0x80 { 2718 break 2719 } 2720 } 2721 intStringLen := int(stringLen) 2722 if intStringLen < 0 { 2723 return ErrInvalidLengthDistribution 2724 } 2725 postIndex := iNdEx + intStringLen 2726 if postIndex < 0 { 2727 return ErrInvalidLengthDistribution 2728 } 2729 if postIndex > l { 2730 return io.ErrUnexpectedEOF 2731 } 2732 m.Description = string(dAtA[iNdEx:postIndex]) 2733 iNdEx = postIndex 2734 case 3: 2735 if wireType != 2 { 2736 return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) 2737 } 2738 var stringLen uint64 2739 for shift := uint(0); ; shift += 7 { 2740 if shift >= 64 { 2741 return ErrIntOverflowDistribution 2742 } 2743 if iNdEx >= l { 2744 return io.ErrUnexpectedEOF 2745 } 2746 b := dAtA[iNdEx] 2747 iNdEx++ 2748 stringLen |= uint64(b&0x7F) << shift 2749 if b < 0x80 { 2750 break 2751 } 2752 } 2753 intStringLen := int(stringLen) 2754 if intStringLen < 0 { 2755 return ErrInvalidLengthDistribution 2756 } 2757 postIndex := iNdEx + intStringLen 2758 if postIndex < 0 { 2759 return ErrInvalidLengthDistribution 2760 } 2761 if postIndex > l { 2762 return io.ErrUnexpectedEOF 2763 } 2764 m.Recipient = string(dAtA[iNdEx:postIndex]) 2765 iNdEx = postIndex 2766 case 4: 2767 if wireType != 2 { 2768 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 2769 } 2770 var msglen int 2771 for shift := uint(0); ; shift += 7 { 2772 if shift >= 64 { 2773 return ErrIntOverflowDistribution 2774 } 2775 if iNdEx >= l { 2776 return io.ErrUnexpectedEOF 2777 } 2778 b := dAtA[iNdEx] 2779 iNdEx++ 2780 msglen |= int(b&0x7F) << shift 2781 if b < 0x80 { 2782 break 2783 } 2784 } 2785 if msglen < 0 { 2786 return ErrInvalidLengthDistribution 2787 } 2788 postIndex := iNdEx + msglen 2789 if postIndex < 0 { 2790 return ErrInvalidLengthDistribution 2791 } 2792 if postIndex > l { 2793 return io.ErrUnexpectedEOF 2794 } 2795 m.Amount = append(m.Amount, types.Coin{}) 2796 if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2797 return err 2798 } 2799 iNdEx = postIndex 2800 default: 2801 iNdEx = preIndex 2802 skippy, err := skipDistribution(dAtA[iNdEx:]) 2803 if err != nil { 2804 return err 2805 } 2806 if (skippy < 0) || (iNdEx+skippy) < 0 { 2807 return ErrInvalidLengthDistribution 2808 } 2809 if (iNdEx + skippy) > l { 2810 return io.ErrUnexpectedEOF 2811 } 2812 iNdEx += skippy 2813 } 2814 } 2815 2816 if iNdEx > l { 2817 return io.ErrUnexpectedEOF 2818 } 2819 return nil 2820 } 2821 func (m *DelegatorStartingInfo) Unmarshal(dAtA []byte) error { 2822 l := len(dAtA) 2823 iNdEx := 0 2824 for iNdEx < l { 2825 preIndex := iNdEx 2826 var wire uint64 2827 for shift := uint(0); ; shift += 7 { 2828 if shift >= 64 { 2829 return ErrIntOverflowDistribution 2830 } 2831 if iNdEx >= l { 2832 return io.ErrUnexpectedEOF 2833 } 2834 b := dAtA[iNdEx] 2835 iNdEx++ 2836 wire |= uint64(b&0x7F) << shift 2837 if b < 0x80 { 2838 break 2839 } 2840 } 2841 fieldNum := int32(wire >> 3) 2842 wireType := int(wire & 0x7) 2843 if wireType == 4 { 2844 return fmt.Errorf("proto: DelegatorStartingInfo: wiretype end group for non-group") 2845 } 2846 if fieldNum <= 0 { 2847 return fmt.Errorf("proto: DelegatorStartingInfo: illegal tag %d (wire type %d)", fieldNum, wire) 2848 } 2849 switch fieldNum { 2850 case 1: 2851 if wireType != 0 { 2852 return fmt.Errorf("proto: wrong wireType = %d for field PreviousPeriod", wireType) 2853 } 2854 m.PreviousPeriod = 0 2855 for shift := uint(0); ; shift += 7 { 2856 if shift >= 64 { 2857 return ErrIntOverflowDistribution 2858 } 2859 if iNdEx >= l { 2860 return io.ErrUnexpectedEOF 2861 } 2862 b := dAtA[iNdEx] 2863 iNdEx++ 2864 m.PreviousPeriod |= uint64(b&0x7F) << shift 2865 if b < 0x80 { 2866 break 2867 } 2868 } 2869 case 2: 2870 if wireType != 2 { 2871 return fmt.Errorf("proto: wrong wireType = %d for field Stake", wireType) 2872 } 2873 var stringLen uint64 2874 for shift := uint(0); ; shift += 7 { 2875 if shift >= 64 { 2876 return ErrIntOverflowDistribution 2877 } 2878 if iNdEx >= l { 2879 return io.ErrUnexpectedEOF 2880 } 2881 b := dAtA[iNdEx] 2882 iNdEx++ 2883 stringLen |= uint64(b&0x7F) << shift 2884 if b < 0x80 { 2885 break 2886 } 2887 } 2888 intStringLen := int(stringLen) 2889 if intStringLen < 0 { 2890 return ErrInvalidLengthDistribution 2891 } 2892 postIndex := iNdEx + intStringLen 2893 if postIndex < 0 { 2894 return ErrInvalidLengthDistribution 2895 } 2896 if postIndex > l { 2897 return io.ErrUnexpectedEOF 2898 } 2899 if err := m.Stake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2900 return err 2901 } 2902 iNdEx = postIndex 2903 case 3: 2904 if wireType != 0 { 2905 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 2906 } 2907 m.Height = 0 2908 for shift := uint(0); ; shift += 7 { 2909 if shift >= 64 { 2910 return ErrIntOverflowDistribution 2911 } 2912 if iNdEx >= l { 2913 return io.ErrUnexpectedEOF 2914 } 2915 b := dAtA[iNdEx] 2916 iNdEx++ 2917 m.Height |= uint64(b&0x7F) << shift 2918 if b < 0x80 { 2919 break 2920 } 2921 } 2922 default: 2923 iNdEx = preIndex 2924 skippy, err := skipDistribution(dAtA[iNdEx:]) 2925 if err != nil { 2926 return err 2927 } 2928 if (skippy < 0) || (iNdEx+skippy) < 0 { 2929 return ErrInvalidLengthDistribution 2930 } 2931 if (iNdEx + skippy) > l { 2932 return io.ErrUnexpectedEOF 2933 } 2934 iNdEx += skippy 2935 } 2936 } 2937 2938 if iNdEx > l { 2939 return io.ErrUnexpectedEOF 2940 } 2941 return nil 2942 } 2943 func (m *DelegationDelegatorReward) Unmarshal(dAtA []byte) error { 2944 l := len(dAtA) 2945 iNdEx := 0 2946 for iNdEx < l { 2947 preIndex := iNdEx 2948 var wire uint64 2949 for shift := uint(0); ; shift += 7 { 2950 if shift >= 64 { 2951 return ErrIntOverflowDistribution 2952 } 2953 if iNdEx >= l { 2954 return io.ErrUnexpectedEOF 2955 } 2956 b := dAtA[iNdEx] 2957 iNdEx++ 2958 wire |= uint64(b&0x7F) << shift 2959 if b < 0x80 { 2960 break 2961 } 2962 } 2963 fieldNum := int32(wire >> 3) 2964 wireType := int(wire & 0x7) 2965 if wireType == 4 { 2966 return fmt.Errorf("proto: DelegationDelegatorReward: wiretype end group for non-group") 2967 } 2968 if fieldNum <= 0 { 2969 return fmt.Errorf("proto: DelegationDelegatorReward: illegal tag %d (wire type %d)", fieldNum, wire) 2970 } 2971 switch fieldNum { 2972 case 1: 2973 if wireType != 2 { 2974 return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) 2975 } 2976 var stringLen uint64 2977 for shift := uint(0); ; shift += 7 { 2978 if shift >= 64 { 2979 return ErrIntOverflowDistribution 2980 } 2981 if iNdEx >= l { 2982 return io.ErrUnexpectedEOF 2983 } 2984 b := dAtA[iNdEx] 2985 iNdEx++ 2986 stringLen |= uint64(b&0x7F) << shift 2987 if b < 0x80 { 2988 break 2989 } 2990 } 2991 intStringLen := int(stringLen) 2992 if intStringLen < 0 { 2993 return ErrInvalidLengthDistribution 2994 } 2995 postIndex := iNdEx + intStringLen 2996 if postIndex < 0 { 2997 return ErrInvalidLengthDistribution 2998 } 2999 if postIndex > l { 3000 return io.ErrUnexpectedEOF 3001 } 3002 m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) 3003 iNdEx = postIndex 3004 case 2: 3005 if wireType != 2 { 3006 return fmt.Errorf("proto: wrong wireType = %d for field Reward", wireType) 3007 } 3008 var msglen int 3009 for shift := uint(0); ; shift += 7 { 3010 if shift >= 64 { 3011 return ErrIntOverflowDistribution 3012 } 3013 if iNdEx >= l { 3014 return io.ErrUnexpectedEOF 3015 } 3016 b := dAtA[iNdEx] 3017 iNdEx++ 3018 msglen |= int(b&0x7F) << shift 3019 if b < 0x80 { 3020 break 3021 } 3022 } 3023 if msglen < 0 { 3024 return ErrInvalidLengthDistribution 3025 } 3026 postIndex := iNdEx + msglen 3027 if postIndex < 0 { 3028 return ErrInvalidLengthDistribution 3029 } 3030 if postIndex > l { 3031 return io.ErrUnexpectedEOF 3032 } 3033 m.Reward = append(m.Reward, types.DecCoin{}) 3034 if err := m.Reward[len(m.Reward)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3035 return err 3036 } 3037 iNdEx = postIndex 3038 default: 3039 iNdEx = preIndex 3040 skippy, err := skipDistribution(dAtA[iNdEx:]) 3041 if err != nil { 3042 return err 3043 } 3044 if (skippy < 0) || (iNdEx+skippy) < 0 { 3045 return ErrInvalidLengthDistribution 3046 } 3047 if (iNdEx + skippy) > l { 3048 return io.ErrUnexpectedEOF 3049 } 3050 iNdEx += skippy 3051 } 3052 } 3053 3054 if iNdEx > l { 3055 return io.ErrUnexpectedEOF 3056 } 3057 return nil 3058 } 3059 func (m *CommunityPoolSpendProposalWithDeposit) Unmarshal(dAtA []byte) error { 3060 l := len(dAtA) 3061 iNdEx := 0 3062 for iNdEx < l { 3063 preIndex := iNdEx 3064 var wire uint64 3065 for shift := uint(0); ; shift += 7 { 3066 if shift >= 64 { 3067 return ErrIntOverflowDistribution 3068 } 3069 if iNdEx >= l { 3070 return io.ErrUnexpectedEOF 3071 } 3072 b := dAtA[iNdEx] 3073 iNdEx++ 3074 wire |= uint64(b&0x7F) << shift 3075 if b < 0x80 { 3076 break 3077 } 3078 } 3079 fieldNum := int32(wire >> 3) 3080 wireType := int(wire & 0x7) 3081 if wireType == 4 { 3082 return fmt.Errorf("proto: CommunityPoolSpendProposalWithDeposit: wiretype end group for non-group") 3083 } 3084 if fieldNum <= 0 { 3085 return fmt.Errorf("proto: CommunityPoolSpendProposalWithDeposit: illegal tag %d (wire type %d)", fieldNum, wire) 3086 } 3087 switch fieldNum { 3088 case 1: 3089 if wireType != 2 { 3090 return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) 3091 } 3092 var stringLen uint64 3093 for shift := uint(0); ; shift += 7 { 3094 if shift >= 64 { 3095 return ErrIntOverflowDistribution 3096 } 3097 if iNdEx >= l { 3098 return io.ErrUnexpectedEOF 3099 } 3100 b := dAtA[iNdEx] 3101 iNdEx++ 3102 stringLen |= uint64(b&0x7F) << shift 3103 if b < 0x80 { 3104 break 3105 } 3106 } 3107 intStringLen := int(stringLen) 3108 if intStringLen < 0 { 3109 return ErrInvalidLengthDistribution 3110 } 3111 postIndex := iNdEx + intStringLen 3112 if postIndex < 0 { 3113 return ErrInvalidLengthDistribution 3114 } 3115 if postIndex > l { 3116 return io.ErrUnexpectedEOF 3117 } 3118 m.Title = string(dAtA[iNdEx:postIndex]) 3119 iNdEx = postIndex 3120 case 2: 3121 if wireType != 2 { 3122 return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) 3123 } 3124 var stringLen uint64 3125 for shift := uint(0); ; shift += 7 { 3126 if shift >= 64 { 3127 return ErrIntOverflowDistribution 3128 } 3129 if iNdEx >= l { 3130 return io.ErrUnexpectedEOF 3131 } 3132 b := dAtA[iNdEx] 3133 iNdEx++ 3134 stringLen |= uint64(b&0x7F) << shift 3135 if b < 0x80 { 3136 break 3137 } 3138 } 3139 intStringLen := int(stringLen) 3140 if intStringLen < 0 { 3141 return ErrInvalidLengthDistribution 3142 } 3143 postIndex := iNdEx + intStringLen 3144 if postIndex < 0 { 3145 return ErrInvalidLengthDistribution 3146 } 3147 if postIndex > l { 3148 return io.ErrUnexpectedEOF 3149 } 3150 m.Description = string(dAtA[iNdEx:postIndex]) 3151 iNdEx = postIndex 3152 case 3: 3153 if wireType != 2 { 3154 return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) 3155 } 3156 var stringLen uint64 3157 for shift := uint(0); ; shift += 7 { 3158 if shift >= 64 { 3159 return ErrIntOverflowDistribution 3160 } 3161 if iNdEx >= l { 3162 return io.ErrUnexpectedEOF 3163 } 3164 b := dAtA[iNdEx] 3165 iNdEx++ 3166 stringLen |= uint64(b&0x7F) << shift 3167 if b < 0x80 { 3168 break 3169 } 3170 } 3171 intStringLen := int(stringLen) 3172 if intStringLen < 0 { 3173 return ErrInvalidLengthDistribution 3174 } 3175 postIndex := iNdEx + intStringLen 3176 if postIndex < 0 { 3177 return ErrInvalidLengthDistribution 3178 } 3179 if postIndex > l { 3180 return io.ErrUnexpectedEOF 3181 } 3182 m.Recipient = string(dAtA[iNdEx:postIndex]) 3183 iNdEx = postIndex 3184 case 4: 3185 if wireType != 2 { 3186 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 3187 } 3188 var stringLen uint64 3189 for shift := uint(0); ; shift += 7 { 3190 if shift >= 64 { 3191 return ErrIntOverflowDistribution 3192 } 3193 if iNdEx >= l { 3194 return io.ErrUnexpectedEOF 3195 } 3196 b := dAtA[iNdEx] 3197 iNdEx++ 3198 stringLen |= uint64(b&0x7F) << shift 3199 if b < 0x80 { 3200 break 3201 } 3202 } 3203 intStringLen := int(stringLen) 3204 if intStringLen < 0 { 3205 return ErrInvalidLengthDistribution 3206 } 3207 postIndex := iNdEx + intStringLen 3208 if postIndex < 0 { 3209 return ErrInvalidLengthDistribution 3210 } 3211 if postIndex > l { 3212 return io.ErrUnexpectedEOF 3213 } 3214 m.Amount = string(dAtA[iNdEx:postIndex]) 3215 iNdEx = postIndex 3216 case 5: 3217 if wireType != 2 { 3218 return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) 3219 } 3220 var stringLen uint64 3221 for shift := uint(0); ; shift += 7 { 3222 if shift >= 64 { 3223 return ErrIntOverflowDistribution 3224 } 3225 if iNdEx >= l { 3226 return io.ErrUnexpectedEOF 3227 } 3228 b := dAtA[iNdEx] 3229 iNdEx++ 3230 stringLen |= uint64(b&0x7F) << shift 3231 if b < 0x80 { 3232 break 3233 } 3234 } 3235 intStringLen := int(stringLen) 3236 if intStringLen < 0 { 3237 return ErrInvalidLengthDistribution 3238 } 3239 postIndex := iNdEx + intStringLen 3240 if postIndex < 0 { 3241 return ErrInvalidLengthDistribution 3242 } 3243 if postIndex > l { 3244 return io.ErrUnexpectedEOF 3245 } 3246 m.Deposit = string(dAtA[iNdEx:postIndex]) 3247 iNdEx = postIndex 3248 default: 3249 iNdEx = preIndex 3250 skippy, err := skipDistribution(dAtA[iNdEx:]) 3251 if err != nil { 3252 return err 3253 } 3254 if (skippy < 0) || (iNdEx+skippy) < 0 { 3255 return ErrInvalidLengthDistribution 3256 } 3257 if (iNdEx + skippy) > l { 3258 return io.ErrUnexpectedEOF 3259 } 3260 iNdEx += skippy 3261 } 3262 } 3263 3264 if iNdEx > l { 3265 return io.ErrUnexpectedEOF 3266 } 3267 return nil 3268 } 3269 func skipDistribution(dAtA []byte) (n int, err error) { 3270 l := len(dAtA) 3271 iNdEx := 0 3272 depth := 0 3273 for iNdEx < l { 3274 var wire uint64 3275 for shift := uint(0); ; shift += 7 { 3276 if shift >= 64 { 3277 return 0, ErrIntOverflowDistribution 3278 } 3279 if iNdEx >= l { 3280 return 0, io.ErrUnexpectedEOF 3281 } 3282 b := dAtA[iNdEx] 3283 iNdEx++ 3284 wire |= (uint64(b) & 0x7F) << shift 3285 if b < 0x80 { 3286 break 3287 } 3288 } 3289 wireType := int(wire & 0x7) 3290 switch wireType { 3291 case 0: 3292 for shift := uint(0); ; shift += 7 { 3293 if shift >= 64 { 3294 return 0, ErrIntOverflowDistribution 3295 } 3296 if iNdEx >= l { 3297 return 0, io.ErrUnexpectedEOF 3298 } 3299 iNdEx++ 3300 if dAtA[iNdEx-1] < 0x80 { 3301 break 3302 } 3303 } 3304 case 1: 3305 iNdEx += 8 3306 case 2: 3307 var length int 3308 for shift := uint(0); ; shift += 7 { 3309 if shift >= 64 { 3310 return 0, ErrIntOverflowDistribution 3311 } 3312 if iNdEx >= l { 3313 return 0, io.ErrUnexpectedEOF 3314 } 3315 b := dAtA[iNdEx] 3316 iNdEx++ 3317 length |= (int(b) & 0x7F) << shift 3318 if b < 0x80 { 3319 break 3320 } 3321 } 3322 if length < 0 { 3323 return 0, ErrInvalidLengthDistribution 3324 } 3325 iNdEx += length 3326 case 3: 3327 depth++ 3328 case 4: 3329 if depth == 0 { 3330 return 0, ErrUnexpectedEndOfGroupDistribution 3331 } 3332 depth-- 3333 case 5: 3334 iNdEx += 4 3335 default: 3336 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 3337 } 3338 if iNdEx < 0 { 3339 return 0, ErrInvalidLengthDistribution 3340 } 3341 if depth == 0 { 3342 return iNdEx, nil 3343 } 3344 } 3345 return 0, io.ErrUnexpectedEOF 3346 } 3347 3348 var ( 3349 ErrInvalidLengthDistribution = fmt.Errorf("proto: negative length found during unmarshaling") 3350 ErrIntOverflowDistribution = fmt.Errorf("proto: integer overflow") 3351 ErrUnexpectedEndOfGroupDistribution = fmt.Errorf("proto: unexpected end of group") 3352 )