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