From 6510ccb13dbe5cdde8eb6ad0886c41117777a306 Mon Sep 17 00:00:00 2001 From: Carlton N Hanna Date: Thu, 11 Apr 2024 11:23:41 -0600 Subject: [PATCH] remove protos again --- proto/provenance/reward/v1/genesis.proto | 24 - proto/provenance/reward/v1/query.proto | 152 - proto/provenance/reward/v1/reward.proto | 210 -- proto/provenance/reward/v1/tx.proto | 143 - x/reward/types/genesis.pb.go | 476 --- x/reward/types/query.pb.go | 3001 --------------- x/reward/types/query.pb.gw.go | 597 --- x/reward/types/reward.pb.go | 4344 ---------------------- x/reward/types/tx.pb.go | 3068 --------------- 9 files changed, 12015 deletions(-) delete mode 100644 proto/provenance/reward/v1/genesis.proto delete mode 100644 proto/provenance/reward/v1/query.proto delete mode 100644 proto/provenance/reward/v1/reward.proto delete mode 100644 proto/provenance/reward/v1/tx.proto delete mode 100644 x/reward/types/genesis.pb.go delete mode 100644 x/reward/types/query.pb.go delete mode 100644 x/reward/types/query.pb.gw.go delete mode 100644 x/reward/types/reward.pb.go delete mode 100644 x/reward/types/tx.pb.go diff --git a/proto/provenance/reward/v1/genesis.proto b/proto/provenance/reward/v1/genesis.proto deleted file mode 100644 index 52bf12a12f..0000000000 --- a/proto/provenance/reward/v1/genesis.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; -package provenance.reward.v1; - -import "gogoproto/gogo.proto"; -import "provenance/reward/v1/reward.proto"; - -option go_package = "github.com/provenance-io/provenance/x/reward/types"; -option java_package = "io.provenance.reward.v1"; -option java_multiple_files = true; - -// GenesisState defines the reward module's genesis state. -message GenesisState { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // Reward program id is the next auto incremented id to be assigned to the next created reward program - uint64 reward_program_id = 1; - // Reward programs to initially start with. - repeated RewardProgram reward_programs = 2 [(gogoproto.nullable) = false]; - // Claim period reward distributions to initially start with. - repeated ClaimPeriodRewardDistribution claim_period_reward_distributions = 3 [(gogoproto.nullable) = false]; - // Reward account states to initially start with. - repeated RewardAccountState reward_account_states = 4 [(gogoproto.nullable) = false]; -} diff --git a/proto/provenance/reward/v1/query.proto b/proto/provenance/reward/v1/query.proto deleted file mode 100644 index 38e905c494..0000000000 --- a/proto/provenance/reward/v1/query.proto +++ /dev/null @@ -1,152 +0,0 @@ -syntax = "proto3"; -package provenance.reward.v1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "provenance/reward/v1/reward.proto"; - -option go_package = "github.com/provenance-io/provenance/x/reward/types"; -option java_package = "io.provenance.reward.v1"; -option java_multiple_files = true; - -// Query defines the gRPC querier service for reward module. -service Query { - - // RewardProgramByID returns a reward program matching the ID. - rpc RewardProgramByID(QueryRewardProgramByIDRequest) returns (QueryRewardProgramByIDResponse) { - option (google.api.http).get = "/provenance/rewards/v1/reward_programs/{id}"; - } - // RewardPrograms returns a list of reward programs matching the query type. - rpc RewardPrograms(QueryRewardProgramsRequest) returns (QueryRewardProgramsResponse) { - option (google.api.http).get = "/provenance/rewards/v1/reward_programs"; - } - - // ClaimPeriodRewardDistributions returns a list of claim period reward distributions matching the claim_status. - rpc ClaimPeriodRewardDistributions(QueryClaimPeriodRewardDistributionsRequest) - returns (QueryClaimPeriodRewardDistributionsResponse) { - option (google.api.http).get = "/provenance/rewards/v1/claim_period_reward_distributions"; - } - - // ClaimPeriodRewardDistributionsByID returns a claim period reward distribution matching the ID. - rpc ClaimPeriodRewardDistributionsByID(QueryClaimPeriodRewardDistributionsByIDRequest) - returns (QueryClaimPeriodRewardDistributionsByIDResponse) { - option (google.api.http).get = - "/provenance/rewards/v1/claim_period_reward_distributions/{reward_id}/claim_periods/{claim_period_id}"; - } - - // RewardDistributionsByAddress returns a list of reward claims belonging to the account and matching the claim - // status. - rpc RewardDistributionsByAddress(QueryRewardDistributionsByAddressRequest) - returns (QueryRewardDistributionsByAddressResponse) { - option (google.api.http).get = "/provenance/rewards/v1/reward_claims/{address}"; - } -} - -// QueryRewardProgramByIDRequest queries for the Reward Program with an identifier of id -message QueryRewardProgramByIDRequest { - // The id of the reward program to query. - uint64 id = 1; -} - -// QueryRewardProgramByIDResponse contains the requested RewardProgram -message QueryRewardProgramByIDResponse { - // The reward program object that was queried for. - RewardProgram reward_program = 1; -} - -// QueryRewardProgramsRequest queries for all reward programs matching the query_type -message QueryRewardProgramsRequest { - // QueryType is the state of reward program to query - enum QueryType { - // unspecified type - QUERY_TYPE_UNSPECIFIED = 0; - // all reward programs states - QUERY_TYPE_ALL = 1; - // pending reward program state= - QUERY_TYPE_PENDING = 2; - // active reward program state - QUERY_TYPE_ACTIVE = 3; - // pending and active reward program states - QUERY_TYPE_OUTSTANDING = 4; - // finished reward program state - QUERY_TYPE_FINISHED = 5; - } - // A filter on the types of reward programs. - QueryType query_type = 1; - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 99; -} - -// QueryRewardProgramsResponse contains the list of RewardPrograms matching the query -message QueryRewardProgramsResponse { - // List of RewardProgram objects matching the query_type. - repeated RewardProgram reward_programs = 1 [(gogoproto.nullable) = false]; - // pagination defines an optional pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 99; -} - -// QueryClaimPeriodRewardDistributionsRequest queries for all the ClaimPeriodRewardDistributions with pagination. -message QueryClaimPeriodRewardDistributionsRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 99; -} - -// QueryClaimPeriodRewardDistributionsResponse returns the list of paginated ClaimPeriodRewardDistributions -message QueryClaimPeriodRewardDistributionsResponse { - // List of all ClaimPeriodRewardDistribution objects queried for. - repeated ClaimPeriodRewardDistribution claim_period_reward_distributions = 1 [(gogoproto.nullable) = false]; - // pagination defines an optional pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 99; -} - -// QueryClaimPeriodRewardDistributionsByIDRequest queries for a single ClaimPeriodRewardDistribution -message QueryClaimPeriodRewardDistributionsByIDRequest { - // The reward program that the claim period reward distribution belongs to. - uint64 reward_id = 1; - // The claim period that the claim period reward distribution was created for. - uint64 claim_period_id = 2; -} - -// QueryClaimPeriodRewardDistributionsByIDResponse returns the requested ClaimPeriodRewardDistribution -message QueryClaimPeriodRewardDistributionsByIDResponse { - // The ClaimPeriodRewardDistribution object that was queried for. - ClaimPeriodRewardDistribution claim_period_reward_distribution = 1; -} - -// QueryRewardDistributionsByAddressRequest queries for reward claims by address that match the claim_status. -message QueryRewardDistributionsByAddressRequest { - // The address that the claim belongs to. - string address = 1; - // The status that the reward account must have. - RewardAccountState.ClaimStatus claim_status = 2; - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 99; -} - -// QueryRewardDistributionsByAddressResponse returns the reward claims for an address that match the claim_status. -message QueryRewardDistributionsByAddressResponse { - // The address that the reward account belongs to. - string address = 1; - // List of RewardAccounts queried for. - repeated RewardAccountResponse reward_account_state = 2 [(gogoproto.nullable) = false]; - // pagination defines an optional pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 99; -} - -// RewardAccountResponse is an address' reward claim for a reward program's claim period. -message RewardAccountResponse { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = true; - - // The id of the reward program that this claim belongs to. - uint64 reward_program_id = 1; - - // total rewards claimed for all eligible claim periods in program. - cosmos.base.v1beta1.Coin total_reward_claim = 2 [(gogoproto.nullable) = false]; - // The status of the claim. - RewardAccountState.ClaimStatus claim_status = 3; - // The claim period that the claim belongs to. - uint64 claim_id = 4; -} diff --git a/proto/provenance/reward/v1/reward.proto b/proto/provenance/reward/v1/reward.proto deleted file mode 100644 index 494b3e5579..0000000000 --- a/proto/provenance/reward/v1/reward.proto +++ /dev/null @@ -1,210 +0,0 @@ -syntax = "proto3"; -package provenance.reward.v1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/provenance-io/provenance/x/reward/types"; -option java_package = "io.provenance.reward.v1"; -option java_multiple_files = true; - -// RewardProgram -message RewardProgram { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = true; - // State is the state of the reward program - enum State { - // undefined program state - STATE_UNSPECIFIED = 0; - // pending state of reward program - STATE_PENDING = 1; - // started state of reward program - STATE_STARTED = 2; - // finished state of reward program - STATE_FINISHED = 3; - // expired state of reward program - STATE_EXPIRED = 4; - } - - // An integer to uniquely identify the reward program. - uint64 id = 1; - // Name to help identify the Reward Program.(MaxTitleLength=140) - string title = 2; - // Short summary describing the Reward Program.(MaxDescriptionLength=10000) - string description = 3; - // address that provides funds for the total reward pool. - string distribute_from_address = 4; - // The total amount of funding given to the RewardProgram. - cosmos.base.v1beta1.Coin total_reward_pool = 5 [(gogoproto.nullable) = false]; - // The remaining funds available to distribute after n claim periods have passed. - cosmos.base.v1beta1.Coin remaining_pool_balance = 6 [(gogoproto.nullable) = false]; - // The total amount of all funds claimed by participants for all past claim periods. - cosmos.base.v1beta1.Coin claimed_amount = 7 [(gogoproto.nullable) = false]; - // Maximum reward per claim period per address. - cosmos.base.v1beta1.Coin max_reward_by_address = 8 [(gogoproto.nullable) = false]; - // Minimum amount of coins for a program to rollover. - cosmos.base.v1beta1.Coin minimum_rollover_amount = 9 [(gogoproto.nullable) = false]; - // Number of seconds that a claim period lasts. - uint64 claim_period_seconds = 10; - // Time that a RewardProgram should start and switch to STARTED state. - google.protobuf.Timestamp program_start_time = 11 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - // Time that a RewardProgram is expected to end, based on data when it was setup. - google.protobuf.Timestamp expected_program_end_time = 12 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - // Time that a RewardProgram MUST end. - google.protobuf.Timestamp program_end_time_max = 13 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - // Used internally to calculate and track the current claim period's ending time. - google.protobuf.Timestamp claim_period_end_time = 14 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - // Time the RewardProgram switched to FINISHED state. Initially set as empty. - google.protobuf.Timestamp actual_program_end_time = 15 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - // Number of claim periods this program will run for. - uint64 claim_periods = 16; - // Current claim period of the RewardProgram. Uses 1-based indexing. - uint64 current_claim_period = 17; - // maximum number of claim periods a reward program can rollover. - uint64 max_rollover_claim_periods = 18; - // Current state of the RewardProgram. - State state = 19; - // Grace period after a RewardProgram FINISHED. It is the number of seconds until a RewardProgram enters the EXPIRED - // state. - uint64 expiration_offset = 20; - // Actions that count towards the reward. - repeated QualifyingAction qualifying_actions = 21 [(gogoproto.nullable) = false]; -} - -// ClaimPeriodRewardDistribution, this is updated at the end of every claim period. -message ClaimPeriodRewardDistribution { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = true; - - // The claim period id. - uint64 claim_period_id = 1; - // The id of the reward program that this reward belongs to. - uint64 reward_program_id = 2; - // The sum of all the granted rewards for this claim period. - cosmos.base.v1beta1.Coin total_rewards_pool_for_claim_period = 3 [(gogoproto.nullable) = false]; - // The final allocated rewards for this claim period. - cosmos.base.v1beta1.Coin rewards_pool = 4 [(gogoproto.nullable) = false]; - // The total number of granted shares for this claim period. - int64 total_shares = 5; - // A flag representing if the claim period for this reward has ended. - bool claim_period_ended = 6; -} - -// RewardAccountState contains state at the claim period level for a specific address. -message RewardAccountState { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = true; - // ClaimStatus is the state a claim is in - enum ClaimStatus { - // undefined state - CLAIM_STATUS_UNSPECIFIED = 0; - // unclaimable status - CLAIM_STATUS_UNCLAIMABLE = 1; - // unclaimable claimable - CLAIM_STATUS_CLAIMABLE = 2; - // unclaimable claimed - CLAIM_STATUS_CLAIMED = 3; - // unclaimable expired - CLAIM_STATUS_EXPIRED = 4; - } - // The id of the reward program that this share belongs to. - uint64 reward_program_id = 1; - // The id of the claim period that the share belongs to. - uint64 claim_period_id = 2; - // Owner of the reward account state. - string address = 3; - // The number of actions performed by this account, mapped by action type. - repeated ActionCounter action_counter = 4; - // The amount of granted shares for the address in the reward program's claim period. - uint64 shares_earned = 5; - // The status of the claim. - ClaimStatus claim_status = 6; -} - -// QualifyingAction can be one of many action types. -message QualifyingAction { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = true; - // type of action to process - oneof type { - ActionDelegate delegate = 1; - ActionTransfer transfer = 2; - ActionVote vote = 3; - } -} - -// QualifyingActions contains a list of QualifyingActions. -message QualifyingActions { - // The actions that count towards the reward. - repeated QualifyingAction qualifying_actions = 1 [(gogoproto.nullable) = false]; -} - -// ActionDelegate represents the delegate action and its required eligibility criteria. -message ActionDelegate { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = true; - - // Minimum number of successful delegates. - uint64 minimum_actions = 1; - // Maximum number of successful delegates. - uint64 maximum_actions = 2; - // Minimum amount that the user must have currently delegated on the validator. - cosmos.base.v1beta1.Coin minimum_delegation_amount = 3; - // Maximum amount that the user must have currently delegated on the validator. - cosmos.base.v1beta1.Coin maximum_delegation_amount = 4; - // Minimum percentile that can be below the validator's power ranking. - string minimum_active_stake_percentile = 5 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - // Maximum percentile that can be below the validator's power ranking. - string maximum_active_stake_percentile = 6 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; -} - -// ActionTransfer represents the transfer action and its required eligibility criteria. -message ActionTransfer { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = true; - - // Minimum number of successful transfers. - uint64 minimum_actions = 1; - // Maximum number of successful transfers. - uint64 maximum_actions = 2; - // Minimum delegation amount the account must have across all validators, for the transfer action to be counted. - cosmos.base.v1beta1.Coin minimum_delegation_amount = 3 [(gogoproto.nullable) = false]; -} - -// ActionVote represents the voting action and its required eligibility criteria. -message ActionVote { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = true; - - // Minimum number of successful votes. - uint64 minimum_actions = 1; - // Maximum number of successful votes. - uint64 maximum_actions = 2; - // Minimum delegation amount the account must have across all validators, for the vote action to be counted. - cosmos.base.v1beta1.Coin minimum_delegation_amount = 3 [(gogoproto.nullable) = false]; - // Positive multiplier that is applied to the shares awarded by the vote action when conditions - // are met(for now the only condition is the current vote is a validator vote). A value of zero will behave the same - // as one - uint64 validator_multiplier = 4; -} - -// ActionCounter is a key-value pair that maps action type to the number of times it was performed. -message ActionCounter { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = true; - - // The type of action performed. - string action_type = 1; - // The number of times this action has been performed - uint64 number_of_actions = 2; -} \ No newline at end of file diff --git a/proto/provenance/reward/v1/tx.proto b/proto/provenance/reward/v1/tx.proto deleted file mode 100644 index 9664c799b4..0000000000 --- a/proto/provenance/reward/v1/tx.proto +++ /dev/null @@ -1,143 +0,0 @@ -syntax = "proto3"; -package provenance.reward.v1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "provenance/reward/v1/reward.proto"; -import "cosmos/msg/v1/msg.proto"; - -option go_package = "github.com/provenance-io/provenance/x/reward/types"; -option java_package = "io.provenance.reward.v1"; -option java_multiple_files = true; - -// Msg -service Msg { - - // CreateRewardProgram is the RPC endpoint for creating a rewards program - rpc CreateRewardProgram(MsgCreateRewardProgramRequest) returns (MsgCreateRewardProgramResponse); - - // EndRewardProgram is the RPC endpoint for ending a rewards program - rpc EndRewardProgram(MsgEndRewardProgramRequest) returns (MsgEndRewardProgramResponse); - - // ClaimRewards is the RPC endpoint for claiming rewards belonging to completed claim periods of a reward program - rpc ClaimRewards(MsgClaimRewardsRequest) returns (MsgClaimRewardsResponse); - - // ClaimAllRewards is the RPC endpoint for claiming rewards for completed claim periods of every reward program for - // the signer of the tx. - rpc ClaimAllRewards(MsgClaimAllRewardsRequest) returns (MsgClaimAllRewardsResponse); -} - -// MsgCreateRewardProgramRequest is the request type for creating a reward program RPC -message MsgCreateRewardProgramRequest { - option (cosmos.msg.v1.signer) = "distribute_from_address"; - - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = true; - - // title for the reward program. - string title = 1; - // description for the reward program. - string description = 2; - // provider address for the reward program funds and signer of message. - string distribute_from_address = 3; - // total reward pool for the reward program. - cosmos.base.v1beta1.Coin total_reward_pool = 4 [(gogoproto.nullable) = false]; - // maximum amount of funds an address can be rewarded per claim period. - cosmos.base.v1beta1.Coin max_reward_per_claim_address = 5 [(gogoproto.nullable) = false]; - // start time of the reward program. - google.protobuf.Timestamp program_start_time = 6 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "program_start_time,omitempty", - (gogoproto.moretags) = "yaml:\"program_start_time,omitempty\"" - ]; - // number of claim periods the reward program runs for. - uint64 claim_periods = 7; - // number of days a claim period will exist. - uint64 claim_period_days = 8; - // maximum number of claim periods a reward program can rollover. - uint64 max_rollover_claim_periods = 9; - // number of days before a reward program will expire after it has ended. - uint64 expire_days = 10; - // actions that count towards the reward. - repeated QualifyingAction qualifying_actions = 11 [(gogoproto.nullable) = false]; -} - -// MsgCreateRewardProgramResponse is the response type for creating a reward program RPC -message MsgCreateRewardProgramResponse { - // reward program id that is generated on creation. - uint64 id = 1; -} - -// MsgEndRewardProgramRequest is the request type for ending a reward program RPC -message MsgEndRewardProgramRequest { - option (cosmos.msg.v1.signer) = "program_owner_address"; - - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = true; - - // reward program id to end. - uint64 reward_program_id = 1; - // owner of the reward program that funds were distributed from. - string program_owner_address = 2; -} - -// MsgEndRewardProgramResponse is the response type for ending a reward program RPC -message MsgEndRewardProgramResponse {} - -// MsgClaimRewardsRequest is the request type for claiming reward from reward program RPC -message MsgClaimRewardsRequest { - option (cosmos.msg.v1.signer) = "reward_address"; - - // reward program id to claim rewards. - uint64 reward_program_id = 1; - // reward address and signer of msg to send claimed rewards to. - string reward_address = 2; -} - -// MsgClaimRewardsResponse is the response type for claiming reward from reward program RPC -message MsgClaimRewardsResponse { - option (gogoproto.equal) = true; - // details about acquired rewards from reward program. - RewardProgramClaimDetail claim_details = 1 [(gogoproto.nullable) = false]; -} - -// MsgClaimRewardsResponse is the request type for claiming rewards from all reward programs RPC -message MsgClaimAllRewardsRequest { - option (cosmos.msg.v1.signer) = "reward_address"; - - // reward address and signer of msg to send claimed rewards to. - string reward_address = 1; -} - -// MsgClaimRewardsResponse is the response type for claiming rewards from all reward programs RPC -message MsgClaimAllRewardsResponse { - option (gogoproto.equal) = true; - // total rewards claimed for all eligible claim periods in all programs. - repeated cosmos.base.v1beta1.Coin total_reward_claim = 1 [(gogoproto.nullable) = false]; - // details about acquired rewards from a reward program. - repeated RewardProgramClaimDetail claim_details = 2; -} - -// ClaimedRewardPeriodDetail is information regarding an addresses' shares and reward for a claim period. -message ClaimedRewardPeriodDetail { - option (gogoproto.equal) = true; - // claim period id - uint64 claim_period_id = 1; - // total shares accumulated for claim period - uint64 total_shares = 2; - // total rewards for claim period - cosmos.base.v1beta1.Coin claim_period_reward = 3 [(gogoproto.nullable) = false]; -} - -// RewardProgramClaimDetail is the response object regarding an address's shares and reward for a reward program. -message RewardProgramClaimDetail { - option (gogoproto.equal) = true; - // reward program id. - uint64 reward_program_id = 1; - // total rewards claimed for all eligible claim periods in program. - cosmos.base.v1beta1.Coin total_reward_claim = 2 [(gogoproto.nullable) = false]; - // claim period details. - repeated ClaimedRewardPeriodDetail claimed_reward_period_details = 3; -} \ No newline at end of file diff --git a/x/reward/types/genesis.pb.go b/x/reward/types/genesis.pb.go deleted file mode 100644 index 745d97d365..0000000000 --- a/x/reward/types/genesis.pb.go +++ /dev/null @@ -1,476 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: provenance/reward/v1/genesis.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// GenesisState defines the reward module's genesis state. -type GenesisState struct { - // Reward program id is the next auto incremented id to be assigned to the next created reward program - RewardProgramId uint64 `protobuf:"varint,1,opt,name=reward_program_id,json=rewardProgramId,proto3" json:"reward_program_id,omitempty"` - // Reward programs to initially start with. - RewardPrograms []RewardProgram `protobuf:"bytes,2,rep,name=reward_programs,json=rewardPrograms,proto3" json:"reward_programs"` - // Claim period reward distributions to initially start with. - ClaimPeriodRewardDistributions []ClaimPeriodRewardDistribution `protobuf:"bytes,3,rep,name=claim_period_reward_distributions,json=claimPeriodRewardDistributions,proto3" json:"claim_period_reward_distributions"` - // Reward account states to initially start with. - RewardAccountStates []RewardAccountState `protobuf:"bytes,4,rep,name=reward_account_states,json=rewardAccountStates,proto3" json:"reward_account_states"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_1a6ae988552967a2, []int{0} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func init() { - proto.RegisterType((*GenesisState)(nil), "provenance.reward.v1.GenesisState") -} - -func init() { - proto.RegisterFile("provenance/reward/v1/genesis.proto", fileDescriptor_1a6ae988552967a2) -} - -var fileDescriptor_1a6ae988552967a2 = []byte{ - // 347 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xbd, 0x4e, 0xf3, 0x30, - 0x14, 0x86, 0xe3, 0xaf, 0xd5, 0x27, 0x64, 0x10, 0x15, 0xa1, 0x88, 0xa8, 0x83, 0xfb, 0xc3, 0x52, - 0x21, 0x91, 0xa8, 0xed, 0xc6, 0x46, 0x41, 0x42, 0x6c, 0x55, 0xd8, 0x58, 0xa2, 0xfc, 0x58, 0xc6, - 0x12, 0xcd, 0x89, 0x6c, 0xb7, 0xc0, 0x0c, 0x03, 0x23, 0x97, 0xd0, 0xcb, 0xe9, 0xd8, 0x91, 0x09, - 0xa1, 0x76, 0xe1, 0x32, 0x50, 0xed, 0xa0, 0xb6, 0x22, 0xea, 0x96, 0xf8, 0x3c, 0xef, 0x79, 0xec, - 0x73, 0x70, 0x2b, 0x13, 0x30, 0xa6, 0x69, 0x98, 0xc6, 0xd4, 0x13, 0xf4, 0x31, 0x14, 0x89, 0x37, - 0xee, 0x78, 0x8c, 0xa6, 0x54, 0x72, 0xe9, 0x66, 0x02, 0x14, 0xd8, 0xd5, 0x15, 0xe3, 0x1a, 0xc6, - 0x1d, 0x77, 0x6a, 0x55, 0x06, 0x0c, 0x34, 0xe0, 0x2d, 0xbf, 0x0c, 0x5b, 0x6b, 0x16, 0xf6, 0xcb, - 0x53, 0x1a, 0x69, 0xbd, 0x94, 0xf0, 0xde, 0xb5, 0x11, 0xdc, 0xaa, 0x50, 0x51, 0xfb, 0x14, 0x1f, - 0x18, 0x20, 0xc8, 0x04, 0x30, 0x11, 0x0e, 0x03, 0x9e, 0x38, 0xa8, 0x81, 0xda, 0x65, 0xbf, 0x62, - 0x0a, 0x03, 0x73, 0x7e, 0x93, 0xd8, 0x3e, 0xae, 0x6c, 0xb2, 0xd2, 0xf9, 0xd7, 0x28, 0xb5, 0x77, - 0xbb, 0x27, 0x6e, 0xd1, 0x2d, 0x5d, 0x7f, 0x3d, 0xdf, 0x2f, 0x4f, 0x3f, 0xeb, 0x96, 0xbf, 0xbf, - 0xd1, 0x54, 0xda, 0xaf, 0x08, 0x37, 0xe3, 0x87, 0x90, 0x0f, 0x83, 0x8c, 0x0a, 0x0e, 0x49, 0x90, - 0x1b, 0x12, 0x2e, 0x95, 0xe0, 0xd1, 0x48, 0x71, 0x48, 0xa5, 0x53, 0xd2, 0x9a, 0x5e, 0xb1, 0xe6, - 0x72, 0x19, 0x1f, 0xe8, 0xb4, 0x31, 0x5e, 0xad, 0x65, 0x73, 0x2d, 0x89, 0xb7, 0x41, 0xd2, 0x8e, - 0xf0, 0x51, 0x2e, 0x0e, 0xe3, 0x18, 0x46, 0xa9, 0x0a, 0xe4, 0x72, 0x3c, 0xd2, 0x29, 0x6b, 0x73, - 0x7b, 0xdb, 0x03, 0x2f, 0x4c, 0x42, 0xcf, 0x33, 0xd7, 0x1d, 0x8a, 0x3f, 0x15, 0x79, 0xbe, 0xf3, - 0x36, 0xa9, 0x5b, 0xdf, 0x93, 0xba, 0xd5, 0x67, 0xd3, 0x39, 0x41, 0xb3, 0x39, 0x41, 0x5f, 0x73, - 0x82, 0xde, 0x17, 0xc4, 0x9a, 0x2d, 0x88, 0xf5, 0xb1, 0x20, 0x16, 0x3e, 0xe6, 0x50, 0xa8, 0x1a, - 0xa0, 0xbb, 0x2e, 0xe3, 0xea, 0x7e, 0x14, 0xb9, 0x31, 0x0c, 0xbd, 0x15, 0x72, 0xc6, 0x61, 0xed, - 0xcf, 0x7b, 0xfa, 0x5d, 0xbc, 0x7a, 0xce, 0xa8, 0x8c, 0xfe, 0xeb, 0xad, 0xf7, 0x7e, 0x02, 0x00, - 0x00, 0xff, 0xff, 0x7f, 0xc3, 0x5a, 0x03, 0x6a, 0x02, 0x00, 0x00, -} - -func (m *GenesisState) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RewardAccountStates) > 0 { - for iNdEx := len(m.RewardAccountStates) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.RewardAccountStates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.ClaimPeriodRewardDistributions) > 0 { - for iNdEx := len(m.ClaimPeriodRewardDistributions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ClaimPeriodRewardDistributions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.RewardPrograms) > 0 { - for iNdEx := len(m.RewardPrograms) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.RewardPrograms[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.RewardProgramId != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.RewardProgramId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RewardProgramId != 0 { - n += 1 + sovGenesis(uint64(m.RewardProgramId)) - } - if len(m.RewardPrograms) > 0 { - for _, e := range m.RewardPrograms { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.ClaimPeriodRewardDistributions) > 0 { - for _, e := range m.ClaimPeriodRewardDistributions { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.RewardAccountStates) > 0 { - for _, e := range m.RewardAccountStates { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GenesisState) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardProgramId", wireType) - } - m.RewardProgramId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RewardProgramId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardPrograms", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RewardPrograms = append(m.RewardPrograms, RewardProgram{}) - if err := m.RewardPrograms[len(m.RewardPrograms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimPeriodRewardDistributions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClaimPeriodRewardDistributions = append(m.ClaimPeriodRewardDistributions, ClaimPeriodRewardDistribution{}) - if err := m.ClaimPeriodRewardDistributions[len(m.ClaimPeriodRewardDistributions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardAccountStates", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RewardAccountStates = append(m.RewardAccountStates, RewardAccountState{}) - if err := m.RewardAccountStates[len(m.RewardAccountStates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/reward/types/query.pb.go b/x/reward/types/query.pb.go deleted file mode 100644 index 2ff42c21b4..0000000000 --- a/x/reward/types/query.pb.go +++ /dev/null @@ -1,3001 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: provenance/reward/v1/query.proto - -package types - -import ( - context "context" - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/types" - query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryType is the state of reward program to query -type QueryRewardProgramsRequest_QueryType int32 - -const ( - // unspecified type - QueryRewardProgramsRequest_QUERY_TYPE_UNSPECIFIED QueryRewardProgramsRequest_QueryType = 0 - // all reward programs states - QueryRewardProgramsRequest_QUERY_TYPE_ALL QueryRewardProgramsRequest_QueryType = 1 - // pending reward program state= - QueryRewardProgramsRequest_QUERY_TYPE_PENDING QueryRewardProgramsRequest_QueryType = 2 - // active reward program state - QueryRewardProgramsRequest_QUERY_TYPE_ACTIVE QueryRewardProgramsRequest_QueryType = 3 - // pending and active reward program states - QueryRewardProgramsRequest_QUERY_TYPE_OUTSTANDING QueryRewardProgramsRequest_QueryType = 4 - // finished reward program state - QueryRewardProgramsRequest_QUERY_TYPE_FINISHED QueryRewardProgramsRequest_QueryType = 5 -) - -var QueryRewardProgramsRequest_QueryType_name = map[int32]string{ - 0: "QUERY_TYPE_UNSPECIFIED", - 1: "QUERY_TYPE_ALL", - 2: "QUERY_TYPE_PENDING", - 3: "QUERY_TYPE_ACTIVE", - 4: "QUERY_TYPE_OUTSTANDING", - 5: "QUERY_TYPE_FINISHED", -} - -var QueryRewardProgramsRequest_QueryType_value = map[string]int32{ - "QUERY_TYPE_UNSPECIFIED": 0, - "QUERY_TYPE_ALL": 1, - "QUERY_TYPE_PENDING": 2, - "QUERY_TYPE_ACTIVE": 3, - "QUERY_TYPE_OUTSTANDING": 4, - "QUERY_TYPE_FINISHED": 5, -} - -func (x QueryRewardProgramsRequest_QueryType) String() string { - return proto.EnumName(QueryRewardProgramsRequest_QueryType_name, int32(x)) -} - -func (QueryRewardProgramsRequest_QueryType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_89e47dd1c3e4febf, []int{2, 0} -} - -// QueryRewardProgramByIDRequest queries for the Reward Program with an identifier of id -type QueryRewardProgramByIDRequest struct { - // The id of the reward program to query. - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *QueryRewardProgramByIDRequest) Reset() { *m = QueryRewardProgramByIDRequest{} } -func (m *QueryRewardProgramByIDRequest) String() string { return proto.CompactTextString(m) } -func (*QueryRewardProgramByIDRequest) ProtoMessage() {} -func (*QueryRewardProgramByIDRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_89e47dd1c3e4febf, []int{0} -} -func (m *QueryRewardProgramByIDRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryRewardProgramByIDRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryRewardProgramByIDRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryRewardProgramByIDRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryRewardProgramByIDRequest.Merge(m, src) -} -func (m *QueryRewardProgramByIDRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryRewardProgramByIDRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryRewardProgramByIDRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryRewardProgramByIDRequest proto.InternalMessageInfo - -func (m *QueryRewardProgramByIDRequest) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - -// QueryRewardProgramByIDResponse contains the requested RewardProgram -type QueryRewardProgramByIDResponse struct { - // The reward program object that was queried for. - RewardProgram *RewardProgram `protobuf:"bytes,1,opt,name=reward_program,json=rewardProgram,proto3" json:"reward_program,omitempty"` -} - -func (m *QueryRewardProgramByIDResponse) Reset() { *m = QueryRewardProgramByIDResponse{} } -func (m *QueryRewardProgramByIDResponse) String() string { return proto.CompactTextString(m) } -func (*QueryRewardProgramByIDResponse) ProtoMessage() {} -func (*QueryRewardProgramByIDResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_89e47dd1c3e4febf, []int{1} -} -func (m *QueryRewardProgramByIDResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryRewardProgramByIDResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryRewardProgramByIDResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryRewardProgramByIDResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryRewardProgramByIDResponse.Merge(m, src) -} -func (m *QueryRewardProgramByIDResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryRewardProgramByIDResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryRewardProgramByIDResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryRewardProgramByIDResponse proto.InternalMessageInfo - -func (m *QueryRewardProgramByIDResponse) GetRewardProgram() *RewardProgram { - if m != nil { - return m.RewardProgram - } - return nil -} - -// QueryRewardProgramsRequest queries for all reward programs matching the query_type -type QueryRewardProgramsRequest struct { - // A filter on the types of reward programs. - QueryType QueryRewardProgramsRequest_QueryType `protobuf:"varint,1,opt,name=query_type,json=queryType,proto3,enum=provenance.reward.v1.QueryRewardProgramsRequest_QueryType" json:"query_type,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *query.PageRequest `protobuf:"bytes,99,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryRewardProgramsRequest) Reset() { *m = QueryRewardProgramsRequest{} } -func (m *QueryRewardProgramsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryRewardProgramsRequest) ProtoMessage() {} -func (*QueryRewardProgramsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_89e47dd1c3e4febf, []int{2} -} -func (m *QueryRewardProgramsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryRewardProgramsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryRewardProgramsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryRewardProgramsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryRewardProgramsRequest.Merge(m, src) -} -func (m *QueryRewardProgramsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryRewardProgramsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryRewardProgramsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryRewardProgramsRequest proto.InternalMessageInfo - -func (m *QueryRewardProgramsRequest) GetQueryType() QueryRewardProgramsRequest_QueryType { - if m != nil { - return m.QueryType - } - return QueryRewardProgramsRequest_QUERY_TYPE_UNSPECIFIED -} - -func (m *QueryRewardProgramsRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryRewardProgramsResponse contains the list of RewardPrograms matching the query -type QueryRewardProgramsResponse struct { - // List of RewardProgram objects matching the query_type. - RewardPrograms []RewardProgram `protobuf:"bytes,1,rep,name=reward_programs,json=rewardPrograms,proto3" json:"reward_programs"` - // pagination defines an optional pagination for the response. - Pagination *query.PageResponse `protobuf:"bytes,99,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryRewardProgramsResponse) Reset() { *m = QueryRewardProgramsResponse{} } -func (m *QueryRewardProgramsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryRewardProgramsResponse) ProtoMessage() {} -func (*QueryRewardProgramsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_89e47dd1c3e4febf, []int{3} -} -func (m *QueryRewardProgramsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryRewardProgramsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryRewardProgramsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryRewardProgramsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryRewardProgramsResponse.Merge(m, src) -} -func (m *QueryRewardProgramsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryRewardProgramsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryRewardProgramsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryRewardProgramsResponse proto.InternalMessageInfo - -func (m *QueryRewardProgramsResponse) GetRewardPrograms() []RewardProgram { - if m != nil { - return m.RewardPrograms - } - return nil -} - -func (m *QueryRewardProgramsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryClaimPeriodRewardDistributionsRequest queries for all the ClaimPeriodRewardDistributions with pagination. -type QueryClaimPeriodRewardDistributionsRequest struct { - // pagination defines an optional pagination for the request. - Pagination *query.PageRequest `protobuf:"bytes,99,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryClaimPeriodRewardDistributionsRequest) Reset() { - *m = QueryClaimPeriodRewardDistributionsRequest{} -} -func (m *QueryClaimPeriodRewardDistributionsRequest) String() string { - return proto.CompactTextString(m) -} -func (*QueryClaimPeriodRewardDistributionsRequest) ProtoMessage() {} -func (*QueryClaimPeriodRewardDistributionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_89e47dd1c3e4febf, []int{4} -} -func (m *QueryClaimPeriodRewardDistributionsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryClaimPeriodRewardDistributionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryClaimPeriodRewardDistributionsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryClaimPeriodRewardDistributionsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryClaimPeriodRewardDistributionsRequest.Merge(m, src) -} -func (m *QueryClaimPeriodRewardDistributionsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryClaimPeriodRewardDistributionsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryClaimPeriodRewardDistributionsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryClaimPeriodRewardDistributionsRequest proto.InternalMessageInfo - -func (m *QueryClaimPeriodRewardDistributionsRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryClaimPeriodRewardDistributionsResponse returns the list of paginated ClaimPeriodRewardDistributions -type QueryClaimPeriodRewardDistributionsResponse struct { - // List of all ClaimPeriodRewardDistribution objects queried for. - ClaimPeriodRewardDistributions []ClaimPeriodRewardDistribution `protobuf:"bytes,1,rep,name=claim_period_reward_distributions,json=claimPeriodRewardDistributions,proto3" json:"claim_period_reward_distributions"` - // pagination defines an optional pagination for the response. - Pagination *query.PageResponse `protobuf:"bytes,99,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryClaimPeriodRewardDistributionsResponse) Reset() { - *m = QueryClaimPeriodRewardDistributionsResponse{} -} -func (m *QueryClaimPeriodRewardDistributionsResponse) String() string { - return proto.CompactTextString(m) -} -func (*QueryClaimPeriodRewardDistributionsResponse) ProtoMessage() {} -func (*QueryClaimPeriodRewardDistributionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_89e47dd1c3e4febf, []int{5} -} -func (m *QueryClaimPeriodRewardDistributionsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryClaimPeriodRewardDistributionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryClaimPeriodRewardDistributionsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryClaimPeriodRewardDistributionsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryClaimPeriodRewardDistributionsResponse.Merge(m, src) -} -func (m *QueryClaimPeriodRewardDistributionsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryClaimPeriodRewardDistributionsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryClaimPeriodRewardDistributionsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryClaimPeriodRewardDistributionsResponse proto.InternalMessageInfo - -func (m *QueryClaimPeriodRewardDistributionsResponse) GetClaimPeriodRewardDistributions() []ClaimPeriodRewardDistribution { - if m != nil { - return m.ClaimPeriodRewardDistributions - } - return nil -} - -func (m *QueryClaimPeriodRewardDistributionsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryClaimPeriodRewardDistributionsByIDRequest queries for a single ClaimPeriodRewardDistribution -type QueryClaimPeriodRewardDistributionsByIDRequest struct { - // The reward program that the claim period reward distribution belongs to. - RewardId uint64 `protobuf:"varint,1,opt,name=reward_id,json=rewardId,proto3" json:"reward_id,omitempty"` - // The claim period that the claim period reward distribution was created for. - ClaimPeriodId uint64 `protobuf:"varint,2,opt,name=claim_period_id,json=claimPeriodId,proto3" json:"claim_period_id,omitempty"` -} - -func (m *QueryClaimPeriodRewardDistributionsByIDRequest) Reset() { - *m = QueryClaimPeriodRewardDistributionsByIDRequest{} -} -func (m *QueryClaimPeriodRewardDistributionsByIDRequest) String() string { - return proto.CompactTextString(m) -} -func (*QueryClaimPeriodRewardDistributionsByIDRequest) ProtoMessage() {} -func (*QueryClaimPeriodRewardDistributionsByIDRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_89e47dd1c3e4febf, []int{6} -} -func (m *QueryClaimPeriodRewardDistributionsByIDRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryClaimPeriodRewardDistributionsByIDRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryClaimPeriodRewardDistributionsByIDRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryClaimPeriodRewardDistributionsByIDRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryClaimPeriodRewardDistributionsByIDRequest.Merge(m, src) -} -func (m *QueryClaimPeriodRewardDistributionsByIDRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryClaimPeriodRewardDistributionsByIDRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryClaimPeriodRewardDistributionsByIDRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryClaimPeriodRewardDistributionsByIDRequest proto.InternalMessageInfo - -func (m *QueryClaimPeriodRewardDistributionsByIDRequest) GetRewardId() uint64 { - if m != nil { - return m.RewardId - } - return 0 -} - -func (m *QueryClaimPeriodRewardDistributionsByIDRequest) GetClaimPeriodId() uint64 { - if m != nil { - return m.ClaimPeriodId - } - return 0 -} - -// QueryClaimPeriodRewardDistributionsByIDResponse returns the requested ClaimPeriodRewardDistribution -type QueryClaimPeriodRewardDistributionsByIDResponse struct { - // The ClaimPeriodRewardDistribution object that was queried for. - ClaimPeriodRewardDistribution *ClaimPeriodRewardDistribution `protobuf:"bytes,1,opt,name=claim_period_reward_distribution,json=claimPeriodRewardDistribution,proto3" json:"claim_period_reward_distribution,omitempty"` -} - -func (m *QueryClaimPeriodRewardDistributionsByIDResponse) Reset() { - *m = QueryClaimPeriodRewardDistributionsByIDResponse{} -} -func (m *QueryClaimPeriodRewardDistributionsByIDResponse) String() string { - return proto.CompactTextString(m) -} -func (*QueryClaimPeriodRewardDistributionsByIDResponse) ProtoMessage() {} -func (*QueryClaimPeriodRewardDistributionsByIDResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_89e47dd1c3e4febf, []int{7} -} -func (m *QueryClaimPeriodRewardDistributionsByIDResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryClaimPeriodRewardDistributionsByIDResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryClaimPeriodRewardDistributionsByIDResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryClaimPeriodRewardDistributionsByIDResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryClaimPeriodRewardDistributionsByIDResponse.Merge(m, src) -} -func (m *QueryClaimPeriodRewardDistributionsByIDResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryClaimPeriodRewardDistributionsByIDResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryClaimPeriodRewardDistributionsByIDResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryClaimPeriodRewardDistributionsByIDResponse proto.InternalMessageInfo - -func (m *QueryClaimPeriodRewardDistributionsByIDResponse) GetClaimPeriodRewardDistribution() *ClaimPeriodRewardDistribution { - if m != nil { - return m.ClaimPeriodRewardDistribution - } - return nil -} - -// QueryRewardDistributionsByAddressRequest queries for reward claims by address that match the claim_status. -type QueryRewardDistributionsByAddressRequest struct { - // The address that the claim belongs to. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // The status that the reward account must have. - ClaimStatus RewardAccountState_ClaimStatus `protobuf:"varint,2,opt,name=claim_status,json=claimStatus,proto3,enum=provenance.reward.v1.RewardAccountState_ClaimStatus" json:"claim_status,omitempty"` - // pagination defines an optional pagination for the request. - Pagination *query.PageRequest `protobuf:"bytes,99,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryRewardDistributionsByAddressRequest) Reset() { - *m = QueryRewardDistributionsByAddressRequest{} -} -func (m *QueryRewardDistributionsByAddressRequest) String() string { return proto.CompactTextString(m) } -func (*QueryRewardDistributionsByAddressRequest) ProtoMessage() {} -func (*QueryRewardDistributionsByAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_89e47dd1c3e4febf, []int{8} -} -func (m *QueryRewardDistributionsByAddressRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryRewardDistributionsByAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryRewardDistributionsByAddressRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryRewardDistributionsByAddressRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryRewardDistributionsByAddressRequest.Merge(m, src) -} -func (m *QueryRewardDistributionsByAddressRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryRewardDistributionsByAddressRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryRewardDistributionsByAddressRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryRewardDistributionsByAddressRequest proto.InternalMessageInfo - -func (m *QueryRewardDistributionsByAddressRequest) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *QueryRewardDistributionsByAddressRequest) GetClaimStatus() RewardAccountState_ClaimStatus { - if m != nil { - return m.ClaimStatus - } - return RewardAccountState_CLAIM_STATUS_UNSPECIFIED -} - -func (m *QueryRewardDistributionsByAddressRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryRewardDistributionsByAddressResponse returns the reward claims for an address that match the claim_status. -type QueryRewardDistributionsByAddressResponse struct { - // The address that the reward account belongs to. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // List of RewardAccounts queried for. - RewardAccountState []RewardAccountResponse `protobuf:"bytes,2,rep,name=reward_account_state,json=rewardAccountState,proto3" json:"reward_account_state"` - // pagination defines an optional pagination for the response. - Pagination *query.PageResponse `protobuf:"bytes,99,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryRewardDistributionsByAddressResponse) Reset() { - *m = QueryRewardDistributionsByAddressResponse{} -} -func (m *QueryRewardDistributionsByAddressResponse) String() string { - return proto.CompactTextString(m) -} -func (*QueryRewardDistributionsByAddressResponse) ProtoMessage() {} -func (*QueryRewardDistributionsByAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_89e47dd1c3e4febf, []int{9} -} -func (m *QueryRewardDistributionsByAddressResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryRewardDistributionsByAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryRewardDistributionsByAddressResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryRewardDistributionsByAddressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryRewardDistributionsByAddressResponse.Merge(m, src) -} -func (m *QueryRewardDistributionsByAddressResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryRewardDistributionsByAddressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryRewardDistributionsByAddressResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryRewardDistributionsByAddressResponse proto.InternalMessageInfo - -func (m *QueryRewardDistributionsByAddressResponse) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *QueryRewardDistributionsByAddressResponse) GetRewardAccountState() []RewardAccountResponse { - if m != nil { - return m.RewardAccountState - } - return nil -} - -func (m *QueryRewardDistributionsByAddressResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// RewardAccountResponse is an address' reward claim for a reward program's claim period. -type RewardAccountResponse struct { - // The id of the reward program that this claim belongs to. - RewardProgramId uint64 `protobuf:"varint,1,opt,name=reward_program_id,json=rewardProgramId,proto3" json:"reward_program_id,omitempty"` - // total rewards claimed for all eligible claim periods in program. - TotalRewardClaim types.Coin `protobuf:"bytes,2,opt,name=total_reward_claim,json=totalRewardClaim,proto3" json:"total_reward_claim"` - // The status of the claim. - ClaimStatus RewardAccountState_ClaimStatus `protobuf:"varint,3,opt,name=claim_status,json=claimStatus,proto3,enum=provenance.reward.v1.RewardAccountState_ClaimStatus" json:"claim_status,omitempty"` - // The claim period that the claim belongs to. - ClaimId uint64 `protobuf:"varint,4,opt,name=claim_id,json=claimId,proto3" json:"claim_id,omitempty"` -} - -func (m *RewardAccountResponse) Reset() { *m = RewardAccountResponse{} } -func (m *RewardAccountResponse) String() string { return proto.CompactTextString(m) } -func (*RewardAccountResponse) ProtoMessage() {} -func (*RewardAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_89e47dd1c3e4febf, []int{10} -} -func (m *RewardAccountResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RewardAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RewardAccountResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RewardAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RewardAccountResponse.Merge(m, src) -} -func (m *RewardAccountResponse) XXX_Size() int { - return m.Size() -} -func (m *RewardAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RewardAccountResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_RewardAccountResponse proto.InternalMessageInfo - -func (m *RewardAccountResponse) GetRewardProgramId() uint64 { - if m != nil { - return m.RewardProgramId - } - return 0 -} - -func (m *RewardAccountResponse) GetTotalRewardClaim() types.Coin { - if m != nil { - return m.TotalRewardClaim - } - return types.Coin{} -} - -func (m *RewardAccountResponse) GetClaimStatus() RewardAccountState_ClaimStatus { - if m != nil { - return m.ClaimStatus - } - return RewardAccountState_CLAIM_STATUS_UNSPECIFIED -} - -func (m *RewardAccountResponse) GetClaimId() uint64 { - if m != nil { - return m.ClaimId - } - return 0 -} - -func init() { - proto.RegisterEnum("provenance.reward.v1.QueryRewardProgramsRequest_QueryType", QueryRewardProgramsRequest_QueryType_name, QueryRewardProgramsRequest_QueryType_value) - proto.RegisterType((*QueryRewardProgramByIDRequest)(nil), "provenance.reward.v1.QueryRewardProgramByIDRequest") - proto.RegisterType((*QueryRewardProgramByIDResponse)(nil), "provenance.reward.v1.QueryRewardProgramByIDResponse") - proto.RegisterType((*QueryRewardProgramsRequest)(nil), "provenance.reward.v1.QueryRewardProgramsRequest") - proto.RegisterType((*QueryRewardProgramsResponse)(nil), "provenance.reward.v1.QueryRewardProgramsResponse") - proto.RegisterType((*QueryClaimPeriodRewardDistributionsRequest)(nil), "provenance.reward.v1.QueryClaimPeriodRewardDistributionsRequest") - proto.RegisterType((*QueryClaimPeriodRewardDistributionsResponse)(nil), "provenance.reward.v1.QueryClaimPeriodRewardDistributionsResponse") - proto.RegisterType((*QueryClaimPeriodRewardDistributionsByIDRequest)(nil), "provenance.reward.v1.QueryClaimPeriodRewardDistributionsByIDRequest") - proto.RegisterType((*QueryClaimPeriodRewardDistributionsByIDResponse)(nil), "provenance.reward.v1.QueryClaimPeriodRewardDistributionsByIDResponse") - proto.RegisterType((*QueryRewardDistributionsByAddressRequest)(nil), "provenance.reward.v1.QueryRewardDistributionsByAddressRequest") - proto.RegisterType((*QueryRewardDistributionsByAddressResponse)(nil), "provenance.reward.v1.QueryRewardDistributionsByAddressResponse") - proto.RegisterType((*RewardAccountResponse)(nil), "provenance.reward.v1.RewardAccountResponse") -} - -func init() { proto.RegisterFile("provenance/reward/v1/query.proto", fileDescriptor_89e47dd1c3e4febf) } - -var fileDescriptor_89e47dd1c3e4febf = []byte{ - // 1042 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0x38, 0x29, 0x4d, 0x5e, 0xa8, 0xe3, 0x0c, 0x69, 0xeb, 0xba, 0xed, 0x26, 0x35, 0x52, - 0x08, 0x89, 0xba, 0x5b, 0x3b, 0x15, 0x42, 0x39, 0x40, 0x9d, 0xd8, 0x29, 0x8b, 0x4a, 0x70, 0xd7, - 0x0e, 0x28, 0x5c, 0xac, 0xf5, 0xee, 0x62, 0x56, 0x72, 0x3c, 0x9b, 0x9d, 0x75, 0x20, 0x0a, 0xb9, - 0x20, 0xfe, 0x80, 0x4a, 0x5c, 0xb8, 0xb5, 0x17, 0xce, 0x1c, 0xb8, 0xf1, 0x17, 0x54, 0xe2, 0x52, - 0x89, 0x03, 0x9c, 0x10, 0x24, 0x20, 0xb8, 0x73, 0x46, 0x42, 0x9e, 0x99, 0xb5, 0x77, 0x63, 0x67, - 0xbd, 0x49, 0x7d, 0xf3, 0xee, 0xbc, 0x1f, 0xdf, 0xf7, 0xbd, 0x37, 0xef, 0xad, 0x61, 0xc1, 0x71, - 0xc9, 0xbe, 0xd5, 0xd2, 0x5b, 0x86, 0xa5, 0xb8, 0xd6, 0xe7, 0xba, 0x6b, 0x2a, 0xfb, 0x39, 0x65, - 0xaf, 0x6d, 0xb9, 0x07, 0xb2, 0xe3, 0x12, 0x8f, 0xe0, 0xb9, 0x9e, 0x85, 0xcc, 0x2d, 0xe4, 0xfd, - 0x5c, 0x66, 0xae, 0x41, 0x1a, 0x84, 0x19, 0x28, 0x9d, 0x5f, 0xdc, 0x36, 0x73, 0xab, 0x41, 0x48, - 0xa3, 0x69, 0x29, 0xba, 0x63, 0x2b, 0x7a, 0xab, 0x45, 0x3c, 0xdd, 0xb3, 0x49, 0x8b, 0x8a, 0x53, - 0xc9, 0x20, 0x74, 0x97, 0x50, 0xa5, 0xae, 0x53, 0x4b, 0xd9, 0xcf, 0xd5, 0x2d, 0x4f, 0xcf, 0x29, - 0x06, 0xb1, 0x5b, 0xe2, 0x7c, 0x39, 0x78, 0xce, 0x20, 0x74, 0xad, 0x1c, 0xbd, 0x61, 0xb7, 0x58, - 0x30, 0x61, 0x7b, 0x67, 0x20, 0x6e, 0x81, 0x8f, 0x99, 0x64, 0x15, 0xb8, 0xfd, 0xb8, 0x13, 0x44, - 0x63, 0x2f, 0xcb, 0x2e, 0x69, 0xb8, 0xfa, 0xee, 0xfa, 0x81, 0x5a, 0xd4, 0xac, 0xbd, 0xb6, 0x45, - 0x3d, 0x9c, 0x84, 0x84, 0x6d, 0xa6, 0xd1, 0x02, 0x5a, 0x9a, 0xd0, 0x12, 0xb6, 0x99, 0x6d, 0x82, - 0x74, 0x96, 0x03, 0x75, 0x48, 0x8b, 0x5a, 0xf8, 0x7d, 0x48, 0xf2, 0x14, 0x35, 0x87, 0x9f, 0x32, - 0xef, 0xe9, 0xfc, 0xeb, 0xf2, 0x20, 0x91, 0xe4, 0x50, 0x20, 0xed, 0x8a, 0x1b, 0x7c, 0xcc, 0xfe, - 0x91, 0x80, 0x4c, 0x7f, 0x3a, 0xea, 0x83, 0xdb, 0x01, 0x60, 0x12, 0xd4, 0xbc, 0x03, 0xc7, 0x62, - 0x69, 0x92, 0xf9, 0xb5, 0xc1, 0x69, 0xce, 0x8e, 0xc2, 0x8f, 0xaa, 0x07, 0x8e, 0xa5, 0x4d, 0xed, - 0xf9, 0x3f, 0xf1, 0x26, 0x40, 0x4f, 0xcf, 0xb4, 0xc1, 0x18, 0x2c, 0xca, 0x5c, 0x7c, 0xb9, 0x23, - 0xbe, 0xcc, 0xeb, 0x2f, 0xc4, 0x97, 0xcb, 0x7a, 0xc3, 0x12, 0x01, 0xb5, 0x80, 0x67, 0xf6, 0x29, - 0x82, 0xa9, 0x6e, 0x02, 0x9c, 0x81, 0x6b, 0x8f, 0xb7, 0x4b, 0xda, 0x4e, 0xad, 0xba, 0x53, 0x2e, - 0xd5, 0xb6, 0xb7, 0x2a, 0xe5, 0xd2, 0x86, 0xba, 0xa9, 0x96, 0x8a, 0xa9, 0x31, 0x8c, 0x21, 0x19, - 0x38, 0x2b, 0x3c, 0x7a, 0x94, 0x42, 0xf8, 0x1a, 0xe0, 0xc0, 0xbb, 0x72, 0x69, 0xab, 0xa8, 0x6e, - 0x3d, 0x4c, 0x25, 0xf0, 0x55, 0x98, 0x0d, 0xda, 0x6e, 0x54, 0xd5, 0x8f, 0x4a, 0xa9, 0xf1, 0x53, - 0xe1, 0x3f, 0xdc, 0xae, 0x56, 0xaa, 0x05, 0xee, 0x32, 0x81, 0xaf, 0xc3, 0x6b, 0x81, 0xb3, 0x4d, - 0x75, 0x4b, 0xad, 0xbc, 0x57, 0x2a, 0xa6, 0x2e, 0x65, 0x7f, 0x44, 0x70, 0x73, 0xa0, 0x3a, 0xa2, - 0x9e, 0x1a, 0xcc, 0x84, 0xeb, 0x49, 0xd3, 0x68, 0x61, 0x3c, 0x66, 0x41, 0xd7, 0x27, 0x9e, 0xff, - 0x36, 0x3f, 0xa6, 0x25, 0x43, 0x65, 0xa5, 0xf8, 0xe1, 0x00, 0x75, 0xdf, 0x18, 0xaa, 0x2e, 0x07, - 0x14, 0x92, 0xd7, 0x83, 0x65, 0x86, 0x7d, 0xa3, 0xa9, 0xdb, 0xbb, 0x65, 0xcb, 0xb5, 0x89, 0xc9, - 0xf3, 0x17, 0x6d, 0xea, 0xb9, 0x76, 0xbd, 0xcd, 0xee, 0x96, 0xdf, 0x2f, 0xa3, 0x2a, 0xea, 0x7f, - 0x08, 0x56, 0x62, 0xa5, 0x15, 0x12, 0x7e, 0x8d, 0xe0, 0x8e, 0xd1, 0x31, 0xad, 0x39, 0xcc, 0xb6, - 0x26, 0x04, 0x35, 0x83, 0xd6, 0x42, 0xd5, 0xd5, 0xc1, 0xaa, 0x46, 0x66, 0x12, 0x2a, 0x4b, 0x46, - 0x24, 0x9c, 0xd1, 0xa9, 0xde, 0x06, 0x39, 0x06, 0xfd, 0xe0, 0x18, 0xb9, 0x09, 0x53, 0x82, 0x73, - 0x77, 0x9a, 0x4c, 0xf2, 0x17, 0xaa, 0x89, 0x17, 0x61, 0x26, 0xa4, 0x8e, 0x6d, 0xa6, 0x13, 0xcc, - 0xe4, 0x4a, 0x80, 0x90, 0x6a, 0x66, 0xbf, 0x47, 0xa0, 0xc4, 0xce, 0x2b, 0xa4, 0xff, 0x12, 0x16, - 0x86, 0x29, 0x2f, 0xe6, 0xd3, 0x45, 0x84, 0xd7, 0x6e, 0x47, 0x4a, 0x9e, 0xfd, 0x0b, 0xc1, 0x52, - 0xe0, 0x6e, 0x9d, 0x82, 0x59, 0x30, 0x4d, 0xd7, 0xa2, 0xdd, 0xee, 0x4c, 0xc3, 0x65, 0x9d, 0xbf, - 0x61, 0x88, 0xa6, 0x34, 0xff, 0x11, 0x7f, 0x0c, 0xaf, 0x72, 0x12, 0xd4, 0xd3, 0xbd, 0x36, 0x65, - 0xea, 0x24, 0xf3, 0xf7, 0xa3, 0xee, 0x5f, 0xc1, 0x30, 0x48, 0xbb, 0xe5, 0x55, 0x3c, 0xdd, 0xb3, - 0x38, 0x87, 0x0a, 0xf3, 0xd5, 0xa6, 0x8d, 0xde, 0xc3, 0xc8, 0x2e, 0xc4, 0xbf, 0x08, 0xde, 0x8c, - 0xc1, 0x53, 0xd4, 0xe4, 0x6c, 0xa2, 0x06, 0xcc, 0x89, 0x02, 0xe9, 0x1c, 0x3f, 0x63, 0x6c, 0xa5, - 0x13, 0xec, 0x6a, 0xac, 0xc4, 0x20, 0xec, 0x27, 0x11, 0x57, 0x02, 0xbb, 0x7d, 0x6a, 0x8c, 0xee, - 0x1a, 0x3c, 0x49, 0xc0, 0xd5, 0x81, 0xc9, 0xf1, 0x32, 0xcc, 0x86, 0x67, 0x66, 0xaf, 0xed, 0x67, - 0x42, 0xa3, 0x50, 0x35, 0xf1, 0x07, 0x80, 0x3d, 0xe2, 0xe9, 0x4d, 0xbf, 0x35, 0x59, 0x7d, 0x58, - 0x89, 0xa7, 0xf3, 0x37, 0x42, 0xb0, 0x7c, 0x40, 0x1b, 0xc4, 0xf6, 0xaf, 0x7c, 0x8a, 0xb9, 0x72, - 0x10, 0xac, 0xca, 0x7d, 0xbd, 0x32, 0x3e, 0xaa, 0x5e, 0xb9, 0x01, 0x93, 0x3c, 0xb0, 0x6d, 0xa6, - 0x27, 0x18, 0x95, 0xcb, 0xec, 0x59, 0x35, 0xd7, 0x26, 0xbf, 0x7d, 0x36, 0x8f, 0xfe, 0x79, 0x36, - 0x8f, 0xf2, 0x3f, 0x4d, 0xc2, 0x25, 0xd6, 0x08, 0xf8, 0x07, 0x04, 0xb3, 0x7d, 0x1f, 0x09, 0x78, - 0x35, 0xee, 0x76, 0x0e, 0x0c, 0x8f, 0xcc, 0xfd, 0xf3, 0x39, 0xf1, 0x1a, 0x64, 0x57, 0xbf, 0xfa, - 0xf9, 0xcf, 0x6f, 0x12, 0x77, 0xf1, 0x8a, 0xd2, 0xf7, 0x19, 0x44, 0x7b, 0xdf, 0x41, 0xdd, 0xa5, - 0xa6, 0x1c, 0xda, 0xe6, 0x11, 0xfe, 0x0e, 0x41, 0x32, 0xbc, 0x07, 0xf1, 0xbd, 0xf3, 0x7e, 0x50, - 0x64, 0x72, 0xe7, 0xf0, 0x10, 0x60, 0x65, 0x06, 0x76, 0x09, 0x2f, 0xc6, 0x03, 0x8b, 0xff, 0x46, - 0x20, 0x45, 0x4f, 0x41, 0xfc, 0x20, 0x02, 0x45, 0xac, 0x75, 0x99, 0x29, 0xbc, 0x44, 0x04, 0xc1, - 0xeb, 0x01, 0xe3, 0xb5, 0x86, 0xdf, 0x3e, 0x83, 0xd7, 0xd0, 0xad, 0x88, 0x9f, 0x26, 0x20, 0x3b, - 0x7c, 0xde, 0xe3, 0xe2, 0x85, 0xb1, 0x06, 0x3b, 0xad, 0xf4, 0x92, 0x51, 0x04, 0xeb, 0x26, 0x63, - 0xfd, 0x29, 0x36, 0x2f, 0xca, 0x5a, 0x39, 0xec, 0x6e, 0xcb, 0xa3, 0x90, 0x35, 0x55, 0x0e, 0x4f, - 0xad, 0xca, 0x23, 0xfc, 0x0b, 0x82, 0x5b, 0x51, 0x73, 0x17, 0xbf, 0x33, 0xb4, 0x1f, 0x23, 0x17, - 0x53, 0xe6, 0xdd, 0x0b, 0xfb, 0x0b, 0x3d, 0xde, 0x62, 0x7a, 0xdc, 0xc3, 0x72, 0x74, 0x77, 0x33, - 0x66, 0x54, 0x39, 0x14, 0xdb, 0xe0, 0x68, 0xbd, 0xf1, 0xfc, 0x58, 0x42, 0x2f, 0x8e, 0x25, 0xf4, - 0xfb, 0xb1, 0x84, 0x9e, 0x9c, 0x48, 0x63, 0x2f, 0x4e, 0xa4, 0xb1, 0x5f, 0x4f, 0xa4, 0x31, 0xb8, - 0x6e, 0x93, 0x81, 0xa0, 0xca, 0xe8, 0x93, 0x7c, 0xc3, 0xf6, 0x3e, 0x6b, 0xd7, 0x65, 0x83, 0xec, - 0x06, 0xd2, 0xdd, 0xb5, 0x49, 0x30, 0xf9, 0x17, 0xfe, 0x1f, 0xa2, 0xce, 0x3f, 0x07, 0x5a, 0x7f, - 0x85, 0xfd, 0x1b, 0x5a, 0xfd, 0x3f, 0x00, 0x00, 0xff, 0xff, 0xed, 0x8c, 0x3b, 0xfc, 0xea, 0x0d, - 0x00, 0x00, -} - -func (this *RewardAccountResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RewardAccountResponse) - if !ok { - that2, ok := that.(RewardAccountResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.RewardProgramId != that1.RewardProgramId { - return false - } - if !this.TotalRewardClaim.Equal(&that1.TotalRewardClaim) { - return false - } - if this.ClaimStatus != that1.ClaimStatus { - return false - } - if this.ClaimId != that1.ClaimId { - return false - } - return true -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // RewardProgramByID returns a reward program matching the ID. - RewardProgramByID(ctx context.Context, in *QueryRewardProgramByIDRequest, opts ...grpc.CallOption) (*QueryRewardProgramByIDResponse, error) - // RewardPrograms returns a list of reward programs matching the query type. - RewardPrograms(ctx context.Context, in *QueryRewardProgramsRequest, opts ...grpc.CallOption) (*QueryRewardProgramsResponse, error) - // ClaimPeriodRewardDistributions returns a list of claim period reward distributions matching the claim_status. - ClaimPeriodRewardDistributions(ctx context.Context, in *QueryClaimPeriodRewardDistributionsRequest, opts ...grpc.CallOption) (*QueryClaimPeriodRewardDistributionsResponse, error) - // ClaimPeriodRewardDistributionsByID returns a claim period reward distribution matching the ID. - ClaimPeriodRewardDistributionsByID(ctx context.Context, in *QueryClaimPeriodRewardDistributionsByIDRequest, opts ...grpc.CallOption) (*QueryClaimPeriodRewardDistributionsByIDResponse, error) - // RewardDistributionsByAddress returns a list of reward claims belonging to the account and matching the claim - // status. - RewardDistributionsByAddress(ctx context.Context, in *QueryRewardDistributionsByAddressRequest, opts ...grpc.CallOption) (*QueryRewardDistributionsByAddressResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) RewardProgramByID(ctx context.Context, in *QueryRewardProgramByIDRequest, opts ...grpc.CallOption) (*QueryRewardProgramByIDResponse, error) { - out := new(QueryRewardProgramByIDResponse) - err := c.cc.Invoke(ctx, "/provenance.reward.v1.Query/RewardProgramByID", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) RewardPrograms(ctx context.Context, in *QueryRewardProgramsRequest, opts ...grpc.CallOption) (*QueryRewardProgramsResponse, error) { - out := new(QueryRewardProgramsResponse) - err := c.cc.Invoke(ctx, "/provenance.reward.v1.Query/RewardPrograms", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ClaimPeriodRewardDistributions(ctx context.Context, in *QueryClaimPeriodRewardDistributionsRequest, opts ...grpc.CallOption) (*QueryClaimPeriodRewardDistributionsResponse, error) { - out := new(QueryClaimPeriodRewardDistributionsResponse) - err := c.cc.Invoke(ctx, "/provenance.reward.v1.Query/ClaimPeriodRewardDistributions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ClaimPeriodRewardDistributionsByID(ctx context.Context, in *QueryClaimPeriodRewardDistributionsByIDRequest, opts ...grpc.CallOption) (*QueryClaimPeriodRewardDistributionsByIDResponse, error) { - out := new(QueryClaimPeriodRewardDistributionsByIDResponse) - err := c.cc.Invoke(ctx, "/provenance.reward.v1.Query/ClaimPeriodRewardDistributionsByID", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) RewardDistributionsByAddress(ctx context.Context, in *QueryRewardDistributionsByAddressRequest, opts ...grpc.CallOption) (*QueryRewardDistributionsByAddressResponse, error) { - out := new(QueryRewardDistributionsByAddressResponse) - err := c.cc.Invoke(ctx, "/provenance.reward.v1.Query/RewardDistributionsByAddress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // RewardProgramByID returns a reward program matching the ID. - RewardProgramByID(context.Context, *QueryRewardProgramByIDRequest) (*QueryRewardProgramByIDResponse, error) - // RewardPrograms returns a list of reward programs matching the query type. - RewardPrograms(context.Context, *QueryRewardProgramsRequest) (*QueryRewardProgramsResponse, error) - // ClaimPeriodRewardDistributions returns a list of claim period reward distributions matching the claim_status. - ClaimPeriodRewardDistributions(context.Context, *QueryClaimPeriodRewardDistributionsRequest) (*QueryClaimPeriodRewardDistributionsResponse, error) - // ClaimPeriodRewardDistributionsByID returns a claim period reward distribution matching the ID. - ClaimPeriodRewardDistributionsByID(context.Context, *QueryClaimPeriodRewardDistributionsByIDRequest) (*QueryClaimPeriodRewardDistributionsByIDResponse, error) - // RewardDistributionsByAddress returns a list of reward claims belonging to the account and matching the claim - // status. - RewardDistributionsByAddress(context.Context, *QueryRewardDistributionsByAddressRequest) (*QueryRewardDistributionsByAddressResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) RewardProgramByID(ctx context.Context, req *QueryRewardProgramByIDRequest) (*QueryRewardProgramByIDResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RewardProgramByID not implemented") -} -func (*UnimplementedQueryServer) RewardPrograms(ctx context.Context, req *QueryRewardProgramsRequest) (*QueryRewardProgramsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RewardPrograms not implemented") -} -func (*UnimplementedQueryServer) ClaimPeriodRewardDistributions(ctx context.Context, req *QueryClaimPeriodRewardDistributionsRequest) (*QueryClaimPeriodRewardDistributionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ClaimPeriodRewardDistributions not implemented") -} -func (*UnimplementedQueryServer) ClaimPeriodRewardDistributionsByID(ctx context.Context, req *QueryClaimPeriodRewardDistributionsByIDRequest) (*QueryClaimPeriodRewardDistributionsByIDResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ClaimPeriodRewardDistributionsByID not implemented") -} -func (*UnimplementedQueryServer) RewardDistributionsByAddress(ctx context.Context, req *QueryRewardDistributionsByAddressRequest) (*QueryRewardDistributionsByAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RewardDistributionsByAddress not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_RewardProgramByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRewardProgramByIDRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).RewardProgramByID(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/provenance.reward.v1.Query/RewardProgramByID", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).RewardProgramByID(ctx, req.(*QueryRewardProgramByIDRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_RewardPrograms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRewardProgramsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).RewardPrograms(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/provenance.reward.v1.Query/RewardPrograms", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).RewardPrograms(ctx, req.(*QueryRewardProgramsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ClaimPeriodRewardDistributions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryClaimPeriodRewardDistributionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ClaimPeriodRewardDistributions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/provenance.reward.v1.Query/ClaimPeriodRewardDistributions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ClaimPeriodRewardDistributions(ctx, req.(*QueryClaimPeriodRewardDistributionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ClaimPeriodRewardDistributionsByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryClaimPeriodRewardDistributionsByIDRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ClaimPeriodRewardDistributionsByID(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/provenance.reward.v1.Query/ClaimPeriodRewardDistributionsByID", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ClaimPeriodRewardDistributionsByID(ctx, req.(*QueryClaimPeriodRewardDistributionsByIDRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_RewardDistributionsByAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRewardDistributionsByAddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).RewardDistributionsByAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/provenance.reward.v1.Query/RewardDistributionsByAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).RewardDistributionsByAddress(ctx, req.(*QueryRewardDistributionsByAddressRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "provenance.reward.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "RewardProgramByID", - Handler: _Query_RewardProgramByID_Handler, - }, - { - MethodName: "RewardPrograms", - Handler: _Query_RewardPrograms_Handler, - }, - { - MethodName: "ClaimPeriodRewardDistributions", - Handler: _Query_ClaimPeriodRewardDistributions_Handler, - }, - { - MethodName: "ClaimPeriodRewardDistributionsByID", - Handler: _Query_ClaimPeriodRewardDistributionsByID_Handler, - }, - { - MethodName: "RewardDistributionsByAddress", - Handler: _Query_RewardDistributionsByAddress_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "provenance/reward/v1/query.proto", -} - -func (m *QueryRewardProgramByIDRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryRewardProgramByIDRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryRewardProgramByIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Id != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryRewardProgramByIDResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryRewardProgramByIDResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryRewardProgramByIDResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.RewardProgram != nil { - { - size, err := m.RewardProgram.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryRewardProgramsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryRewardProgramsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryRewardProgramsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0x9a - } - if m.QueryType != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.QueryType)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryRewardProgramsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryRewardProgramsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryRewardProgramsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0x9a - } - if len(m.RewardPrograms) > 0 { - for iNdEx := len(m.RewardPrograms) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.RewardPrograms[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryClaimPeriodRewardDistributionsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryClaimPeriodRewardDistributionsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryClaimPeriodRewardDistributionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0x9a - } - return len(dAtA) - i, nil -} - -func (m *QueryClaimPeriodRewardDistributionsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryClaimPeriodRewardDistributionsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryClaimPeriodRewardDistributionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0x9a - } - if len(m.ClaimPeriodRewardDistributions) > 0 { - for iNdEx := len(m.ClaimPeriodRewardDistributions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ClaimPeriodRewardDistributions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryClaimPeriodRewardDistributionsByIDRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryClaimPeriodRewardDistributionsByIDRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryClaimPeriodRewardDistributionsByIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ClaimPeriodId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.ClaimPeriodId)) - i-- - dAtA[i] = 0x10 - } - if m.RewardId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.RewardId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryClaimPeriodRewardDistributionsByIDResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryClaimPeriodRewardDistributionsByIDResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryClaimPeriodRewardDistributionsByIDResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ClaimPeriodRewardDistribution != nil { - { - size, err := m.ClaimPeriodRewardDistribution.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryRewardDistributionsByAddressRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryRewardDistributionsByAddressRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryRewardDistributionsByAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0x9a - } - if m.ClaimStatus != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.ClaimStatus)) - i-- - dAtA[i] = 0x10 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryRewardDistributionsByAddressResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryRewardDistributionsByAddressResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryRewardDistributionsByAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6 - i-- - dAtA[i] = 0x9a - } - if len(m.RewardAccountState) > 0 { - for iNdEx := len(m.RewardAccountState) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.RewardAccountState[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RewardAccountResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RewardAccountResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RewardAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ClaimId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.ClaimId)) - i-- - dAtA[i] = 0x20 - } - if m.ClaimStatus != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.ClaimStatus)) - i-- - dAtA[i] = 0x18 - } - { - size, err := m.TotalRewardClaim.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if m.RewardProgramId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.RewardProgramId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryRewardProgramByIDRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovQuery(uint64(m.Id)) - } - return n -} - -func (m *QueryRewardProgramByIDResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RewardProgram != nil { - l = m.RewardProgram.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryRewardProgramsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.QueryType != 0 { - n += 1 + sovQuery(uint64(m.QueryType)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 2 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryRewardProgramsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.RewardPrograms) > 0 { - for _, e := range m.RewardPrograms { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 2 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryClaimPeriodRewardDistributionsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 2 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryClaimPeriodRewardDistributionsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ClaimPeriodRewardDistributions) > 0 { - for _, e := range m.ClaimPeriodRewardDistributions { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 2 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryClaimPeriodRewardDistributionsByIDRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RewardId != 0 { - n += 1 + sovQuery(uint64(m.RewardId)) - } - if m.ClaimPeriodId != 0 { - n += 1 + sovQuery(uint64(m.ClaimPeriodId)) - } - return n -} - -func (m *QueryClaimPeriodRewardDistributionsByIDResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ClaimPeriodRewardDistribution != nil { - l = m.ClaimPeriodRewardDistribution.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryRewardDistributionsByAddressRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.ClaimStatus != 0 { - n += 1 + sovQuery(uint64(m.ClaimStatus)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 2 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryRewardDistributionsByAddressResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if len(m.RewardAccountState) > 0 { - for _, e := range m.RewardAccountState { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 2 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *RewardAccountResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RewardProgramId != 0 { - n += 1 + sovQuery(uint64(m.RewardProgramId)) - } - l = m.TotalRewardClaim.Size() - n += 1 + l + sovQuery(uint64(l)) - if m.ClaimStatus != 0 { - n += 1 + sovQuery(uint64(m.ClaimStatus)) - } - if m.ClaimId != 0 { - n += 1 + sovQuery(uint64(m.ClaimId)) - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryRewardProgramByIDRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryRewardProgramByIDRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryRewardProgramByIDRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryRewardProgramByIDResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryRewardProgramByIDResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryRewardProgramByIDResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardProgram", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RewardProgram == nil { - m.RewardProgram = &RewardProgram{} - } - if err := m.RewardProgram.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryRewardProgramsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryRewardProgramsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryRewardProgramsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryType", wireType) - } - m.QueryType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.QueryType |= QueryRewardProgramsRequest_QueryType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 99: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryRewardProgramsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryRewardProgramsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryRewardProgramsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardPrograms", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RewardPrograms = append(m.RewardPrograms, RewardProgram{}) - if err := m.RewardPrograms[len(m.RewardPrograms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 99: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryClaimPeriodRewardDistributionsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryClaimPeriodRewardDistributionsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryClaimPeriodRewardDistributionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 99: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryClaimPeriodRewardDistributionsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryClaimPeriodRewardDistributionsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryClaimPeriodRewardDistributionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimPeriodRewardDistributions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClaimPeriodRewardDistributions = append(m.ClaimPeriodRewardDistributions, ClaimPeriodRewardDistribution{}) - if err := m.ClaimPeriodRewardDistributions[len(m.ClaimPeriodRewardDistributions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 99: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryClaimPeriodRewardDistributionsByIDRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryClaimPeriodRewardDistributionsByIDRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryClaimPeriodRewardDistributionsByIDRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardId", wireType) - } - m.RewardId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RewardId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimPeriodId", wireType) - } - m.ClaimPeriodId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ClaimPeriodId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryClaimPeriodRewardDistributionsByIDResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryClaimPeriodRewardDistributionsByIDResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryClaimPeriodRewardDistributionsByIDResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimPeriodRewardDistribution", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ClaimPeriodRewardDistribution == nil { - m.ClaimPeriodRewardDistribution = &ClaimPeriodRewardDistribution{} - } - if err := m.ClaimPeriodRewardDistribution.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryRewardDistributionsByAddressRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryRewardDistributionsByAddressRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryRewardDistributionsByAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimStatus", wireType) - } - m.ClaimStatus = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ClaimStatus |= RewardAccountState_ClaimStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 99: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryRewardDistributionsByAddressResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryRewardDistributionsByAddressResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryRewardDistributionsByAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardAccountState", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RewardAccountState = append(m.RewardAccountState, RewardAccountResponse{}) - if err := m.RewardAccountState[len(m.RewardAccountState)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 99: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RewardAccountResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RewardAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RewardAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardProgramId", wireType) - } - m.RewardProgramId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RewardProgramId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalRewardClaim", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TotalRewardClaim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimStatus", wireType) - } - m.ClaimStatus = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ClaimStatus |= RewardAccountState_ClaimStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimId", wireType) - } - m.ClaimId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ClaimId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/reward/types/query.pb.gw.go b/x/reward/types/query.pb.gw.go deleted file mode 100644 index b4df807957..0000000000 --- a/x/reward/types/query.pb.gw.go +++ /dev/null @@ -1,597 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: provenance/reward/v1/query.proto - -/* -Package types is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package types - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - -func request_Query_RewardProgramByID_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryRewardProgramByIDRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.RewardProgramByID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_RewardProgramByID_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryRewardProgramByIDRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.RewardProgramByID(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_RewardPrograms_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_RewardPrograms_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryRewardProgramsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_RewardPrograms_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.RewardPrograms(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_RewardPrograms_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryRewardProgramsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_RewardPrograms_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.RewardPrograms(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_ClaimPeriodRewardDistributions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_ClaimPeriodRewardDistributions_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryClaimPeriodRewardDistributionsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ClaimPeriodRewardDistributions_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ClaimPeriodRewardDistributions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ClaimPeriodRewardDistributions_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryClaimPeriodRewardDistributionsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ClaimPeriodRewardDistributions_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ClaimPeriodRewardDistributions(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_ClaimPeriodRewardDistributionsByID_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryClaimPeriodRewardDistributionsByIDRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["reward_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "reward_id") - } - - protoReq.RewardId, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "reward_id", err) - } - - val, ok = pathParams["claim_period_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "claim_period_id") - } - - protoReq.ClaimPeriodId, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "claim_period_id", err) - } - - msg, err := client.ClaimPeriodRewardDistributionsByID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ClaimPeriodRewardDistributionsByID_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryClaimPeriodRewardDistributionsByIDRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["reward_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "reward_id") - } - - protoReq.RewardId, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "reward_id", err) - } - - val, ok = pathParams["claim_period_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "claim_period_id") - } - - protoReq.ClaimPeriodId, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "claim_period_id", err) - } - - msg, err := server.ClaimPeriodRewardDistributionsByID(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_RewardDistributionsByAddress_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_Query_RewardDistributionsByAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryRewardDistributionsByAddressRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_RewardDistributionsByAddress_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.RewardDistributionsByAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_RewardDistributionsByAddress_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryRewardDistributionsByAddressRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_RewardDistributionsByAddress_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.RewardDistributionsByAddress(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". -// UnaryRPC :call QueryServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. -func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - - mux.Handle("GET", pattern_Query_RewardProgramByID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_RewardProgramByID_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_RewardProgramByID_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_RewardPrograms_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_RewardPrograms_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_RewardPrograms_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ClaimPeriodRewardDistributions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_ClaimPeriodRewardDistributions_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ClaimPeriodRewardDistributions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ClaimPeriodRewardDistributionsByID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_ClaimPeriodRewardDistributionsByID_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ClaimPeriodRewardDistributionsByID_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_RewardDistributionsByAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_RewardDistributionsByAddress_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_RewardDistributionsByAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterQueryHandler(ctx, mux, conn) -} - -// RegisterQueryHandler registers the http handlers for service Query to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) -} - -// RegisterQueryHandlerClient registers the http handlers for service Query -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "QueryClient" to call the correct interceptors. -func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - - mux.Handle("GET", pattern_Query_RewardProgramByID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_RewardProgramByID_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_RewardProgramByID_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_RewardPrograms_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_RewardPrograms_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_RewardPrograms_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ClaimPeriodRewardDistributions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_ClaimPeriodRewardDistributions_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ClaimPeriodRewardDistributions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ClaimPeriodRewardDistributionsByID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_ClaimPeriodRewardDistributionsByID_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ClaimPeriodRewardDistributionsByID_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_RewardDistributionsByAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_RewardDistributionsByAddress_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_RewardDistributionsByAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Query_RewardProgramByID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"provenance", "rewards", "v1", "reward_programs", "id"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_RewardPrograms_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"provenance", "rewards", "v1", "reward_programs"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_ClaimPeriodRewardDistributions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"provenance", "rewards", "v1", "claim_period_reward_distributions"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_ClaimPeriodRewardDistributionsByID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"provenance", "rewards", "v1", "claim_period_reward_distributions", "reward_id", "claim_periods", "claim_period_id"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_RewardDistributionsByAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"provenance", "rewards", "v1", "reward_claims", "address"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Query_RewardProgramByID_0 = runtime.ForwardResponseMessage - - forward_Query_RewardPrograms_0 = runtime.ForwardResponseMessage - - forward_Query_ClaimPeriodRewardDistributions_0 = runtime.ForwardResponseMessage - - forward_Query_ClaimPeriodRewardDistributionsByID_0 = runtime.ForwardResponseMessage - - forward_Query_RewardDistributionsByAddress_0 = runtime.ForwardResponseMessage -) diff --git a/x/reward/types/reward.pb.go b/x/reward/types/reward.pb.go deleted file mode 100644 index 667f4cac2a..0000000000 --- a/x/reward/types/reward.pb.go +++ /dev/null @@ -1,4344 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: provenance/reward/v1/reward.proto - -package types - -import ( - cosmossdk_io_math "cosmossdk.io/math" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" - _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// State is the state of the reward program -type RewardProgram_State int32 - -const ( - // undefined program state - RewardProgram_STATE_UNSPECIFIED RewardProgram_State = 0 - // pending state of reward program - RewardProgram_STATE_PENDING RewardProgram_State = 1 - // started state of reward program - RewardProgram_STATE_STARTED RewardProgram_State = 2 - // finished state of reward program - RewardProgram_STATE_FINISHED RewardProgram_State = 3 - // expired state of reward program - RewardProgram_STATE_EXPIRED RewardProgram_State = 4 -) - -var RewardProgram_State_name = map[int32]string{ - 0: "STATE_UNSPECIFIED", - 1: "STATE_PENDING", - 2: "STATE_STARTED", - 3: "STATE_FINISHED", - 4: "STATE_EXPIRED", -} - -var RewardProgram_State_value = map[string]int32{ - "STATE_UNSPECIFIED": 0, - "STATE_PENDING": 1, - "STATE_STARTED": 2, - "STATE_FINISHED": 3, - "STATE_EXPIRED": 4, -} - -func (x RewardProgram_State) String() string { - return proto.EnumName(RewardProgram_State_name, int32(x)) -} - -func (RewardProgram_State) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_0c3894741a216575, []int{0, 0} -} - -// ClaimStatus is the state a claim is in -type RewardAccountState_ClaimStatus int32 - -const ( - // undefined state - RewardAccountState_CLAIM_STATUS_UNSPECIFIED RewardAccountState_ClaimStatus = 0 - // unclaimable status - RewardAccountState_CLAIM_STATUS_UNCLAIMABLE RewardAccountState_ClaimStatus = 1 - // unclaimable claimable - RewardAccountState_CLAIM_STATUS_CLAIMABLE RewardAccountState_ClaimStatus = 2 - // unclaimable claimed - RewardAccountState_CLAIM_STATUS_CLAIMED RewardAccountState_ClaimStatus = 3 - // unclaimable expired - RewardAccountState_CLAIM_STATUS_EXPIRED RewardAccountState_ClaimStatus = 4 -) - -var RewardAccountState_ClaimStatus_name = map[int32]string{ - 0: "CLAIM_STATUS_UNSPECIFIED", - 1: "CLAIM_STATUS_UNCLAIMABLE", - 2: "CLAIM_STATUS_CLAIMABLE", - 3: "CLAIM_STATUS_CLAIMED", - 4: "CLAIM_STATUS_EXPIRED", -} - -var RewardAccountState_ClaimStatus_value = map[string]int32{ - "CLAIM_STATUS_UNSPECIFIED": 0, - "CLAIM_STATUS_UNCLAIMABLE": 1, - "CLAIM_STATUS_CLAIMABLE": 2, - "CLAIM_STATUS_CLAIMED": 3, - "CLAIM_STATUS_EXPIRED": 4, -} - -func (x RewardAccountState_ClaimStatus) String() string { - return proto.EnumName(RewardAccountState_ClaimStatus_name, int32(x)) -} - -func (RewardAccountState_ClaimStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_0c3894741a216575, []int{2, 0} -} - -// RewardProgram -type RewardProgram struct { - // An integer to uniquely identify the reward program. - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // Name to help identify the Reward Program.(MaxTitleLength=140) - Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` - // Short summary describing the Reward Program.(MaxDescriptionLength=10000) - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // address that provides funds for the total reward pool. - DistributeFromAddress string `protobuf:"bytes,4,opt,name=distribute_from_address,json=distributeFromAddress,proto3" json:"distribute_from_address,omitempty"` - // The total amount of funding given to the RewardProgram. - TotalRewardPool types.Coin `protobuf:"bytes,5,opt,name=total_reward_pool,json=totalRewardPool,proto3" json:"total_reward_pool"` - // The remaining funds available to distribute after n claim periods have passed. - RemainingPoolBalance types.Coin `protobuf:"bytes,6,opt,name=remaining_pool_balance,json=remainingPoolBalance,proto3" json:"remaining_pool_balance"` - // The total amount of all funds claimed by participants for all past claim periods. - ClaimedAmount types.Coin `protobuf:"bytes,7,opt,name=claimed_amount,json=claimedAmount,proto3" json:"claimed_amount"` - // Maximum reward per claim period per address. - MaxRewardByAddress types.Coin `protobuf:"bytes,8,opt,name=max_reward_by_address,json=maxRewardByAddress,proto3" json:"max_reward_by_address"` - // Minimum amount of coins for a program to rollover. - MinimumRolloverAmount types.Coin `protobuf:"bytes,9,opt,name=minimum_rollover_amount,json=minimumRolloverAmount,proto3" json:"minimum_rollover_amount"` - // Number of seconds that a claim period lasts. - ClaimPeriodSeconds uint64 `protobuf:"varint,10,opt,name=claim_period_seconds,json=claimPeriodSeconds,proto3" json:"claim_period_seconds,omitempty"` - // Time that a RewardProgram should start and switch to STARTED state. - ProgramStartTime time.Time `protobuf:"bytes,11,opt,name=program_start_time,json=programStartTime,proto3,stdtime" json:"program_start_time"` - // Time that a RewardProgram is expected to end, based on data when it was setup. - ExpectedProgramEndTime time.Time `protobuf:"bytes,12,opt,name=expected_program_end_time,json=expectedProgramEndTime,proto3,stdtime" json:"expected_program_end_time"` - // Time that a RewardProgram MUST end. - ProgramEndTimeMax time.Time `protobuf:"bytes,13,opt,name=program_end_time_max,json=programEndTimeMax,proto3,stdtime" json:"program_end_time_max"` - // Used internally to calculate and track the current claim period's ending time. - ClaimPeriodEndTime time.Time `protobuf:"bytes,14,opt,name=claim_period_end_time,json=claimPeriodEndTime,proto3,stdtime" json:"claim_period_end_time"` - // Time the RewardProgram switched to FINISHED state. Initially set as empty. - ActualProgramEndTime time.Time `protobuf:"bytes,15,opt,name=actual_program_end_time,json=actualProgramEndTime,proto3,stdtime" json:"actual_program_end_time"` - // Number of claim periods this program will run for. - ClaimPeriods uint64 `protobuf:"varint,16,opt,name=claim_periods,json=claimPeriods,proto3" json:"claim_periods,omitempty"` - // Current claim period of the RewardProgram. Uses 1-based indexing. - CurrentClaimPeriod uint64 `protobuf:"varint,17,opt,name=current_claim_period,json=currentClaimPeriod,proto3" json:"current_claim_period,omitempty"` - // maximum number of claim periods a reward program can rollover. - MaxRolloverClaimPeriods uint64 `protobuf:"varint,18,opt,name=max_rollover_claim_periods,json=maxRolloverClaimPeriods,proto3" json:"max_rollover_claim_periods,omitempty"` - // Current state of the RewardProgram. - State RewardProgram_State `protobuf:"varint,19,opt,name=state,proto3,enum=provenance.reward.v1.RewardProgram_State" json:"state,omitempty"` - // Grace period after a RewardProgram FINISHED. It is the number of seconds until a RewardProgram enters the EXPIRED - // state. - ExpirationOffset uint64 `protobuf:"varint,20,opt,name=expiration_offset,json=expirationOffset,proto3" json:"expiration_offset,omitempty"` - // Actions that count towards the reward. - QualifyingActions []QualifyingAction `protobuf:"bytes,21,rep,name=qualifying_actions,json=qualifyingActions,proto3" json:"qualifying_actions"` -} - -func (m *RewardProgram) Reset() { *m = RewardProgram{} } -func (m *RewardProgram) String() string { return proto.CompactTextString(m) } -func (*RewardProgram) ProtoMessage() {} -func (*RewardProgram) Descriptor() ([]byte, []int) { - return fileDescriptor_0c3894741a216575, []int{0} -} -func (m *RewardProgram) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RewardProgram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RewardProgram.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RewardProgram) XXX_Merge(src proto.Message) { - xxx_messageInfo_RewardProgram.Merge(m, src) -} -func (m *RewardProgram) XXX_Size() int { - return m.Size() -} -func (m *RewardProgram) XXX_DiscardUnknown() { - xxx_messageInfo_RewardProgram.DiscardUnknown(m) -} - -var xxx_messageInfo_RewardProgram proto.InternalMessageInfo - -func (m *RewardProgram) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *RewardProgram) GetTitle() string { - if m != nil { - return m.Title - } - return "" -} - -func (m *RewardProgram) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *RewardProgram) GetDistributeFromAddress() string { - if m != nil { - return m.DistributeFromAddress - } - return "" -} - -func (m *RewardProgram) GetTotalRewardPool() types.Coin { - if m != nil { - return m.TotalRewardPool - } - return types.Coin{} -} - -func (m *RewardProgram) GetRemainingPoolBalance() types.Coin { - if m != nil { - return m.RemainingPoolBalance - } - return types.Coin{} -} - -func (m *RewardProgram) GetClaimedAmount() types.Coin { - if m != nil { - return m.ClaimedAmount - } - return types.Coin{} -} - -func (m *RewardProgram) GetMaxRewardByAddress() types.Coin { - if m != nil { - return m.MaxRewardByAddress - } - return types.Coin{} -} - -func (m *RewardProgram) GetMinimumRolloverAmount() types.Coin { - if m != nil { - return m.MinimumRolloverAmount - } - return types.Coin{} -} - -func (m *RewardProgram) GetClaimPeriodSeconds() uint64 { - if m != nil { - return m.ClaimPeriodSeconds - } - return 0 -} - -func (m *RewardProgram) GetProgramStartTime() time.Time { - if m != nil { - return m.ProgramStartTime - } - return time.Time{} -} - -func (m *RewardProgram) GetExpectedProgramEndTime() time.Time { - if m != nil { - return m.ExpectedProgramEndTime - } - return time.Time{} -} - -func (m *RewardProgram) GetProgramEndTimeMax() time.Time { - if m != nil { - return m.ProgramEndTimeMax - } - return time.Time{} -} - -func (m *RewardProgram) GetClaimPeriodEndTime() time.Time { - if m != nil { - return m.ClaimPeriodEndTime - } - return time.Time{} -} - -func (m *RewardProgram) GetActualProgramEndTime() time.Time { - if m != nil { - return m.ActualProgramEndTime - } - return time.Time{} -} - -func (m *RewardProgram) GetClaimPeriods() uint64 { - if m != nil { - return m.ClaimPeriods - } - return 0 -} - -func (m *RewardProgram) GetCurrentClaimPeriod() uint64 { - if m != nil { - return m.CurrentClaimPeriod - } - return 0 -} - -func (m *RewardProgram) GetMaxRolloverClaimPeriods() uint64 { - if m != nil { - return m.MaxRolloverClaimPeriods - } - return 0 -} - -func (m *RewardProgram) GetState() RewardProgram_State { - if m != nil { - return m.State - } - return RewardProgram_STATE_UNSPECIFIED -} - -func (m *RewardProgram) GetExpirationOffset() uint64 { - if m != nil { - return m.ExpirationOffset - } - return 0 -} - -func (m *RewardProgram) GetQualifyingActions() []QualifyingAction { - if m != nil { - return m.QualifyingActions - } - return nil -} - -// ClaimPeriodRewardDistribution, this is updated at the end of every claim period. -type ClaimPeriodRewardDistribution struct { - // The claim period id. - ClaimPeriodId uint64 `protobuf:"varint,1,opt,name=claim_period_id,json=claimPeriodId,proto3" json:"claim_period_id,omitempty"` - // The id of the reward program that this reward belongs to. - RewardProgramId uint64 `protobuf:"varint,2,opt,name=reward_program_id,json=rewardProgramId,proto3" json:"reward_program_id,omitempty"` - // The sum of all the granted rewards for this claim period. - TotalRewardsPoolForClaimPeriod types.Coin `protobuf:"bytes,3,opt,name=total_rewards_pool_for_claim_period,json=totalRewardsPoolForClaimPeriod,proto3" json:"total_rewards_pool_for_claim_period"` - // The final allocated rewards for this claim period. - RewardsPool types.Coin `protobuf:"bytes,4,opt,name=rewards_pool,json=rewardsPool,proto3" json:"rewards_pool"` - // The total number of granted shares for this claim period. - TotalShares int64 `protobuf:"varint,5,opt,name=total_shares,json=totalShares,proto3" json:"total_shares,omitempty"` - // A flag representing if the claim period for this reward has ended. - ClaimPeriodEnded bool `protobuf:"varint,6,opt,name=claim_period_ended,json=claimPeriodEnded,proto3" json:"claim_period_ended,omitempty"` -} - -func (m *ClaimPeriodRewardDistribution) Reset() { *m = ClaimPeriodRewardDistribution{} } -func (m *ClaimPeriodRewardDistribution) String() string { return proto.CompactTextString(m) } -func (*ClaimPeriodRewardDistribution) ProtoMessage() {} -func (*ClaimPeriodRewardDistribution) Descriptor() ([]byte, []int) { - return fileDescriptor_0c3894741a216575, []int{1} -} -func (m *ClaimPeriodRewardDistribution) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClaimPeriodRewardDistribution) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ClaimPeriodRewardDistribution.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ClaimPeriodRewardDistribution) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClaimPeriodRewardDistribution.Merge(m, src) -} -func (m *ClaimPeriodRewardDistribution) XXX_Size() int { - return m.Size() -} -func (m *ClaimPeriodRewardDistribution) XXX_DiscardUnknown() { - xxx_messageInfo_ClaimPeriodRewardDistribution.DiscardUnknown(m) -} - -var xxx_messageInfo_ClaimPeriodRewardDistribution proto.InternalMessageInfo - -func (m *ClaimPeriodRewardDistribution) GetClaimPeriodId() uint64 { - if m != nil { - return m.ClaimPeriodId - } - return 0 -} - -func (m *ClaimPeriodRewardDistribution) GetRewardProgramId() uint64 { - if m != nil { - return m.RewardProgramId - } - return 0 -} - -func (m *ClaimPeriodRewardDistribution) GetTotalRewardsPoolForClaimPeriod() types.Coin { - if m != nil { - return m.TotalRewardsPoolForClaimPeriod - } - return types.Coin{} -} - -func (m *ClaimPeriodRewardDistribution) GetRewardsPool() types.Coin { - if m != nil { - return m.RewardsPool - } - return types.Coin{} -} - -func (m *ClaimPeriodRewardDistribution) GetTotalShares() int64 { - if m != nil { - return m.TotalShares - } - return 0 -} - -func (m *ClaimPeriodRewardDistribution) GetClaimPeriodEnded() bool { - if m != nil { - return m.ClaimPeriodEnded - } - return false -} - -// RewardAccountState contains state at the claim period level for a specific address. -type RewardAccountState struct { - // The id of the reward program that this share belongs to. - RewardProgramId uint64 `protobuf:"varint,1,opt,name=reward_program_id,json=rewardProgramId,proto3" json:"reward_program_id,omitempty"` - // The id of the claim period that the share belongs to. - ClaimPeriodId uint64 `protobuf:"varint,2,opt,name=claim_period_id,json=claimPeriodId,proto3" json:"claim_period_id,omitempty"` - // Owner of the reward account state. - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` - // The number of actions performed by this account, mapped by action type. - ActionCounter []*ActionCounter `protobuf:"bytes,4,rep,name=action_counter,json=actionCounter,proto3" json:"action_counter,omitempty"` - // The amount of granted shares for the address in the reward program's claim period. - SharesEarned uint64 `protobuf:"varint,5,opt,name=shares_earned,json=sharesEarned,proto3" json:"shares_earned,omitempty"` - // The status of the claim. - ClaimStatus RewardAccountState_ClaimStatus `protobuf:"varint,6,opt,name=claim_status,json=claimStatus,proto3,enum=provenance.reward.v1.RewardAccountState_ClaimStatus" json:"claim_status,omitempty"` -} - -func (m *RewardAccountState) Reset() { *m = RewardAccountState{} } -func (m *RewardAccountState) String() string { return proto.CompactTextString(m) } -func (*RewardAccountState) ProtoMessage() {} -func (*RewardAccountState) Descriptor() ([]byte, []int) { - return fileDescriptor_0c3894741a216575, []int{2} -} -func (m *RewardAccountState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RewardAccountState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RewardAccountState.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RewardAccountState) XXX_Merge(src proto.Message) { - xxx_messageInfo_RewardAccountState.Merge(m, src) -} -func (m *RewardAccountState) XXX_Size() int { - return m.Size() -} -func (m *RewardAccountState) XXX_DiscardUnknown() { - xxx_messageInfo_RewardAccountState.DiscardUnknown(m) -} - -var xxx_messageInfo_RewardAccountState proto.InternalMessageInfo - -func (m *RewardAccountState) GetRewardProgramId() uint64 { - if m != nil { - return m.RewardProgramId - } - return 0 -} - -func (m *RewardAccountState) GetClaimPeriodId() uint64 { - if m != nil { - return m.ClaimPeriodId - } - return 0 -} - -func (m *RewardAccountState) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *RewardAccountState) GetActionCounter() []*ActionCounter { - if m != nil { - return m.ActionCounter - } - return nil -} - -func (m *RewardAccountState) GetSharesEarned() uint64 { - if m != nil { - return m.SharesEarned - } - return 0 -} - -func (m *RewardAccountState) GetClaimStatus() RewardAccountState_ClaimStatus { - if m != nil { - return m.ClaimStatus - } - return RewardAccountState_CLAIM_STATUS_UNSPECIFIED -} - -// QualifyingAction can be one of many action types. -type QualifyingAction struct { - // type of action to process - // - // Types that are valid to be assigned to Type: - // - // *QualifyingAction_Delegate - // *QualifyingAction_Transfer - // *QualifyingAction_Vote - Type isQualifyingAction_Type `protobuf_oneof:"type"` -} - -func (m *QualifyingAction) Reset() { *m = QualifyingAction{} } -func (m *QualifyingAction) String() string { return proto.CompactTextString(m) } -func (*QualifyingAction) ProtoMessage() {} -func (*QualifyingAction) Descriptor() ([]byte, []int) { - return fileDescriptor_0c3894741a216575, []int{3} -} -func (m *QualifyingAction) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QualifyingAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QualifyingAction.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QualifyingAction) XXX_Merge(src proto.Message) { - xxx_messageInfo_QualifyingAction.Merge(m, src) -} -func (m *QualifyingAction) XXX_Size() int { - return m.Size() -} -func (m *QualifyingAction) XXX_DiscardUnknown() { - xxx_messageInfo_QualifyingAction.DiscardUnknown(m) -} - -var xxx_messageInfo_QualifyingAction proto.InternalMessageInfo - -type isQualifyingAction_Type interface { - isQualifyingAction_Type() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type QualifyingAction_Delegate struct { - Delegate *ActionDelegate `protobuf:"bytes,1,opt,name=delegate,proto3,oneof" json:"delegate,omitempty"` -} -type QualifyingAction_Transfer struct { - Transfer *ActionTransfer `protobuf:"bytes,2,opt,name=transfer,proto3,oneof" json:"transfer,omitempty"` -} -type QualifyingAction_Vote struct { - Vote *ActionVote `protobuf:"bytes,3,opt,name=vote,proto3,oneof" json:"vote,omitempty"` -} - -func (*QualifyingAction_Delegate) isQualifyingAction_Type() {} -func (*QualifyingAction_Transfer) isQualifyingAction_Type() {} -func (*QualifyingAction_Vote) isQualifyingAction_Type() {} - -func (m *QualifyingAction) GetType() isQualifyingAction_Type { - if m != nil { - return m.Type - } - return nil -} - -func (m *QualifyingAction) GetDelegate() *ActionDelegate { - if x, ok := m.GetType().(*QualifyingAction_Delegate); ok { - return x.Delegate - } - return nil -} - -func (m *QualifyingAction) GetTransfer() *ActionTransfer { - if x, ok := m.GetType().(*QualifyingAction_Transfer); ok { - return x.Transfer - } - return nil -} - -func (m *QualifyingAction) GetVote() *ActionVote { - if x, ok := m.GetType().(*QualifyingAction_Vote); ok { - return x.Vote - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*QualifyingAction) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*QualifyingAction_Delegate)(nil), - (*QualifyingAction_Transfer)(nil), - (*QualifyingAction_Vote)(nil), - } -} - -// QualifyingActions contains a list of QualifyingActions. -type QualifyingActions struct { - // The actions that count towards the reward. - QualifyingActions []QualifyingAction `protobuf:"bytes,1,rep,name=qualifying_actions,json=qualifyingActions,proto3" json:"qualifying_actions"` -} - -func (m *QualifyingActions) Reset() { *m = QualifyingActions{} } -func (m *QualifyingActions) String() string { return proto.CompactTextString(m) } -func (*QualifyingActions) ProtoMessage() {} -func (*QualifyingActions) Descriptor() ([]byte, []int) { - return fileDescriptor_0c3894741a216575, []int{4} -} -func (m *QualifyingActions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QualifyingActions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QualifyingActions.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QualifyingActions) XXX_Merge(src proto.Message) { - xxx_messageInfo_QualifyingActions.Merge(m, src) -} -func (m *QualifyingActions) XXX_Size() int { - return m.Size() -} -func (m *QualifyingActions) XXX_DiscardUnknown() { - xxx_messageInfo_QualifyingActions.DiscardUnknown(m) -} - -var xxx_messageInfo_QualifyingActions proto.InternalMessageInfo - -func (m *QualifyingActions) GetQualifyingActions() []QualifyingAction { - if m != nil { - return m.QualifyingActions - } - return nil -} - -// ActionDelegate represents the delegate action and its required eligibility criteria. -type ActionDelegate struct { - // Minimum number of successful delegates. - MinimumActions uint64 `protobuf:"varint,1,opt,name=minimum_actions,json=minimumActions,proto3" json:"minimum_actions,omitempty"` - // Maximum number of successful delegates. - MaximumActions uint64 `protobuf:"varint,2,opt,name=maximum_actions,json=maximumActions,proto3" json:"maximum_actions,omitempty"` - // Minimum amount that the user must have currently delegated on the validator. - MinimumDelegationAmount *types.Coin `protobuf:"bytes,3,opt,name=minimum_delegation_amount,json=minimumDelegationAmount,proto3" json:"minimum_delegation_amount,omitempty"` - // Maximum amount that the user must have currently delegated on the validator. - MaximumDelegationAmount *types.Coin `protobuf:"bytes,4,opt,name=maximum_delegation_amount,json=maximumDelegationAmount,proto3" json:"maximum_delegation_amount,omitempty"` - // Minimum percentile that can be below the validator's power ranking. - MinimumActiveStakePercentile cosmossdk_io_math.LegacyDec `protobuf:"bytes,5,opt,name=minimum_active_stake_percentile,json=minimumActiveStakePercentile,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"minimum_active_stake_percentile"` - // Maximum percentile that can be below the validator's power ranking. - MaximumActiveStakePercentile cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=maximum_active_stake_percentile,json=maximumActiveStakePercentile,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"maximum_active_stake_percentile"` -} - -func (m *ActionDelegate) Reset() { *m = ActionDelegate{} } -func (m *ActionDelegate) String() string { return proto.CompactTextString(m) } -func (*ActionDelegate) ProtoMessage() {} -func (*ActionDelegate) Descriptor() ([]byte, []int) { - return fileDescriptor_0c3894741a216575, []int{5} -} -func (m *ActionDelegate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ActionDelegate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ActionDelegate.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ActionDelegate) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActionDelegate.Merge(m, src) -} -func (m *ActionDelegate) XXX_Size() int { - return m.Size() -} -func (m *ActionDelegate) XXX_DiscardUnknown() { - xxx_messageInfo_ActionDelegate.DiscardUnknown(m) -} - -var xxx_messageInfo_ActionDelegate proto.InternalMessageInfo - -func (m *ActionDelegate) GetMinimumActions() uint64 { - if m != nil { - return m.MinimumActions - } - return 0 -} - -func (m *ActionDelegate) GetMaximumActions() uint64 { - if m != nil { - return m.MaximumActions - } - return 0 -} - -func (m *ActionDelegate) GetMinimumDelegationAmount() *types.Coin { - if m != nil { - return m.MinimumDelegationAmount - } - return nil -} - -func (m *ActionDelegate) GetMaximumDelegationAmount() *types.Coin { - if m != nil { - return m.MaximumDelegationAmount - } - return nil -} - -// ActionTransfer represents the transfer action and its required eligibility criteria. -type ActionTransfer struct { - // Minimum number of successful transfers. - MinimumActions uint64 `protobuf:"varint,1,opt,name=minimum_actions,json=minimumActions,proto3" json:"minimum_actions,omitempty"` - // Maximum number of successful transfers. - MaximumActions uint64 `protobuf:"varint,2,opt,name=maximum_actions,json=maximumActions,proto3" json:"maximum_actions,omitempty"` - // Minimum delegation amount the account must have across all validators, for the transfer action to be counted. - MinimumDelegationAmount types.Coin `protobuf:"bytes,3,opt,name=minimum_delegation_amount,json=minimumDelegationAmount,proto3" json:"minimum_delegation_amount"` -} - -func (m *ActionTransfer) Reset() { *m = ActionTransfer{} } -func (m *ActionTransfer) String() string { return proto.CompactTextString(m) } -func (*ActionTransfer) ProtoMessage() {} -func (*ActionTransfer) Descriptor() ([]byte, []int) { - return fileDescriptor_0c3894741a216575, []int{6} -} -func (m *ActionTransfer) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ActionTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ActionTransfer.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ActionTransfer) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActionTransfer.Merge(m, src) -} -func (m *ActionTransfer) XXX_Size() int { - return m.Size() -} -func (m *ActionTransfer) XXX_DiscardUnknown() { - xxx_messageInfo_ActionTransfer.DiscardUnknown(m) -} - -var xxx_messageInfo_ActionTransfer proto.InternalMessageInfo - -func (m *ActionTransfer) GetMinimumActions() uint64 { - if m != nil { - return m.MinimumActions - } - return 0 -} - -func (m *ActionTransfer) GetMaximumActions() uint64 { - if m != nil { - return m.MaximumActions - } - return 0 -} - -func (m *ActionTransfer) GetMinimumDelegationAmount() types.Coin { - if m != nil { - return m.MinimumDelegationAmount - } - return types.Coin{} -} - -// ActionVote represents the voting action and its required eligibility criteria. -type ActionVote struct { - // Minimum number of successful votes. - MinimumActions uint64 `protobuf:"varint,1,opt,name=minimum_actions,json=minimumActions,proto3" json:"minimum_actions,omitempty"` - // Maximum number of successful votes. - MaximumActions uint64 `protobuf:"varint,2,opt,name=maximum_actions,json=maximumActions,proto3" json:"maximum_actions,omitempty"` - // Minimum delegation amount the account must have across all validators, for the vote action to be counted. - MinimumDelegationAmount types.Coin `protobuf:"bytes,3,opt,name=minimum_delegation_amount,json=minimumDelegationAmount,proto3" json:"minimum_delegation_amount"` - // Positive multiplier that is applied to the shares awarded by the vote action when conditions - // are met(for now the only condition is the current vote is a validator vote). A value of zero will behave the same - // as one - ValidatorMultiplier uint64 `protobuf:"varint,4,opt,name=validator_multiplier,json=validatorMultiplier,proto3" json:"validator_multiplier,omitempty"` -} - -func (m *ActionVote) Reset() { *m = ActionVote{} } -func (m *ActionVote) String() string { return proto.CompactTextString(m) } -func (*ActionVote) ProtoMessage() {} -func (*ActionVote) Descriptor() ([]byte, []int) { - return fileDescriptor_0c3894741a216575, []int{7} -} -func (m *ActionVote) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ActionVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ActionVote.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ActionVote) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActionVote.Merge(m, src) -} -func (m *ActionVote) XXX_Size() int { - return m.Size() -} -func (m *ActionVote) XXX_DiscardUnknown() { - xxx_messageInfo_ActionVote.DiscardUnknown(m) -} - -var xxx_messageInfo_ActionVote proto.InternalMessageInfo - -func (m *ActionVote) GetMinimumActions() uint64 { - if m != nil { - return m.MinimumActions - } - return 0 -} - -func (m *ActionVote) GetMaximumActions() uint64 { - if m != nil { - return m.MaximumActions - } - return 0 -} - -func (m *ActionVote) GetMinimumDelegationAmount() types.Coin { - if m != nil { - return m.MinimumDelegationAmount - } - return types.Coin{} -} - -func (m *ActionVote) GetValidatorMultiplier() uint64 { - if m != nil { - return m.ValidatorMultiplier - } - return 0 -} - -// ActionCounter is a key-value pair that maps action type to the number of times it was performed. -type ActionCounter struct { - // The type of action performed. - ActionType string `protobuf:"bytes,1,opt,name=action_type,json=actionType,proto3" json:"action_type,omitempty"` - // The number of times this action has been performed - NumberOfActions uint64 `protobuf:"varint,2,opt,name=number_of_actions,json=numberOfActions,proto3" json:"number_of_actions,omitempty"` -} - -func (m *ActionCounter) Reset() { *m = ActionCounter{} } -func (m *ActionCounter) String() string { return proto.CompactTextString(m) } -func (*ActionCounter) ProtoMessage() {} -func (*ActionCounter) Descriptor() ([]byte, []int) { - return fileDescriptor_0c3894741a216575, []int{8} -} -func (m *ActionCounter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ActionCounter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ActionCounter.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ActionCounter) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActionCounter.Merge(m, src) -} -func (m *ActionCounter) XXX_Size() int { - return m.Size() -} -func (m *ActionCounter) XXX_DiscardUnknown() { - xxx_messageInfo_ActionCounter.DiscardUnknown(m) -} - -var xxx_messageInfo_ActionCounter proto.InternalMessageInfo - -func (m *ActionCounter) GetActionType() string { - if m != nil { - return m.ActionType - } - return "" -} - -func (m *ActionCounter) GetNumberOfActions() uint64 { - if m != nil { - return m.NumberOfActions - } - return 0 -} - -func init() { - proto.RegisterEnum("provenance.reward.v1.RewardProgram_State", RewardProgram_State_name, RewardProgram_State_value) - proto.RegisterEnum("provenance.reward.v1.RewardAccountState_ClaimStatus", RewardAccountState_ClaimStatus_name, RewardAccountState_ClaimStatus_value) - proto.RegisterType((*RewardProgram)(nil), "provenance.reward.v1.RewardProgram") - proto.RegisterType((*ClaimPeriodRewardDistribution)(nil), "provenance.reward.v1.ClaimPeriodRewardDistribution") - proto.RegisterType((*RewardAccountState)(nil), "provenance.reward.v1.RewardAccountState") - proto.RegisterType((*QualifyingAction)(nil), "provenance.reward.v1.QualifyingAction") - proto.RegisterType((*QualifyingActions)(nil), "provenance.reward.v1.QualifyingActions") - proto.RegisterType((*ActionDelegate)(nil), "provenance.reward.v1.ActionDelegate") - proto.RegisterType((*ActionTransfer)(nil), "provenance.reward.v1.ActionTransfer") - proto.RegisterType((*ActionVote)(nil), "provenance.reward.v1.ActionVote") - proto.RegisterType((*ActionCounter)(nil), "provenance.reward.v1.ActionCounter") -} - -func init() { proto.RegisterFile("provenance/reward/v1/reward.proto", fileDescriptor_0c3894741a216575) } - -var fileDescriptor_0c3894741a216575 = []byte{ - // 1479 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x4b, 0x73, 0x1b, 0x45, - 0x10, 0xf6, 0xda, 0xb2, 0x63, 0xb7, 0x2c, 0x59, 0x9a, 0xc8, 0xf1, 0xda, 0x04, 0xc9, 0x71, 0xa8, - 0x60, 0x1e, 0x91, 0xb0, 0xa1, 0x72, 0x80, 0x03, 0x25, 0x59, 0x32, 0x11, 0x24, 0x8e, 0x59, 0xc9, - 0x84, 0x22, 0x87, 0xad, 0xd1, 0xee, 0x48, 0xd9, 0xca, 0xee, 0x8e, 0xb2, 0x3b, 0x12, 0xf2, 0x8d, - 0x5f, 0x40, 0xe5, 0x08, 0xb7, 0xfc, 0x08, 0x7e, 0x44, 0xb8, 0xa5, 0x38, 0x51, 0x1c, 0x02, 0x95, - 0x70, 0xe0, 0x9c, 0x13, 0x47, 0x6a, 0x1e, 0x2b, 0xad, 0x64, 0x25, 0xb1, 0x79, 0x1c, 0xb8, 0x69, - 0xa6, 0xbb, 0xbf, 0x7e, 0xcc, 0xd7, 0xdd, 0x5b, 0x82, 0x4b, 0xdd, 0x80, 0xf6, 0x89, 0x8f, 0x7d, - 0x8b, 0x94, 0x02, 0xf2, 0x35, 0x0e, 0xec, 0x52, 0x7f, 0x47, 0xfd, 0x2a, 0x76, 0x03, 0xca, 0x28, - 0xca, 0x8d, 0x54, 0x8a, 0x4a, 0xd0, 0xdf, 0xd9, 0xc8, 0x75, 0x68, 0x87, 0x0a, 0x85, 0x12, 0xff, - 0x25, 0x75, 0x37, 0x0a, 0x1d, 0x4a, 0x3b, 0x2e, 0x29, 0x89, 0x53, 0xab, 0xd7, 0x2e, 0x31, 0xc7, - 0x23, 0x21, 0xc3, 0x5e, 0x57, 0x29, 0xe4, 0x2d, 0x1a, 0x7a, 0x34, 0x2c, 0xb5, 0x70, 0x48, 0x4a, - 0xfd, 0x9d, 0x16, 0x61, 0x78, 0xa7, 0x64, 0x51, 0xc7, 0x57, 0xf2, 0x75, 0x29, 0x37, 0x25, 0xb2, - 0x3c, 0x48, 0xd1, 0xd6, 0xf3, 0x24, 0xa4, 0x0c, 0xe1, 0xff, 0x30, 0xa0, 0x9d, 0x00, 0x7b, 0x28, - 0x0d, 0xb3, 0x8e, 0xad, 0x6b, 0x9b, 0xda, 0x76, 0xc2, 0x98, 0x75, 0x6c, 0x94, 0x83, 0x79, 0xe6, - 0x30, 0x97, 0xe8, 0xb3, 0x9b, 0xda, 0xf6, 0x92, 0x21, 0x0f, 0x68, 0x13, 0x92, 0x36, 0x09, 0xad, - 0xc0, 0xe9, 0x32, 0x87, 0xfa, 0xfa, 0x9c, 0x90, 0xc5, 0xaf, 0xd0, 0x35, 0x58, 0xb3, 0x9d, 0x90, - 0x05, 0x4e, 0xab, 0xc7, 0x88, 0xd9, 0x0e, 0xa8, 0x67, 0x62, 0xdb, 0x0e, 0x48, 0x18, 0xea, 0x09, - 0xa1, 0xbd, 0x3a, 0x12, 0xef, 0x07, 0xd4, 0x2b, 0x4b, 0x21, 0xfa, 0x0c, 0xb2, 0x8c, 0x32, 0xec, - 0x9a, 0xb2, 0x2c, 0x66, 0x97, 0x52, 0x57, 0x9f, 0xdf, 0xd4, 0xb6, 0x93, 0xbb, 0xeb, 0x45, 0x15, - 0x3b, 0x4f, 0xb4, 0xa8, 0x12, 0x2d, 0xee, 0x51, 0xc7, 0xaf, 0x24, 0x1e, 0x3d, 0x29, 0xcc, 0x18, - 0x2b, 0xc2, 0x52, 0xe5, 0x43, 0xa9, 0x8b, 0x8e, 0xe0, 0x42, 0x40, 0x3c, 0xec, 0xf8, 0x8e, 0xdf, - 0x11, 0x48, 0x66, 0x0b, 0xbb, 0xbc, 0xe8, 0xfa, 0xc2, 0xe9, 0x10, 0x73, 0x43, 0x73, 0x8e, 0x57, - 0x91, 0xc6, 0x68, 0x1f, 0xd2, 0x96, 0x8b, 0x1d, 0x8f, 0xd8, 0x26, 0xf6, 0x68, 0xcf, 0x67, 0xfa, - 0xb9, 0xd3, 0xc1, 0xa5, 0x94, 0x59, 0x59, 0x58, 0x21, 0x03, 0x56, 0x3d, 0x3c, 0x88, 0x32, 0x6d, - 0x1d, 0x0f, 0x2b, 0xb4, 0x78, 0x3a, 0x38, 0xe4, 0xe1, 0x81, 0xcc, 0xb6, 0x72, 0x1c, 0xd5, 0xef, - 0x36, 0xac, 0x79, 0x8e, 0xef, 0x78, 0x3d, 0xcf, 0x0c, 0xa8, 0xeb, 0xd2, 0x3e, 0x09, 0xa2, 0x20, - 0x97, 0x4e, 0x87, 0xba, 0xaa, 0xec, 0x0d, 0x65, 0xae, 0x82, 0x7d, 0x0f, 0x72, 0x22, 0x7a, 0xb3, - 0x4b, 0x02, 0x87, 0xda, 0x66, 0x48, 0x2c, 0xea, 0xdb, 0xa1, 0x0e, 0x82, 0x2a, 0x48, 0xc8, 0x0e, - 0x85, 0xa8, 0x21, 0x25, 0xc8, 0x00, 0xd4, 0x95, 0xac, 0x32, 0x43, 0x86, 0x03, 0x66, 0x72, 0xe2, - 0xea, 0x49, 0x11, 0xc5, 0x46, 0x51, 0xb2, 0xba, 0x18, 0xb1, 0xba, 0xd8, 0x8c, 0x58, 0x5d, 0x59, - 0xe4, 0x61, 0x3c, 0xf8, 0xb5, 0xa0, 0x19, 0x19, 0x65, 0xdf, 0xe0, 0xe6, 0x5c, 0x01, 0x99, 0xb0, - 0x4e, 0x06, 0x5d, 0x62, 0x31, 0x62, 0x9b, 0x11, 0x38, 0xf1, 0x6d, 0x09, 0xbd, 0x7c, 0x06, 0xe8, - 0x0b, 0x11, 0x8c, 0x22, 0x7e, 0xcd, 0xb7, 0x85, 0x83, 0x23, 0xc8, 0x4d, 0xe2, 0x9a, 0x1e, 0x1e, - 0xe8, 0xa9, 0x33, 0x60, 0x67, 0xbb, 0x63, 0x98, 0x37, 0xf1, 0x00, 0xdd, 0x86, 0xd5, 0xb1, 0xea, - 0x0d, 0x63, 0x4e, 0x9f, 0x01, 0x37, 0x5e, 0xe4, 0x28, 0xde, 0x3b, 0xb0, 0x86, 0x2d, 0xd6, 0xc3, - 0xee, 0xc9, 0x72, 0xac, 0x9c, 0x01, 0x3a, 0x27, 0x41, 0x26, 0x8a, 0x71, 0x19, 0x52, 0xf1, 0xa8, - 0x43, 0x3d, 0x23, 0x1e, 0x7b, 0x39, 0x16, 0x47, 0x28, 0x88, 0xd1, 0x0b, 0x02, 0xe2, 0x33, 0x33, - 0xae, 0xac, 0x67, 0x15, 0x31, 0xa4, 0x6c, 0x6f, 0x64, 0x82, 0x3e, 0x82, 0x0d, 0xc1, 0xfb, 0x88, - 0x9f, 0xe3, 0x3e, 0x90, 0xb0, 0x5b, 0xe3, 0xdc, 0x56, 0x0a, 0x7b, 0x71, 0x77, 0x1f, 0xc3, 0x7c, - 0xc8, 0x30, 0x23, 0xfa, 0xf9, 0x4d, 0x6d, 0x3b, 0xbd, 0xfb, 0x56, 0x71, 0xda, 0x28, 0x2d, 0x8e, - 0x0d, 0xb5, 0x62, 0x83, 0x1b, 0x18, 0xd2, 0x0e, 0xbd, 0x03, 0x59, 0x32, 0xe8, 0x3a, 0x01, 0xe6, - 0x73, 0xca, 0xa4, 0xed, 0x76, 0x48, 0x98, 0x9e, 0x13, 0x4e, 0x33, 0x23, 0xc1, 0x2d, 0x71, 0x8f, - 0xee, 0x00, 0xba, 0xdf, 0xc3, 0xae, 0xd3, 0x3e, 0xe6, 0x23, 0x04, 0x5b, 0x5c, 0x14, 0xea, 0xab, - 0x9b, 0x73, 0xdb, 0xc9, 0xdd, 0x2b, 0xd3, 0x5d, 0x7f, 0x3e, 0xd4, 0x2f, 0x0b, 0x75, 0xd5, 0x56, - 0xd9, 0xfb, 0x13, 0xf7, 0xe1, 0xd6, 0x3d, 0x98, 0x17, 0x91, 0xa1, 0x55, 0xc8, 0x36, 0x9a, 0xe5, - 0x66, 0xcd, 0x3c, 0x3a, 0x68, 0x1c, 0xd6, 0xf6, 0xea, 0xfb, 0xf5, 0x5a, 0x35, 0x33, 0x83, 0xb2, - 0x90, 0x92, 0xd7, 0x87, 0xb5, 0x83, 0x6a, 0xfd, 0xe0, 0x93, 0x8c, 0x36, 0xba, 0x6a, 0x34, 0xcb, - 0x46, 0xb3, 0x56, 0xcd, 0xcc, 0x22, 0x04, 0x69, 0x79, 0xb5, 0x5f, 0x3f, 0xa8, 0x37, 0xae, 0xd7, - 0xaa, 0x99, 0xb9, 0x91, 0x5a, 0xed, 0xcb, 0xc3, 0xba, 0x51, 0xab, 0x66, 0x12, 0x1f, 0x2e, 0x7e, - 0xf7, 0xb0, 0xa0, 0xfd, 0xf1, 0xb0, 0xa0, 0x6d, 0x7d, 0x33, 0x07, 0xaf, 0xc7, 0x4a, 0x2a, 0x4b, - 0x55, 0x8d, 0xa6, 0x31, 0x1f, 0xde, 0x57, 0x60, 0x65, 0x8c, 0xad, 0xc3, 0x8d, 0x90, 0x8a, 0xbd, - 0x7c, 0xdd, 0x46, 0x6f, 0x43, 0x36, 0x1a, 0xd3, 0x8a, 0x7c, 0x8e, 0x2d, 0x16, 0x45, 0xc2, 0x58, - 0x09, 0xe2, 0x2f, 0x50, 0xb7, 0x91, 0x0b, 0x97, 0xe3, 0x83, 0x3d, 0x94, 0xf3, 0xb8, 0x4d, 0xc7, - 0x9f, 0x5f, 0xac, 0x92, 0x53, 0x0c, 0xa9, 0x7c, 0x6c, 0xd4, 0x87, 0x7c, 0x36, 0xef, 0xd3, 0x38, - 0x4d, 0x50, 0x05, 0x96, 0xe3, 0x7e, 0xc4, 0xce, 0x39, 0x05, 0x6c, 0x32, 0x18, 0x21, 0xa2, 0x4b, - 0xb0, 0x2c, 0x23, 0x0e, 0xef, 0xe2, 0x80, 0x84, 0x62, 0x0b, 0xcd, 0x19, 0x49, 0x71, 0xd7, 0x10, - 0x57, 0xe8, 0x5d, 0x40, 0x93, 0x6d, 0x4d, 0x6c, 0xb1, 0x5c, 0x16, 0x8d, 0xcc, 0x78, 0xb7, 0x12, - 0x3b, 0xf6, 0x04, 0xcf, 0xe7, 0x00, 0xc9, 0xe0, 0xcb, 0x96, 0xc5, 0xc7, 0xab, 0xe4, 0xc1, 0xd4, - 0x7a, 0x6a, 0xd3, 0xeb, 0x39, 0xe5, 0x8d, 0x66, 0xa7, 0xbd, 0x91, 0x0e, 0xe7, 0xa2, 0xb5, 0x22, - 0xd7, 0x74, 0x74, 0x44, 0x9f, 0x42, 0x5a, 0x12, 0xda, 0x14, 0x21, 0x90, 0x40, 0x4f, 0x08, 0x5e, - 0x5f, 0x9e, 0xce, 0x6b, 0xc9, 0xda, 0x3d, 0xa9, 0x6a, 0xa4, 0x70, 0xfc, 0xc8, 0x27, 0x85, 0xac, - 0x92, 0x49, 0x70, 0xe0, 0x13, 0x5b, 0x14, 0x2b, 0x61, 0x2c, 0xcb, 0xcb, 0x9a, 0xb8, 0x43, 0xb7, - 0x41, 0x4e, 0x0e, 0xbe, 0x0e, 0x58, 0x2f, 0x14, 0x75, 0x4a, 0xef, 0x7e, 0xf0, 0xb2, 0x0e, 0x8e, - 0x97, 0xa7, 0x28, 0x1e, 0xb8, 0x21, 0x6c, 0x8d, 0xa4, 0x35, 0x3a, 0x6c, 0x7d, 0xaf, 0x41, 0x32, - 0x26, 0x44, 0x17, 0x41, 0xdf, 0xbb, 0x51, 0xae, 0xdf, 0xe4, 0x5d, 0xd2, 0x3c, 0x6a, 0x4c, 0xb4, - 0xd5, 0x49, 0xa9, 0x38, 0x96, 0x2b, 0x37, 0x6a, 0x19, 0x0d, 0x6d, 0xc0, 0x85, 0x31, 0xe9, 0x48, - 0x36, 0x8b, 0x74, 0xc8, 0x9d, 0x94, 0x89, 0x86, 0x9b, 0x94, 0x4c, 0xeb, 0xbb, 0xdf, 0x35, 0xc8, - 0x4c, 0x0e, 0x07, 0x54, 0x81, 0x45, 0x9b, 0xb8, 0xa4, 0xc3, 0x27, 0x9a, 0x26, 0x48, 0xfa, 0xc6, - 0xcb, 0xca, 0x5f, 0x55, 0xba, 0xd7, 0x67, 0x8c, 0xa1, 0x1d, 0xc7, 0x60, 0x01, 0xf6, 0xc3, 0x36, - 0x09, 0x04, 0x07, 0x5e, 0x81, 0xd1, 0x54, 0xba, 0x1c, 0x23, 0xb2, 0x43, 0xd7, 0x20, 0xd1, 0xa7, - 0x8c, 0xa8, 0xfe, 0xdb, 0x7c, 0x99, 0xfd, 0x17, 0x54, 0xf8, 0x17, 0xfa, 0xa3, 0xf4, 0x2a, 0x0b, - 0x90, 0x60, 0xc7, 0x5d, 0xb2, 0xd5, 0x85, 0xec, 0x64, 0x96, 0xe1, 0x0b, 0xe6, 0xa8, 0xf6, 0xef, - 0xcc, 0xd1, 0x6f, 0x13, 0x90, 0x1e, 0x2f, 0x0f, 0x7a, 0x13, 0x56, 0xa2, 0xcf, 0xa0, 0x91, 0x33, - 0xce, 0xc8, 0xb4, 0xba, 0x8e, 0x02, 0xe3, 0x8a, 0x78, 0x30, 0xa6, 0x38, 0xab, 0x14, 0xe5, 0x75, - 0xa4, 0x78, 0x04, 0xeb, 0x11, 0xa2, 0x2a, 0x3c, 0xef, 0x1c, 0xf5, 0x69, 0xf5, 0xaa, 0xa9, 0x65, - 0x44, 0x1f, 0x65, 0xd5, 0xa1, 0xa9, 0xfa, 0xac, 0xe2, 0xb0, 0xca, 0xff, 0x49, 0xd8, 0xc4, 0xab, - 0x61, 0xa5, 0xed, 0x09, 0xd8, 0x01, 0x14, 0xe2, 0xf9, 0xf7, 0x09, 0xef, 0xb9, 0x7b, 0x84, 0x0f, - 0x0b, 0x8b, 0xf8, 0xcc, 0x71, 0x89, 0xe8, 0xd0, 0xa5, 0xca, 0x0e, 0x2f, 0xea, 0x2f, 0x4f, 0x0a, - 0xaf, 0x49, 0x1f, 0xa1, 0x7d, 0xaf, 0xe8, 0xd0, 0x92, 0x87, 0xd9, 0xdd, 0xe2, 0x0d, 0xd2, 0xc1, - 0xd6, 0x71, 0x95, 0x58, 0x3f, 0xfd, 0x70, 0x15, 0x54, 0x08, 0x55, 0x62, 0x19, 0x17, 0x63, 0x25, - 0xec, 0x93, 0x06, 0xc7, 0x3d, 0x1c, 0xc2, 0x0a, 0xcf, 0xb1, 0x82, 0x4e, 0xf3, 0xbc, 0xf0, 0xf7, - 0x3d, 0x8f, 0xde, 0xe4, 0x84, 0xe7, 0x58, 0xa7, 0xfd, 0xa8, 0x45, 0x84, 0x88, 0xb8, 0xfe, 0x1f, - 0x10, 0xe2, 0xce, 0x3f, 0x21, 0x84, 0x22, 0xf3, 0x8b, 0x68, 0x11, 0xcb, 0xe5, 0x4f, 0x0d, 0x60, - 0xd4, 0x77, 0xff, 0xb3, 0x3c, 0xd0, 0x0e, 0xe4, 0xfa, 0xd8, 0x75, 0x6c, 0xcc, 0x68, 0x60, 0x7a, - 0x3d, 0x97, 0x39, 0x5d, 0xd7, 0x11, 0x9b, 0x86, 0x87, 0x72, 0x7e, 0x28, 0xbb, 0x39, 0x14, 0xc5, - 0x52, 0x6f, 0x43, 0x6a, 0x6c, 0xe9, 0xa0, 0x02, 0x24, 0xd5, 0xc6, 0xe2, 0x93, 0x46, 0x24, 0xbe, - 0x64, 0x80, 0xbc, 0x6a, 0x1e, 0x77, 0xc5, 0x02, 0xf5, 0x7b, 0x5e, 0x8b, 0x04, 0x26, 0x6d, 0x4f, - 0xa4, 0xbd, 0x22, 0x05, 0xb7, 0xda, 0x2a, 0xef, 0xd8, 0xe4, 0xea, 0x3c, 0x7a, 0x9a, 0xd7, 0x1e, - 0x3f, 0xcd, 0x6b, 0xbf, 0x3d, 0xcd, 0x6b, 0x0f, 0x9e, 0xe5, 0x67, 0x1e, 0x3f, 0xcb, 0xcf, 0xfc, - 0xfc, 0x2c, 0x3f, 0x03, 0x6b, 0x0e, 0x9d, 0x3a, 0x9c, 0x0e, 0xb5, 0xaf, 0x76, 0x3b, 0x0e, 0xbb, - 0xdb, 0x6b, 0x15, 0x2d, 0xea, 0x95, 0x46, 0x2a, 0x57, 0x1d, 0x1a, 0x3b, 0x95, 0x06, 0xd1, 0x1f, - 0x00, 0x3c, 0xde, 0xb0, 0xb5, 0x20, 0xbe, 0xc1, 0xdf, 0xff, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x3b, - 0xe0, 0x83, 0x17, 0x22, 0x10, 0x00, 0x00, -} - -func (this *RewardProgram) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RewardProgram) - if !ok { - that2, ok := that.(RewardProgram) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Id != that1.Id { - return false - } - if this.Title != that1.Title { - return false - } - if this.Description != that1.Description { - return false - } - if this.DistributeFromAddress != that1.DistributeFromAddress { - return false - } - if !this.TotalRewardPool.Equal(&that1.TotalRewardPool) { - return false - } - if !this.RemainingPoolBalance.Equal(&that1.RemainingPoolBalance) { - return false - } - if !this.ClaimedAmount.Equal(&that1.ClaimedAmount) { - return false - } - if !this.MaxRewardByAddress.Equal(&that1.MaxRewardByAddress) { - return false - } - if !this.MinimumRolloverAmount.Equal(&that1.MinimumRolloverAmount) { - return false - } - if this.ClaimPeriodSeconds != that1.ClaimPeriodSeconds { - return false - } - if !this.ProgramStartTime.Equal(that1.ProgramStartTime) { - return false - } - if !this.ExpectedProgramEndTime.Equal(that1.ExpectedProgramEndTime) { - return false - } - if !this.ProgramEndTimeMax.Equal(that1.ProgramEndTimeMax) { - return false - } - if !this.ClaimPeriodEndTime.Equal(that1.ClaimPeriodEndTime) { - return false - } - if !this.ActualProgramEndTime.Equal(that1.ActualProgramEndTime) { - return false - } - if this.ClaimPeriods != that1.ClaimPeriods { - return false - } - if this.CurrentClaimPeriod != that1.CurrentClaimPeriod { - return false - } - if this.MaxRolloverClaimPeriods != that1.MaxRolloverClaimPeriods { - return false - } - if this.State != that1.State { - return false - } - if this.ExpirationOffset != that1.ExpirationOffset { - return false - } - if len(this.QualifyingActions) != len(that1.QualifyingActions) { - return false - } - for i := range this.QualifyingActions { - if !this.QualifyingActions[i].Equal(&that1.QualifyingActions[i]) { - return false - } - } - return true -} -func (this *ClaimPeriodRewardDistribution) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ClaimPeriodRewardDistribution) - if !ok { - that2, ok := that.(ClaimPeriodRewardDistribution) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ClaimPeriodId != that1.ClaimPeriodId { - return false - } - if this.RewardProgramId != that1.RewardProgramId { - return false - } - if !this.TotalRewardsPoolForClaimPeriod.Equal(&that1.TotalRewardsPoolForClaimPeriod) { - return false - } - if !this.RewardsPool.Equal(&that1.RewardsPool) { - return false - } - if this.TotalShares != that1.TotalShares { - return false - } - if this.ClaimPeriodEnded != that1.ClaimPeriodEnded { - return false - } - return true -} -func (this *RewardAccountState) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RewardAccountState) - if !ok { - that2, ok := that.(RewardAccountState) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.RewardProgramId != that1.RewardProgramId { - return false - } - if this.ClaimPeriodId != that1.ClaimPeriodId { - return false - } - if this.Address != that1.Address { - return false - } - if len(this.ActionCounter) != len(that1.ActionCounter) { - return false - } - for i := range this.ActionCounter { - if !this.ActionCounter[i].Equal(that1.ActionCounter[i]) { - return false - } - } - if this.SharesEarned != that1.SharesEarned { - return false - } - if this.ClaimStatus != that1.ClaimStatus { - return false - } - return true -} -func (this *QualifyingAction) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*QualifyingAction) - if !ok { - that2, ok := that.(QualifyingAction) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.Type == nil { - if this.Type != nil { - return false - } - } else if this.Type == nil { - return false - } else if !this.Type.Equal(that1.Type) { - return false - } - return true -} -func (this *QualifyingAction_Delegate) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*QualifyingAction_Delegate) - if !ok { - that2, ok := that.(QualifyingAction_Delegate) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Delegate.Equal(that1.Delegate) { - return false - } - return true -} -func (this *QualifyingAction_Transfer) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*QualifyingAction_Transfer) - if !ok { - that2, ok := that.(QualifyingAction_Transfer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Transfer.Equal(that1.Transfer) { - return false - } - return true -} -func (this *QualifyingAction_Vote) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*QualifyingAction_Vote) - if !ok { - that2, ok := that.(QualifyingAction_Vote) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Vote.Equal(that1.Vote) { - return false - } - return true -} -func (this *ActionDelegate) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ActionDelegate) - if !ok { - that2, ok := that.(ActionDelegate) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.MinimumActions != that1.MinimumActions { - return false - } - if this.MaximumActions != that1.MaximumActions { - return false - } - if !this.MinimumDelegationAmount.Equal(that1.MinimumDelegationAmount) { - return false - } - if !this.MaximumDelegationAmount.Equal(that1.MaximumDelegationAmount) { - return false - } - if !this.MinimumActiveStakePercentile.Equal(that1.MinimumActiveStakePercentile) { - return false - } - if !this.MaximumActiveStakePercentile.Equal(that1.MaximumActiveStakePercentile) { - return false - } - return true -} -func (this *ActionTransfer) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ActionTransfer) - if !ok { - that2, ok := that.(ActionTransfer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.MinimumActions != that1.MinimumActions { - return false - } - if this.MaximumActions != that1.MaximumActions { - return false - } - if !this.MinimumDelegationAmount.Equal(&that1.MinimumDelegationAmount) { - return false - } - return true -} -func (this *ActionVote) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ActionVote) - if !ok { - that2, ok := that.(ActionVote) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.MinimumActions != that1.MinimumActions { - return false - } - if this.MaximumActions != that1.MaximumActions { - return false - } - if !this.MinimumDelegationAmount.Equal(&that1.MinimumDelegationAmount) { - return false - } - if this.ValidatorMultiplier != that1.ValidatorMultiplier { - return false - } - return true -} -func (this *ActionCounter) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ActionCounter) - if !ok { - that2, ok := that.(ActionCounter) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ActionType != that1.ActionType { - return false - } - if this.NumberOfActions != that1.NumberOfActions { - return false - } - return true -} -func (m *RewardProgram) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RewardProgram) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RewardProgram) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.QualifyingActions) > 0 { - for iNdEx := len(m.QualifyingActions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.QualifyingActions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintReward(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } - } - if m.ExpirationOffset != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.ExpirationOffset)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa0 - } - if m.State != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.State)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x98 - } - if m.MaxRolloverClaimPeriods != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.MaxRolloverClaimPeriods)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x90 - } - if m.CurrentClaimPeriod != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.CurrentClaimPeriod)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x88 - } - if m.ClaimPeriods != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.ClaimPeriods)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - } - n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.ActualProgramEndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ActualProgramEndTime):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintReward(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x7a - n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.ClaimPeriodEndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ClaimPeriodEndTime):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintReward(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x72 - n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.ProgramEndTimeMax, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ProgramEndTimeMax):]) - if err3 != nil { - return 0, err3 - } - i -= n3 - i = encodeVarintReward(dAtA, i, uint64(n3)) - i-- - dAtA[i] = 0x6a - n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.ExpectedProgramEndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ExpectedProgramEndTime):]) - if err4 != nil { - return 0, err4 - } - i -= n4 - i = encodeVarintReward(dAtA, i, uint64(n4)) - i-- - dAtA[i] = 0x62 - n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.ProgramStartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ProgramStartTime):]) - if err5 != nil { - return 0, err5 - } - i -= n5 - i = encodeVarintReward(dAtA, i, uint64(n5)) - i-- - dAtA[i] = 0x5a - if m.ClaimPeriodSeconds != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.ClaimPeriodSeconds)) - i-- - dAtA[i] = 0x50 - } - { - size, err := m.MinimumRolloverAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintReward(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - { - size, err := m.MaxRewardByAddress.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintReward(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - { - size, err := m.ClaimedAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintReward(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - { - size, err := m.RemainingPoolBalance.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintReward(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - { - size, err := m.TotalRewardPool.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintReward(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if len(m.DistributeFromAddress) > 0 { - i -= len(m.DistributeFromAddress) - copy(dAtA[i:], m.DistributeFromAddress) - i = encodeVarintReward(dAtA, i, uint64(len(m.DistributeFromAddress))) - i-- - dAtA[i] = 0x22 - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintReward(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x1a - } - if len(m.Title) > 0 { - i -= len(m.Title) - copy(dAtA[i:], m.Title) - i = encodeVarintReward(dAtA, i, uint64(len(m.Title))) - i-- - dAtA[i] = 0x12 - } - if m.Id != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ClaimPeriodRewardDistribution) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClaimPeriodRewardDistribution) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClaimPeriodRewardDistribution) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ClaimPeriodEnded { - i-- - if m.ClaimPeriodEnded { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if m.TotalShares != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.TotalShares)) - i-- - dAtA[i] = 0x28 - } - { - size, err := m.RewardsPool.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintReward(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size, err := m.TotalRewardsPoolForClaimPeriod.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintReward(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if m.RewardProgramId != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.RewardProgramId)) - i-- - dAtA[i] = 0x10 - } - if m.ClaimPeriodId != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.ClaimPeriodId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RewardAccountState) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RewardAccountState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RewardAccountState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ClaimStatus != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.ClaimStatus)) - i-- - dAtA[i] = 0x30 - } - if m.SharesEarned != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.SharesEarned)) - i-- - dAtA[i] = 0x28 - } - if len(m.ActionCounter) > 0 { - for iNdEx := len(m.ActionCounter) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ActionCounter[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintReward(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintReward(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x1a - } - if m.ClaimPeriodId != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.ClaimPeriodId)) - i-- - dAtA[i] = 0x10 - } - if m.RewardProgramId != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.RewardProgramId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QualifyingAction) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QualifyingAction) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QualifyingAction) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Type != nil { - { - size := m.Type.Size() - i -= size - if _, err := m.Type.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *QualifyingAction_Delegate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QualifyingAction_Delegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Delegate != nil { - { - size, err := m.Delegate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintReward(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *QualifyingAction_Transfer) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QualifyingAction_Transfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Transfer != nil { - { - size, err := m.Transfer.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintReward(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *QualifyingAction_Vote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QualifyingAction_Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Vote != nil { - { - size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintReward(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *QualifyingActions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QualifyingActions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QualifyingActions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.QualifyingActions) > 0 { - for iNdEx := len(m.QualifyingActions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.QualifyingActions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintReward(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ActionDelegate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ActionDelegate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionDelegate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.MaximumActiveStakePercentile.Size() - i -= size - if _, err := m.MaximumActiveStakePercentile.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintReward(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - { - size := m.MinimumActiveStakePercentile.Size() - i -= size - if _, err := m.MinimumActiveStakePercentile.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintReward(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if m.MaximumDelegationAmount != nil { - { - size, err := m.MaximumDelegationAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintReward(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.MinimumDelegationAmount != nil { - { - size, err := m.MinimumDelegationAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintReward(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.MaximumActions != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.MaximumActions)) - i-- - dAtA[i] = 0x10 - } - if m.MinimumActions != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.MinimumActions)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ActionTransfer) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ActionTransfer) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.MinimumDelegationAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintReward(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if m.MaximumActions != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.MaximumActions)) - i-- - dAtA[i] = 0x10 - } - if m.MinimumActions != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.MinimumActions)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ActionVote) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ActionVote) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ValidatorMultiplier != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.ValidatorMultiplier)) - i-- - dAtA[i] = 0x20 - } - { - size, err := m.MinimumDelegationAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintReward(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if m.MaximumActions != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.MaximumActions)) - i-- - dAtA[i] = 0x10 - } - if m.MinimumActions != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.MinimumActions)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ActionCounter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ActionCounter) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ActionCounter) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NumberOfActions != 0 { - i = encodeVarintReward(dAtA, i, uint64(m.NumberOfActions)) - i-- - dAtA[i] = 0x10 - } - if len(m.ActionType) > 0 { - i -= len(m.ActionType) - copy(dAtA[i:], m.ActionType) - i = encodeVarintReward(dAtA, i, uint64(len(m.ActionType))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintReward(dAtA []byte, offset int, v uint64) int { - offset -= sovReward(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *RewardProgram) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovReward(uint64(m.Id)) - } - l = len(m.Title) - if l > 0 { - n += 1 + l + sovReward(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovReward(uint64(l)) - } - l = len(m.DistributeFromAddress) - if l > 0 { - n += 1 + l + sovReward(uint64(l)) - } - l = m.TotalRewardPool.Size() - n += 1 + l + sovReward(uint64(l)) - l = m.RemainingPoolBalance.Size() - n += 1 + l + sovReward(uint64(l)) - l = m.ClaimedAmount.Size() - n += 1 + l + sovReward(uint64(l)) - l = m.MaxRewardByAddress.Size() - n += 1 + l + sovReward(uint64(l)) - l = m.MinimumRolloverAmount.Size() - n += 1 + l + sovReward(uint64(l)) - if m.ClaimPeriodSeconds != 0 { - n += 1 + sovReward(uint64(m.ClaimPeriodSeconds)) - } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ProgramStartTime) - n += 1 + l + sovReward(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ExpectedProgramEndTime) - n += 1 + l + sovReward(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ProgramEndTimeMax) - n += 1 + l + sovReward(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ClaimPeriodEndTime) - n += 1 + l + sovReward(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ActualProgramEndTime) - n += 1 + l + sovReward(uint64(l)) - if m.ClaimPeriods != 0 { - n += 2 + sovReward(uint64(m.ClaimPeriods)) - } - if m.CurrentClaimPeriod != 0 { - n += 2 + sovReward(uint64(m.CurrentClaimPeriod)) - } - if m.MaxRolloverClaimPeriods != 0 { - n += 2 + sovReward(uint64(m.MaxRolloverClaimPeriods)) - } - if m.State != 0 { - n += 2 + sovReward(uint64(m.State)) - } - if m.ExpirationOffset != 0 { - n += 2 + sovReward(uint64(m.ExpirationOffset)) - } - if len(m.QualifyingActions) > 0 { - for _, e := range m.QualifyingActions { - l = e.Size() - n += 2 + l + sovReward(uint64(l)) - } - } - return n -} - -func (m *ClaimPeriodRewardDistribution) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ClaimPeriodId != 0 { - n += 1 + sovReward(uint64(m.ClaimPeriodId)) - } - if m.RewardProgramId != 0 { - n += 1 + sovReward(uint64(m.RewardProgramId)) - } - l = m.TotalRewardsPoolForClaimPeriod.Size() - n += 1 + l + sovReward(uint64(l)) - l = m.RewardsPool.Size() - n += 1 + l + sovReward(uint64(l)) - if m.TotalShares != 0 { - n += 1 + sovReward(uint64(m.TotalShares)) - } - if m.ClaimPeriodEnded { - n += 2 - } - return n -} - -func (m *RewardAccountState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RewardProgramId != 0 { - n += 1 + sovReward(uint64(m.RewardProgramId)) - } - if m.ClaimPeriodId != 0 { - n += 1 + sovReward(uint64(m.ClaimPeriodId)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovReward(uint64(l)) - } - if len(m.ActionCounter) > 0 { - for _, e := range m.ActionCounter { - l = e.Size() - n += 1 + l + sovReward(uint64(l)) - } - } - if m.SharesEarned != 0 { - n += 1 + sovReward(uint64(m.SharesEarned)) - } - if m.ClaimStatus != 0 { - n += 1 + sovReward(uint64(m.ClaimStatus)) - } - return n -} - -func (m *QualifyingAction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != nil { - n += m.Type.Size() - } - return n -} - -func (m *QualifyingAction_Delegate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Delegate != nil { - l = m.Delegate.Size() - n += 1 + l + sovReward(uint64(l)) - } - return n -} -func (m *QualifyingAction_Transfer) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Transfer != nil { - l = m.Transfer.Size() - n += 1 + l + sovReward(uint64(l)) - } - return n -} -func (m *QualifyingAction_Vote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Vote != nil { - l = m.Vote.Size() - n += 1 + l + sovReward(uint64(l)) - } - return n -} -func (m *QualifyingActions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.QualifyingActions) > 0 { - for _, e := range m.QualifyingActions { - l = e.Size() - n += 1 + l + sovReward(uint64(l)) - } - } - return n -} - -func (m *ActionDelegate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MinimumActions != 0 { - n += 1 + sovReward(uint64(m.MinimumActions)) - } - if m.MaximumActions != 0 { - n += 1 + sovReward(uint64(m.MaximumActions)) - } - if m.MinimumDelegationAmount != nil { - l = m.MinimumDelegationAmount.Size() - n += 1 + l + sovReward(uint64(l)) - } - if m.MaximumDelegationAmount != nil { - l = m.MaximumDelegationAmount.Size() - n += 1 + l + sovReward(uint64(l)) - } - l = m.MinimumActiveStakePercentile.Size() - n += 1 + l + sovReward(uint64(l)) - l = m.MaximumActiveStakePercentile.Size() - n += 1 + l + sovReward(uint64(l)) - return n -} - -func (m *ActionTransfer) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MinimumActions != 0 { - n += 1 + sovReward(uint64(m.MinimumActions)) - } - if m.MaximumActions != 0 { - n += 1 + sovReward(uint64(m.MaximumActions)) - } - l = m.MinimumDelegationAmount.Size() - n += 1 + l + sovReward(uint64(l)) - return n -} - -func (m *ActionVote) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MinimumActions != 0 { - n += 1 + sovReward(uint64(m.MinimumActions)) - } - if m.MaximumActions != 0 { - n += 1 + sovReward(uint64(m.MaximumActions)) - } - l = m.MinimumDelegationAmount.Size() - n += 1 + l + sovReward(uint64(l)) - if m.ValidatorMultiplier != 0 { - n += 1 + sovReward(uint64(m.ValidatorMultiplier)) - } - return n -} - -func (m *ActionCounter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ActionType) - if l > 0 { - n += 1 + l + sovReward(uint64(l)) - } - if m.NumberOfActions != 0 { - n += 1 + sovReward(uint64(m.NumberOfActions)) - } - return n -} - -func sovReward(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozReward(x uint64) (n int) { - return sovReward(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *RewardProgram) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RewardProgram: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RewardProgram: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Title = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DistributeFromAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DistributeFromAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalRewardPool", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TotalRewardPool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RemainingPoolBalance", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.RemainingPoolBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimedAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ClaimedAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxRewardByAddress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MaxRewardByAddress.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinimumRolloverAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MinimumRolloverAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimPeriodSeconds", wireType) - } - m.ClaimPeriodSeconds = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ClaimPeriodSeconds |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProgramStartTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.ProgramStartTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpectedProgramEndTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.ExpectedProgramEndTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProgramEndTimeMax", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.ProgramEndTimeMax, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimPeriodEndTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.ClaimPeriodEndTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActualProgramEndTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.ActualProgramEndTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimPeriods", wireType) - } - m.ClaimPeriods = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ClaimPeriods |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 17: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentClaimPeriod", wireType) - } - m.CurrentClaimPeriod = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CurrentClaimPeriod |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 18: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxRolloverClaimPeriods", wireType) - } - m.MaxRolloverClaimPeriods = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxRolloverClaimPeriods |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 19: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - m.State = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.State |= RewardProgram_State(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 20: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpirationOffset", wireType) - } - m.ExpirationOffset = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExpirationOffset |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 21: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QualifyingActions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.QualifyingActions = append(m.QualifyingActions, QualifyingAction{}) - if err := m.QualifyingActions[len(m.QualifyingActions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipReward(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthReward - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClaimPeriodRewardDistribution) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClaimPeriodRewardDistribution: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClaimPeriodRewardDistribution: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimPeriodId", wireType) - } - m.ClaimPeriodId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ClaimPeriodId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardProgramId", wireType) - } - m.RewardProgramId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RewardProgramId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalRewardsPoolForClaimPeriod", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TotalRewardsPoolForClaimPeriod.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardsPool", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.RewardsPool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalShares", wireType) - } - m.TotalShares = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalShares |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimPeriodEnded", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ClaimPeriodEnded = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipReward(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthReward - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RewardAccountState) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RewardAccountState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RewardAccountState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardProgramId", wireType) - } - m.RewardProgramId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RewardProgramId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimPeriodId", wireType) - } - m.ClaimPeriodId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ClaimPeriodId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionCounter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ActionCounter = append(m.ActionCounter, &ActionCounter{}) - if err := m.ActionCounter[len(m.ActionCounter)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SharesEarned", wireType) - } - m.SharesEarned = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SharesEarned |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimStatus", wireType) - } - m.ClaimStatus = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ClaimStatus |= RewardAccountState_ClaimStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipReward(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthReward - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QualifyingAction) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QualifyingAction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QualifyingAction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delegate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ActionDelegate{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Type = &QualifyingAction_Delegate{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Transfer", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ActionTransfer{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Type = &QualifyingAction_Transfer{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ActionVote{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Type = &QualifyingAction_Vote{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipReward(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthReward - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QualifyingActions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QualifyingActions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QualifyingActions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QualifyingActions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.QualifyingActions = append(m.QualifyingActions, QualifyingAction{}) - if err := m.QualifyingActions[len(m.QualifyingActions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipReward(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthReward - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ActionDelegate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ActionDelegate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActionDelegate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinimumActions", wireType) - } - m.MinimumActions = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MinimumActions |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaximumActions", wireType) - } - m.MaximumActions = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaximumActions |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinimumDelegationAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MinimumDelegationAmount == nil { - m.MinimumDelegationAmount = &types.Coin{} - } - if err := m.MinimumDelegationAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaximumDelegationAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaximumDelegationAmount == nil { - m.MaximumDelegationAmount = &types.Coin{} - } - if err := m.MaximumDelegationAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinimumActiveStakePercentile", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MinimumActiveStakePercentile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaximumActiveStakePercentile", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MaximumActiveStakePercentile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipReward(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthReward - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ActionTransfer) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ActionTransfer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActionTransfer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinimumActions", wireType) - } - m.MinimumActions = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MinimumActions |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaximumActions", wireType) - } - m.MaximumActions = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaximumActions |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinimumDelegationAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MinimumDelegationAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipReward(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthReward - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ActionVote) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ActionVote: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActionVote: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinimumActions", wireType) - } - m.MinimumActions = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MinimumActions |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaximumActions", wireType) - } - m.MaximumActions = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaximumActions |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinimumDelegationAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MinimumDelegationAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorMultiplier", wireType) - } - m.ValidatorMultiplier = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ValidatorMultiplier |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipReward(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthReward - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ActionCounter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ActionCounter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ActionCounter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthReward - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthReward - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ActionType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NumberOfActions", wireType) - } - m.NumberOfActions = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowReward - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NumberOfActions |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipReward(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthReward - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipReward(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowReward - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowReward - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowReward - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthReward - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupReward - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthReward - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthReward = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowReward = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupReward = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/reward/types/tx.pb.go b/x/reward/types/tx.pb.go deleted file mode 100644 index 0e4287a7c7..0000000000 --- a/x/reward/types/tx.pb.go +++ /dev/null @@ -1,3068 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: provenance/reward/v1/tx.proto - -package types - -import ( - context "context" - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/cosmos-sdk/types/msgservice" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// MsgCreateRewardProgramRequest is the request type for creating a reward program RPC -type MsgCreateRewardProgramRequest struct { - // title for the reward program. - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - // description for the reward program. - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // provider address for the reward program funds and signer of message. - DistributeFromAddress string `protobuf:"bytes,3,opt,name=distribute_from_address,json=distributeFromAddress,proto3" json:"distribute_from_address,omitempty"` - // total reward pool for the reward program. - TotalRewardPool types.Coin `protobuf:"bytes,4,opt,name=total_reward_pool,json=totalRewardPool,proto3" json:"total_reward_pool"` - // maximum amount of funds an address can be rewarded per claim period. - MaxRewardPerClaimAddress types.Coin `protobuf:"bytes,5,opt,name=max_reward_per_claim_address,json=maxRewardPerClaimAddress,proto3" json:"max_reward_per_claim_address"` - // start time of the reward program. - ProgramStartTime time.Time `protobuf:"bytes,6,opt,name=program_start_time,json=programStartTime,proto3,stdtime" json:"program_start_time,omitempty" yaml:"program_start_time,omitempty"` - // number of claim periods the reward program runs for. - ClaimPeriods uint64 `protobuf:"varint,7,opt,name=claim_periods,json=claimPeriods,proto3" json:"claim_periods,omitempty"` - // number of days a claim period will exist. - ClaimPeriodDays uint64 `protobuf:"varint,8,opt,name=claim_period_days,json=claimPeriodDays,proto3" json:"claim_period_days,omitempty"` - // maximum number of claim periods a reward program can rollover. - MaxRolloverClaimPeriods uint64 `protobuf:"varint,9,opt,name=max_rollover_claim_periods,json=maxRolloverClaimPeriods,proto3" json:"max_rollover_claim_periods,omitempty"` - // number of days before a reward program will expire after it has ended. - ExpireDays uint64 `protobuf:"varint,10,opt,name=expire_days,json=expireDays,proto3" json:"expire_days,omitempty"` - // actions that count towards the reward. - QualifyingActions []QualifyingAction `protobuf:"bytes,11,rep,name=qualifying_actions,json=qualifyingActions,proto3" json:"qualifying_actions"` -} - -func (m *MsgCreateRewardProgramRequest) Reset() { *m = MsgCreateRewardProgramRequest{} } -func (m *MsgCreateRewardProgramRequest) String() string { return proto.CompactTextString(m) } -func (*MsgCreateRewardProgramRequest) ProtoMessage() {} -func (*MsgCreateRewardProgramRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6a1c90eb8246d229, []int{0} -} -func (m *MsgCreateRewardProgramRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateRewardProgramRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateRewardProgramRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCreateRewardProgramRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateRewardProgramRequest.Merge(m, src) -} -func (m *MsgCreateRewardProgramRequest) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateRewardProgramRequest) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateRewardProgramRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateRewardProgramRequest proto.InternalMessageInfo - -func (m *MsgCreateRewardProgramRequest) GetTitle() string { - if m != nil { - return m.Title - } - return "" -} - -func (m *MsgCreateRewardProgramRequest) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *MsgCreateRewardProgramRequest) GetDistributeFromAddress() string { - if m != nil { - return m.DistributeFromAddress - } - return "" -} - -func (m *MsgCreateRewardProgramRequest) GetTotalRewardPool() types.Coin { - if m != nil { - return m.TotalRewardPool - } - return types.Coin{} -} - -func (m *MsgCreateRewardProgramRequest) GetMaxRewardPerClaimAddress() types.Coin { - if m != nil { - return m.MaxRewardPerClaimAddress - } - return types.Coin{} -} - -func (m *MsgCreateRewardProgramRequest) GetProgramStartTime() time.Time { - if m != nil { - return m.ProgramStartTime - } - return time.Time{} -} - -func (m *MsgCreateRewardProgramRequest) GetClaimPeriods() uint64 { - if m != nil { - return m.ClaimPeriods - } - return 0 -} - -func (m *MsgCreateRewardProgramRequest) GetClaimPeriodDays() uint64 { - if m != nil { - return m.ClaimPeriodDays - } - return 0 -} - -func (m *MsgCreateRewardProgramRequest) GetMaxRolloverClaimPeriods() uint64 { - if m != nil { - return m.MaxRolloverClaimPeriods - } - return 0 -} - -func (m *MsgCreateRewardProgramRequest) GetExpireDays() uint64 { - if m != nil { - return m.ExpireDays - } - return 0 -} - -func (m *MsgCreateRewardProgramRequest) GetQualifyingActions() []QualifyingAction { - if m != nil { - return m.QualifyingActions - } - return nil -} - -// MsgCreateRewardProgramResponse is the response type for creating a reward program RPC -type MsgCreateRewardProgramResponse struct { - // reward program id that is generated on creation. - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *MsgCreateRewardProgramResponse) Reset() { *m = MsgCreateRewardProgramResponse{} } -func (m *MsgCreateRewardProgramResponse) String() string { return proto.CompactTextString(m) } -func (*MsgCreateRewardProgramResponse) ProtoMessage() {} -func (*MsgCreateRewardProgramResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6a1c90eb8246d229, []int{1} -} -func (m *MsgCreateRewardProgramResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateRewardProgramResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateRewardProgramResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCreateRewardProgramResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateRewardProgramResponse.Merge(m, src) -} -func (m *MsgCreateRewardProgramResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateRewardProgramResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateRewardProgramResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateRewardProgramResponse proto.InternalMessageInfo - -func (m *MsgCreateRewardProgramResponse) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - -// MsgEndRewardProgramRequest is the request type for ending a reward program RPC -type MsgEndRewardProgramRequest struct { - // reward program id to end. - RewardProgramId uint64 `protobuf:"varint,1,opt,name=reward_program_id,json=rewardProgramId,proto3" json:"reward_program_id,omitempty"` - // owner of the reward program that funds were distributed from. - ProgramOwnerAddress string `protobuf:"bytes,2,opt,name=program_owner_address,json=programOwnerAddress,proto3" json:"program_owner_address,omitempty"` -} - -func (m *MsgEndRewardProgramRequest) Reset() { *m = MsgEndRewardProgramRequest{} } -func (m *MsgEndRewardProgramRequest) String() string { return proto.CompactTextString(m) } -func (*MsgEndRewardProgramRequest) ProtoMessage() {} -func (*MsgEndRewardProgramRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6a1c90eb8246d229, []int{2} -} -func (m *MsgEndRewardProgramRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgEndRewardProgramRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgEndRewardProgramRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgEndRewardProgramRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgEndRewardProgramRequest.Merge(m, src) -} -func (m *MsgEndRewardProgramRequest) XXX_Size() int { - return m.Size() -} -func (m *MsgEndRewardProgramRequest) XXX_DiscardUnknown() { - xxx_messageInfo_MsgEndRewardProgramRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgEndRewardProgramRequest proto.InternalMessageInfo - -func (m *MsgEndRewardProgramRequest) GetRewardProgramId() uint64 { - if m != nil { - return m.RewardProgramId - } - return 0 -} - -func (m *MsgEndRewardProgramRequest) GetProgramOwnerAddress() string { - if m != nil { - return m.ProgramOwnerAddress - } - return "" -} - -// MsgEndRewardProgramResponse is the response type for ending a reward program RPC -type MsgEndRewardProgramResponse struct { -} - -func (m *MsgEndRewardProgramResponse) Reset() { *m = MsgEndRewardProgramResponse{} } -func (m *MsgEndRewardProgramResponse) String() string { return proto.CompactTextString(m) } -func (*MsgEndRewardProgramResponse) ProtoMessage() {} -func (*MsgEndRewardProgramResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6a1c90eb8246d229, []int{3} -} -func (m *MsgEndRewardProgramResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgEndRewardProgramResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgEndRewardProgramResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgEndRewardProgramResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgEndRewardProgramResponse.Merge(m, src) -} -func (m *MsgEndRewardProgramResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgEndRewardProgramResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgEndRewardProgramResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgEndRewardProgramResponse proto.InternalMessageInfo - -// MsgClaimRewardsRequest is the request type for claiming reward from reward program RPC -type MsgClaimRewardsRequest struct { - // reward program id to claim rewards. - RewardProgramId uint64 `protobuf:"varint,1,opt,name=reward_program_id,json=rewardProgramId,proto3" json:"reward_program_id,omitempty"` - // reward address and signer of msg to send claimed rewards to. - RewardAddress string `protobuf:"bytes,2,opt,name=reward_address,json=rewardAddress,proto3" json:"reward_address,omitempty"` -} - -func (m *MsgClaimRewardsRequest) Reset() { *m = MsgClaimRewardsRequest{} } -func (m *MsgClaimRewardsRequest) String() string { return proto.CompactTextString(m) } -func (*MsgClaimRewardsRequest) ProtoMessage() {} -func (*MsgClaimRewardsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6a1c90eb8246d229, []int{4} -} -func (m *MsgClaimRewardsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgClaimRewardsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgClaimRewardsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgClaimRewardsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgClaimRewardsRequest.Merge(m, src) -} -func (m *MsgClaimRewardsRequest) XXX_Size() int { - return m.Size() -} -func (m *MsgClaimRewardsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_MsgClaimRewardsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgClaimRewardsRequest proto.InternalMessageInfo - -func (m *MsgClaimRewardsRequest) GetRewardProgramId() uint64 { - if m != nil { - return m.RewardProgramId - } - return 0 -} - -func (m *MsgClaimRewardsRequest) GetRewardAddress() string { - if m != nil { - return m.RewardAddress - } - return "" -} - -// MsgClaimRewardsResponse is the response type for claiming reward from reward program RPC -type MsgClaimRewardsResponse struct { - // details about acquired rewards from reward program. - ClaimDetails RewardProgramClaimDetail `protobuf:"bytes,1,opt,name=claim_details,json=claimDetails,proto3" json:"claim_details"` -} - -func (m *MsgClaimRewardsResponse) Reset() { *m = MsgClaimRewardsResponse{} } -func (m *MsgClaimRewardsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgClaimRewardsResponse) ProtoMessage() {} -func (*MsgClaimRewardsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6a1c90eb8246d229, []int{5} -} -func (m *MsgClaimRewardsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgClaimRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgClaimRewardsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgClaimRewardsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgClaimRewardsResponse.Merge(m, src) -} -func (m *MsgClaimRewardsResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgClaimRewardsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgClaimRewardsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgClaimRewardsResponse proto.InternalMessageInfo - -func (m *MsgClaimRewardsResponse) GetClaimDetails() RewardProgramClaimDetail { - if m != nil { - return m.ClaimDetails - } - return RewardProgramClaimDetail{} -} - -// MsgClaimRewardsResponse is the request type for claiming rewards from all reward programs RPC -type MsgClaimAllRewardsRequest struct { - // reward address and signer of msg to send claimed rewards to. - RewardAddress string `protobuf:"bytes,1,opt,name=reward_address,json=rewardAddress,proto3" json:"reward_address,omitempty"` -} - -func (m *MsgClaimAllRewardsRequest) Reset() { *m = MsgClaimAllRewardsRequest{} } -func (m *MsgClaimAllRewardsRequest) String() string { return proto.CompactTextString(m) } -func (*MsgClaimAllRewardsRequest) ProtoMessage() {} -func (*MsgClaimAllRewardsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6a1c90eb8246d229, []int{6} -} -func (m *MsgClaimAllRewardsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgClaimAllRewardsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgClaimAllRewardsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgClaimAllRewardsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgClaimAllRewardsRequest.Merge(m, src) -} -func (m *MsgClaimAllRewardsRequest) XXX_Size() int { - return m.Size() -} -func (m *MsgClaimAllRewardsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_MsgClaimAllRewardsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgClaimAllRewardsRequest proto.InternalMessageInfo - -func (m *MsgClaimAllRewardsRequest) GetRewardAddress() string { - if m != nil { - return m.RewardAddress - } - return "" -} - -// MsgClaimRewardsResponse is the response type for claiming rewards from all reward programs RPC -type MsgClaimAllRewardsResponse struct { - // total rewards claimed for all eligible claim periods in all programs. - TotalRewardClaim []types.Coin `protobuf:"bytes,1,rep,name=total_reward_claim,json=totalRewardClaim,proto3" json:"total_reward_claim"` - // details about acquired rewards from a reward program. - ClaimDetails []*RewardProgramClaimDetail `protobuf:"bytes,2,rep,name=claim_details,json=claimDetails,proto3" json:"claim_details,omitempty"` -} - -func (m *MsgClaimAllRewardsResponse) Reset() { *m = MsgClaimAllRewardsResponse{} } -func (m *MsgClaimAllRewardsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgClaimAllRewardsResponse) ProtoMessage() {} -func (*MsgClaimAllRewardsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6a1c90eb8246d229, []int{7} -} -func (m *MsgClaimAllRewardsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgClaimAllRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgClaimAllRewardsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgClaimAllRewardsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgClaimAllRewardsResponse.Merge(m, src) -} -func (m *MsgClaimAllRewardsResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgClaimAllRewardsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgClaimAllRewardsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgClaimAllRewardsResponse proto.InternalMessageInfo - -func (m *MsgClaimAllRewardsResponse) GetTotalRewardClaim() []types.Coin { - if m != nil { - return m.TotalRewardClaim - } - return nil -} - -func (m *MsgClaimAllRewardsResponse) GetClaimDetails() []*RewardProgramClaimDetail { - if m != nil { - return m.ClaimDetails - } - return nil -} - -// ClaimedRewardPeriodDetail is information regarding an addresses' shares and reward for a claim period. -type ClaimedRewardPeriodDetail struct { - // claim period id - ClaimPeriodId uint64 `protobuf:"varint,1,opt,name=claim_period_id,json=claimPeriodId,proto3" json:"claim_period_id,omitempty"` - // total shares accumulated for claim period - TotalShares uint64 `protobuf:"varint,2,opt,name=total_shares,json=totalShares,proto3" json:"total_shares,omitempty"` - // total rewards for claim period - ClaimPeriodReward types.Coin `protobuf:"bytes,3,opt,name=claim_period_reward,json=claimPeriodReward,proto3" json:"claim_period_reward"` -} - -func (m *ClaimedRewardPeriodDetail) Reset() { *m = ClaimedRewardPeriodDetail{} } -func (m *ClaimedRewardPeriodDetail) String() string { return proto.CompactTextString(m) } -func (*ClaimedRewardPeriodDetail) ProtoMessage() {} -func (*ClaimedRewardPeriodDetail) Descriptor() ([]byte, []int) { - return fileDescriptor_6a1c90eb8246d229, []int{8} -} -func (m *ClaimedRewardPeriodDetail) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClaimedRewardPeriodDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ClaimedRewardPeriodDetail.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ClaimedRewardPeriodDetail) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClaimedRewardPeriodDetail.Merge(m, src) -} -func (m *ClaimedRewardPeriodDetail) XXX_Size() int { - return m.Size() -} -func (m *ClaimedRewardPeriodDetail) XXX_DiscardUnknown() { - xxx_messageInfo_ClaimedRewardPeriodDetail.DiscardUnknown(m) -} - -var xxx_messageInfo_ClaimedRewardPeriodDetail proto.InternalMessageInfo - -func (m *ClaimedRewardPeriodDetail) GetClaimPeriodId() uint64 { - if m != nil { - return m.ClaimPeriodId - } - return 0 -} - -func (m *ClaimedRewardPeriodDetail) GetTotalShares() uint64 { - if m != nil { - return m.TotalShares - } - return 0 -} - -func (m *ClaimedRewardPeriodDetail) GetClaimPeriodReward() types.Coin { - if m != nil { - return m.ClaimPeriodReward - } - return types.Coin{} -} - -// RewardProgramClaimDetail is the response object regarding an address's shares and reward for a reward program. -type RewardProgramClaimDetail struct { - // reward program id. - RewardProgramId uint64 `protobuf:"varint,1,opt,name=reward_program_id,json=rewardProgramId,proto3" json:"reward_program_id,omitempty"` - // total rewards claimed for all eligible claim periods in program. - TotalRewardClaim types.Coin `protobuf:"bytes,2,opt,name=total_reward_claim,json=totalRewardClaim,proto3" json:"total_reward_claim"` - // claim period details. - ClaimedRewardPeriodDetails []*ClaimedRewardPeriodDetail `protobuf:"bytes,3,rep,name=claimed_reward_period_details,json=claimedRewardPeriodDetails,proto3" json:"claimed_reward_period_details,omitempty"` -} - -func (m *RewardProgramClaimDetail) Reset() { *m = RewardProgramClaimDetail{} } -func (m *RewardProgramClaimDetail) String() string { return proto.CompactTextString(m) } -func (*RewardProgramClaimDetail) ProtoMessage() {} -func (*RewardProgramClaimDetail) Descriptor() ([]byte, []int) { - return fileDescriptor_6a1c90eb8246d229, []int{9} -} -func (m *RewardProgramClaimDetail) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RewardProgramClaimDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RewardProgramClaimDetail.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RewardProgramClaimDetail) XXX_Merge(src proto.Message) { - xxx_messageInfo_RewardProgramClaimDetail.Merge(m, src) -} -func (m *RewardProgramClaimDetail) XXX_Size() int { - return m.Size() -} -func (m *RewardProgramClaimDetail) XXX_DiscardUnknown() { - xxx_messageInfo_RewardProgramClaimDetail.DiscardUnknown(m) -} - -var xxx_messageInfo_RewardProgramClaimDetail proto.InternalMessageInfo - -func (m *RewardProgramClaimDetail) GetRewardProgramId() uint64 { - if m != nil { - return m.RewardProgramId - } - return 0 -} - -func (m *RewardProgramClaimDetail) GetTotalRewardClaim() types.Coin { - if m != nil { - return m.TotalRewardClaim - } - return types.Coin{} -} - -func (m *RewardProgramClaimDetail) GetClaimedRewardPeriodDetails() []*ClaimedRewardPeriodDetail { - if m != nil { - return m.ClaimedRewardPeriodDetails - } - return nil -} - -func init() { - proto.RegisterType((*MsgCreateRewardProgramRequest)(nil), "provenance.reward.v1.MsgCreateRewardProgramRequest") - proto.RegisterType((*MsgCreateRewardProgramResponse)(nil), "provenance.reward.v1.MsgCreateRewardProgramResponse") - proto.RegisterType((*MsgEndRewardProgramRequest)(nil), "provenance.reward.v1.MsgEndRewardProgramRequest") - proto.RegisterType((*MsgEndRewardProgramResponse)(nil), "provenance.reward.v1.MsgEndRewardProgramResponse") - proto.RegisterType((*MsgClaimRewardsRequest)(nil), "provenance.reward.v1.MsgClaimRewardsRequest") - proto.RegisterType((*MsgClaimRewardsResponse)(nil), "provenance.reward.v1.MsgClaimRewardsResponse") - proto.RegisterType((*MsgClaimAllRewardsRequest)(nil), "provenance.reward.v1.MsgClaimAllRewardsRequest") - proto.RegisterType((*MsgClaimAllRewardsResponse)(nil), "provenance.reward.v1.MsgClaimAllRewardsResponse") - proto.RegisterType((*ClaimedRewardPeriodDetail)(nil), "provenance.reward.v1.ClaimedRewardPeriodDetail") - proto.RegisterType((*RewardProgramClaimDetail)(nil), "provenance.reward.v1.RewardProgramClaimDetail") -} - -func init() { proto.RegisterFile("provenance/reward/v1/tx.proto", fileDescriptor_6a1c90eb8246d229) } - -var fileDescriptor_6a1c90eb8246d229 = []byte{ - // 1026 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0x3a, 0x6e, 0xa0, 0xe3, 0xa4, 0x49, 0x26, 0x29, 0xd9, 0x2c, 0x8d, 0x9d, 0x6e, 0xa1, - 0x8a, 0xa2, 0x76, 0x37, 0x76, 0x11, 0x87, 0x70, 0x4a, 0x52, 0x90, 0x2a, 0x14, 0x25, 0x38, 0x48, - 0x08, 0x38, 0xac, 0xc6, 0xde, 0xc9, 0x76, 0xc4, 0xae, 0x67, 0x33, 0x33, 0x76, 0x6c, 0x4e, 0x15, - 0x57, 0x0e, 0xf4, 0x08, 0xb7, 0x7c, 0x04, 0xbe, 0x00, 0x57, 0xd4, 0x63, 0x8f, 0x9c, 0x02, 0x4a, - 0x90, 0x40, 0x1c, 0xf9, 0x04, 0x68, 0x67, 0x66, 0x9d, 0xb5, 0xbd, 0x0e, 0x4e, 0x6f, 0xf1, 0x7b, - 0xbf, 0xf7, 0x7b, 0x7f, 0xe7, 0x97, 0x05, 0x6b, 0x31, 0xa3, 0x1d, 0xdc, 0x42, 0xad, 0x26, 0x76, - 0x19, 0x3e, 0x45, 0xcc, 0x77, 0x3b, 0x55, 0x57, 0x74, 0x9d, 0x98, 0x51, 0x41, 0xe1, 0xf2, 0x95, - 0xdb, 0x51, 0x6e, 0xa7, 0x53, 0xb5, 0x96, 0x03, 0x1a, 0x50, 0x09, 0x70, 0x93, 0xbf, 0x14, 0xd6, - 0xaa, 0x04, 0x94, 0x06, 0x21, 0x76, 0xe5, 0xaf, 0x46, 0xfb, 0xd8, 0x15, 0x24, 0xc2, 0x5c, 0xa0, - 0x28, 0xd6, 0x80, 0x72, 0x93, 0xf2, 0x88, 0x72, 0xb7, 0x81, 0x38, 0x76, 0x3b, 0xd5, 0x06, 0x16, - 0xa8, 0xea, 0x36, 0x29, 0x69, 0x69, 0xff, 0xfd, 0xdc, 0x5a, 0x74, 0x5a, 0x05, 0x59, 0xd1, 0x14, - 0x11, 0x0f, 0x12, 0x5f, 0xc4, 0x03, 0xe5, 0xb0, 0xbf, 0x9f, 0x01, 0x6b, 0xfb, 0x3c, 0xd8, 0x63, - 0x18, 0x09, 0x5c, 0x97, 0x21, 0x87, 0x8c, 0x06, 0x0c, 0x45, 0x75, 0x7c, 0xd2, 0xc6, 0x5c, 0xc0, - 0x65, 0x70, 0x4b, 0x10, 0x11, 0x62, 0xd3, 0x58, 0x37, 0x36, 0x6e, 0xd7, 0xd5, 0x0f, 0xb8, 0x0e, - 0x4a, 0x3e, 0xe6, 0x4d, 0x46, 0x62, 0x41, 0x68, 0xcb, 0x2c, 0x48, 0x5f, 0xd6, 0x04, 0x3f, 0x04, - 0x2b, 0x3e, 0xe1, 0x82, 0x91, 0x46, 0x5b, 0x60, 0xef, 0x98, 0xd1, 0xc8, 0x43, 0xbe, 0xcf, 0x30, - 0xe7, 0xe6, 0xb4, 0x44, 0xdf, 0xbd, 0x72, 0x7f, 0xc2, 0x68, 0xb4, 0xa3, 0x9c, 0xf0, 0x53, 0xb0, - 0x28, 0xa8, 0x40, 0xa1, 0xa7, 0x1a, 0xf0, 0x62, 0x4a, 0x43, 0xb3, 0xb8, 0x6e, 0x6c, 0x94, 0x6a, - 0xab, 0x8e, 0x6a, 0xc3, 0x49, 0x26, 0xe1, 0xe8, 0x49, 0x38, 0x7b, 0x94, 0xb4, 0x76, 0x8b, 0xaf, - 0xce, 0x2b, 0x53, 0xf5, 0x79, 0x19, 0xa9, 0xdb, 0xa0, 0x34, 0x84, 0x1e, 0xb8, 0x17, 0xa1, 0x6e, - 0x9f, 0x0a, 0x33, 0xaf, 0x19, 0x22, 0x72, 0x55, 0xc9, 0xad, 0xc9, 0x78, 0xcd, 0x08, 0x75, 0x35, - 0x2b, 0x66, 0x7b, 0x09, 0x43, 0x5a, 0xed, 0x4f, 0x06, 0x80, 0xb1, 0x1a, 0x98, 0xc7, 0x05, 0x62, - 0xc2, 0x4b, 0xb6, 0x67, 0xce, 0x48, 0x5e, 0xcb, 0x51, 0xab, 0x75, 0xd2, 0xd5, 0x3a, 0x9f, 0xa7, - 0xab, 0xdd, 0x3d, 0x48, 0x88, 0xff, 0x39, 0xaf, 0xdc, 0x1b, 0x8d, 0x7e, 0x44, 0x23, 0x22, 0x70, - 0x14, 0x8b, 0xde, 0xbf, 0xe7, 0x95, 0x07, 0x3d, 0x14, 0x85, 0xdb, 0xf6, 0x75, 0x28, 0xfb, 0xe5, - 0xef, 0x15, 0xa3, 0xbe, 0xa0, 0x21, 0x47, 0x09, 0x22, 0xc9, 0x03, 0x1f, 0x80, 0x39, 0xd5, 0x6d, - 0x8c, 0x19, 0xa1, 0x3e, 0x37, 0xdf, 0x5a, 0x37, 0x36, 0x8a, 0xf5, 0x59, 0x69, 0x3c, 0x54, 0x36, - 0xb8, 0x09, 0x16, 0xb3, 0x20, 0xcf, 0x47, 0x3d, 0x6e, 0xbe, 0x2d, 0x81, 0xf3, 0x19, 0xe0, 0x53, - 0xd4, 0xe3, 0xf0, 0x23, 0x60, 0xc9, 0x69, 0xd2, 0x30, 0xa4, 0x9d, 0xfe, 0x2c, 0x53, 0xf6, 0xdb, - 0x32, 0x68, 0x25, 0x19, 0x95, 0x06, 0xec, 0x65, 0x13, 0x55, 0x40, 0x09, 0x77, 0x63, 0xc2, 0xb0, - 0x4a, 0x01, 0x24, 0x1a, 0x28, 0x93, 0x64, 0xff, 0x1a, 0xc0, 0x93, 0x36, 0x0a, 0xc9, 0x71, 0x8f, - 0xb4, 0x02, 0x0f, 0x35, 0x93, 0x2b, 0xe2, 0x66, 0x69, 0x7d, 0x7a, 0xa3, 0x54, 0x7b, 0xe8, 0xe4, - 0x3d, 0x28, 0xe7, 0xb3, 0x3e, 0x7e, 0x47, 0xc2, 0xf5, 0xba, 0x16, 0x4f, 0x86, 0xec, 0x7c, 0xfb, - 0xbd, 0x1f, 0xcf, 0x2a, 0xc6, 0xdf, 0x67, 0x15, 0xe3, 0xbb, 0xbf, 0x7e, 0xde, 0x1c, 0x77, 0x98, - 0xf6, 0x16, 0x28, 0x8f, 0x7b, 0x0c, 0x3c, 0xa6, 0x2d, 0x8e, 0xe1, 0x1d, 0x50, 0x20, 0xbe, 0x7c, - 0x0a, 0xc5, 0x7a, 0x81, 0xf8, 0xf6, 0x99, 0x01, 0xac, 0x7d, 0x1e, 0x7c, 0xdc, 0xf2, 0x73, 0x1f, - 0xcf, 0x26, 0x58, 0x4c, 0x6f, 0x4f, 0x2f, 0xb0, 0x1f, 0x3d, 0xcf, 0xb2, 0x01, 0xcf, 0x7c, 0x58, - 0x03, 0x77, 0x53, 0x10, 0x3d, 0x6d, 0x61, 0xd6, 0x3f, 0x52, 0xf5, 0xb8, 0x96, 0xb4, 0xf3, 0x20, - 0xf1, 0xe9, 0xf3, 0xdb, 0xb6, 0xb3, 0x6d, 0xe5, 0x87, 0xdb, 0x6b, 0xe0, 0xdd, 0xdc, 0x0a, 0x55, - 0x47, 0xf6, 0x0b, 0x03, 0xbc, 0x93, 0x34, 0x9d, 0xec, 0x4a, 0x21, 0xf8, 0x9b, 0x54, 0xff, 0x3e, - 0xb8, 0xa3, 0xb1, 0x83, 0x65, 0xcf, 0x29, 0x6b, 0x5a, 0xf0, 0x52, 0x52, 0xe8, 0x10, 0xd2, 0xfe, - 0x16, 0xac, 0x8c, 0x54, 0xa0, 0xe7, 0xfd, 0x65, 0x7a, 0xc3, 0x3e, 0x16, 0x88, 0x84, 0x5c, 0xa6, - 0x2f, 0xd5, 0x9c, 0xfc, 0x7b, 0x18, 0xe8, 0x50, 0xf2, 0x3d, 0x95, 0x61, 0xfa, 0x2e, 0xd4, 0xe5, - 0x2b, 0x13, 0xdf, 0x2e, 0x26, 0x73, 0xb3, 0xbf, 0x00, 0xab, 0x69, 0xee, 0x9d, 0x30, 0x1c, 0x1a, - 0xc0, 0x68, 0x53, 0xc6, 0xc4, 0x4d, 0xfd, 0xaa, 0x2e, 0x63, 0x84, 0x59, 0x37, 0xb6, 0x0f, 0xe0, - 0x80, 0xcc, 0xc9, 0xd2, 0x4c, 0x43, 0x5e, 0xfb, 0xff, 0xea, 0xd1, 0x42, 0x46, 0xe7, 0x64, 0x02, - 0x78, 0x34, 0x3c, 0xa7, 0x82, 0x64, 0xba, 0xe1, 0x9c, 0x72, 0x27, 0xf4, 0x8b, 0x01, 0x56, 0x25, - 0x06, 0xfb, 0x7d, 0x0d, 0x4c, 0x14, 0x41, 0x82, 0xe0, 0x43, 0x30, 0x3f, 0xa0, 0x1f, 0xfd, 0x0b, - 0x99, 0xcb, 0xa8, 0xc7, 0x33, 0x1f, 0xde, 0x07, 0xb3, 0xaa, 0x5f, 0xfe, 0x1c, 0x31, 0xac, 0xae, - 0xa3, 0x58, 0x2f, 0x49, 0xdb, 0x91, 0x34, 0xc1, 0x03, 0xb0, 0x34, 0x40, 0xa5, 0xea, 0x95, 0xff, - 0x2d, 0x26, 0x98, 0xc9, 0x62, 0x26, 0x9f, 0xaa, 0x53, 0xd7, 0xff, 0x43, 0x01, 0x98, 0xe3, 0x1a, - 0xbe, 0xd1, 0x89, 0xe7, 0xaf, 0xac, 0x30, 0x59, 0x79, 0xa3, 0x2b, 0x63, 0x60, 0xad, 0xa9, 0xc6, - 0x9a, 0xf9, 0xff, 0x24, 0x25, 0x58, 0xaf, 0x70, 0x5a, 0xae, 0xd0, 0xcd, 0x5f, 0xe1, 0xd8, 0x8d, - 0xd4, 0xad, 0xe6, 0x38, 0x97, 0xde, 0x68, 0xed, 0xcf, 0x69, 0x30, 0xbd, 0xcf, 0x03, 0xf8, 0xc2, - 0x00, 0x4b, 0x39, 0x62, 0x07, 0x9f, 0xe4, 0xa7, 0xbc, 0xf6, 0x3b, 0xc1, 0xfa, 0xe0, 0x66, 0x41, - 0xfa, 0x19, 0x9c, 0x82, 0x85, 0x61, 0x65, 0x82, 0x5b, 0x63, 0x99, 0xc6, 0xc8, 0xac, 0x55, 0xbd, - 0x41, 0x84, 0x4e, 0xfc, 0x0d, 0x98, 0xcd, 0x0a, 0x0e, 0x7c, 0x34, 0xbe, 0xfc, 0x51, 0x65, 0xb4, - 0x1e, 0x4f, 0x88, 0xd6, 0xc9, 0x04, 0x98, 0x1f, 0xd2, 0x01, 0xe8, 0x5e, 0xcf, 0x30, 0xa2, 0x45, - 0xd6, 0xd6, 0xe4, 0x01, 0x2a, 0xeb, 0x6e, 0xf0, 0xea, 0xa2, 0x6c, 0xbc, 0xbe, 0x28, 0x1b, 0x7f, - 0x5c, 0x94, 0x8d, 0x97, 0x97, 0xe5, 0xa9, 0xd7, 0x97, 0xe5, 0xa9, 0xdf, 0x2e, 0xcb, 0x53, 0x60, - 0x85, 0xd0, 0x5c, 0xb6, 0x43, 0xe3, 0xab, 0x5a, 0x40, 0xc4, 0xf3, 0x76, 0xc3, 0x69, 0xd2, 0xc8, - 0xbd, 0x82, 0x3c, 0x26, 0x34, 0xf3, 0xcb, 0xed, 0xa6, 0xdf, 0x99, 0xa2, 0x17, 0x63, 0xde, 0x98, - 0x91, 0xdf, 0x37, 0x4f, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x37, 0xfb, 0xc1, 0xcf, 0x15, 0x0b, - 0x00, 0x00, -} - -func (this *MsgCreateRewardProgramRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgCreateRewardProgramRequest) - if !ok { - that2, ok := that.(MsgCreateRewardProgramRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Title != that1.Title { - return false - } - if this.Description != that1.Description { - return false - } - if this.DistributeFromAddress != that1.DistributeFromAddress { - return false - } - if !this.TotalRewardPool.Equal(&that1.TotalRewardPool) { - return false - } - if !this.MaxRewardPerClaimAddress.Equal(&that1.MaxRewardPerClaimAddress) { - return false - } - if !this.ProgramStartTime.Equal(that1.ProgramStartTime) { - return false - } - if this.ClaimPeriods != that1.ClaimPeriods { - return false - } - if this.ClaimPeriodDays != that1.ClaimPeriodDays { - return false - } - if this.MaxRolloverClaimPeriods != that1.MaxRolloverClaimPeriods { - return false - } - if this.ExpireDays != that1.ExpireDays { - return false - } - if len(this.QualifyingActions) != len(that1.QualifyingActions) { - return false - } - for i := range this.QualifyingActions { - if !this.QualifyingActions[i].Equal(&that1.QualifyingActions[i]) { - return false - } - } - return true -} -func (this *MsgEndRewardProgramRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgEndRewardProgramRequest) - if !ok { - that2, ok := that.(MsgEndRewardProgramRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.RewardProgramId != that1.RewardProgramId { - return false - } - if this.ProgramOwnerAddress != that1.ProgramOwnerAddress { - return false - } - return true -} -func (this *MsgClaimRewardsResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgClaimRewardsResponse) - if !ok { - that2, ok := that.(MsgClaimRewardsResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ClaimDetails.Equal(&that1.ClaimDetails) { - return false - } - return true -} -func (this *MsgClaimAllRewardsResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MsgClaimAllRewardsResponse) - if !ok { - that2, ok := that.(MsgClaimAllRewardsResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.TotalRewardClaim) != len(that1.TotalRewardClaim) { - return false - } - for i := range this.TotalRewardClaim { - if !this.TotalRewardClaim[i].Equal(&that1.TotalRewardClaim[i]) { - return false - } - } - if len(this.ClaimDetails) != len(that1.ClaimDetails) { - return false - } - for i := range this.ClaimDetails { - if !this.ClaimDetails[i].Equal(that1.ClaimDetails[i]) { - return false - } - } - return true -} -func (this *ClaimedRewardPeriodDetail) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ClaimedRewardPeriodDetail) - if !ok { - that2, ok := that.(ClaimedRewardPeriodDetail) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ClaimPeriodId != that1.ClaimPeriodId { - return false - } - if this.TotalShares != that1.TotalShares { - return false - } - if !this.ClaimPeriodReward.Equal(&that1.ClaimPeriodReward) { - return false - } - return true -} -func (this *RewardProgramClaimDetail) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RewardProgramClaimDetail) - if !ok { - that2, ok := that.(RewardProgramClaimDetail) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.RewardProgramId != that1.RewardProgramId { - return false - } - if !this.TotalRewardClaim.Equal(&that1.TotalRewardClaim) { - return false - } - if len(this.ClaimedRewardPeriodDetails) != len(that1.ClaimedRewardPeriodDetails) { - return false - } - for i := range this.ClaimedRewardPeriodDetails { - if !this.ClaimedRewardPeriodDetails[i].Equal(that1.ClaimedRewardPeriodDetails[i]) { - return false - } - } - return true -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MsgClient interface { - // CreateRewardProgram is the RPC endpoint for creating a rewards program - CreateRewardProgram(ctx context.Context, in *MsgCreateRewardProgramRequest, opts ...grpc.CallOption) (*MsgCreateRewardProgramResponse, error) - // EndRewardProgram is the RPC endpoint for ending a rewards program - EndRewardProgram(ctx context.Context, in *MsgEndRewardProgramRequest, opts ...grpc.CallOption) (*MsgEndRewardProgramResponse, error) - // ClaimRewards is the RPC endpoint for claiming rewards belonging to completed claim periods of a reward program - ClaimRewards(ctx context.Context, in *MsgClaimRewardsRequest, opts ...grpc.CallOption) (*MsgClaimRewardsResponse, error) - // ClaimAllRewards is the RPC endpoint for claiming rewards for completed claim periods of every reward program for - // the signer of the tx. - ClaimAllRewards(ctx context.Context, in *MsgClaimAllRewardsRequest, opts ...grpc.CallOption) (*MsgClaimAllRewardsResponse, error) -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) CreateRewardProgram(ctx context.Context, in *MsgCreateRewardProgramRequest, opts ...grpc.CallOption) (*MsgCreateRewardProgramResponse, error) { - out := new(MsgCreateRewardProgramResponse) - err := c.cc.Invoke(ctx, "/provenance.reward.v1.Msg/CreateRewardProgram", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) EndRewardProgram(ctx context.Context, in *MsgEndRewardProgramRequest, opts ...grpc.CallOption) (*MsgEndRewardProgramResponse, error) { - out := new(MsgEndRewardProgramResponse) - err := c.cc.Invoke(ctx, "/provenance.reward.v1.Msg/EndRewardProgram", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) ClaimRewards(ctx context.Context, in *MsgClaimRewardsRequest, opts ...grpc.CallOption) (*MsgClaimRewardsResponse, error) { - out := new(MsgClaimRewardsResponse) - err := c.cc.Invoke(ctx, "/provenance.reward.v1.Msg/ClaimRewards", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) ClaimAllRewards(ctx context.Context, in *MsgClaimAllRewardsRequest, opts ...grpc.CallOption) (*MsgClaimAllRewardsResponse, error) { - out := new(MsgClaimAllRewardsResponse) - err := c.cc.Invoke(ctx, "/provenance.reward.v1.Msg/ClaimAllRewards", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { - // CreateRewardProgram is the RPC endpoint for creating a rewards program - CreateRewardProgram(context.Context, *MsgCreateRewardProgramRequest) (*MsgCreateRewardProgramResponse, error) - // EndRewardProgram is the RPC endpoint for ending a rewards program - EndRewardProgram(context.Context, *MsgEndRewardProgramRequest) (*MsgEndRewardProgramResponse, error) - // ClaimRewards is the RPC endpoint for claiming rewards belonging to completed claim periods of a reward program - ClaimRewards(context.Context, *MsgClaimRewardsRequest) (*MsgClaimRewardsResponse, error) - // ClaimAllRewards is the RPC endpoint for claiming rewards for completed claim periods of every reward program for - // the signer of the tx. - ClaimAllRewards(context.Context, *MsgClaimAllRewardsRequest) (*MsgClaimAllRewardsResponse, error) -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (*UnimplementedMsgServer) CreateRewardProgram(ctx context.Context, req *MsgCreateRewardProgramRequest) (*MsgCreateRewardProgramResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateRewardProgram not implemented") -} -func (*UnimplementedMsgServer) EndRewardProgram(ctx context.Context, req *MsgEndRewardProgramRequest) (*MsgEndRewardProgramResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EndRewardProgram not implemented") -} -func (*UnimplementedMsgServer) ClaimRewards(ctx context.Context, req *MsgClaimRewardsRequest) (*MsgClaimRewardsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ClaimRewards not implemented") -} -func (*UnimplementedMsgServer) ClaimAllRewards(ctx context.Context, req *MsgClaimAllRewardsRequest) (*MsgClaimAllRewardsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ClaimAllRewards not implemented") -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -func _Msg_CreateRewardProgram_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreateRewardProgramRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreateRewardProgram(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/provenance.reward.v1.Msg/CreateRewardProgram", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreateRewardProgram(ctx, req.(*MsgCreateRewardProgramRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_EndRewardProgram_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgEndRewardProgramRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).EndRewardProgram(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/provenance.reward.v1.Msg/EndRewardProgram", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).EndRewardProgram(ctx, req.(*MsgEndRewardProgramRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_ClaimRewards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgClaimRewardsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).ClaimRewards(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/provenance.reward.v1.Msg/ClaimRewards", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ClaimRewards(ctx, req.(*MsgClaimRewardsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_ClaimAllRewards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgClaimAllRewardsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).ClaimAllRewards(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/provenance.reward.v1.Msg/ClaimAllRewards", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ClaimAllRewards(ctx, req.(*MsgClaimAllRewardsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "provenance.reward.v1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateRewardProgram", - Handler: _Msg_CreateRewardProgram_Handler, - }, - { - MethodName: "EndRewardProgram", - Handler: _Msg_EndRewardProgram_Handler, - }, - { - MethodName: "ClaimRewards", - Handler: _Msg_ClaimRewards_Handler, - }, - { - MethodName: "ClaimAllRewards", - Handler: _Msg_ClaimAllRewards_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "provenance/reward/v1/tx.proto", -} - -func (m *MsgCreateRewardProgramRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCreateRewardProgramRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateRewardProgramRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.QualifyingActions) > 0 { - for iNdEx := len(m.QualifyingActions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.QualifyingActions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - } - if m.ExpireDays != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.ExpireDays)) - i-- - dAtA[i] = 0x50 - } - if m.MaxRolloverClaimPeriods != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.MaxRolloverClaimPeriods)) - i-- - dAtA[i] = 0x48 - } - if m.ClaimPeriodDays != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.ClaimPeriodDays)) - i-- - dAtA[i] = 0x40 - } - if m.ClaimPeriods != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.ClaimPeriods)) - i-- - dAtA[i] = 0x38 - } - n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.ProgramStartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ProgramStartTime):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintTx(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x32 - { - size, err := m.MaxRewardPerClaimAddress.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - { - size, err := m.TotalRewardPool.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if len(m.DistributeFromAddress) > 0 { - i -= len(m.DistributeFromAddress) - copy(dAtA[i:], m.DistributeFromAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.DistributeFromAddress))) - i-- - dAtA[i] = 0x1a - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintTx(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if len(m.Title) > 0 { - i -= len(m.Title) - copy(dAtA[i:], m.Title) - i = encodeVarintTx(dAtA, i, uint64(len(m.Title))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgCreateRewardProgramResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCreateRewardProgramResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateRewardProgramResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Id != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MsgEndRewardProgramRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgEndRewardProgramRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgEndRewardProgramRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ProgramOwnerAddress) > 0 { - i -= len(m.ProgramOwnerAddress) - copy(dAtA[i:], m.ProgramOwnerAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.ProgramOwnerAddress))) - i-- - dAtA[i] = 0x12 - } - if m.RewardProgramId != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.RewardProgramId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MsgEndRewardProgramResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgEndRewardProgramResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgEndRewardProgramResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgClaimRewardsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgClaimRewardsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgClaimRewardsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RewardAddress) > 0 { - i -= len(m.RewardAddress) - copy(dAtA[i:], m.RewardAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.RewardAddress))) - i-- - dAtA[i] = 0x12 - } - if m.RewardProgramId != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.RewardProgramId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MsgClaimRewardsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgClaimRewardsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgClaimRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ClaimDetails.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *MsgClaimAllRewardsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgClaimAllRewardsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgClaimAllRewardsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.RewardAddress) > 0 { - i -= len(m.RewardAddress) - copy(dAtA[i:], m.RewardAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.RewardAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgClaimAllRewardsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgClaimAllRewardsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgClaimAllRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ClaimDetails) > 0 { - for iNdEx := len(m.ClaimDetails) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ClaimDetails[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.TotalRewardClaim) > 0 { - for iNdEx := len(m.TotalRewardClaim) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.TotalRewardClaim[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ClaimedRewardPeriodDetail) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClaimedRewardPeriodDetail) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClaimedRewardPeriodDetail) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ClaimPeriodReward.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if m.TotalShares != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.TotalShares)) - i-- - dAtA[i] = 0x10 - } - if m.ClaimPeriodId != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.ClaimPeriodId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RewardProgramClaimDetail) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RewardProgramClaimDetail) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RewardProgramClaimDetail) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ClaimedRewardPeriodDetails) > 0 { - for iNdEx := len(m.ClaimedRewardPeriodDetails) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ClaimedRewardPeriodDetails[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - { - size, err := m.TotalRewardClaim.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if m.RewardProgramId != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.RewardProgramId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgCreateRewardProgramRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Title) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.DistributeFromAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.TotalRewardPool.Size() - n += 1 + l + sovTx(uint64(l)) - l = m.MaxRewardPerClaimAddress.Size() - n += 1 + l + sovTx(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.ProgramStartTime) - n += 1 + l + sovTx(uint64(l)) - if m.ClaimPeriods != 0 { - n += 1 + sovTx(uint64(m.ClaimPeriods)) - } - if m.ClaimPeriodDays != 0 { - n += 1 + sovTx(uint64(m.ClaimPeriodDays)) - } - if m.MaxRolloverClaimPeriods != 0 { - n += 1 + sovTx(uint64(m.MaxRolloverClaimPeriods)) - } - if m.ExpireDays != 0 { - n += 1 + sovTx(uint64(m.ExpireDays)) - } - if len(m.QualifyingActions) > 0 { - for _, e := range m.QualifyingActions { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func (m *MsgCreateRewardProgramResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovTx(uint64(m.Id)) - } - return n -} - -func (m *MsgEndRewardProgramRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RewardProgramId != 0 { - n += 1 + sovTx(uint64(m.RewardProgramId)) - } - l = len(m.ProgramOwnerAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgEndRewardProgramResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgClaimRewardsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RewardProgramId != 0 { - n += 1 + sovTx(uint64(m.RewardProgramId)) - } - l = len(m.RewardAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgClaimRewardsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ClaimDetails.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgClaimAllRewardsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RewardAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgClaimAllRewardsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.TotalRewardClaim) > 0 { - for _, e := range m.TotalRewardClaim { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - if len(m.ClaimDetails) > 0 { - for _, e := range m.ClaimDetails { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func (m *ClaimedRewardPeriodDetail) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ClaimPeriodId != 0 { - n += 1 + sovTx(uint64(m.ClaimPeriodId)) - } - if m.TotalShares != 0 { - n += 1 + sovTx(uint64(m.TotalShares)) - } - l = m.ClaimPeriodReward.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *RewardProgramClaimDetail) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RewardProgramId != 0 { - n += 1 + sovTx(uint64(m.RewardProgramId)) - } - l = m.TotalRewardClaim.Size() - n += 1 + l + sovTx(uint64(l)) - if len(m.ClaimedRewardPeriodDetails) > 0 { - for _, e := range m.ClaimedRewardPeriodDetails { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgCreateRewardProgramRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCreateRewardProgramRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateRewardProgramRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Title = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DistributeFromAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DistributeFromAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalRewardPool", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TotalRewardPool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxRewardPerClaimAddress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MaxRewardPerClaimAddress.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProgramStartTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.ProgramStartTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimPeriods", wireType) - } - m.ClaimPeriods = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ClaimPeriods |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimPeriodDays", wireType) - } - m.ClaimPeriodDays = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ClaimPeriodDays |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxRolloverClaimPeriods", wireType) - } - m.MaxRolloverClaimPeriods = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxRolloverClaimPeriods |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpireDays", wireType) - } - m.ExpireDays = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExpireDays |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QualifyingActions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.QualifyingActions = append(m.QualifyingActions, QualifyingAction{}) - if err := m.QualifyingActions[len(m.QualifyingActions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCreateRewardProgramResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCreateRewardProgramResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateRewardProgramResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgEndRewardProgramRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgEndRewardProgramRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgEndRewardProgramRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardProgramId", wireType) - } - m.RewardProgramId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RewardProgramId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProgramOwnerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProgramOwnerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgEndRewardProgramResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgEndRewardProgramResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgEndRewardProgramResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgClaimRewardsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgClaimRewardsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgClaimRewardsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardProgramId", wireType) - } - m.RewardProgramId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RewardProgramId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RewardAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgClaimRewardsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgClaimRewardsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgClaimRewardsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimDetails", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ClaimDetails.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgClaimAllRewardsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgClaimAllRewardsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgClaimAllRewardsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RewardAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgClaimAllRewardsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgClaimAllRewardsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgClaimAllRewardsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalRewardClaim", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TotalRewardClaim = append(m.TotalRewardClaim, types.Coin{}) - if err := m.TotalRewardClaim[len(m.TotalRewardClaim)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimDetails", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClaimDetails = append(m.ClaimDetails, &RewardProgramClaimDetail{}) - if err := m.ClaimDetails[len(m.ClaimDetails)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClaimedRewardPeriodDetail) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClaimedRewardPeriodDetail: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClaimedRewardPeriodDetail: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimPeriodId", wireType) - } - m.ClaimPeriodId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ClaimPeriodId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalShares", wireType) - } - m.TotalShares = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TotalShares |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimPeriodReward", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ClaimPeriodReward.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RewardProgramClaimDetail) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RewardProgramClaimDetail: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RewardProgramClaimDetail: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardProgramId", wireType) - } - m.RewardProgramId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RewardProgramId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalRewardClaim", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TotalRewardClaim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimedRewardPeriodDetails", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClaimedRewardPeriodDetails = append(m.ClaimedRewardPeriodDetails, &ClaimedRewardPeriodDetail{}) - if err := m.ClaimedRewardPeriodDetails[len(m.ClaimedRewardPeriodDetails)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTx(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTx - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTx - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTx - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") -)