diff --git a/docs/design_docs/009-liquidity-mining.md b/docs/design_docs/009-liquidity-mining.md index a82f4b8f7e..3ee8ad3aee 100644 --- a/docs/design_docs/009-liquidity-mining.md +++ b/docs/design_docs/009-liquidity-mining.md @@ -194,20 +194,20 @@ The following approach is proposed: - Additionally, each nonzero `TotalLocked(denom,tier) = Amount` is kept up to date in state. These track the sum of uTokens locked across all addresses. - For each `(denom,tier)` that has ever been incentivized, any nonzero `RewardAccumulator(denom,tier)` is stored in state. This `sdk.DecCoins` represents the total rewards a single locked `uToken` would have accumulated if locked into a given tier at genesis. - For each user, any nonzero `PendingReward` is stored as `sdk.DecCoins`. -- For each nonzero `Locked(address,denom,tier)`, a value `RewardBasis(address,denom,tier)` is stored which tracks the value of `RewardAccumulator(denom,tier)` at the most recent time rewards were added to `PendingReward` by the given (address,denom,tier). +- For each nonzero `Locked(address,denom,tier)`, a value `RewardTracker(address,denom,tier)` is stored which tracks the value of `RewardAccumulator(denom,tier)` at the most recent time rewards were added to `PendingReward` by the given (address,denom,tier). - At any given `EndBlock`, each active incentive program performs some computations: - Calculates the total `RewardDenom` rewards that will be given by the program in the current block `X = program.TotalRewards * (secondsElapsed / program.Duration)` - Each lock tier receives a `weightedValue(program,denom,tier) = TotalLocked(denom,tier) * tierWeight(program,tier)`. - The amount `X` for each program is then split between the tiers by `weightedValue` into three `X(tier)` values (X1,X2,X3) - For each tier, `RewardAccumulator(denom,tier)` is increased by `X(tier) / TotalLocked(denom,tier)`. -- When a user's `Locked(address,denom,tier) = Amount` is updated for any reason, `RewardBasis(address,denom,tier)` is set to the current `RewardAccumulator(denom,tier)` and `PendingRewards(addr)` is increased by the difference of the two, times the user's locked amount. (This uses the locked amount _before_ it is updated.) +- When a user's `Locked(address,denom,tier) = Amount` is updated for any reason, `RewardTracker(address,denom,tier)` is set to the current `RewardAccumulator(denom,tier)` and `PendingRewards(addr)` is increased by the difference of the two, times the user's locked amount. (This uses the locked amount _before_ it is updated.) - When a user claims rewards, they receive `PendingRewards(addr)` and set it to zero (which clears it from state). -The algorithm above uses an approach similar to [F1 Fee Distribution](https://drops.dagstuhl.de/opus/volltexte/2020/11974/) in that it uses an exchange rate (in our case, HistoricalReward) to track each denom's hypothetical rewards since genesis, and determines actual reward amounts by recording the previous exchange rate (RewardBasis) at which each user made their previous claim. +The algorithm above uses an approach similar to [F1 Fee Distribution](https://drops.dagstuhl.de/opus/volltexte/2020/11974/) in that it uses an exchange rate (in our case, HistoricalReward) to track each denom's hypothetical rewards since genesis, and determines actual reward amounts by recording the previous exchange rate (RewardTracker) at which each user made their previous claim. The F1 algorithm only works if users are forced to claim rewards every time their locked amount increases or decreases (thus, locked amount is known to have stayed constant between any two claims). Our implementation is less complex than F1 because there is no equivalent to slashing in `x/incentive`, and we move rewards to the `PendingRewards` instead of claiming them directly. -The same mathematical effect is achieved, where `Locked(addr,denom,tier)` remains constant in the time `RewardAccumulator(denom,tier)` has increased to its current value from `RewardBasis(denom,tier)`, allowing reward calculation on demand using only those three values. +The same mathematical effect is achieved, where `Locked(addr,denom,tier)` remains constant in the time `RewardAccumulator(denom,tier)` has increased to its current value from `RewardTracker(denom,tier)`, allowing reward calculation on demand using only those three values. ### Claiming Rewards @@ -219,7 +219,7 @@ type MsgClaim struct { } ``` -This message type gathers `PendingRewards` by updating `RewardBasis` for each nonzero `Locked(addr,denom,tier)` associated with the user's address, then claims all pending rewards. +This message type gathers `PendingRewards` by updating `RewardTracker` for each nonzero `Locked(addr,denom,tier)` associated with the user's address, then claims all pending rewards. ### Funding Programs diff --git a/proto/umee/incentive/v1/genesis.proto b/proto/umee/incentive/v1/genesis.proto new file mode 100644 index 0000000000..9e588f9115 --- /dev/null +++ b/proto/umee/incentive/v1/genesis.proto @@ -0,0 +1,80 @@ +syntax = "proto3"; +package umeenetwork.umee.incentive.v1; + +option go_package = "github.com/umee-network/umee/v3/x/incentive"; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "umee/incentive/v1/incentive.proto"; + +// GenesisState defines the x/incentive module's genesis state. +message GenesisState { + Params params = 1 [(gogoproto.nullable) = false]; + repeated IncentiveProgram completed_programs = 2 [(gogoproto.nullable) = false]; + repeated IncentiveProgram ongoing_programs = 3 [(gogoproto.nullable) = false]; + repeated IncentiveProgram upcoming_programs = 4 [(gogoproto.nullable) = false]; + uint32 next_program_id = 5; + uint64 last_rewards_time = 6; + repeated cosmos.base.v1beta1.Coin total_bonded = 7 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + repeated Bond bonds = 8 [(gogoproto.nullable) = false]; + repeated PendingReward pending_rewards = 9 [(gogoproto.nullable) = false]; + repeated RewardTracker reward_bases = 10 [(gogoproto.nullable) = false]; + repeated RewardAccumulator reward_accumulators = 11 [(gogoproto.nullable) = false]; + repeated Unbonding unbondings = 12 [(gogoproto.nullable) = false]; +} + +// Bond tracks the amount of coins of one uToken denomination bonded to a +// given reward tier by a single account. +message Bond { + string account = 1; + uint32 tier = 2; + cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; +} + +// PendingReward tracks the amount of rewards that a given account has calculated +// but not yet claimed. +message PendingReward { + string account = 1; + repeated cosmos.base.v1beta1.Coin pending_reward = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// RewardTracker tracks the value of a given tier and lock denom's RewardAccumulator +// at the last time a specific account calculated pending rewards for it. When calculating +// available rewards, this value is used to determine the difference between the current +// RewardAccumulator for a tier and the last value at which the user updated bonds or claimed +// tokens. Their pending rewards increase by only the rewards accrued in that time period. +message RewardTracker { + string account = 1; + uint32 tier = 2; + string denom = 3; + repeated cosmos.base.v1beta1.DecCoin reward_tracker = 4 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" + ]; +} + +// RewardAccumulator is a global reward tracking struct that indicates the amount +// of rewards that a single unit of denom would have acucmulated if it was bonded +// at a given tier since genesis. +message RewardAccumulator { + uint32 tier = 1; + string denom = 2; + repeated cosmos.base.v1beta1.DecCoin reward_tracker = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" + ]; +} + +// Unbonding is a structure that tracks an in-progress token unbonding. +message Unbonding { + string account = 1; + uint32 tier = 2; + uint64 end = 3; + cosmos.base.v1beta1.Coin amount = 4 [(gogoproto.nullable) = false]; +} \ No newline at end of file diff --git a/proto/umee/incentive/v1/incentive.proto b/proto/umee/incentive/v1/incentive.proto new file mode 100644 index 0000000000..e26b5062c8 --- /dev/null +++ b/proto/umee/incentive/v1/incentive.proto @@ -0,0 +1,93 @@ +syntax = "proto3"; +package umeenetwork.umee.incentive.v1; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/umee-network/umee/v3/x/incentive"; + +// Params defines the parameters for the incentive module. +message Params { + option (gogoproto.equal) = true; + + // max_unbondings defines the maximum amount of concurrent unbondings an address can have. + uint32 max_unbondings = 1; + + // unbonding_duration_long defines the unbonding duration (in seconds) of the long tier. + uint64 unbonding_duration_long = 2; + + // unbonding_duration_middle defines the unbonding duration (in seconds) of the middle tier. + uint64 unbonding_duration_middle = 3; + + // unbonding_duration_short defines the unbonding duration (in seconds) of the short tier. + uint64 unbonding_duration_short = 4; + + // tier_weight_short defines the proportion of rewards which assets bonded + // in the short unbonding duration receive compared to what the same amount + // would receive bonded to the long tier. + // valid values: [0;1] + string tier_weight_short = 5 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + + // tier_weight_middle defines the proportion of rewards which assets bonded + // in the middle unbonding duration receive compared to what the same amount + // would receive bonded to the long tier. + // valid values: [0;1] + string tier_weight_middle = 6 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + + // community_fund_address is the address from which all incentive programs + // proposed with "from_community_fund = true" will receive their funding. + // Since funds are withdrawn automatically when an incentive program passes + // governance, this account should always contain sufficient balance to + // cover incentive programs which are being voted upon. + string community_fund_address = 7; +} + +// IncentiveProgram defines a liquidity mining incentive program on a single +// locked uToken denom that will run for a set amount of time. +message IncentiveProgram { + option (gogoproto.equal) = true; + + // ID uniquely identifies the incentive program after it has been created. + // It is zero when the program is being proposed by governance. + uint32 id = 1; + + // start_time is the unix time (in seconds) at which the incentives begin. + uint64 start_time = 2; + + // duration is the length of the incentive program in seconds. + uint64 duration = 3; + + // denom is the incentivized uToken collateral. + string denom = 4; + + // total_rewards are total amount of rewards which can be distributed to + // suppliers by this program. This is set to its final value when the program + // is proposed by governance. + cosmos.base.v1beta1.Coin total_rewards = 5 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + + // funded_rewards are total amount of rewards which have been funded by a + // sponsor to this program. This is zero until the program is both passed + // by governance and funded. + cosmos.base.v1beta1.Coin funded_rewards = 6 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + + // remaining_rewards are total amount of this program's funded rewards + // which have not yet been allocated to suppliers. This is zero until the + // program is both passed by governance and funded, then begins decreasing + // to zero as the program runs to completion. + cosmos.base.v1beta1.Coin remaining_rewards = 7 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} \ No newline at end of file diff --git a/proto/umee/incentive/v1/query.proto b/proto/umee/incentive/v1/query.proto new file mode 100644 index 0000000000..fc6bda72f2 --- /dev/null +++ b/proto/umee/incentive/v1/query.proto @@ -0,0 +1,179 @@ +syntax = "proto3"; +package umeenetwork.umee.incentive.v1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "google/api/annotations.proto"; +import "gogoproto/gogo.proto"; +import "umee/incentive/v1/incentive.proto"; +import "umee/incentive/v1/genesis.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/umee-network/umee/v3/x/incentive"; + +// Query defines the gRPC querier service. +service Query { + // Params queries the parameters of the x/incentive module. + rpc Params(QueryParams) returns (QueryParamsResponse) { + option (google.api.http).get = "/umee/incentive/v1/params"; + } + + // PendingRewards queries unclaimed incentive rewards associated with an account. + rpc PendingRewards(QueryPendingRewards) + returns (QueryPendingRewardsResponse) { + option (google.api.http).get = "/umee/incentive/v1/pending_rewards/{address}"; + } + + // Bonded queries all bonded collateral uTokens associated with an account. + rpc Bonded(QueryBonded) + returns (QueryBondedResponse) { + option (google.api.http).get = "/umee/incentive/v1/bonded/{address}"; + } + + // Unbondings queries all current uToken unbondings associated with an account. + rpc Unbondings(QueryUnbondings) + returns (QueryUnbondingsResponse) { + option (google.api.http).get = "/umee/incentive/v1/unbondings/{address}"; + } + + // TotalBonded queries the sum of all bonded collateral uTokens, separated by tier. + rpc TotalBonded(QueryTotalBonded) + returns (QueryTotalBondedResponse) { + option (google.api.http).get = "/umee/incentive/v1/total_bonded"; + } + + // CompletedIncentivePrograms queries for all incentives programs that have been passed + // by governance, and either run to completion or expired immediately due to not being funded. + rpc CompletedIncentivePrograms(QueryCompletedIncentivePrograms) + returns (QueryCompletedIncentiveProgramsResponse) { + option (google.api.http).get = "/umee/incentive/v1/incentive_programs/completed"; + } + + // OngoingIncentivePrograms queries for all incentives programs that have been passed + // by governance, funded, and started but not yet completed. + rpc OngoingIncentivePrograms(QueryOngoingIncentivePrograms) + returns (QueryOngoingIncentiveProgramsResponse) { + option (google.api.http).get = "/umee/incentive/v1/incentive_programs/ongoing"; + } + + // UpcomingIncentivePrograms queries for all incentives programs that have been passed + // by governance, but not yet started. They may or may not have been funded. + rpc UpcomingIncentivePrograms(QueryUpcomingIncentivePrograms) + returns (QueryUpcomingIncentiveProgramsResponse) { + option (google.api.http).get = "/umee/incentive/v1/incentive_programs/upcoming"; + } + + // IncentiveProgram queries a single incentive program by ID. + rpc IncentiveProgram(QueryIncentiveProgram) + returns (QueryIncentiveProgramResponse) { + option (google.api.http).get = "/umee/incentive/v1/incentive_program/{id}"; + } +} + +// TotalBond tracks the amount of coins of one uToken denomination bonded to a +// given reward tier without specifying an account. +message TotalBond { + uint32 tier = 1; + cosmos.base.v1beta1.Coin amount = 2 [(gogoproto.nullable) = false]; +} + +// QueryParams defines the request structure for the Params gRPC service +// handler. +message QueryParams {} + +// QueryParamsResponse defines the response structure for the Params gRPC +// service handler. +message QueryParamsResponse { + Params params = 1 [(gogoproto.nullable) = false]; +} + +// QueryPendingRewards defines the request structure for the PendingRewards gRPC service handler. +message QueryPendingRewards { + string address = 1; +} + +// QueryPendingRewardsResponse defines the response structure for the PendingRewards gRPC service handler. +message QueryPendingRewardsResponse { + repeated cosmos.base.v1beta1.Coin rewards = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// QueryBonded defines the request structure for the Bonded gRPC service handler. +message QueryBonded { + string address = 1; +} + +// QueryBondedResponse defines the response structure for the Bonded gRPC service handler. +message QueryBondedResponse { + repeated TotalBond bonded = 1 [(gogoproto.nullable) = false]; +} + +// QueryUnbondings defines the request structure for the Unbondings gRPC service handler. +message QueryUnbondings { + string address = 1; +} + +// QueryUnbondingsResponse defines the response structure for the Unbondings gRPC service handler. +message QueryUnbondingsResponse { + repeated Unbonding unbondings = 1 [(gogoproto.nullable) = false]; +} + +// QueryTotalBonded defines the request structure for the TotalBonded gRPC service handler. +message QueryTotalBonded { +} + +// QueryTotalBondedResponse defines the response structure for the TotalBonded gRPC service handler. +message QueryTotalBondedResponse { + repeated TotalBond bonded = 1 [(gogoproto.nullable) = false]; +} + +// QueryUpcomingIncentivePrograms defines the request structure for the +// OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service handlers. +message QueryUpcomingIncentivePrograms { +} + +// QueryUpcomingIncentiveProgramsResponse defines the response structure for the +// OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service handlers. +message QueryUpcomingIncentiveProgramsResponse { + repeated IncentiveProgram programs = 1 [(gogoproto.nullable) = false]; +} + +// QueryOngoingIncentivePrograms defines the request structure for the +// OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service handlers. +message QueryOngoingIncentivePrograms { +} + +// QueryOngoingIncentiveProgramsResponse defines the response structure for the +// OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service handlers. +message QueryOngoingIncentiveProgramsResponse { + repeated IncentiveProgram programs = 1 [(gogoproto.nullable) = false]; +} + +// QueryCompletedIncentivePrograms defines the request structure for the +// CompletedIncentivePrograms gRPC service handler. +message QueryCompletedIncentivePrograms { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryCompletedIncentiveProgramsResponse defines the response structure for the +// CompletedIncentivePrograms gRPC service handler. +message QueryCompletedIncentiveProgramsResponse { + repeated IncentiveProgram programs = 1 [(gogoproto.nullable) = false]; + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryIncentiveProgram defines the request structure for the IncentiveProgram +// gRPC service handler. +message QueryIncentiveProgram { + // ID specifies which program to query for + uint32 id = 1; +} + +// QueryIncentivePrograResponse defines the response structure for the +// IncentiveProgram gRPC service handler. +message QueryIncentiveProgramResponse { + IncentiveProgram program = 1 [(gogoproto.nullable) = false]; +} \ No newline at end of file diff --git a/proto/umee/incentive/v1/tx.proto b/proto/umee/incentive/v1/tx.proto new file mode 100644 index 0000000000..b8d44dc3ff --- /dev/null +++ b/proto/umee/incentive/v1/tx.proto @@ -0,0 +1,120 @@ +syntax = "proto3"; +package umeenetwork.umee.incentive.v1; + +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/msg/v1/msg.proto"; +import "gogoproto/gogo.proto"; +import "umee/incentive/v1/incentive.proto"; + +option go_package = "github.com/umee-network/umee/v3/x/incentive"; + +// Msg defines the x/incentive module's Msg service. +service Msg { + // Claim defines a method for claiming any pending incentive rewards. + rpc Claim(MsgClaim) returns (MsgClaimResponse); + + // Bond defines a method for bonding uToken collateral into reward tier. + rpc Bond(MsgBond) returns (MsgBondResponse); + + // BeginUnbonding defines a method for starting to unbond uToken collateral. + rpc BeginUnbonding(MsgBeginUnbonding) returns (MsgBeginUnbondingResponse); + + // Sponsor defines a permissionless method for sponsoring an upcoming, not yet funded incentive program. + // In the current implementation, the sponsor must be a single account and the MsgSponsor must fully cover the expected program rewards. + rpc Sponsor(MsgSponsor) returns (MsgSponsorResponse); + + // GovSetParams is used by governance proposals to update parameters. + rpc GovSetParams(MsgGovSetParams) returns (MsgGovSetParamsResponse); + + // GovCreateProgram is used by governance proposals to create (but not fund) an incentive program. + rpc GovCreateProgram(MsgGovCreateProgram) returns (MsgGovCreateProgramResponse); +} + +// MsgClaim represents a account's request to claim pending rewards. +message MsgClaim { + string account = 1; +} + +// MsgClaimResponse defines the Msg/Claim response type. +message MsgClaimResponse { + repeated cosmos.base.v1beta1.Coin amount = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// MsgBond represents a account's request to bond uToken collateral. +message MsgBond { + string account = 1; + uint32 tier = 2; + cosmos.base.v1beta1.Coin asset = 3 [(gogoproto.nullable) = false]; +} + +// MsgBondResponse defines the Msg/Lock response type. +message MsgBondResponse {} + +// MsgBeginUnbonding represents a account's request to begin unbonding uToken collateral. +message MsgBeginUnbonding { + string account = 1; + uint32 tier = 2; + cosmos.base.v1beta1.Coin asset = 3 [(gogoproto.nullable) = false]; +} + +// MsgBeginUnbondingResponse defines the Msg/BeginUnbonding response type. +message MsgBeginUnbondingResponse {} + +// MsgSponsor represents a sponsor's request to fund rewards for an incentive program. +// The program must have been passed by governance, not yet started, and not yet funded. +// Funded assets must be the full amount required by the program. +message MsgSponsor { + // Sponsor bech32 account address + string sponsor = 1; + uint32 program = 2; + cosmos.base.v1beta1.Coin asset = 3 [(gogoproto.nullable) = false]; +} + +// MsgSponsorResponse defines the Msg/Sponsor response type. +message MsgSponsorResponse {} + +// MsgGovSetParams is used by governance to update module parameters. +message MsgGovSetParams { + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + option (cosmos.msg.v1.signer) = "authority"; + + // authority must be the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string title = 2; + string description = 3; + Params params = 4 [(gogoproto.nullable) = false]; +} + +// MsgGovSetParamsResponse defines the Msg/SetParams response type. +message MsgGovSetParamsResponse {} + +// MsgGovCreateProgram is used by governance to create an incentive program. There are two +// funding scenarios, depending on from_community_fund. +// If it is true,the program's total rewards will be automatically withdrawn from +// the (parameter) community_fund_address to the incentive module account when this +// message is passed. (Insufficient funds cause the parameter to be treated as false.) +// If it is false, a MsgSponsor fundign the program's full amount must be submitted +// after this message passes, but before the program's start_time, or the program +// will be cancelled when it would otherwise start. +message MsgGovCreateProgram { + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + option (cosmos.msg.v1.signer) = "authority"; + + // authority must be the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string title = 2; + string description = 3; + IncentiveProgram program = 4 [(gogoproto.nullable) = false]; + + // from_community_fund defines the source of funds for a proposed incentive program. + bool from_community_fund = 5; +} + +// MsgGovCreateProgramResponse defines the Msg/CreateProgram response type. +message MsgGovCreateProgramResponse {} \ No newline at end of file diff --git a/x/incentive/genesis.pb.go b/x/incentive/genesis.pb.go new file mode 100644 index 0000000000..033c089a50 --- /dev/null +++ b/x/incentive/genesis.pb.go @@ -0,0 +1,2365 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: umee/incentive/v1/genesis.proto + +package incentive + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/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 x/incentive module's genesis state. +type GenesisState struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + CompletedPrograms []IncentiveProgram `protobuf:"bytes,2,rep,name=completed_programs,json=completedPrograms,proto3" json:"completed_programs"` + OngoingPrograms []IncentiveProgram `protobuf:"bytes,3,rep,name=ongoing_programs,json=ongoingPrograms,proto3" json:"ongoing_programs"` + UpcomingPrograms []IncentiveProgram `protobuf:"bytes,4,rep,name=upcoming_programs,json=upcomingPrograms,proto3" json:"upcoming_programs"` + NextProgramId uint32 `protobuf:"varint,5,opt,name=next_program_id,json=nextProgramId,proto3" json:"next_program_id,omitempty"` + LastRewardsTime uint64 `protobuf:"varint,6,opt,name=last_rewards_time,json=lastRewardsTime,proto3" json:"last_rewards_time,omitempty"` + TotalBonded github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,7,rep,name=total_bonded,json=totalBonded,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_bonded"` + Bonds []Bond `protobuf:"bytes,8,rep,name=bonds,proto3" json:"bonds"` + PendingRewards []PendingReward `protobuf:"bytes,9,rep,name=pending_rewards,json=pendingRewards,proto3" json:"pending_rewards"` + RewardBases []RewardTracker `protobuf:"bytes,10,rep,name=reward_bases,json=rewardBases,proto3" json:"reward_bases"` + RewardAccumulators []RewardAccumulator `protobuf:"bytes,11,rep,name=reward_accumulators,json=rewardAccumulators,proto3" json:"reward_accumulators"` + Unbondings []Unbonding `protobuf:"bytes,12,rep,name=unbondings,proto3" json:"unbondings"` +} + +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_3f117566517b8062, []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 (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func (m *GenesisState) GetCompletedPrograms() []IncentiveProgram { + if m != nil { + return m.CompletedPrograms + } + return nil +} + +func (m *GenesisState) GetOngoingPrograms() []IncentiveProgram { + if m != nil { + return m.OngoingPrograms + } + return nil +} + +func (m *GenesisState) GetUpcomingPrograms() []IncentiveProgram { + if m != nil { + return m.UpcomingPrograms + } + return nil +} + +func (m *GenesisState) GetNextProgramId() uint32 { + if m != nil { + return m.NextProgramId + } + return 0 +} + +func (m *GenesisState) GetLastRewardsTime() uint64 { + if m != nil { + return m.LastRewardsTime + } + return 0 +} + +func (m *GenesisState) GetTotalBonded() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.TotalBonded + } + return nil +} + +func (m *GenesisState) GetBonds() []Bond { + if m != nil { + return m.Bonds + } + return nil +} + +func (m *GenesisState) GetPendingRewards() []PendingReward { + if m != nil { + return m.PendingRewards + } + return nil +} + +func (m *GenesisState) GetRewardBases() []RewardTracker { + if m != nil { + return m.RewardBases + } + return nil +} + +func (m *GenesisState) GetRewardAccumulators() []RewardAccumulator { + if m != nil { + return m.RewardAccumulators + } + return nil +} + +func (m *GenesisState) GetUnbondings() []Unbonding { + if m != nil { + return m.Unbondings + } + return nil +} + +// Bond tracks the amount of coins of one uToken denomination bonded to a +// given reward tier by a single account. +type Bond struct { + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + Tier uint32 `protobuf:"varint,2,opt,name=tier,proto3" json:"tier,omitempty"` + Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` +} + +func (m *Bond) Reset() { *m = Bond{} } +func (m *Bond) String() string { return proto.CompactTextString(m) } +func (*Bond) ProtoMessage() {} +func (*Bond) Descriptor() ([]byte, []int) { + return fileDescriptor_3f117566517b8062, []int{1} +} +func (m *Bond) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Bond) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Bond.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 *Bond) XXX_Merge(src proto.Message) { + xxx_messageInfo_Bond.Merge(m, src) +} +func (m *Bond) XXX_Size() int { + return m.Size() +} +func (m *Bond) XXX_DiscardUnknown() { + xxx_messageInfo_Bond.DiscardUnknown(m) +} + +var xxx_messageInfo_Bond proto.InternalMessageInfo + +func (m *Bond) GetAccount() string { + if m != nil { + return m.Account + } + return "" +} + +func (m *Bond) GetTier() uint32 { + if m != nil { + return m.Tier + } + return 0 +} + +func (m *Bond) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + +// PendingReward tracks the amount of rewards that a given account has calculated +// but not yet claimed. +type PendingReward struct { + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + PendingReward github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=pending_reward,json=pendingReward,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"pending_reward"` +} + +func (m *PendingReward) Reset() { *m = PendingReward{} } +func (m *PendingReward) String() string { return proto.CompactTextString(m) } +func (*PendingReward) ProtoMessage() {} +func (*PendingReward) Descriptor() ([]byte, []int) { + return fileDescriptor_3f117566517b8062, []int{2} +} +func (m *PendingReward) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PendingReward) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PendingReward.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 *PendingReward) XXX_Merge(src proto.Message) { + xxx_messageInfo_PendingReward.Merge(m, src) +} +func (m *PendingReward) XXX_Size() int { + return m.Size() +} +func (m *PendingReward) XXX_DiscardUnknown() { + xxx_messageInfo_PendingReward.DiscardUnknown(m) +} + +var xxx_messageInfo_PendingReward proto.InternalMessageInfo + +func (m *PendingReward) GetAccount() string { + if m != nil { + return m.Account + } + return "" +} + +func (m *PendingReward) GetPendingReward() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.PendingReward + } + return nil +} + +// RewardTracker tracks the value of a given tier and lock denom's RewardAccumulator +// at the last time a specific account calculated pending rewards for it. When calculating +// available rewards, this value is used to determine the difference between the current +// RewardAccumulator for a tier and the last value at which the user updated bonds or claimed +// tokens. Their pending rewards increase by only the rewards accrued in that time period. +type RewardTracker struct { + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + Tier uint32 `protobuf:"varint,2,opt,name=tier,proto3" json:"tier,omitempty"` + Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` + RewardTracker github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,4,rep,name=reward_tracker,json=rewardTracker,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"reward_tracker"` +} + +func (m *RewardTracker) Reset() { *m = RewardTracker{} } +func (m *RewardTracker) String() string { return proto.CompactTextString(m) } +func (*RewardTracker) ProtoMessage() {} +func (*RewardTracker) Descriptor() ([]byte, []int) { + return fileDescriptor_3f117566517b8062, []int{3} +} +func (m *RewardTracker) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RewardTracker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RewardTracker.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 *RewardTracker) XXX_Merge(src proto.Message) { + xxx_messageInfo_RewardTracker.Merge(m, src) +} +func (m *RewardTracker) XXX_Size() int { + return m.Size() +} +func (m *RewardTracker) XXX_DiscardUnknown() { + xxx_messageInfo_RewardTracker.DiscardUnknown(m) +} + +var xxx_messageInfo_RewardTracker proto.InternalMessageInfo + +func (m *RewardTracker) GetAccount() string { + if m != nil { + return m.Account + } + return "" +} + +func (m *RewardTracker) GetTier() uint32 { + if m != nil { + return m.Tier + } + return 0 +} + +func (m *RewardTracker) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *RewardTracker) GetRewardTracker() github_com_cosmos_cosmos_sdk_types.DecCoins { + if m != nil { + return m.RewardTracker + } + return nil +} + +// RewardAccumulator is a global reward tracking struct that indicates the amount +// of rewards that a single unit of denom would have acucmulated if it was bonded +// at a given tier since genesis. +type RewardAccumulator struct { + Tier uint32 `protobuf:"varint,1,opt,name=tier,proto3" json:"tier,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + RewardTracker github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,3,rep,name=reward_tracker,json=rewardTracker,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"reward_tracker"` +} + +func (m *RewardAccumulator) Reset() { *m = RewardAccumulator{} } +func (m *RewardAccumulator) String() string { return proto.CompactTextString(m) } +func (*RewardAccumulator) ProtoMessage() {} +func (*RewardAccumulator) Descriptor() ([]byte, []int) { + return fileDescriptor_3f117566517b8062, []int{4} +} +func (m *RewardAccumulator) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RewardAccumulator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RewardAccumulator.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 *RewardAccumulator) XXX_Merge(src proto.Message) { + xxx_messageInfo_RewardAccumulator.Merge(m, src) +} +func (m *RewardAccumulator) XXX_Size() int { + return m.Size() +} +func (m *RewardAccumulator) XXX_DiscardUnknown() { + xxx_messageInfo_RewardAccumulator.DiscardUnknown(m) +} + +var xxx_messageInfo_RewardAccumulator proto.InternalMessageInfo + +func (m *RewardAccumulator) GetTier() uint32 { + if m != nil { + return m.Tier + } + return 0 +} + +func (m *RewardAccumulator) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *RewardAccumulator) GetRewardTracker() github_com_cosmos_cosmos_sdk_types.DecCoins { + if m != nil { + return m.RewardTracker + } + return nil +} + +// Unbonding is a structure that tracks an in-progress token unbonding. +type Unbonding struct { + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + Tier uint32 `protobuf:"varint,2,opt,name=tier,proto3" json:"tier,omitempty"` + End uint64 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"` + Amount types.Coin `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount"` +} + +func (m *Unbonding) Reset() { *m = Unbonding{} } +func (m *Unbonding) String() string { return proto.CompactTextString(m) } +func (*Unbonding) ProtoMessage() {} +func (*Unbonding) Descriptor() ([]byte, []int) { + return fileDescriptor_3f117566517b8062, []int{5} +} +func (m *Unbonding) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Unbonding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Unbonding.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 *Unbonding) XXX_Merge(src proto.Message) { + xxx_messageInfo_Unbonding.Merge(m, src) +} +func (m *Unbonding) XXX_Size() int { + return m.Size() +} +func (m *Unbonding) XXX_DiscardUnknown() { + xxx_messageInfo_Unbonding.DiscardUnknown(m) +} + +var xxx_messageInfo_Unbonding proto.InternalMessageInfo + +func (m *Unbonding) GetAccount() string { + if m != nil { + return m.Account + } + return "" +} + +func (m *Unbonding) GetTier() uint32 { + if m != nil { + return m.Tier + } + return 0 +} + +func (m *Unbonding) GetEnd() uint64 { + if m != nil { + return m.End + } + return 0 +} + +func (m *Unbonding) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "umeenetwork.umee.incentive.v1.GenesisState") + proto.RegisterType((*Bond)(nil), "umeenetwork.umee.incentive.v1.Bond") + proto.RegisterType((*PendingReward)(nil), "umeenetwork.umee.incentive.v1.PendingReward") + proto.RegisterType((*RewardTracker)(nil), "umeenetwork.umee.incentive.v1.RewardTracker") + proto.RegisterType((*RewardAccumulator)(nil), "umeenetwork.umee.incentive.v1.RewardAccumulator") + proto.RegisterType((*Unbonding)(nil), "umeenetwork.umee.incentive.v1.Unbonding") +} + +func init() { proto.RegisterFile("umee/incentive/v1/genesis.proto", fileDescriptor_3f117566517b8062) } + +var fileDescriptor_3f117566517b8062 = []byte{ + // 734 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0x4d, 0x6e, 0xd3, 0x40, + 0x14, 0xc7, 0xe3, 0x26, 0x4d, 0xc9, 0x4b, 0xd2, 0x34, 0x43, 0x17, 0xa6, 0x02, 0x37, 0x04, 0x81, + 0x22, 0xa0, 0x76, 0x3f, 0x16, 0x2c, 0x11, 0x29, 0x08, 0x75, 0x83, 0x2a, 0xd3, 0x6e, 0x60, 0x11, + 0x1c, 0x7b, 0x64, 0xac, 0xc6, 0x33, 0x96, 0x67, 0x9c, 0x96, 0x3d, 0x07, 0xe0, 0x02, 0x5c, 0x80, + 0x0b, 0x70, 0x85, 0x6e, 0x90, 0xba, 0x64, 0x05, 0xa8, 0x3d, 0x01, 0x37, 0x40, 0xf3, 0x91, 0x2f, + 0x5a, 0x25, 0xad, 0x8a, 0x58, 0x65, 0x66, 0xf2, 0xde, 0xef, 0xff, 0xde, 0xcc, 0x7f, 0xc6, 0xb0, + 0x9a, 0xc5, 0x18, 0x3b, 0x11, 0xf1, 0x31, 0xe1, 0x51, 0x1f, 0x3b, 0xfd, 0x0d, 0x27, 0xc4, 0x04, + 0xb3, 0x88, 0xd9, 0x49, 0x4a, 0x39, 0x45, 0x77, 0x44, 0x00, 0xc1, 0xfc, 0x90, 0xa6, 0x07, 0xb6, + 0x18, 0xdb, 0xc3, 0x60, 0xbb, 0xbf, 0xb1, 0x62, 0xf9, 0x94, 0xc5, 0x94, 0x39, 0x5d, 0x8f, 0x89, + 0xe4, 0x2e, 0xe6, 0xde, 0x86, 0xe3, 0xd3, 0x88, 0xa8, 0xf4, 0x95, 0xe5, 0x90, 0x86, 0x54, 0x0e, + 0x1d, 0x31, 0xd2, 0xab, 0x77, 0xcf, 0xab, 0x8e, 0xa8, 0x32, 0xa4, 0xf9, 0x7b, 0x01, 0x2a, 0x2f, + 0x55, 0x25, 0xaf, 0xb9, 0xc7, 0x31, 0xda, 0x86, 0x62, 0xe2, 0xa5, 0x5e, 0xcc, 0x4c, 0xa3, 0x61, + 0xb4, 0xca, 0x9b, 0xf7, 0xed, 0xa9, 0x95, 0xd9, 0xbb, 0x32, 0xb8, 0x5d, 0x38, 0xfe, 0xb1, 0x9a, + 0x73, 0x75, 0x2a, 0x0a, 0x00, 0xf9, 0x34, 0x4e, 0x7a, 0x98, 0xe3, 0xa0, 0x93, 0xa4, 0x34, 0x94, + 0xc0, 0xb9, 0x46, 0xbe, 0x55, 0xde, 0x74, 0x66, 0x00, 0x77, 0x06, 0x93, 0x5d, 0x95, 0xa7, 0xd1, + 0xf5, 0x21, 0x50, 0xaf, 0x33, 0xf4, 0x0e, 0x96, 0x28, 0x09, 0x69, 0x44, 0xc2, 0x91, 0x46, 0xfe, + 0x3a, 0x1a, 0x35, 0x8d, 0x1b, 0x2a, 0x74, 0xa1, 0x9e, 0x25, 0x3e, 0x8d, 0x27, 0x24, 0x0a, 0xd7, + 0x91, 0x58, 0x1a, 0xf0, 0x86, 0x1a, 0x0f, 0xa0, 0x46, 0xf0, 0x11, 0x1f, 0xf0, 0x3b, 0x51, 0x60, + 0xce, 0x37, 0x8c, 0x56, 0xd5, 0xad, 0x8a, 0x65, 0x1d, 0xb6, 0x13, 0xa0, 0x87, 0x50, 0xef, 0x79, + 0x8c, 0x77, 0x52, 0x7c, 0xe8, 0xa5, 0x01, 0xeb, 0xf0, 0x28, 0xc6, 0x66, 0xb1, 0x61, 0xb4, 0x0a, + 0x6e, 0x4d, 0xfc, 0xe1, 0xaa, 0xf5, 0xbd, 0x28, 0xc6, 0x88, 0x40, 0x85, 0x53, 0xee, 0xf5, 0x3a, + 0x5d, 0x4a, 0x02, 0x1c, 0x98, 0x0b, 0xb2, 0xe4, 0x5b, 0xb6, 0x72, 0x91, 0x2d, 0x5c, 0x64, 0x6b, + 0x17, 0xd9, 0xdb, 0x34, 0x22, 0xed, 0x75, 0x51, 0xdc, 0x97, 0x9f, 0xab, 0xad, 0x30, 0xe2, 0xef, + 0xb3, 0xae, 0xed, 0xd3, 0xd8, 0xd1, 0x96, 0x53, 0x3f, 0x6b, 0x2c, 0x38, 0x70, 0xf8, 0x87, 0x04, + 0x33, 0x99, 0xc0, 0xdc, 0xb2, 0x14, 0x68, 0x4b, 0x3e, 0x7a, 0x0a, 0xf3, 0x42, 0x89, 0x99, 0x37, + 0xa4, 0xd0, 0xbd, 0x19, 0x7b, 0x23, 0xb2, 0xf4, 0x7e, 0xa8, 0x3c, 0xf4, 0x16, 0x6a, 0x09, 0x26, + 0x81, 0xd8, 0x67, 0xdd, 0x9f, 0x59, 0x92, 0xa8, 0xc7, 0xb3, 0xec, 0xa7, 0xb2, 0x54, 0xf3, 0x9a, + 0xb9, 0x98, 0x8c, 0x2f, 0x32, 0xb4, 0x0f, 0x15, 0x05, 0xed, 0x88, 0xc6, 0x99, 0x09, 0x97, 0x22, + 0xab, 0xec, 0xbd, 0xd4, 0xf3, 0x0f, 0x70, 0xaa, 0xc9, 0x65, 0xc5, 0x69, 0x0b, 0x0c, 0x0a, 0xe1, + 0xa6, 0xc6, 0x7a, 0xbe, 0x9f, 0xc5, 0x59, 0xcf, 0xe3, 0x34, 0x65, 0x66, 0x59, 0xd2, 0xd7, 0x2f, + 0x45, 0x7f, 0x36, 0x4a, 0xd4, 0x0a, 0x28, 0xfd, 0xfb, 0x0f, 0x86, 0x5e, 0x01, 0x64, 0x44, 0xec, + 0x53, 0x44, 0x42, 0x66, 0x56, 0x24, 0xbf, 0x35, 0x83, 0xbf, 0x3f, 0x48, 0xd0, 0xdc, 0x31, 0x42, + 0x33, 0x86, 0x82, 0x38, 0x01, 0x64, 0xc2, 0x82, 0xe7, 0xfb, 0x34, 0x23, 0x5c, 0xde, 0xf5, 0x92, + 0x3b, 0x98, 0x22, 0x04, 0x05, 0x1e, 0xe1, 0xd4, 0x9c, 0x93, 0x46, 0x94, 0x63, 0xf4, 0x04, 0x8a, + 0x5e, 0x2c, 0x83, 0xf3, 0xf2, 0x61, 0x98, 0xe2, 0x26, 0xfd, 0x18, 0xa8, 0xf0, 0xe6, 0x67, 0x03, + 0xaa, 0x13, 0xc7, 0x34, 0x45, 0x38, 0x85, 0xc5, 0x49, 0x1f, 0xe8, 0x47, 0xe3, 0x9f, 0x5a, 0xb7, + 0x3a, 0xe1, 0x8f, 0xe6, 0x37, 0x03, 0xaa, 0x13, 0x87, 0x7d, 0xc5, 0x8d, 0x59, 0x86, 0xf9, 0x00, + 0x13, 0x1a, 0xcb, 0x7d, 0x29, 0xb9, 0x6a, 0x82, 0x8e, 0x60, 0x51, 0xbb, 0x83, 0x2b, 0xaa, 0x7e, + 0x37, 0x6e, 0x5f, 0xd8, 0xc9, 0x73, 0xec, 0xcb, 0x66, 0xb6, 0x74, 0x33, 0x8f, 0x2e, 0xd1, 0x8c, + 0xce, 0x61, 0x6e, 0x35, 0x1d, 0xaf, 0xbe, 0xf9, 0xd5, 0x80, 0xfa, 0x39, 0x7b, 0x0d, 0x2b, 0x37, + 0x2e, 0xaa, 0x7c, 0x6e, 0x7a, 0xe5, 0xf9, 0xff, 0x54, 0xf9, 0x47, 0x03, 0x4a, 0x43, 0xe3, 0x5e, + 0xf1, 0x14, 0x96, 0x20, 0x8f, 0x49, 0x20, 0xcf, 0xa0, 0xe0, 0x8a, 0xe1, 0x98, 0x61, 0x0b, 0x57, + 0x32, 0x6c, 0xfb, 0xc5, 0xf1, 0xa9, 0x65, 0x9c, 0x9c, 0x5a, 0xc6, 0xaf, 0x53, 0xcb, 0xf8, 0x74, + 0x66, 0xe5, 0x4e, 0xce, 0xac, 0xdc, 0xf7, 0x33, 0x2b, 0xf7, 0x66, 0xbc, 0x39, 0x71, 0xe7, 0xd6, + 0xf4, 0x05, 0x94, 0x13, 0xa7, 0xbf, 0xe5, 0x1c, 0x8d, 0x3e, 0xb0, 0xdd, 0xa2, 0xfc, 0xc2, 0x6e, + 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0xc8, 0x0c, 0x31, 0x6e, 0xfc, 0x07, 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.Unbondings) > 0 { + for iNdEx := len(m.Unbondings) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Unbondings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + } + if len(m.RewardAccumulators) > 0 { + for iNdEx := len(m.RewardAccumulators) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RewardAccumulators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + } + if len(m.RewardBases) > 0 { + for iNdEx := len(m.RewardBases) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RewardBases[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + } + if len(m.PendingRewards) > 0 { + for iNdEx := len(m.PendingRewards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PendingRewards[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if len(m.Bonds) > 0 { + for iNdEx := len(m.Bonds) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Bonds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if len(m.TotalBonded) > 0 { + for iNdEx := len(m.TotalBonded) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TotalBonded[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if m.LastRewardsTime != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.LastRewardsTime)) + i-- + dAtA[i] = 0x30 + } + if m.NextProgramId != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.NextProgramId)) + i-- + dAtA[i] = 0x28 + } + if len(m.UpcomingPrograms) > 0 { + for iNdEx := len(m.UpcomingPrograms) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.UpcomingPrograms[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.OngoingPrograms) > 0 { + for iNdEx := len(m.OngoingPrograms) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.OngoingPrograms[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.CompletedPrograms) > 0 { + for iNdEx := len(m.CompletedPrograms) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CompletedPrograms[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Bond) 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 *Bond) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Bond) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.Tier != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Tier)) + i-- + dAtA[i] = 0x10 + } + if len(m.Account) > 0 { + i -= len(m.Account) + copy(dAtA[i:], m.Account) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Account))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PendingReward) 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 *PendingReward) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PendingReward) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PendingReward) > 0 { + for iNdEx := len(m.PendingReward) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PendingReward[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Account) > 0 { + i -= len(m.Account) + copy(dAtA[i:], m.Account) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Account))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RewardTracker) 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 *RewardTracker) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RewardTracker) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RewardTracker) > 0 { + for iNdEx := len(m.RewardTracker) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RewardTracker[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.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x1a + } + if m.Tier != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Tier)) + i-- + dAtA[i] = 0x10 + } + if len(m.Account) > 0 { + i -= len(m.Account) + copy(dAtA[i:], m.Account) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Account))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RewardAccumulator) 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 *RewardAccumulator) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RewardAccumulator) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RewardTracker) > 0 { + for iNdEx := len(m.RewardTracker) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RewardTracker[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.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 + } + if m.Tier != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Tier)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Unbonding) 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 *Unbonding) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Unbonding) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if m.End != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.End)) + i-- + dAtA[i] = 0x18 + } + if m.Tier != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Tier)) + i-- + dAtA[i] = 0x10 + } + if len(m.Account) > 0 { + i -= len(m.Account) + copy(dAtA[i:], m.Account) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Account))) + i-- + dAtA[i] = 0xa + } + 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 + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + if len(m.CompletedPrograms) > 0 { + for _, e := range m.CompletedPrograms { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.OngoingPrograms) > 0 { + for _, e := range m.OngoingPrograms { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.UpcomingPrograms) > 0 { + for _, e := range m.UpcomingPrograms { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if m.NextProgramId != 0 { + n += 1 + sovGenesis(uint64(m.NextProgramId)) + } + if m.LastRewardsTime != 0 { + n += 1 + sovGenesis(uint64(m.LastRewardsTime)) + } + if len(m.TotalBonded) > 0 { + for _, e := range m.TotalBonded { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Bonds) > 0 { + for _, e := range m.Bonds { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.PendingRewards) > 0 { + for _, e := range m.PendingRewards { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.RewardBases) > 0 { + for _, e := range m.RewardBases { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.RewardAccumulators) > 0 { + for _, e := range m.RewardAccumulators { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Unbondings) > 0 { + for _, e := range m.Unbondings { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *Bond) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Account) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.Tier != 0 { + n += 1 + sovGenesis(uint64(m.Tier)) + } + l = m.Amount.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func (m *PendingReward) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Account) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if len(m.PendingReward) > 0 { + for _, e := range m.PendingReward { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *RewardTracker) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Account) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.Tier != 0 { + n += 1 + sovGenesis(uint64(m.Tier)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if len(m.RewardTracker) > 0 { + for _, e := range m.RewardTracker { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *RewardAccumulator) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Tier != 0 { + n += 1 + sovGenesis(uint64(m.Tier)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if len(m.RewardTracker) > 0 { + for _, e := range m.RewardTracker { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *Unbonding) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Account) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.Tier != 0 { + n += 1 + sovGenesis(uint64(m.Tier)) + } + if m.End != 0 { + n += 1 + sovGenesis(uint64(m.End)) + } + l = m.Amount.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 != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", 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 + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompletedPrograms", 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.CompletedPrograms = append(m.CompletedPrograms, IncentiveProgram{}) + if err := m.CompletedPrograms[len(m.CompletedPrograms)-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 OngoingPrograms", 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.OngoingPrograms = append(m.OngoingPrograms, IncentiveProgram{}) + if err := m.OngoingPrograms[len(m.OngoingPrograms)-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 UpcomingPrograms", 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.UpcomingPrograms = append(m.UpcomingPrograms, IncentiveProgram{}) + if err := m.UpcomingPrograms[len(m.UpcomingPrograms)-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 NextProgramId", wireType) + } + m.NextProgramId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NextProgramId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastRewardsTime", wireType) + } + m.LastRewardsTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastRewardsTime |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalBonded", 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.TotalBonded = append(m.TotalBonded, types.Coin{}) + if err := m.TotalBonded[len(m.TotalBonded)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bonds", 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.Bonds = append(m.Bonds, Bond{}) + if err := m.Bonds[len(m.Bonds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PendingRewards", 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.PendingRewards = append(m.PendingRewards, PendingReward{}) + if err := m.PendingRewards[len(m.PendingRewards)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RewardBases", 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.RewardBases = append(m.RewardBases, RewardTracker{}) + if err := m.RewardBases[len(m.RewardBases)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RewardAccumulators", 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.RewardAccumulators = append(m.RewardAccumulators, RewardAccumulator{}) + if err := m.RewardAccumulators[len(m.RewardAccumulators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Unbondings", 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.Unbondings = append(m.Unbondings, Unbonding{}) + if err := m.Unbondings[len(m.Unbondings)-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 (m *Bond) 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: Bond: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Bond: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Account = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Tier", wireType) + } + m.Tier = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Tier |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", 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 + } + if err := m.Amount.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 (m *PendingReward) 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: PendingReward: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PendingReward: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Account = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PendingReward", 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.PendingReward = append(m.PendingReward, types.Coin{}) + if err := m.PendingReward[len(m.PendingReward)-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 (m *RewardTracker) 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: RewardTracker: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RewardTracker: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Account = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Tier", wireType) + } + m.Tier = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Tier |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RewardTracker", 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.RewardTracker = append(m.RewardTracker, types.DecCoin{}) + if err := m.RewardTracker[len(m.RewardTracker)-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 (m *RewardAccumulator) 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: RewardAccumulator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RewardAccumulator: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Tier", wireType) + } + m.Tier = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Tier |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RewardTracker", 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.RewardTracker = append(m.RewardTracker, types.DecCoin{}) + if err := m.RewardTracker[len(m.RewardTracker)-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 (m *Unbonding) 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: Unbonding: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Unbonding: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Account = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Tier", wireType) + } + m.Tier = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Tier |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + } + m.End = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.End |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", 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 + } + if err := m.Amount.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/incentive/incentive.pb.go b/x/incentive/incentive.pb.go new file mode 100644 index 0000000000..e1d5c66cbd --- /dev/null +++ b/x/incentive/incentive.pb.go @@ -0,0 +1,1130 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: umee/incentive/v1/incentive.proto + +package incentive + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/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 + +// Params defines the parameters for the incentive module. +type Params struct { + // max_unbondings defines the maximum amount of concurrent unbondings an address can have. + MaxUnbondings uint32 `protobuf:"varint,1,opt,name=max_unbondings,json=maxUnbondings,proto3" json:"max_unbondings,omitempty"` + // unbonding_duration_long defines the unbonding duration (in seconds) of the long tier. + UnbondingDurationLong uint64 `protobuf:"varint,2,opt,name=unbonding_duration_long,json=unbondingDurationLong,proto3" json:"unbonding_duration_long,omitempty"` + // unbonding_duration_middle defines the unbonding duration (in seconds) of the middle tier. + UnbondingDurationMiddle uint64 `protobuf:"varint,3,opt,name=unbonding_duration_middle,json=unbondingDurationMiddle,proto3" json:"unbonding_duration_middle,omitempty"` + // unbonding_duration_short defines the unbonding duration (in seconds) of the short tier. + UnbondingDurationShort uint64 `protobuf:"varint,4,opt,name=unbonding_duration_short,json=unbondingDurationShort,proto3" json:"unbonding_duration_short,omitempty"` + // tier_weight_short defines the proportion of rewards which assets bonded + // in the short unbonding duration receive compared to what the same amount + // would receive bonded to the long tier. + // valid values: [0;1] + TierWeightShort github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=tier_weight_short,json=tierWeightShort,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"tier_weight_short"` + // tier_weight_middle defines the proportion of rewards which assets bonded + // in the middle unbonding duration receive compared to what the same amount + // would receive bonded to the long tier. + // valid values: [0;1] + TierWeightMiddle github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=tier_weight_middle,json=tierWeightMiddle,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"tier_weight_middle"` + // community_fund_address is the address from which all incentive programs + // proposed with "from_community_fund = true" will receive their funding. + // Since funds are withdrawn automatically when an incentive program passes + // governance, this account should always contain sufficient balance to + // cover incentive programs which are being voted upon. + CommunityFundAddress string `protobuf:"bytes,7,opt,name=community_fund_address,json=communityFundAddress,proto3" json:"community_fund_address,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_8c99c623956e199b, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetMaxUnbondings() uint32 { + if m != nil { + return m.MaxUnbondings + } + return 0 +} + +func (m *Params) GetUnbondingDurationLong() uint64 { + if m != nil { + return m.UnbondingDurationLong + } + return 0 +} + +func (m *Params) GetUnbondingDurationMiddle() uint64 { + if m != nil { + return m.UnbondingDurationMiddle + } + return 0 +} + +func (m *Params) GetUnbondingDurationShort() uint64 { + if m != nil { + return m.UnbondingDurationShort + } + return 0 +} + +func (m *Params) GetCommunityFundAddress() string { + if m != nil { + return m.CommunityFundAddress + } + return "" +} + +// IncentiveProgram defines a liquidity mining incentive program on a single +// locked uToken denom that will run for a set amount of time. +type IncentiveProgram struct { + // ID uniquely identifies the incentive program after it has been created. + // It is zero when the program is being proposed by governance. + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // start_time is the unix time (in seconds) at which the incentives begin. + StartTime uint64 `protobuf:"varint,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // duration is the length of the incentive program in seconds. + Duration uint64 `protobuf:"varint,3,opt,name=duration,proto3" json:"duration,omitempty"` + // denom is the incentivized uToken collateral. + Denom string `protobuf:"bytes,4,opt,name=denom,proto3" json:"denom,omitempty"` + // total_rewards are total amount of rewards which can be distributed to + // suppliers by this program. This is set to its final value when the program + // is proposed by governance. + TotalRewards types.Coin `protobuf:"bytes,5,opt,name=total_rewards,json=totalRewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"total_rewards"` + // funded_rewards are total amount of rewards which have been funded by a + // sponsor to this program. This is zero until the program is both passed + // by governance and funded. + FundedRewards types.Coin `protobuf:"bytes,6,opt,name=funded_rewards,json=fundedRewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"funded_rewards"` + // remaining_rewards are total amount of this program's funded rewards + // which have not yet been allocated to suppliers. This is zero until the + // program is both passed by governance and funded, then begins decreasing + // to zero as the program runs to completion. + RemainingRewards types.Coin `protobuf:"bytes,7,opt,name=remaining_rewards,json=remainingRewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"remaining_rewards"` +} + +func (m *IncentiveProgram) Reset() { *m = IncentiveProgram{} } +func (m *IncentiveProgram) String() string { return proto.CompactTextString(m) } +func (*IncentiveProgram) ProtoMessage() {} +func (*IncentiveProgram) Descriptor() ([]byte, []int) { + return fileDescriptor_8c99c623956e199b, []int{1} +} +func (m *IncentiveProgram) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IncentiveProgram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IncentiveProgram.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 *IncentiveProgram) XXX_Merge(src proto.Message) { + xxx_messageInfo_IncentiveProgram.Merge(m, src) +} +func (m *IncentiveProgram) XXX_Size() int { + return m.Size() +} +func (m *IncentiveProgram) XXX_DiscardUnknown() { + xxx_messageInfo_IncentiveProgram.DiscardUnknown(m) +} + +var xxx_messageInfo_IncentiveProgram proto.InternalMessageInfo + +func (m *IncentiveProgram) GetId() uint32 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *IncentiveProgram) GetStartTime() uint64 { + if m != nil { + return m.StartTime + } + return 0 +} + +func (m *IncentiveProgram) GetDuration() uint64 { + if m != nil { + return m.Duration + } + return 0 +} + +func (m *IncentiveProgram) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *IncentiveProgram) GetTotalRewards() types.Coin { + if m != nil { + return m.TotalRewards + } + return types.Coin{} +} + +func (m *IncentiveProgram) GetFundedRewards() types.Coin { + if m != nil { + return m.FundedRewards + } + return types.Coin{} +} + +func (m *IncentiveProgram) GetRemainingRewards() types.Coin { + if m != nil { + return m.RemainingRewards + } + return types.Coin{} +} + +func init() { + proto.RegisterType((*Params)(nil), "umeenetwork.umee.incentive.v1.Params") + proto.RegisterType((*IncentiveProgram)(nil), "umeenetwork.umee.incentive.v1.IncentiveProgram") +} + +func init() { proto.RegisterFile("umee/incentive/v1/incentive.proto", fileDescriptor_8c99c623956e199b) } + +var fileDescriptor_8c99c623956e199b = []byte{ + // 564 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x41, 0x6b, 0x13, 0x41, + 0x18, 0xcd, 0x36, 0x69, 0x6a, 0x46, 0x13, 0xd3, 0x21, 0xb6, 0xdb, 0x40, 0x37, 0xb1, 0xa0, 0x04, + 0xa4, 0xbb, 0xc6, 0x8a, 0x48, 0x6f, 0xc6, 0x2a, 0x08, 0x0a, 0x65, 0x55, 0x84, 0x22, 0x2c, 0x93, + 0x9d, 0x71, 0x33, 0x34, 0x33, 0x13, 0x66, 0x66, 0x93, 0xf4, 0x5f, 0xf8, 0x13, 0x3c, 0xfb, 0x4b, + 0x7a, 0x2c, 0x78, 0x51, 0x0f, 0x55, 0x92, 0x8b, 0x3f, 0x43, 0x66, 0x77, 0xb3, 0x29, 0xb4, 0x07, + 0x91, 0x9e, 0x76, 0xbe, 0x79, 0xf3, 0xde, 0x63, 0xde, 0xf7, 0xed, 0x80, 0xbb, 0x31, 0x23, 0xc4, + 0xa3, 0x3c, 0x24, 0x5c, 0xd3, 0x31, 0xf1, 0xc6, 0xdd, 0x65, 0xe1, 0x8e, 0xa4, 0xd0, 0x02, 0x6e, + 0x9b, 0x23, 0x9c, 0xe8, 0x89, 0x90, 0xc7, 0xae, 0x59, 0xbb, 0xcb, 0x13, 0xe3, 0x6e, 0xd3, 0x09, + 0x85, 0x62, 0x42, 0x79, 0x7d, 0xa4, 0x0c, 0xbd, 0x4f, 0x34, 0xea, 0x7a, 0xa1, 0xa0, 0x3c, 0xa5, + 0x37, 0x1b, 0x91, 0x88, 0x44, 0xb2, 0xf4, 0xcc, 0x2a, 0xdd, 0xdd, 0xf9, 0x56, 0x04, 0xe5, 0x43, + 0x24, 0x11, 0x53, 0xf0, 0x1e, 0xa8, 0x31, 0x34, 0x0d, 0x62, 0xde, 0x17, 0x1c, 0x53, 0x1e, 0x29, + 0xdb, 0x6a, 0x5b, 0x9d, 0xaa, 0x5f, 0x65, 0x68, 0xfa, 0x3e, 0xdf, 0x84, 0x4f, 0xc0, 0x66, 0x7e, + 0x24, 0xc0, 0xb1, 0x44, 0x9a, 0x0a, 0x1e, 0x0c, 0x05, 0x8f, 0xec, 0x95, 0xb6, 0xd5, 0x29, 0xf9, + 0x77, 0x72, 0xf8, 0x20, 0x43, 0x5f, 0x0b, 0x1e, 0xc1, 0x7d, 0xb0, 0x75, 0x05, 0x8f, 0x51, 0x8c, + 0x87, 0xc4, 0x2e, 0x26, 0xcc, 0xcd, 0x4b, 0xcc, 0x37, 0x09, 0x0c, 0x9f, 0x02, 0xfb, 0x0a, 0xae, + 0x1a, 0x08, 0xa9, 0xed, 0x52, 0x42, 0xdd, 0xb8, 0x44, 0x7d, 0x6b, 0x50, 0x78, 0x04, 0xd6, 0x35, + 0x25, 0x32, 0x98, 0x10, 0x1a, 0x0d, 0x74, 0x46, 0x59, 0x6d, 0x5b, 0x9d, 0x4a, 0xcf, 0x3d, 0x3d, + 0x6f, 0x15, 0x7e, 0x9e, 0xb7, 0xee, 0x47, 0x54, 0x0f, 0xe2, 0xbe, 0x1b, 0x0a, 0xe6, 0x65, 0x19, + 0xa6, 0x9f, 0x5d, 0x85, 0x8f, 0x3d, 0x7d, 0x32, 0x22, 0xca, 0x3d, 0x20, 0xa1, 0x7f, 0xdb, 0x08, + 0x7d, 0x48, 0x74, 0x52, 0xed, 0x8f, 0x00, 0x5e, 0xd4, 0xce, 0xae, 0x52, 0xfe, 0x2f, 0xf1, 0xfa, + 0x52, 0x3c, 0xbb, 0xf3, 0x63, 0xb0, 0x11, 0x0a, 0xc6, 0x62, 0x4e, 0xf5, 0x49, 0xf0, 0x29, 0xe6, + 0x38, 0x40, 0x18, 0x4b, 0xa2, 0x94, 0xbd, 0x66, 0x1c, 0xfc, 0x46, 0x8e, 0xbe, 0x8c, 0x39, 0x7e, + 0x96, 0x62, 0xfb, 0xa5, 0x3f, 0x5f, 0x5a, 0xd6, 0xce, 0x8f, 0x22, 0xa8, 0xbf, 0x5a, 0x0c, 0xc7, + 0xa1, 0x14, 0x91, 0x44, 0x0c, 0xd6, 0xc0, 0x0a, 0xc5, 0x59, 0x4f, 0x57, 0x28, 0x86, 0xdb, 0x00, + 0x28, 0x8d, 0xa4, 0x0e, 0x34, 0x65, 0x24, 0xeb, 0x5d, 0x25, 0xd9, 0x79, 0x47, 0x19, 0x81, 0x4d, + 0x70, 0x63, 0x91, 0x74, 0xd6, 0x9e, 0xbc, 0x86, 0x0d, 0xb0, 0x8a, 0x09, 0x17, 0x2c, 0x09, 0xbf, + 0xe2, 0xa7, 0x05, 0x1c, 0x81, 0xaa, 0x16, 0x1a, 0x0d, 0x03, 0x49, 0x26, 0x48, 0x62, 0x95, 0xe4, + 0x7c, 0xf3, 0xd1, 0x96, 0x9b, 0xde, 0xd8, 0x35, 0x93, 0xe9, 0x66, 0x93, 0xe9, 0x3e, 0x17, 0x94, + 0xf7, 0x1e, 0x9a, 0x94, 0xbe, 0xfe, 0x6a, 0x75, 0xfe, 0x21, 0x25, 0x43, 0x50, 0xfe, 0xad, 0xc4, + 0xc1, 0x4f, 0x0d, 0xa0, 0x04, 0x35, 0x93, 0x0c, 0xc1, 0xb9, 0x65, 0xf9, 0xfa, 0x2d, 0xab, 0xa9, + 0xc5, 0xc2, 0x73, 0x0a, 0xd6, 0x25, 0x61, 0x88, 0x72, 0x33, 0x8b, 0x0b, 0xdb, 0xb5, 0xeb, 0xb7, + 0xad, 0xe7, 0x2e, 0x99, 0x73, 0xda, 0xdb, 0xde, 0x8b, 0xd3, 0x99, 0x63, 0x9d, 0xcd, 0x1c, 0xeb, + 0xf7, 0xcc, 0xb1, 0x3e, 0xcf, 0x9d, 0xc2, 0xd9, 0xdc, 0x29, 0x7c, 0x9f, 0x3b, 0x85, 0xa3, 0x07, + 0x17, 0xb4, 0xcd, 0xfb, 0xb0, 0x9b, 0x3d, 0x16, 0x49, 0xe1, 0x8d, 0xf7, 0xbc, 0xe9, 0xf2, 0x4d, + 0xe9, 0x97, 0x93, 0xff, 0x7f, 0xef, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x04, 0x15, 0x3a, 0xb4, + 0x79, 0x04, 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.MaxUnbondings != that1.MaxUnbondings { + return false + } + if this.UnbondingDurationLong != that1.UnbondingDurationLong { + return false + } + if this.UnbondingDurationMiddle != that1.UnbondingDurationMiddle { + return false + } + if this.UnbondingDurationShort != that1.UnbondingDurationShort { + return false + } + if !this.TierWeightShort.Equal(that1.TierWeightShort) { + return false + } + if !this.TierWeightMiddle.Equal(that1.TierWeightMiddle) { + return false + } + if this.CommunityFundAddress != that1.CommunityFundAddress { + return false + } + return true +} +func (this *IncentiveProgram) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*IncentiveProgram) + if !ok { + that2, ok := that.(IncentiveProgram) + 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.StartTime != that1.StartTime { + return false + } + if this.Duration != that1.Duration { + return false + } + if this.Denom != that1.Denom { + return false + } + if !this.TotalRewards.Equal(&that1.TotalRewards) { + return false + } + if !this.FundedRewards.Equal(&that1.FundedRewards) { + return false + } + if !this.RemainingRewards.Equal(&that1.RemainingRewards) { + return false + } + return true +} +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CommunityFundAddress) > 0 { + i -= len(m.CommunityFundAddress) + copy(dAtA[i:], m.CommunityFundAddress) + i = encodeVarintIncentive(dAtA, i, uint64(len(m.CommunityFundAddress))) + i-- + dAtA[i] = 0x3a + } + { + size := m.TierWeightMiddle.Size() + i -= size + if _, err := m.TierWeightMiddle.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintIncentive(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.TierWeightShort.Size() + i -= size + if _, err := m.TierWeightShort.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintIncentive(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if m.UnbondingDurationShort != 0 { + i = encodeVarintIncentive(dAtA, i, uint64(m.UnbondingDurationShort)) + i-- + dAtA[i] = 0x20 + } + if m.UnbondingDurationMiddle != 0 { + i = encodeVarintIncentive(dAtA, i, uint64(m.UnbondingDurationMiddle)) + i-- + dAtA[i] = 0x18 + } + if m.UnbondingDurationLong != 0 { + i = encodeVarintIncentive(dAtA, i, uint64(m.UnbondingDurationLong)) + i-- + dAtA[i] = 0x10 + } + if m.MaxUnbondings != 0 { + i = encodeVarintIncentive(dAtA, i, uint64(m.MaxUnbondings)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *IncentiveProgram) 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 *IncentiveProgram) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IncentiveProgram) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.RemainingRewards.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintIncentive(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size, err := m.FundedRewards.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintIncentive(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size, err := m.TotalRewards.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintIncentive(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintIncentive(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x22 + } + if m.Duration != 0 { + i = encodeVarintIncentive(dAtA, i, uint64(m.Duration)) + i-- + dAtA[i] = 0x18 + } + if m.StartTime != 0 { + i = encodeVarintIncentive(dAtA, i, uint64(m.StartTime)) + i-- + dAtA[i] = 0x10 + } + if m.Id != 0 { + i = encodeVarintIncentive(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintIncentive(dAtA []byte, offset int, v uint64) int { + offset -= sovIncentive(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MaxUnbondings != 0 { + n += 1 + sovIncentive(uint64(m.MaxUnbondings)) + } + if m.UnbondingDurationLong != 0 { + n += 1 + sovIncentive(uint64(m.UnbondingDurationLong)) + } + if m.UnbondingDurationMiddle != 0 { + n += 1 + sovIncentive(uint64(m.UnbondingDurationMiddle)) + } + if m.UnbondingDurationShort != 0 { + n += 1 + sovIncentive(uint64(m.UnbondingDurationShort)) + } + l = m.TierWeightShort.Size() + n += 1 + l + sovIncentive(uint64(l)) + l = m.TierWeightMiddle.Size() + n += 1 + l + sovIncentive(uint64(l)) + l = len(m.CommunityFundAddress) + if l > 0 { + n += 1 + l + sovIncentive(uint64(l)) + } + return n +} + +func (m *IncentiveProgram) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovIncentive(uint64(m.Id)) + } + if m.StartTime != 0 { + n += 1 + sovIncentive(uint64(m.StartTime)) + } + if m.Duration != 0 { + n += 1 + sovIncentive(uint64(m.Duration)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovIncentive(uint64(l)) + } + l = m.TotalRewards.Size() + n += 1 + l + sovIncentive(uint64(l)) + l = m.FundedRewards.Size() + n += 1 + l + sovIncentive(uint64(l)) + l = m.RemainingRewards.Size() + n += 1 + l + sovIncentive(uint64(l)) + return n +} + +func sovIncentive(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozIncentive(x uint64) (n int) { + return sovIncentive(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) 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 ErrIntOverflowIncentive + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxUnbondings", wireType) + } + m.MaxUnbondings = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIncentive + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxUnbondings |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingDurationLong", wireType) + } + m.UnbondingDurationLong = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIncentive + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UnbondingDurationLong |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingDurationMiddle", wireType) + } + m.UnbondingDurationMiddle = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIncentive + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UnbondingDurationMiddle |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingDurationShort", wireType) + } + m.UnbondingDurationShort = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIncentive + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UnbondingDurationShort |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TierWeightShort", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIncentive + } + 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 ErrInvalidLengthIncentive + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthIncentive + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TierWeightShort.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TierWeightMiddle", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIncentive + } + 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 ErrInvalidLengthIncentive + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthIncentive + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TierWeightMiddle.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CommunityFundAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIncentive + } + 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 ErrInvalidLengthIncentive + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthIncentive + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CommunityFundAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipIncentive(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthIncentive + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IncentiveProgram) 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 ErrIntOverflowIncentive + } + 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: IncentiveProgram: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IncentiveProgram: 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 ErrIntOverflowIncentive + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + m.StartTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIncentive + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StartTime |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + m.Duration = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIncentive + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Duration |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIncentive + } + 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 ErrInvalidLengthIncentive + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthIncentive + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalRewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIncentive + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthIncentive + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthIncentive + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TotalRewards.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FundedRewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIncentive + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthIncentive + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthIncentive + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.FundedRewards.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RemainingRewards", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIncentive + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthIncentive + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthIncentive + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RemainingRewards.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipIncentive(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthIncentive + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipIncentive(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, ErrIntOverflowIncentive + } + 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, ErrIntOverflowIncentive + } + 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, ErrIntOverflowIncentive + } + 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, ErrInvalidLengthIncentive + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupIncentive + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthIncentive + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthIncentive = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIncentive = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupIncentive = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/incentive/query.pb.go b/x/incentive/query.pb.go new file mode 100644 index 0000000000..ea44784859 --- /dev/null +++ b/x/incentive/query.pb.go @@ -0,0 +1,3831 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: umee/incentive/v1/query.proto + +package incentive + +import ( + context "context" + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/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 + +// TotalBond tracks the amount of coins of one uToken denomination bonded to a +// given reward tier without specifying an account. +type TotalBond struct { + Tier uint32 `protobuf:"varint,1,opt,name=tier,proto3" json:"tier,omitempty"` + Amount types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"` +} + +func (m *TotalBond) Reset() { *m = TotalBond{} } +func (m *TotalBond) String() string { return proto.CompactTextString(m) } +func (*TotalBond) ProtoMessage() {} +func (*TotalBond) Descriptor() ([]byte, []int) { + return fileDescriptor_98af6650734ce845, []int{0} +} +func (m *TotalBond) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TotalBond) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TotalBond.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 *TotalBond) XXX_Merge(src proto.Message) { + xxx_messageInfo_TotalBond.Merge(m, src) +} +func (m *TotalBond) XXX_Size() int { + return m.Size() +} +func (m *TotalBond) XXX_DiscardUnknown() { + xxx_messageInfo_TotalBond.DiscardUnknown(m) +} + +var xxx_messageInfo_TotalBond proto.InternalMessageInfo + +func (m *TotalBond) GetTier() uint32 { + if m != nil { + return m.Tier + } + return 0 +} + +func (m *TotalBond) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + +// QueryParams defines the request structure for the Params gRPC service +// handler. +type QueryParams struct { +} + +func (m *QueryParams) Reset() { *m = QueryParams{} } +func (m *QueryParams) String() string { return proto.CompactTextString(m) } +func (*QueryParams) ProtoMessage() {} +func (*QueryParams) Descriptor() ([]byte, []int) { + return fileDescriptor_98af6650734ce845, []int{1} +} +func (m *QueryParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParams.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 *QueryParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParams.Merge(m, src) +} +func (m *QueryParams) XXX_Size() int { + return m.Size() +} +func (m *QueryParams) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParams.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParams proto.InternalMessageInfo + +// QueryParamsResponse defines the response structure for the Params gRPC +// service handler. +type QueryParamsResponse struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_98af6650734ce845, []int{2} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// QueryPendingRewards defines the request structure for the PendingRewards gRPC service handler. +type QueryPendingRewards struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryPendingRewards) Reset() { *m = QueryPendingRewards{} } +func (m *QueryPendingRewards) String() string { return proto.CompactTextString(m) } +func (*QueryPendingRewards) ProtoMessage() {} +func (*QueryPendingRewards) Descriptor() ([]byte, []int) { + return fileDescriptor_98af6650734ce845, []int{3} +} +func (m *QueryPendingRewards) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPendingRewards) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPendingRewards.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 *QueryPendingRewards) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPendingRewards.Merge(m, src) +} +func (m *QueryPendingRewards) XXX_Size() int { + return m.Size() +} +func (m *QueryPendingRewards) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPendingRewards.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPendingRewards proto.InternalMessageInfo + +func (m *QueryPendingRewards) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +// QueryPendingRewardsResponse defines the response structure for the PendingRewards gRPC service handler. +type QueryPendingRewardsResponse struct { + Rewards github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=rewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"rewards"` +} + +func (m *QueryPendingRewardsResponse) Reset() { *m = QueryPendingRewardsResponse{} } +func (m *QueryPendingRewardsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryPendingRewardsResponse) ProtoMessage() {} +func (*QueryPendingRewardsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_98af6650734ce845, []int{4} +} +func (m *QueryPendingRewardsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryPendingRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryPendingRewardsResponse.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 *QueryPendingRewardsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryPendingRewardsResponse.Merge(m, src) +} +func (m *QueryPendingRewardsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryPendingRewardsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryPendingRewardsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryPendingRewardsResponse proto.InternalMessageInfo + +func (m *QueryPendingRewardsResponse) GetRewards() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Rewards + } + return nil +} + +// QueryBonded defines the request structure for the Bonded gRPC service handler. +type QueryBonded struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryBonded) Reset() { *m = QueryBonded{} } +func (m *QueryBonded) String() string { return proto.CompactTextString(m) } +func (*QueryBonded) ProtoMessage() {} +func (*QueryBonded) Descriptor() ([]byte, []int) { + return fileDescriptor_98af6650734ce845, []int{5} +} +func (m *QueryBonded) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBonded) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBonded.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 *QueryBonded) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBonded.Merge(m, src) +} +func (m *QueryBonded) XXX_Size() int { + return m.Size() +} +func (m *QueryBonded) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBonded.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBonded proto.InternalMessageInfo + +func (m *QueryBonded) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +// QueryBondedResponse defines the response structure for the Bonded gRPC service handler. +type QueryBondedResponse struct { + Bonded []TotalBond `protobuf:"bytes,1,rep,name=bonded,proto3" json:"bonded"` +} + +func (m *QueryBondedResponse) Reset() { *m = QueryBondedResponse{} } +func (m *QueryBondedResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBondedResponse) ProtoMessage() {} +func (*QueryBondedResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_98af6650734ce845, []int{6} +} +func (m *QueryBondedResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryBondedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryBondedResponse.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 *QueryBondedResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBondedResponse.Merge(m, src) +} +func (m *QueryBondedResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryBondedResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBondedResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryBondedResponse proto.InternalMessageInfo + +func (m *QueryBondedResponse) GetBonded() []TotalBond { + if m != nil { + return m.Bonded + } + return nil +} + +// QueryUnbondings defines the request structure for the Unbondings gRPC service handler. +type QueryUnbondings struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryUnbondings) Reset() { *m = QueryUnbondings{} } +func (m *QueryUnbondings) String() string { return proto.CompactTextString(m) } +func (*QueryUnbondings) ProtoMessage() {} +func (*QueryUnbondings) Descriptor() ([]byte, []int) { + return fileDescriptor_98af6650734ce845, []int{7} +} +func (m *QueryUnbondings) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryUnbondings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryUnbondings.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 *QueryUnbondings) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryUnbondings.Merge(m, src) +} +func (m *QueryUnbondings) XXX_Size() int { + return m.Size() +} +func (m *QueryUnbondings) XXX_DiscardUnknown() { + xxx_messageInfo_QueryUnbondings.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryUnbondings proto.InternalMessageInfo + +func (m *QueryUnbondings) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +// QueryUnbondingsResponse defines the response structure for the Unbondings gRPC service handler. +type QueryUnbondingsResponse struct { + Unbondings []Unbonding `protobuf:"bytes,1,rep,name=unbondings,proto3" json:"unbondings"` +} + +func (m *QueryUnbondingsResponse) Reset() { *m = QueryUnbondingsResponse{} } +func (m *QueryUnbondingsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryUnbondingsResponse) ProtoMessage() {} +func (*QueryUnbondingsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_98af6650734ce845, []int{8} +} +func (m *QueryUnbondingsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryUnbondingsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryUnbondingsResponse.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 *QueryUnbondingsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryUnbondingsResponse.Merge(m, src) +} +func (m *QueryUnbondingsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryUnbondingsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryUnbondingsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryUnbondingsResponse proto.InternalMessageInfo + +func (m *QueryUnbondingsResponse) GetUnbondings() []Unbonding { + if m != nil { + return m.Unbondings + } + return nil +} + +// QueryTotalBonded defines the request structure for the TotalBonded gRPC service handler. +type QueryTotalBonded struct { +} + +func (m *QueryTotalBonded) Reset() { *m = QueryTotalBonded{} } +func (m *QueryTotalBonded) String() string { return proto.CompactTextString(m) } +func (*QueryTotalBonded) ProtoMessage() {} +func (*QueryTotalBonded) Descriptor() ([]byte, []int) { + return fileDescriptor_98af6650734ce845, []int{9} +} +func (m *QueryTotalBonded) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTotalBonded) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTotalBonded.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 *QueryTotalBonded) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalBonded.Merge(m, src) +} +func (m *QueryTotalBonded) XXX_Size() int { + return m.Size() +} +func (m *QueryTotalBonded) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalBonded.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTotalBonded proto.InternalMessageInfo + +// QueryTotalBondedResponse defines the response structure for the TotalBonded gRPC service handler. +type QueryTotalBondedResponse struct { + Bonded []TotalBond `protobuf:"bytes,1,rep,name=bonded,proto3" json:"bonded"` +} + +func (m *QueryTotalBondedResponse) Reset() { *m = QueryTotalBondedResponse{} } +func (m *QueryTotalBondedResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTotalBondedResponse) ProtoMessage() {} +func (*QueryTotalBondedResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_98af6650734ce845, []int{10} +} +func (m *QueryTotalBondedResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTotalBondedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTotalBondedResponse.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 *QueryTotalBondedResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalBondedResponse.Merge(m, src) +} +func (m *QueryTotalBondedResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTotalBondedResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalBondedResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTotalBondedResponse proto.InternalMessageInfo + +func (m *QueryTotalBondedResponse) GetBonded() []TotalBond { + if m != nil { + return m.Bonded + } + return nil +} + +// QueryUpcomingIncentivePrograms defines the request structure for the +// OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service handlers. +type QueryUpcomingIncentivePrograms struct { +} + +func (m *QueryUpcomingIncentivePrograms) Reset() { *m = QueryUpcomingIncentivePrograms{} } +func (m *QueryUpcomingIncentivePrograms) String() string { return proto.CompactTextString(m) } +func (*QueryUpcomingIncentivePrograms) ProtoMessage() {} +func (*QueryUpcomingIncentivePrograms) Descriptor() ([]byte, []int) { + return fileDescriptor_98af6650734ce845, []int{11} +} +func (m *QueryUpcomingIncentivePrograms) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryUpcomingIncentivePrograms) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryUpcomingIncentivePrograms.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 *QueryUpcomingIncentivePrograms) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryUpcomingIncentivePrograms.Merge(m, src) +} +func (m *QueryUpcomingIncentivePrograms) XXX_Size() int { + return m.Size() +} +func (m *QueryUpcomingIncentivePrograms) XXX_DiscardUnknown() { + xxx_messageInfo_QueryUpcomingIncentivePrograms.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryUpcomingIncentivePrograms proto.InternalMessageInfo + +// QueryUpcomingIncentiveProgramsResponse defines the response structure for the +// OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service handlers. +type QueryUpcomingIncentiveProgramsResponse struct { + Programs []IncentiveProgram `protobuf:"bytes,1,rep,name=programs,proto3" json:"programs"` +} + +func (m *QueryUpcomingIncentiveProgramsResponse) Reset() { + *m = QueryUpcomingIncentiveProgramsResponse{} +} +func (m *QueryUpcomingIncentiveProgramsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryUpcomingIncentiveProgramsResponse) ProtoMessage() {} +func (*QueryUpcomingIncentiveProgramsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_98af6650734ce845, []int{12} +} +func (m *QueryUpcomingIncentiveProgramsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryUpcomingIncentiveProgramsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryUpcomingIncentiveProgramsResponse.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 *QueryUpcomingIncentiveProgramsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryUpcomingIncentiveProgramsResponse.Merge(m, src) +} +func (m *QueryUpcomingIncentiveProgramsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryUpcomingIncentiveProgramsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryUpcomingIncentiveProgramsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryUpcomingIncentiveProgramsResponse proto.InternalMessageInfo + +func (m *QueryUpcomingIncentiveProgramsResponse) GetPrograms() []IncentiveProgram { + if m != nil { + return m.Programs + } + return nil +} + +// QueryOngoingIncentivePrograms defines the request structure for the +// OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service handlers. +type QueryOngoingIncentivePrograms struct { +} + +func (m *QueryOngoingIncentivePrograms) Reset() { *m = QueryOngoingIncentivePrograms{} } +func (m *QueryOngoingIncentivePrograms) String() string { return proto.CompactTextString(m) } +func (*QueryOngoingIncentivePrograms) ProtoMessage() {} +func (*QueryOngoingIncentivePrograms) Descriptor() ([]byte, []int) { + return fileDescriptor_98af6650734ce845, []int{13} +} +func (m *QueryOngoingIncentivePrograms) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryOngoingIncentivePrograms) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryOngoingIncentivePrograms.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 *QueryOngoingIncentivePrograms) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOngoingIncentivePrograms.Merge(m, src) +} +func (m *QueryOngoingIncentivePrograms) XXX_Size() int { + return m.Size() +} +func (m *QueryOngoingIncentivePrograms) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOngoingIncentivePrograms.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryOngoingIncentivePrograms proto.InternalMessageInfo + +// QueryOngoingIncentiveProgramsResponse defines the response structure for the +// OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service handlers. +type QueryOngoingIncentiveProgramsResponse struct { + Programs []IncentiveProgram `protobuf:"bytes,1,rep,name=programs,proto3" json:"programs"` +} + +func (m *QueryOngoingIncentiveProgramsResponse) Reset() { *m = QueryOngoingIncentiveProgramsResponse{} } +func (m *QueryOngoingIncentiveProgramsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryOngoingIncentiveProgramsResponse) ProtoMessage() {} +func (*QueryOngoingIncentiveProgramsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_98af6650734ce845, []int{14} +} +func (m *QueryOngoingIncentiveProgramsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryOngoingIncentiveProgramsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryOngoingIncentiveProgramsResponse.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 *QueryOngoingIncentiveProgramsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryOngoingIncentiveProgramsResponse.Merge(m, src) +} +func (m *QueryOngoingIncentiveProgramsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryOngoingIncentiveProgramsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryOngoingIncentiveProgramsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryOngoingIncentiveProgramsResponse proto.InternalMessageInfo + +func (m *QueryOngoingIncentiveProgramsResponse) GetPrograms() []IncentiveProgram { + if m != nil { + return m.Programs + } + return nil +} + +// QueryCompletedIncentivePrograms defines the request structure for the +// CompletedIncentivePrograms gRPC service handler. +type QueryCompletedIncentivePrograms struct { + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryCompletedIncentivePrograms) Reset() { *m = QueryCompletedIncentivePrograms{} } +func (m *QueryCompletedIncentivePrograms) String() string { return proto.CompactTextString(m) } +func (*QueryCompletedIncentivePrograms) ProtoMessage() {} +func (*QueryCompletedIncentivePrograms) Descriptor() ([]byte, []int) { + return fileDescriptor_98af6650734ce845, []int{15} +} +func (m *QueryCompletedIncentivePrograms) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCompletedIncentivePrograms) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCompletedIncentivePrograms.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 *QueryCompletedIncentivePrograms) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCompletedIncentivePrograms.Merge(m, src) +} +func (m *QueryCompletedIncentivePrograms) XXX_Size() int { + return m.Size() +} +func (m *QueryCompletedIncentivePrograms) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCompletedIncentivePrograms.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCompletedIncentivePrograms proto.InternalMessageInfo + +func (m *QueryCompletedIncentivePrograms) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryCompletedIncentiveProgramsResponse defines the response structure for the +// CompletedIncentivePrograms gRPC service handler. +type QueryCompletedIncentiveProgramsResponse struct { + Programs []IncentiveProgram `protobuf:"bytes,1,rep,name=programs,proto3" json:"programs"` + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryCompletedIncentiveProgramsResponse) Reset() { + *m = QueryCompletedIncentiveProgramsResponse{} +} +func (m *QueryCompletedIncentiveProgramsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCompletedIncentiveProgramsResponse) ProtoMessage() {} +func (*QueryCompletedIncentiveProgramsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_98af6650734ce845, []int{16} +} +func (m *QueryCompletedIncentiveProgramsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCompletedIncentiveProgramsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCompletedIncentiveProgramsResponse.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 *QueryCompletedIncentiveProgramsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCompletedIncentiveProgramsResponse.Merge(m, src) +} +func (m *QueryCompletedIncentiveProgramsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCompletedIncentiveProgramsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCompletedIncentiveProgramsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCompletedIncentiveProgramsResponse proto.InternalMessageInfo + +func (m *QueryCompletedIncentiveProgramsResponse) GetPrograms() []IncentiveProgram { + if m != nil { + return m.Programs + } + return nil +} + +func (m *QueryCompletedIncentiveProgramsResponse) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryIncentiveProgram defines the request structure for the IncentiveProgram +// gRPC service handler. +type QueryIncentiveProgram struct { + // ID specifies which program to query for + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *QueryIncentiveProgram) Reset() { *m = QueryIncentiveProgram{} } +func (m *QueryIncentiveProgram) String() string { return proto.CompactTextString(m) } +func (*QueryIncentiveProgram) ProtoMessage() {} +func (*QueryIncentiveProgram) Descriptor() ([]byte, []int) { + return fileDescriptor_98af6650734ce845, []int{17} +} +func (m *QueryIncentiveProgram) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryIncentiveProgram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryIncentiveProgram.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 *QueryIncentiveProgram) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryIncentiveProgram.Merge(m, src) +} +func (m *QueryIncentiveProgram) XXX_Size() int { + return m.Size() +} +func (m *QueryIncentiveProgram) XXX_DiscardUnknown() { + xxx_messageInfo_QueryIncentiveProgram.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryIncentiveProgram proto.InternalMessageInfo + +func (m *QueryIncentiveProgram) GetId() uint32 { + if m != nil { + return m.Id + } + return 0 +} + +// QueryIncentivePrograResponse defines the response structure for the +// IncentiveProgram gRPC service handler. +type QueryIncentiveProgramResponse struct { + Program IncentiveProgram `protobuf:"bytes,1,opt,name=program,proto3" json:"program"` +} + +func (m *QueryIncentiveProgramResponse) Reset() { *m = QueryIncentiveProgramResponse{} } +func (m *QueryIncentiveProgramResponse) String() string { return proto.CompactTextString(m) } +func (*QueryIncentiveProgramResponse) ProtoMessage() {} +func (*QueryIncentiveProgramResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_98af6650734ce845, []int{18} +} +func (m *QueryIncentiveProgramResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryIncentiveProgramResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryIncentiveProgramResponse.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 *QueryIncentiveProgramResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryIncentiveProgramResponse.Merge(m, src) +} +func (m *QueryIncentiveProgramResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryIncentiveProgramResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryIncentiveProgramResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryIncentiveProgramResponse proto.InternalMessageInfo + +func (m *QueryIncentiveProgramResponse) GetProgram() IncentiveProgram { + if m != nil { + return m.Program + } + return IncentiveProgram{} +} + +func init() { + proto.RegisterType((*TotalBond)(nil), "umeenetwork.umee.incentive.v1.TotalBond") + proto.RegisterType((*QueryParams)(nil), "umeenetwork.umee.incentive.v1.QueryParams") + proto.RegisterType((*QueryParamsResponse)(nil), "umeenetwork.umee.incentive.v1.QueryParamsResponse") + proto.RegisterType((*QueryPendingRewards)(nil), "umeenetwork.umee.incentive.v1.QueryPendingRewards") + proto.RegisterType((*QueryPendingRewardsResponse)(nil), "umeenetwork.umee.incentive.v1.QueryPendingRewardsResponse") + proto.RegisterType((*QueryBonded)(nil), "umeenetwork.umee.incentive.v1.QueryBonded") + proto.RegisterType((*QueryBondedResponse)(nil), "umeenetwork.umee.incentive.v1.QueryBondedResponse") + proto.RegisterType((*QueryUnbondings)(nil), "umeenetwork.umee.incentive.v1.QueryUnbondings") + proto.RegisterType((*QueryUnbondingsResponse)(nil), "umeenetwork.umee.incentive.v1.QueryUnbondingsResponse") + proto.RegisterType((*QueryTotalBonded)(nil), "umeenetwork.umee.incentive.v1.QueryTotalBonded") + proto.RegisterType((*QueryTotalBondedResponse)(nil), "umeenetwork.umee.incentive.v1.QueryTotalBondedResponse") + proto.RegisterType((*QueryUpcomingIncentivePrograms)(nil), "umeenetwork.umee.incentive.v1.QueryUpcomingIncentivePrograms") + proto.RegisterType((*QueryUpcomingIncentiveProgramsResponse)(nil), "umeenetwork.umee.incentive.v1.QueryUpcomingIncentiveProgramsResponse") + proto.RegisterType((*QueryOngoingIncentivePrograms)(nil), "umeenetwork.umee.incentive.v1.QueryOngoingIncentivePrograms") + proto.RegisterType((*QueryOngoingIncentiveProgramsResponse)(nil), "umeenetwork.umee.incentive.v1.QueryOngoingIncentiveProgramsResponse") + proto.RegisterType((*QueryCompletedIncentivePrograms)(nil), "umeenetwork.umee.incentive.v1.QueryCompletedIncentivePrograms") + proto.RegisterType((*QueryCompletedIncentiveProgramsResponse)(nil), "umeenetwork.umee.incentive.v1.QueryCompletedIncentiveProgramsResponse") + proto.RegisterType((*QueryIncentiveProgram)(nil), "umeenetwork.umee.incentive.v1.QueryIncentiveProgram") + proto.RegisterType((*QueryIncentiveProgramResponse)(nil), "umeenetwork.umee.incentive.v1.QueryIncentiveProgramResponse") +} + +func init() { proto.RegisterFile("umee/incentive/v1/query.proto", fileDescriptor_98af6650734ce845) } + +var fileDescriptor_98af6650734ce845 = []byte{ + // 968 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x97, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xc7, 0x33, 0xa6, 0x38, 0xf4, 0x45, 0x29, 0xd5, 0x00, 0xc2, 0xd9, 0x52, 0x3b, 0x59, 0x94, + 0x3a, 0x6d, 0xc8, 0x4e, 0x9d, 0x96, 0x46, 0x42, 0x85, 0x43, 0x42, 0x23, 0x71, 0xa1, 0xa9, 0x05, + 0x12, 0xaa, 0x84, 0xa2, 0xb5, 0x77, 0xb4, 0x8c, 0x1a, 0xcf, 0x6c, 0x77, 0xd7, 0x2e, 0x25, 0xea, + 0x01, 0xc4, 0x8d, 0x0b, 0x12, 0xe2, 0xce, 0x85, 0x0b, 0x7f, 0x00, 0x12, 0x77, 0x0e, 0x3d, 0x56, + 0x42, 0x48, 0x70, 0xe0, 0x87, 0x12, 0xfe, 0x10, 0xb4, 0x33, 0xb3, 0xe3, 0xcd, 0xda, 0x5e, 0x6f, + 0x92, 0xe6, 0x94, 0xf5, 0xf8, 0x7d, 0xbf, 0xef, 0xf3, 0x7d, 0xf6, 0xbe, 0x75, 0xe0, 0x72, 0xbf, + 0x47, 0x29, 0x61, 0xbc, 0x4b, 0x79, 0xcc, 0x06, 0x94, 0x0c, 0x5a, 0xe4, 0x61, 0x9f, 0x86, 0x8f, + 0x9d, 0x20, 0x14, 0xb1, 0xc0, 0xf2, 0x6d, 0x4e, 0xe3, 0x47, 0x22, 0x7c, 0xe0, 0x24, 0xd7, 0x8e, + 0x29, 0x75, 0x06, 0x2d, 0xeb, 0x5a, 0x57, 0x44, 0x3d, 0x11, 0x91, 0x8e, 0x1b, 0x51, 0xa5, 0x23, + 0x83, 0x56, 0x87, 0xc6, 0x6e, 0x8b, 0x04, 0xae, 0xcf, 0xb8, 0x1b, 0x33, 0xc1, 0x95, 0x95, 0xf5, + 0x86, 0x2f, 0x84, 0xbf, 0x47, 0x89, 0x1b, 0x30, 0xe2, 0x72, 0x2e, 0x62, 0xf9, 0x66, 0xa4, 0xdf, + 0x7d, 0xd5, 0x17, 0xbe, 0x90, 0x97, 0x24, 0xb9, 0xd2, 0xa7, 0x4b, 0xa3, 0x74, 0xc3, 0xfe, 0xaa, + 0xa4, 0x31, 0x5a, 0xe2, 0x53, 0x4e, 0x23, 0x96, 0x3a, 0xd7, 0xb3, 0x8c, 0x29, 0x5d, 0x57, 0x30, + 0xcd, 0x65, 0x7f, 0x02, 0xe7, 0x3f, 0x12, 0xb1, 0xbb, 0xb7, 0x29, 0xb8, 0x87, 0x31, 0x9c, 0x8b, + 0x19, 0x0d, 0x6b, 0x68, 0x11, 0xad, 0xcc, 0xb7, 0xe5, 0x35, 0xde, 0x80, 0xaa, 0xdb, 0x13, 0x7d, + 0x1e, 0xd7, 0x2a, 0x8b, 0x68, 0x65, 0x6e, 0x7d, 0xc1, 0x51, 0x8e, 0x4e, 0xe2, 0xe8, 0x68, 0x47, + 0x67, 0x4b, 0x30, 0xbe, 0x79, 0xee, 0xe9, 0xdf, 0x8d, 0x99, 0xb6, 0x2e, 0xb7, 0xe7, 0x61, 0xee, + 0x5e, 0x32, 0x93, 0x1d, 0x37, 0x74, 0x7b, 0x91, 0x7d, 0x1f, 0x5e, 0xc9, 0xbc, 0x6c, 0xd3, 0x28, + 0x10, 0x3c, 0xa2, 0x78, 0x0b, 0xaa, 0x81, 0x3c, 0x91, 0x4d, 0xe7, 0xd6, 0x97, 0x9d, 0xc2, 0x99, + 0x3b, 0x4a, 0x9e, 0xb6, 0x52, 0x52, 0x9b, 0xa4, 0xde, 0x94, 0x7b, 0x8c, 0xfb, 0x6d, 0xfa, 0xc8, + 0x0d, 0xbd, 0x08, 0xd7, 0x60, 0xd6, 0xf5, 0xbc, 0x90, 0x46, 0xca, 0xfc, 0x7c, 0x3b, 0x7d, 0x69, + 0x7f, 0x8d, 0xe0, 0xd2, 0x18, 0x85, 0xa1, 0xa2, 0x30, 0x1b, 0xaa, 0xa3, 0x1a, 0x5a, 0x7c, 0xa1, + 0x38, 0xf5, 0xf5, 0x04, 0xe5, 0xa7, 0x7f, 0x1a, 0x2b, 0x3e, 0x8b, 0x3f, 0xeb, 0x77, 0x9c, 0xae, + 0xe8, 0x11, 0x3d, 0x74, 0xf5, 0x67, 0x2d, 0xf2, 0x1e, 0x90, 0xf8, 0x71, 0x40, 0x23, 0x29, 0x88, + 0xda, 0xa9, 0xb7, 0xdd, 0xd4, 0x23, 0x4a, 0x86, 0x4f, 0xbd, 0x02, 0xde, 0x4f, 0x75, 0x40, 0x55, + 0x68, 0x30, 0xb7, 0xa1, 0xda, 0x91, 0x27, 0x9a, 0x72, 0x65, 0xca, 0xf0, 0xcc, 0x27, 0x9d, 0xce, + 0x4f, 0xa9, 0xed, 0x55, 0x78, 0x59, 0xda, 0x7f, 0xcc, 0x93, 0x03, 0xc6, 0xfd, 0xa2, 0xd9, 0x31, + 0x78, 0x3d, 0x57, 0x6c, 0x78, 0x3e, 0x04, 0xe8, 0x9b, 0xd3, 0x92, 0x4c, 0xc6, 0x46, 0x33, 0x65, + 0x1c, 0x6c, 0x0c, 0x17, 0x65, 0x2b, 0xc3, 0x4d, 0x3d, 0xbb, 0x03, 0xb5, 0xfc, 0xd9, 0x73, 0x9f, + 0xc7, 0x22, 0xd4, 0x55, 0xc4, 0xa0, 0x2b, 0x7a, 0x8c, 0xfb, 0x1f, 0xa4, 0xa2, 0x9d, 0x50, 0xf8, + 0xf2, 0x1b, 0xb7, 0x0f, 0x57, 0x8a, 0x2b, 0x0c, 0xd3, 0x3d, 0x78, 0x29, 0xd0, 0x67, 0x9a, 0x8a, + 0x4c, 0xa1, 0xca, 0x7b, 0x69, 0x38, 0x63, 0x63, 0x37, 0xe0, 0xb2, 0x6c, 0x7e, 0x97, 0xfb, 0x62, + 0x2c, 0xdd, 0x17, 0xb0, 0x5c, 0x58, 0x70, 0x96, 0x70, 0x0c, 0x1a, 0xb2, 0xf7, 0x96, 0xe8, 0x05, + 0x7b, 0x34, 0xa6, 0xde, 0x48, 0x77, 0xbc, 0x0d, 0x30, 0xdc, 0x8f, 0xfa, 0xbe, 0xbf, 0x72, 0xe4, + 0x06, 0x53, 0x4b, 0x38, 0xbd, 0xcd, 0x76, 0x5c, 0x9f, 0xb6, 0xe9, 0xc3, 0x3e, 0x8d, 0xe2, 0x76, + 0x46, 0x69, 0xff, 0x8a, 0xa0, 0x39, 0xa5, 0xd7, 0x19, 0x26, 0xcd, 0xc5, 0xa8, 0x9c, 0x38, 0x46, + 0x13, 0x5e, 0x93, 0x29, 0xf2, 0x0d, 0xf1, 0x05, 0xa8, 0x30, 0x4f, 0x2f, 0xe3, 0x0a, 0xf3, 0xec, + 0x40, 0x7f, 0xee, 0xf9, 0x42, 0x13, 0xf2, 0x2e, 0xcc, 0x6a, 0x3a, 0x3d, 0xd5, 0x13, 0x66, 0x4c, + 0x5d, 0xd6, 0xbf, 0x9c, 0x87, 0x17, 0x65, 0x4b, 0xfc, 0x0d, 0x82, 0xaa, 0xda, 0xbd, 0xf8, 0xda, + 0x14, 0xd3, 0xcc, 0x9a, 0xb7, 0xd6, 0xcb, 0xd7, 0xa6, 0x29, 0xec, 0xa5, 0xaf, 0x7e, 0xfb, 0xef, + 0xbb, 0xca, 0x25, 0xbc, 0x40, 0x46, 0x1f, 0x6e, 0x6a, 0xe1, 0xe3, 0x9f, 0x11, 0x5c, 0xc8, 0x2d, + 0xfb, 0x72, 0x9d, 0x8e, 0x68, 0xac, 0x77, 0x8e, 0xaf, 0x31, 0x94, 0x37, 0x25, 0xa5, 0x83, 0xdf, + 0x1a, 0x47, 0xa9, 0x24, 0xbb, 0x7a, 0xcf, 0x93, 0x7d, 0xbd, 0x3b, 0x9f, 0xe0, 0xef, 0x11, 0x54, + 0xf5, 0xb6, 0x2f, 0x35, 0x46, 0x55, 0x5b, 0x6e, 0x8c, 0x47, 0x97, 0xa1, 0xbd, 0x2a, 0x01, 0x97, + 0xf1, 0x9b, 0x63, 0x00, 0xd5, 0x9e, 0xcb, 0x70, 0xfd, 0x88, 0x00, 0x32, 0xdb, 0xdf, 0x29, 0xd3, + 0x6f, 0x58, 0x6f, 0xdd, 0x3a, 0x5e, 0xbd, 0x61, 0x24, 0x92, 0xf1, 0x2a, 0x6e, 0x8e, 0x61, 0x1c, + 0x3e, 0x07, 0x32, 0x9c, 0x3f, 0x20, 0x98, 0xcb, 0x6c, 0x7e, 0x4c, 0xca, 0x34, 0xce, 0x08, 0xac, + 0x8d, 0x63, 0x0a, 0x0c, 0x6a, 0x53, 0xa2, 0x2e, 0xe1, 0xc6, 0x18, 0xd4, 0x38, 0xa9, 0xdf, 0x55, + 0x43, 0xc5, 0x7f, 0x21, 0xb0, 0x0a, 0x96, 0xdf, 0x7b, 0x65, 0x00, 0x26, 0xeb, 0xad, 0xed, 0xd3, + 0xe9, 0x4d, 0x9e, 0x0d, 0x99, 0xa7, 0x85, 0x09, 0x29, 0xf8, 0x95, 0xb9, 0x9b, 0x2e, 0x3b, 0xd2, + 0x4d, 0x1d, 0xf1, 0xef, 0x08, 0x6a, 0x93, 0x1e, 0x2c, 0xf8, 0x76, 0x19, 0xba, 0x49, 0x6a, 0xeb, + 0xfd, 0xd3, 0xa8, 0x4d, 0xb2, 0xb7, 0x65, 0x32, 0x82, 0xd7, 0xca, 0x25, 0x13, 0xca, 0x0f, 0xff, + 0x89, 0x60, 0x61, 0xe2, 0xe3, 0x1c, 0xbf, 0x5b, 0xea, 0x1b, 0x3e, 0x49, 0x6e, 0xdd, 0x39, 0x95, + 0xdc, 0x44, 0xbb, 0x25, 0xa3, 0x5d, 0xc7, 0x4e, 0xb9, 0x68, 0x7d, 0x6d, 0x88, 0x7f, 0x41, 0x70, + 0x71, 0xe4, 0xf1, 0x72, 0xb3, 0x0c, 0x53, 0x5e, 0x65, 0xdd, 0x3e, 0x89, 0xca, 0x04, 0x68, 0xc9, + 0x00, 0xab, 0xf8, 0x6a, 0x99, 0x00, 0x64, 0x9f, 0x79, 0x4f, 0x36, 0xef, 0x3c, 0x3d, 0xa8, 0xa3, + 0x67, 0x07, 0x75, 0xf4, 0xef, 0x41, 0x1d, 0x7d, 0x7b, 0x58, 0x9f, 0x79, 0x76, 0x58, 0x9f, 0xf9, + 0xe3, 0xb0, 0x3e, 0x73, 0x7f, 0x35, 0xf3, 0x8b, 0x3b, 0xb1, 0x5b, 0xd3, 0x54, 0xca, 0x7b, 0x70, + 0x83, 0x7c, 0x3e, 0xf4, 0xec, 0x54, 0xe5, 0xff, 0x3b, 0x37, 0xfe, 0x0f, 0x00, 0x00, 0xff, 0xff, + 0x5f, 0x32, 0x56, 0x24, 0xf3, 0x0d, 0x00, 0x00, +} + +// 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 { + // Params queries the parameters of the x/incentive module. + Params(ctx context.Context, in *QueryParams, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // PendingRewards queries unclaimed incentive rewards associated with an account. + PendingRewards(ctx context.Context, in *QueryPendingRewards, opts ...grpc.CallOption) (*QueryPendingRewardsResponse, error) + // Bonded queries all bonded collateral uTokens associated with an account. + Bonded(ctx context.Context, in *QueryBonded, opts ...grpc.CallOption) (*QueryBondedResponse, error) + // Unbondings queries all current uToken unbondings associated with an account. + Unbondings(ctx context.Context, in *QueryUnbondings, opts ...grpc.CallOption) (*QueryUnbondingsResponse, error) + // TotalBonded queries the sum of all bonded collateral uTokens, separated by tier. + TotalBonded(ctx context.Context, in *QueryTotalBonded, opts ...grpc.CallOption) (*QueryTotalBondedResponse, error) + // CompletedIncentivePrograms queries for all incentives programs that have been passed + // by governance, and either run to completion or expired immediately due to not being funded. + CompletedIncentivePrograms(ctx context.Context, in *QueryCompletedIncentivePrograms, opts ...grpc.CallOption) (*QueryCompletedIncentiveProgramsResponse, error) + // OngoingIncentivePrograms queries for all incentives programs that have been passed + // by governance, funded, and started but not yet completed. + OngoingIncentivePrograms(ctx context.Context, in *QueryOngoingIncentivePrograms, opts ...grpc.CallOption) (*QueryOngoingIncentiveProgramsResponse, error) + // UpcomingIncentivePrograms queries for all incentives programs that have been passed + // by governance, but not yet started. They may or may not have been funded. + UpcomingIncentivePrograms(ctx context.Context, in *QueryUpcomingIncentivePrograms, opts ...grpc.CallOption) (*QueryUpcomingIncentiveProgramsResponse, error) + // IncentiveProgram queries a single incentive program by ID. + IncentiveProgram(ctx context.Context, in *QueryIncentiveProgram, opts ...grpc.CallOption) (*QueryIncentiveProgramResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParams, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/umeenetwork.umee.incentive.v1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) PendingRewards(ctx context.Context, in *QueryPendingRewards, opts ...grpc.CallOption) (*QueryPendingRewardsResponse, error) { + out := new(QueryPendingRewardsResponse) + err := c.cc.Invoke(ctx, "/umeenetwork.umee.incentive.v1.Query/PendingRewards", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Bonded(ctx context.Context, in *QueryBonded, opts ...grpc.CallOption) (*QueryBondedResponse, error) { + out := new(QueryBondedResponse) + err := c.cc.Invoke(ctx, "/umeenetwork.umee.incentive.v1.Query/Bonded", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Unbondings(ctx context.Context, in *QueryUnbondings, opts ...grpc.CallOption) (*QueryUnbondingsResponse, error) { + out := new(QueryUnbondingsResponse) + err := c.cc.Invoke(ctx, "/umeenetwork.umee.incentive.v1.Query/Unbondings", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TotalBonded(ctx context.Context, in *QueryTotalBonded, opts ...grpc.CallOption) (*QueryTotalBondedResponse, error) { + out := new(QueryTotalBondedResponse) + err := c.cc.Invoke(ctx, "/umeenetwork.umee.incentive.v1.Query/TotalBonded", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) CompletedIncentivePrograms(ctx context.Context, in *QueryCompletedIncentivePrograms, opts ...grpc.CallOption) (*QueryCompletedIncentiveProgramsResponse, error) { + out := new(QueryCompletedIncentiveProgramsResponse) + err := c.cc.Invoke(ctx, "/umeenetwork.umee.incentive.v1.Query/CompletedIncentivePrograms", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) OngoingIncentivePrograms(ctx context.Context, in *QueryOngoingIncentivePrograms, opts ...grpc.CallOption) (*QueryOngoingIncentiveProgramsResponse, error) { + out := new(QueryOngoingIncentiveProgramsResponse) + err := c.cc.Invoke(ctx, "/umeenetwork.umee.incentive.v1.Query/OngoingIncentivePrograms", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) UpcomingIncentivePrograms(ctx context.Context, in *QueryUpcomingIncentivePrograms, opts ...grpc.CallOption) (*QueryUpcomingIncentiveProgramsResponse, error) { + out := new(QueryUpcomingIncentiveProgramsResponse) + err := c.cc.Invoke(ctx, "/umeenetwork.umee.incentive.v1.Query/UpcomingIncentivePrograms", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) IncentiveProgram(ctx context.Context, in *QueryIncentiveProgram, opts ...grpc.CallOption) (*QueryIncentiveProgramResponse, error) { + out := new(QueryIncentiveProgramResponse) + err := c.cc.Invoke(ctx, "/umeenetwork.umee.incentive.v1.Query/IncentiveProgram", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Params queries the parameters of the x/incentive module. + Params(context.Context, *QueryParams) (*QueryParamsResponse, error) + // PendingRewards queries unclaimed incentive rewards associated with an account. + PendingRewards(context.Context, *QueryPendingRewards) (*QueryPendingRewardsResponse, error) + // Bonded queries all bonded collateral uTokens associated with an account. + Bonded(context.Context, *QueryBonded) (*QueryBondedResponse, error) + // Unbondings queries all current uToken unbondings associated with an account. + Unbondings(context.Context, *QueryUnbondings) (*QueryUnbondingsResponse, error) + // TotalBonded queries the sum of all bonded collateral uTokens, separated by tier. + TotalBonded(context.Context, *QueryTotalBonded) (*QueryTotalBondedResponse, error) + // CompletedIncentivePrograms queries for all incentives programs that have been passed + // by governance, and either run to completion or expired immediately due to not being funded. + CompletedIncentivePrograms(context.Context, *QueryCompletedIncentivePrograms) (*QueryCompletedIncentiveProgramsResponse, error) + // OngoingIncentivePrograms queries for all incentives programs that have been passed + // by governance, funded, and started but not yet completed. + OngoingIncentivePrograms(context.Context, *QueryOngoingIncentivePrograms) (*QueryOngoingIncentiveProgramsResponse, error) + // UpcomingIncentivePrograms queries for all incentives programs that have been passed + // by governance, but not yet started. They may or may not have been funded. + UpcomingIncentivePrograms(context.Context, *QueryUpcomingIncentivePrograms) (*QueryUpcomingIncentiveProgramsResponse, error) + // IncentiveProgram queries a single incentive program by ID. + IncentiveProgram(context.Context, *QueryIncentiveProgram) (*QueryIncentiveProgramResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParams) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) PendingRewards(ctx context.Context, req *QueryPendingRewards) (*QueryPendingRewardsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PendingRewards not implemented") +} +func (*UnimplementedQueryServer) Bonded(ctx context.Context, req *QueryBonded) (*QueryBondedResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Bonded not implemented") +} +func (*UnimplementedQueryServer) Unbondings(ctx context.Context, req *QueryUnbondings) (*QueryUnbondingsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Unbondings not implemented") +} +func (*UnimplementedQueryServer) TotalBonded(ctx context.Context, req *QueryTotalBonded) (*QueryTotalBondedResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TotalBonded not implemented") +} +func (*UnimplementedQueryServer) CompletedIncentivePrograms(ctx context.Context, req *QueryCompletedIncentivePrograms) (*QueryCompletedIncentiveProgramsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CompletedIncentivePrograms not implemented") +} +func (*UnimplementedQueryServer) OngoingIncentivePrograms(ctx context.Context, req *QueryOngoingIncentivePrograms) (*QueryOngoingIncentiveProgramsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method OngoingIncentivePrograms not implemented") +} +func (*UnimplementedQueryServer) UpcomingIncentivePrograms(ctx context.Context, req *QueryUpcomingIncentivePrograms) (*QueryUpcomingIncentiveProgramsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpcomingIncentivePrograms not implemented") +} +func (*UnimplementedQueryServer) IncentiveProgram(ctx context.Context, req *QueryIncentiveProgram) (*QueryIncentiveProgramResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IncentiveProgram not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umeenetwork.umee.incentive.v1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_PendingRewards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryPendingRewards) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).PendingRewards(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umeenetwork.umee.incentive.v1.Query/PendingRewards", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).PendingRewards(ctx, req.(*QueryPendingRewards)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Bonded_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBonded) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Bonded(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umeenetwork.umee.incentive.v1.Query/Bonded", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Bonded(ctx, req.(*QueryBonded)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Unbondings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryUnbondings) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Unbondings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umeenetwork.umee.incentive.v1.Query/Unbondings", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Unbondings(ctx, req.(*QueryUnbondings)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TotalBonded_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTotalBonded) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TotalBonded(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umeenetwork.umee.incentive.v1.Query/TotalBonded", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TotalBonded(ctx, req.(*QueryTotalBonded)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_CompletedIncentivePrograms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCompletedIncentivePrograms) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CompletedIncentivePrograms(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umeenetwork.umee.incentive.v1.Query/CompletedIncentivePrograms", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CompletedIncentivePrograms(ctx, req.(*QueryCompletedIncentivePrograms)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_OngoingIncentivePrograms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryOngoingIncentivePrograms) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).OngoingIncentivePrograms(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umeenetwork.umee.incentive.v1.Query/OngoingIncentivePrograms", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).OngoingIncentivePrograms(ctx, req.(*QueryOngoingIncentivePrograms)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_UpcomingIncentivePrograms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryUpcomingIncentivePrograms) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).UpcomingIncentivePrograms(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umeenetwork.umee.incentive.v1.Query/UpcomingIncentivePrograms", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).UpcomingIncentivePrograms(ctx, req.(*QueryUpcomingIncentivePrograms)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_IncentiveProgram_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryIncentiveProgram) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).IncentiveProgram(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umeenetwork.umee.incentive.v1.Query/IncentiveProgram", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).IncentiveProgram(ctx, req.(*QueryIncentiveProgram)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "umeenetwork.umee.incentive.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "PendingRewards", + Handler: _Query_PendingRewards_Handler, + }, + { + MethodName: "Bonded", + Handler: _Query_Bonded_Handler, + }, + { + MethodName: "Unbondings", + Handler: _Query_Unbondings_Handler, + }, + { + MethodName: "TotalBonded", + Handler: _Query_TotalBonded_Handler, + }, + { + MethodName: "CompletedIncentivePrograms", + Handler: _Query_CompletedIncentivePrograms_Handler, + }, + { + MethodName: "OngoingIncentivePrograms", + Handler: _Query_OngoingIncentivePrograms_Handler, + }, + { + MethodName: "UpcomingIncentivePrograms", + Handler: _Query_UpcomingIncentivePrograms_Handler, + }, + { + MethodName: "IncentiveProgram", + Handler: _Query_IncentiveProgram_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "umee/incentive/v1/query.proto", +} + +func (m *TotalBond) 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 *TotalBond) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TotalBond) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.Tier != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Tier)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryParams) 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 *QueryParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.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 *QueryPendingRewards) 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 *QueryPendingRewards) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPendingRewards) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + 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 *QueryPendingRewardsResponse) 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 *QueryPendingRewardsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryPendingRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Rewards) > 0 { + for iNdEx := len(m.Rewards) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rewards[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 *QueryBonded) 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 *QueryBonded) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBonded) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + 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 *QueryBondedResponse) 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 *QueryBondedResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryBondedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Bonded) > 0 { + for iNdEx := len(m.Bonded) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Bonded[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 *QueryUnbondings) 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 *QueryUnbondings) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryUnbondings) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + 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 *QueryUnbondingsResponse) 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 *QueryUnbondingsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryUnbondingsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Unbondings) > 0 { + for iNdEx := len(m.Unbondings) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Unbondings[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 *QueryTotalBonded) 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 *QueryTotalBonded) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTotalBonded) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryTotalBondedResponse) 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 *QueryTotalBondedResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTotalBondedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Bonded) > 0 { + for iNdEx := len(m.Bonded) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Bonded[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 *QueryUpcomingIncentivePrograms) 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 *QueryUpcomingIncentivePrograms) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryUpcomingIncentivePrograms) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryUpcomingIncentiveProgramsResponse) 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 *QueryUpcomingIncentiveProgramsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryUpcomingIncentiveProgramsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Programs) > 0 { + for iNdEx := len(m.Programs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Programs[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 *QueryOngoingIncentivePrograms) 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 *QueryOngoingIncentivePrograms) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOngoingIncentivePrograms) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryOngoingIncentiveProgramsResponse) 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 *QueryOngoingIncentiveProgramsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryOngoingIncentiveProgramsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Programs) > 0 { + for iNdEx := len(m.Programs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Programs[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 *QueryCompletedIncentivePrograms) 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 *QueryCompletedIncentivePrograms) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCompletedIncentivePrograms) 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] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryCompletedIncentiveProgramsResponse) 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 *QueryCompletedIncentiveProgramsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCompletedIncentiveProgramsResponse) 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] = 0x12 + } + if len(m.Programs) > 0 { + for iNdEx := len(m.Programs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Programs[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 *QueryIncentiveProgram) 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 *QueryIncentiveProgram) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryIncentiveProgram) 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 *QueryIncentiveProgramResponse) 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 *QueryIncentiveProgramResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryIncentiveProgramResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Program.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 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 *TotalBond) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Tier != 0 { + n += 1 + sovQuery(uint64(m.Tier)) + } + l = m.Amount.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryPendingRewards) 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)) + } + return n +} + +func (m *QueryPendingRewardsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Rewards) > 0 { + for _, e := range m.Rewards { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryBonded) 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)) + } + return n +} + +func (m *QueryBondedResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Bonded) > 0 { + for _, e := range m.Bonded { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryUnbondings) 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)) + } + return n +} + +func (m *QueryUnbondingsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Unbondings) > 0 { + for _, e := range m.Unbondings { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryTotalBonded) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryTotalBondedResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Bonded) > 0 { + for _, e := range m.Bonded { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryUpcomingIncentivePrograms) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryUpcomingIncentiveProgramsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Programs) > 0 { + for _, e := range m.Programs { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryOngoingIncentivePrograms) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryOngoingIncentiveProgramsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Programs) > 0 { + for _, e := range m.Programs { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryCompletedIncentivePrograms) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCompletedIncentiveProgramsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Programs) > 0 { + for _, e := range m.Programs { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryIncentiveProgram) 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 *QueryIncentiveProgramResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Program.Size() + n += 1 + l + sovQuery(uint64(l)) + 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 *TotalBond) 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: TotalBond: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TotalBond: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Tier", wireType) + } + m.Tier = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Tier |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount.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 *QueryParams) 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: QueryParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params.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 *QueryPendingRewards) 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: QueryPendingRewards: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPendingRewards: 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 + 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 *QueryPendingRewardsResponse) 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: QueryPendingRewardsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryPendingRewardsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rewards", 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.Rewards = append(m.Rewards, types.Coin{}) + if err := m.Rewards[len(m.Rewards)-1].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 *QueryBonded) 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: QueryBonded: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBonded: 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 + 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 *QueryBondedResponse) 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: QueryBondedResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryBondedResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bonded", 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.Bonded = append(m.Bonded, TotalBond{}) + if err := m.Bonded[len(m.Bonded)-1].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 *QueryUnbondings) 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: QueryUnbondings: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryUnbondings: 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 + 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 *QueryUnbondingsResponse) 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: QueryUnbondingsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryUnbondingsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Unbondings", 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.Unbondings = append(m.Unbondings, Unbonding{}) + if err := m.Unbondings[len(m.Unbondings)-1].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 *QueryTotalBonded) 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: QueryTotalBonded: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTotalBonded: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *QueryTotalBondedResponse) 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: QueryTotalBondedResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTotalBondedResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bonded", 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.Bonded = append(m.Bonded, TotalBond{}) + if err := m.Bonded[len(m.Bonded)-1].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 *QueryUpcomingIncentivePrograms) 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: QueryUpcomingIncentivePrograms: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryUpcomingIncentivePrograms: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *QueryUpcomingIncentiveProgramsResponse) 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: QueryUpcomingIncentiveProgramsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryUpcomingIncentiveProgramsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Programs", 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.Programs = append(m.Programs, IncentiveProgram{}) + if err := m.Programs[len(m.Programs)-1].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 *QueryOngoingIncentivePrograms) 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: QueryOngoingIncentivePrograms: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOngoingIncentivePrograms: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *QueryOngoingIncentiveProgramsResponse) 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: QueryOngoingIncentiveProgramsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryOngoingIncentiveProgramsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Programs", 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.Programs = append(m.Programs, IncentiveProgram{}) + if err := m.Programs[len(m.Programs)-1].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 *QueryCompletedIncentivePrograms) 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: QueryCompletedIncentivePrograms: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCompletedIncentivePrograms: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 *QueryCompletedIncentiveProgramsResponse) 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: QueryCompletedIncentiveProgramsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCompletedIncentiveProgramsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Programs", 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.Programs = append(m.Programs, IncentiveProgram{}) + if err := m.Programs[len(m.Programs)-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 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 *QueryIncentiveProgram) 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: QueryIncentiveProgram: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryIncentiveProgram: 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 |= uint32(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 *QueryIncentiveProgramResponse) 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: QueryIncentiveProgramResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryIncentiveProgramResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Program", 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.Program.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 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/incentive/query.pb.gw.go b/x/incentive/query.pb.gw.go new file mode 100644 index 0000000000..dd722e5531 --- /dev/null +++ b/x/incentive/query.pb.gw.go @@ -0,0 +1,835 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: umee/incentive/v1/query.proto + +/* +Package incentive is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package incentive + +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_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParams + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParams + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_PendingRewards_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPendingRewards + 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) + } + + msg, err := client.PendingRewards(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_PendingRewards_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryPendingRewards + 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) + } + + msg, err := server.PendingRewards(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Bonded_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBonded + 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) + } + + msg, err := client.Bonded(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Bonded_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBonded + 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) + } + + msg, err := server.Bonded(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Unbondings_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryUnbondings + 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) + } + + msg, err := client.Unbondings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Unbondings_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryUnbondings + 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) + } + + msg, err := server.Unbondings(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_TotalBonded_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTotalBonded + var metadata runtime.ServerMetadata + + msg, err := client.TotalBonded(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TotalBonded_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTotalBonded + var metadata runtime.ServerMetadata + + msg, err := server.TotalBonded(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_CompletedIncentivePrograms_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_CompletedIncentivePrograms_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCompletedIncentivePrograms + 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_CompletedIncentivePrograms_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CompletedIncentivePrograms(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_CompletedIncentivePrograms_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCompletedIncentivePrograms + 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_CompletedIncentivePrograms_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CompletedIncentivePrograms(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_OngoingIncentivePrograms_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryOngoingIncentivePrograms + var metadata runtime.ServerMetadata + + msg, err := client.OngoingIncentivePrograms(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_OngoingIncentivePrograms_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryOngoingIncentivePrograms + var metadata runtime.ServerMetadata + + msg, err := server.OngoingIncentivePrograms(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_UpcomingIncentivePrograms_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryUpcomingIncentivePrograms + var metadata runtime.ServerMetadata + + msg, err := client.UpcomingIncentivePrograms(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_UpcomingIncentivePrograms_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryUpcomingIncentivePrograms + var metadata runtime.ServerMetadata + + msg, err := server.UpcomingIncentivePrograms(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_IncentiveProgram_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryIncentiveProgram + 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.Uint32(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.IncentiveProgram(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_IncentiveProgram_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryIncentiveProgram + 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.Uint32(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.IncentiveProgram(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_Params_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_Params_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_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_PendingRewards_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_PendingRewards_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_PendingRewards_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Bonded_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_Bonded_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_Bonded_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Unbondings_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_Unbondings_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_Unbondings_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TotalBonded_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_TotalBonded_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_TotalBonded_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CompletedIncentivePrograms_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_CompletedIncentivePrograms_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_CompletedIncentivePrograms_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_OngoingIncentivePrograms_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_OngoingIncentivePrograms_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_OngoingIncentivePrograms_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_UpcomingIncentivePrograms_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_UpcomingIncentivePrograms_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_UpcomingIncentivePrograms_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_IncentiveProgram_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_IncentiveProgram_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_IncentiveProgram_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_Params_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_Params_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_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_PendingRewards_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_PendingRewards_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_PendingRewards_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Bonded_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_Bonded_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_Bonded_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Unbondings_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_Unbondings_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_Unbondings_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_TotalBonded_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_TotalBonded_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_TotalBonded_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CompletedIncentivePrograms_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_CompletedIncentivePrograms_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_CompletedIncentivePrograms_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_OngoingIncentivePrograms_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_OngoingIncentivePrograms_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_OngoingIncentivePrograms_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_UpcomingIncentivePrograms_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_UpcomingIncentivePrograms_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_UpcomingIncentivePrograms_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_IncentiveProgram_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_IncentiveProgram_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_IncentiveProgram_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "incentive", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_PendingRewards_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"umee", "incentive", "v1", "pending_rewards", "address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Bonded_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"umee", "incentive", "v1", "bonded", "address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Unbondings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"umee", "incentive", "v1", "unbondings", "address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_TotalBonded_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "incentive", "v1", "total_bonded"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_CompletedIncentivePrograms_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"umee", "incentive", "v1", "incentive_programs", "completed"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_OngoingIncentivePrograms_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"umee", "incentive", "v1", "incentive_programs", "ongoing"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_UpcomingIncentivePrograms_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"umee", "incentive", "v1", "incentive_programs", "upcoming"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_IncentiveProgram_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"umee", "incentive", "v1", "incentive_program", "id"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_PendingRewards_0 = runtime.ForwardResponseMessage + + forward_Query_Bonded_0 = runtime.ForwardResponseMessage + + forward_Query_Unbondings_0 = runtime.ForwardResponseMessage + + forward_Query_TotalBonded_0 = runtime.ForwardResponseMessage + + forward_Query_CompletedIncentivePrograms_0 = runtime.ForwardResponseMessage + + forward_Query_OngoingIncentivePrograms_0 = runtime.ForwardResponseMessage + + forward_Query_UpcomingIncentivePrograms_0 = runtime.ForwardResponseMessage + + forward_Query_IncentiveProgram_0 = runtime.ForwardResponseMessage +) diff --git a/x/incentive/tx.pb.go b/x/incentive/tx.pb.go new file mode 100644 index 0000000000..79b64e6d23 --- /dev/null +++ b/x/incentive/tx.pb.go @@ -0,0 +1,2908 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: umee/incentive/v1/tx.proto + +package incentive + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + 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 + +// MsgClaim represents a account's request to claim pending rewards. +type MsgClaim struct { + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` +} + +func (m *MsgClaim) Reset() { *m = MsgClaim{} } +func (m *MsgClaim) String() string { return proto.CompactTextString(m) } +func (*MsgClaim) ProtoMessage() {} +func (*MsgClaim) Descriptor() ([]byte, []int) { + return fileDescriptor_d04c68bb9e1f6306, []int{0} +} +func (m *MsgClaim) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgClaim.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 *MsgClaim) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClaim.Merge(m, src) +} +func (m *MsgClaim) XXX_Size() int { + return m.Size() +} +func (m *MsgClaim) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClaim.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgClaim proto.InternalMessageInfo + +func (m *MsgClaim) GetAccount() string { + if m != nil { + return m.Account + } + return "" +} + +// MsgClaimResponse defines the Msg/Claim response type. +type MsgClaimResponse struct { + Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` +} + +func (m *MsgClaimResponse) Reset() { *m = MsgClaimResponse{} } +func (m *MsgClaimResponse) String() string { return proto.CompactTextString(m) } +func (*MsgClaimResponse) ProtoMessage() {} +func (*MsgClaimResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d04c68bb9e1f6306, []int{1} +} +func (m *MsgClaimResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgClaimResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgClaimResponse.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 *MsgClaimResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClaimResponse.Merge(m, src) +} +func (m *MsgClaimResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgClaimResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClaimResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgClaimResponse proto.InternalMessageInfo + +func (m *MsgClaimResponse) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.Amount + } + return nil +} + +// MsgBond represents a account's request to bond uToken collateral. +type MsgBond struct { + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + Tier uint32 `protobuf:"varint,2,opt,name=tier,proto3" json:"tier,omitempty"` + Asset types.Coin `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset"` +} + +func (m *MsgBond) Reset() { *m = MsgBond{} } +func (m *MsgBond) String() string { return proto.CompactTextString(m) } +func (*MsgBond) ProtoMessage() {} +func (*MsgBond) Descriptor() ([]byte, []int) { + return fileDescriptor_d04c68bb9e1f6306, []int{2} +} +func (m *MsgBond) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBond) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBond.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 *MsgBond) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBond.Merge(m, src) +} +func (m *MsgBond) XXX_Size() int { + return m.Size() +} +func (m *MsgBond) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBond.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBond proto.InternalMessageInfo + +func (m *MsgBond) GetAccount() string { + if m != nil { + return m.Account + } + return "" +} + +func (m *MsgBond) GetTier() uint32 { + if m != nil { + return m.Tier + } + return 0 +} + +func (m *MsgBond) GetAsset() types.Coin { + if m != nil { + return m.Asset + } + return types.Coin{} +} + +// MsgBondResponse defines the Msg/Lock response type. +type MsgBondResponse struct { +} + +func (m *MsgBondResponse) Reset() { *m = MsgBondResponse{} } +func (m *MsgBondResponse) String() string { return proto.CompactTextString(m) } +func (*MsgBondResponse) ProtoMessage() {} +func (*MsgBondResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d04c68bb9e1f6306, []int{3} +} +func (m *MsgBondResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBondResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBondResponse.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 *MsgBondResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBondResponse.Merge(m, src) +} +func (m *MsgBondResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgBondResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBondResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBondResponse proto.InternalMessageInfo + +// MsgBeginUnbonding represents a account's request to begin unbonding uToken collateral. +type MsgBeginUnbonding struct { + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + Tier uint32 `protobuf:"varint,2,opt,name=tier,proto3" json:"tier,omitempty"` + Asset types.Coin `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset"` +} + +func (m *MsgBeginUnbonding) Reset() { *m = MsgBeginUnbonding{} } +func (m *MsgBeginUnbonding) String() string { return proto.CompactTextString(m) } +func (*MsgBeginUnbonding) ProtoMessage() {} +func (*MsgBeginUnbonding) Descriptor() ([]byte, []int) { + return fileDescriptor_d04c68bb9e1f6306, []int{4} +} +func (m *MsgBeginUnbonding) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBeginUnbonding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBeginUnbonding.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 *MsgBeginUnbonding) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBeginUnbonding.Merge(m, src) +} +func (m *MsgBeginUnbonding) XXX_Size() int { + return m.Size() +} +func (m *MsgBeginUnbonding) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBeginUnbonding.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBeginUnbonding proto.InternalMessageInfo + +func (m *MsgBeginUnbonding) GetAccount() string { + if m != nil { + return m.Account + } + return "" +} + +func (m *MsgBeginUnbonding) GetTier() uint32 { + if m != nil { + return m.Tier + } + return 0 +} + +func (m *MsgBeginUnbonding) GetAsset() types.Coin { + if m != nil { + return m.Asset + } + return types.Coin{} +} + +// MsgBeginUnbondingResponse defines the Msg/BeginUnbonding response type. +type MsgBeginUnbondingResponse struct { +} + +func (m *MsgBeginUnbondingResponse) Reset() { *m = MsgBeginUnbondingResponse{} } +func (m *MsgBeginUnbondingResponse) String() string { return proto.CompactTextString(m) } +func (*MsgBeginUnbondingResponse) ProtoMessage() {} +func (*MsgBeginUnbondingResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d04c68bb9e1f6306, []int{5} +} +func (m *MsgBeginUnbondingResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBeginUnbondingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBeginUnbondingResponse.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 *MsgBeginUnbondingResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBeginUnbondingResponse.Merge(m, src) +} +func (m *MsgBeginUnbondingResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgBeginUnbondingResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBeginUnbondingResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBeginUnbondingResponse proto.InternalMessageInfo + +// MsgSponsor represents a sponsor's request to fund rewards for an incentive program. +// The program must have been passed by governance, not yet started, and not yet funded. +// Funded assets must be the full amount required by the program. +type MsgSponsor struct { + // Sponsor bech32 account address + Sponsor string `protobuf:"bytes,1,opt,name=sponsor,proto3" json:"sponsor,omitempty"` + Program uint32 `protobuf:"varint,2,opt,name=program,proto3" json:"program,omitempty"` + Asset types.Coin `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset"` +} + +func (m *MsgSponsor) Reset() { *m = MsgSponsor{} } +func (m *MsgSponsor) String() string { return proto.CompactTextString(m) } +func (*MsgSponsor) ProtoMessage() {} +func (*MsgSponsor) Descriptor() ([]byte, []int) { + return fileDescriptor_d04c68bb9e1f6306, []int{6} +} +func (m *MsgSponsor) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSponsor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSponsor.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 *MsgSponsor) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSponsor.Merge(m, src) +} +func (m *MsgSponsor) XXX_Size() int { + return m.Size() +} +func (m *MsgSponsor) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSponsor.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSponsor proto.InternalMessageInfo + +func (m *MsgSponsor) GetSponsor() string { + if m != nil { + return m.Sponsor + } + return "" +} + +func (m *MsgSponsor) GetProgram() uint32 { + if m != nil { + return m.Program + } + return 0 +} + +func (m *MsgSponsor) GetAsset() types.Coin { + if m != nil { + return m.Asset + } + return types.Coin{} +} + +// MsgSponsorResponse defines the Msg/Sponsor response type. +type MsgSponsorResponse struct { +} + +func (m *MsgSponsorResponse) Reset() { *m = MsgSponsorResponse{} } +func (m *MsgSponsorResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSponsorResponse) ProtoMessage() {} +func (*MsgSponsorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d04c68bb9e1f6306, []int{7} +} +func (m *MsgSponsorResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSponsorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSponsorResponse.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 *MsgSponsorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSponsorResponse.Merge(m, src) +} +func (m *MsgSponsorResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSponsorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSponsorResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSponsorResponse proto.InternalMessageInfo + +// MsgGovSetParams is used by governance to update module parameters. +type MsgGovSetParams struct { + // authority must be the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Params Params `protobuf:"bytes,4,opt,name=params,proto3" json:"params"` +} + +func (m *MsgGovSetParams) Reset() { *m = MsgGovSetParams{} } +func (m *MsgGovSetParams) String() string { return proto.CompactTextString(m) } +func (*MsgGovSetParams) ProtoMessage() {} +func (*MsgGovSetParams) Descriptor() ([]byte, []int) { + return fileDescriptor_d04c68bb9e1f6306, []int{8} +} +func (m *MsgGovSetParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovSetParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovSetParams.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 *MsgGovSetParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovSetParams.Merge(m, src) +} +func (m *MsgGovSetParams) XXX_Size() int { + return m.Size() +} +func (m *MsgGovSetParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovSetParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovSetParams proto.InternalMessageInfo + +// MsgGovSetParamsResponse defines the Msg/SetParams response type. +type MsgGovSetParamsResponse struct { +} + +func (m *MsgGovSetParamsResponse) Reset() { *m = MsgGovSetParamsResponse{} } +func (m *MsgGovSetParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgGovSetParamsResponse) ProtoMessage() {} +func (*MsgGovSetParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d04c68bb9e1f6306, []int{9} +} +func (m *MsgGovSetParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovSetParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovSetParamsResponse.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 *MsgGovSetParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovSetParamsResponse.Merge(m, src) +} +func (m *MsgGovSetParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgGovSetParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovSetParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovSetParamsResponse proto.InternalMessageInfo + +// MsgGovCreateProgram is used by governance to create an incentive program. There are two +// funding scenarios, depending on from_community_fund. +// If it is true,the program's total rewards will be automatically withdrawn from +// the (parameter) community_fund_address to the incentive module account when this +// message is passed. (Insufficient funds cause the parameter to be treated as false.) +// If it is false, a MsgSponsor fundign the program's full amount must be submitted +// after this message passes, but before the program's start_time, or the program +// will be cancelled when it would otherwise start. +type MsgGovCreateProgram struct { + // authority must be the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Program IncentiveProgram `protobuf:"bytes,4,opt,name=program,proto3" json:"program"` + // from_community_fund defines the source of funds for a proposed incentive program. + FromCommunityFund bool `protobuf:"varint,5,opt,name=from_community_fund,json=fromCommunityFund,proto3" json:"from_community_fund,omitempty"` +} + +func (m *MsgGovCreateProgram) Reset() { *m = MsgGovCreateProgram{} } +func (m *MsgGovCreateProgram) String() string { return proto.CompactTextString(m) } +func (*MsgGovCreateProgram) ProtoMessage() {} +func (*MsgGovCreateProgram) Descriptor() ([]byte, []int) { + return fileDescriptor_d04c68bb9e1f6306, []int{10} +} +func (m *MsgGovCreateProgram) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovCreateProgram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovCreateProgram.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 *MsgGovCreateProgram) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovCreateProgram.Merge(m, src) +} +func (m *MsgGovCreateProgram) XXX_Size() int { + return m.Size() +} +func (m *MsgGovCreateProgram) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovCreateProgram.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovCreateProgram proto.InternalMessageInfo + +// MsgGovCreateProgramResponse defines the Msg/CreateProgram response type. +type MsgGovCreateProgramResponse struct { +} + +func (m *MsgGovCreateProgramResponse) Reset() { *m = MsgGovCreateProgramResponse{} } +func (m *MsgGovCreateProgramResponse) String() string { return proto.CompactTextString(m) } +func (*MsgGovCreateProgramResponse) ProtoMessage() {} +func (*MsgGovCreateProgramResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d04c68bb9e1f6306, []int{11} +} +func (m *MsgGovCreateProgramResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovCreateProgramResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovCreateProgramResponse.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 *MsgGovCreateProgramResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovCreateProgramResponse.Merge(m, src) +} +func (m *MsgGovCreateProgramResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgGovCreateProgramResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovCreateProgramResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovCreateProgramResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgClaim)(nil), "umeenetwork.umee.incentive.v1.MsgClaim") + proto.RegisterType((*MsgClaimResponse)(nil), "umeenetwork.umee.incentive.v1.MsgClaimResponse") + proto.RegisterType((*MsgBond)(nil), "umeenetwork.umee.incentive.v1.MsgBond") + proto.RegisterType((*MsgBondResponse)(nil), "umeenetwork.umee.incentive.v1.MsgBondResponse") + proto.RegisterType((*MsgBeginUnbonding)(nil), "umeenetwork.umee.incentive.v1.MsgBeginUnbonding") + proto.RegisterType((*MsgBeginUnbondingResponse)(nil), "umeenetwork.umee.incentive.v1.MsgBeginUnbondingResponse") + proto.RegisterType((*MsgSponsor)(nil), "umeenetwork.umee.incentive.v1.MsgSponsor") + proto.RegisterType((*MsgSponsorResponse)(nil), "umeenetwork.umee.incentive.v1.MsgSponsorResponse") + proto.RegisterType((*MsgGovSetParams)(nil), "umeenetwork.umee.incentive.v1.MsgGovSetParams") + proto.RegisterType((*MsgGovSetParamsResponse)(nil), "umeenetwork.umee.incentive.v1.MsgGovSetParamsResponse") + proto.RegisterType((*MsgGovCreateProgram)(nil), "umeenetwork.umee.incentive.v1.MsgGovCreateProgram") + proto.RegisterType((*MsgGovCreateProgramResponse)(nil), "umeenetwork.umee.incentive.v1.MsgGovCreateProgramResponse") +} + +func init() { proto.RegisterFile("umee/incentive/v1/tx.proto", fileDescriptor_d04c68bb9e1f6306) } + +var fileDescriptor_d04c68bb9e1f6306 = []byte{ + // 740 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0x4d, 0x4f, 0xdb, 0x4c, + 0x10, 0xc7, 0x63, 0x48, 0x80, 0x0c, 0xcf, 0x0b, 0x98, 0xe8, 0x21, 0x31, 0x22, 0xc9, 0x13, 0xf5, + 0x25, 0x6d, 0x85, 0x4d, 0x40, 0x45, 0x15, 0xb7, 0x26, 0x6a, 0xab, 0x1e, 0xa2, 0x22, 0xa3, 0x5e, + 0x7a, 0x28, 0x72, 0xec, 0xc5, 0xac, 0xc0, 0xbb, 0x91, 0x77, 0x1d, 0x40, 0xea, 0x89, 0x53, 0x8f, + 0xfd, 0x04, 0x15, 0xe7, 0xaa, 0x87, 0x1e, 0xfa, 0x21, 0x38, 0xa2, 0x9e, 0x7a, 0xa2, 0x15, 0x1c, + 0xda, 0x8f, 0x51, 0xad, 0xbd, 0xb6, 0x79, 0x29, 0x24, 0xf4, 0xc0, 0x89, 0x1d, 0xcf, 0x7f, 0x66, + 0x7e, 0x33, 0x64, 0x67, 0x41, 0x0b, 0x3c, 0x84, 0x0c, 0x4c, 0x6c, 0x44, 0x38, 0xee, 0x21, 0xa3, + 0xd7, 0x30, 0xf8, 0x8e, 0xde, 0xf5, 0x29, 0xa7, 0xea, 0xac, 0xf0, 0x11, 0xc4, 0xb7, 0xa9, 0xbf, + 0xa9, 0x8b, 0xb3, 0x9e, 0xe8, 0xf4, 0x5e, 0x43, 0x2b, 0xdb, 0x94, 0x79, 0x94, 0x19, 0x1d, 0x8b, + 0x89, 0xb8, 0x0e, 0xe2, 0x56, 0xc3, 0xb0, 0x29, 0x26, 0x51, 0xb8, 0x56, 0x8a, 0xfc, 0x6b, 0xa1, + 0x65, 0x44, 0x86, 0x74, 0x4d, 0xcb, 0x50, 0x8f, 0xb9, 0xa2, 0xa2, 0xc7, 0x5c, 0xe9, 0x28, 0xb8, + 0xd4, 0xa5, 0x51, 0x80, 0x38, 0xc9, 0xaf, 0xff, 0x5f, 0x84, 0x4c, 0x49, 0x42, 0x49, 0xed, 0x16, + 0x8c, 0xb5, 0x99, 0xdb, 0xda, 0xb2, 0xb0, 0xa7, 0x16, 0x61, 0xd4, 0xb2, 0x6d, 0x1a, 0x10, 0x5e, + 0x54, 0xaa, 0x4a, 0x3d, 0x6f, 0xc6, 0x66, 0x6d, 0x1b, 0x26, 0x62, 0x95, 0x89, 0x58, 0x97, 0x12, + 0x86, 0x54, 0x1b, 0x46, 0x2c, 0x4f, 0x8a, 0x87, 0xeb, 0xe3, 0x0b, 0x25, 0x5d, 0xa2, 0x8a, 0xbe, + 0x74, 0xd9, 0x97, 0xde, 0xa2, 0x98, 0x34, 0xe7, 0x0f, 0x8e, 0x2a, 0x99, 0x0f, 0xdf, 0x2a, 0x75, + 0x17, 0xf3, 0x8d, 0xa0, 0xa3, 0xdb, 0xd4, 0x93, 0x7d, 0xc9, 0x3f, 0x73, 0xcc, 0xd9, 0x34, 0xf8, + 0x6e, 0x17, 0xb1, 0x30, 0x80, 0x99, 0x32, 0x75, 0x8d, 0xc0, 0x68, 0x9b, 0xb9, 0x4d, 0x4a, 0x9c, + 0xcb, 0xe9, 0x54, 0x15, 0xb2, 0x1c, 0x23, 0xbf, 0x38, 0x54, 0x55, 0xea, 0x7f, 0x9b, 0xe1, 0x59, + 0x7d, 0x08, 0x39, 0x8b, 0x31, 0xc4, 0x8b, 0xc3, 0x55, 0xe5, 0x6a, 0xb8, 0xac, 0x80, 0x33, 0x23, + 0x75, 0x6d, 0x12, 0xfe, 0x95, 0xf5, 0xe2, 0x3e, 0x6b, 0x3b, 0x30, 0x29, 0x3e, 0x21, 0x17, 0x93, + 0x97, 0xa4, 0x43, 0x89, 0x83, 0x89, 0x7b, 0x33, 0x30, 0x33, 0x50, 0xba, 0x50, 0x39, 0xc1, 0xda, + 0x06, 0x68, 0x33, 0x77, 0x55, 0x18, 0xd4, 0x17, 0x3c, 0x2c, 0x3a, 0xc6, 0x3c, 0x2c, 0xf5, 0x74, + 0x7d, 0xea, 0xfa, 0x96, 0x27, 0x91, 0x62, 0xf3, 0x4f, 0xa9, 0x0a, 0xa0, 0xa6, 0x85, 0x13, 0x9c, + 0x23, 0x25, 0x9c, 0xdc, 0x33, 0xda, 0x5b, 0x45, 0x7c, 0xc5, 0xf2, 0x2d, 0x8f, 0xa9, 0x4b, 0x90, + 0xb7, 0x02, 0xbe, 0x41, 0x7d, 0xcc, 0x77, 0x23, 0xac, 0x66, 0xf1, 0xcb, 0xe7, 0xb9, 0x82, 0xac, + 0xf3, 0xd8, 0x71, 0x7c, 0xc4, 0xd8, 0x2a, 0xf7, 0x45, 0x5f, 0xa9, 0x54, 0x2d, 0x40, 0x8e, 0x63, + 0xbe, 0x85, 0x42, 0xe0, 0xbc, 0x19, 0x19, 0x6a, 0x15, 0xc6, 0x1d, 0xc4, 0x6c, 0x1f, 0x77, 0x39, + 0xa6, 0x24, 0x84, 0xce, 0x9b, 0xa7, 0x3f, 0xa9, 0x2d, 0x18, 0xe9, 0x86, 0x95, 0x8b, 0xd9, 0xb0, + 0xa3, 0xdb, 0xfa, 0x95, 0x17, 0x51, 0x8f, 0x30, 0x65, 0x77, 0x32, 0x74, 0xf9, 0xbf, 0xb7, 0xfb, + 0x95, 0xcc, 0xcf, 0xfd, 0x8a, 0xb2, 0xf7, 0xe3, 0xd3, 0xfd, 0x14, 0xaa, 0x56, 0x82, 0xe9, 0x73, + 0xfd, 0x25, 0xbd, 0xbf, 0x1f, 0x82, 0xa9, 0xc8, 0xd7, 0xf2, 0x91, 0xc5, 0xd1, 0x8a, 0x1c, 0xf0, + 0x4d, 0xf7, 0xff, 0x22, 0xfd, 0x57, 0x47, 0x03, 0x30, 0xfa, 0x0c, 0xe0, 0x79, 0x6c, 0x48, 0x62, + 0x39, 0x8a, 0xe4, 0x17, 0xa2, 0xc3, 0xd4, 0xba, 0x4f, 0xbd, 0x35, 0x9b, 0x7a, 0x5e, 0x40, 0x30, + 0xdf, 0x5d, 0x5b, 0x0f, 0x88, 0x53, 0xcc, 0x55, 0x95, 0xfa, 0x98, 0x39, 0x29, 0x5c, 0xad, 0xd8, + 0xf3, 0x34, 0x20, 0xce, 0xa5, 0xb3, 0x9b, 0x85, 0x99, 0xdf, 0xcc, 0x27, 0x9e, 0xdf, 0xc2, 0xc7, + 0x1c, 0x0c, 0xb7, 0x99, 0xab, 0x5a, 0x90, 0x8b, 0x16, 0xd1, 0xdd, 0x3e, 0xdc, 0xf1, 0x2e, 0xd2, + 0x8c, 0x01, 0x85, 0xc9, 0xd2, 0x7a, 0x0d, 0xd9, 0x70, 0x99, 0xdc, 0xe9, 0x1f, 0x28, 0x74, 0x9a, + 0x3e, 0x98, 0x2e, 0xc9, 0xff, 0x06, 0xfe, 0x39, 0xb7, 0x29, 0xe6, 0x07, 0xc8, 0x70, 0x26, 0x42, + 0x7b, 0x74, 0xdd, 0x88, 0xa4, 0xba, 0x0b, 0xa3, 0xf1, 0x42, 0xb8, 0xd7, 0x3f, 0x89, 0x94, 0x6a, + 0x8d, 0x81, 0xa5, 0x49, 0xa1, 0x1e, 0xfc, 0x75, 0xe6, 0xa6, 0x0f, 0x30, 0xa6, 0xd3, 0x7a, 0x6d, + 0xe9, 0x7a, 0xfa, 0xa4, 0xee, 0x9e, 0x02, 0x13, 0x17, 0xae, 0xd9, 0xc2, 0x40, 0xc9, 0xce, 0xc4, + 0x68, 0xcb, 0xd7, 0x8f, 0x89, 0x21, 0x9a, 0x4f, 0x0e, 0x8e, 0xcb, 0xca, 0xe1, 0x71, 0x59, 0xf9, + 0x7e, 0x5c, 0x56, 0xde, 0x9d, 0x94, 0x33, 0x87, 0x27, 0xe5, 0xcc, 0xd7, 0x93, 0x72, 0xe6, 0xd5, + 0x83, 0x53, 0xef, 0x9b, 0xc8, 0x39, 0x27, 0x0b, 0x84, 0x86, 0xd1, 0x5b, 0x34, 0x76, 0xd2, 0xf7, + 0xb7, 0x33, 0x12, 0x3e, 0xc0, 0x8b, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc2, 0xd6, 0xbc, 0xdc, + 0x4a, 0x08, 0x00, 0x00, +} + +func (this *MsgGovSetParams) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgGovSetParams) + if !ok { + that2, ok := that.(MsgGovSetParams) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Authority != that1.Authority { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if !this.Params.Equal(&that1.Params) { + return false + } + return true +} +func (this *MsgGovCreateProgram) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MsgGovCreateProgram) + if !ok { + that2, ok := that.(MsgGovCreateProgram) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Authority != that1.Authority { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if !this.Program.Equal(&that1.Program) { + return false + } + if this.FromCommunityFund != that1.FromCommunityFund { + 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 { + // Claim defines a method for claiming any pending incentive rewards. + Claim(ctx context.Context, in *MsgClaim, opts ...grpc.CallOption) (*MsgClaimResponse, error) + // Bond defines a method for bonding uToken collateral into reward tier. + Bond(ctx context.Context, in *MsgBond, opts ...grpc.CallOption) (*MsgBondResponse, error) + // BeginUnbonding defines a method for starting to unbond uToken collateral. + BeginUnbonding(ctx context.Context, in *MsgBeginUnbonding, opts ...grpc.CallOption) (*MsgBeginUnbondingResponse, error) + // Sponsor defines a permissionless method for sponsoring an upcoming, not yet funded incentive program. + // In the current implementation, the sponsor must be a single account and the MsgSponsor must fully cover the expected program rewards. + Sponsor(ctx context.Context, in *MsgSponsor, opts ...grpc.CallOption) (*MsgSponsorResponse, error) + // GovSetParams is used by governance proposals to update parameters. + GovSetParams(ctx context.Context, in *MsgGovSetParams, opts ...grpc.CallOption) (*MsgGovSetParamsResponse, error) + // GovCreateProgram is used by governance proposals to create (but not fund) an incentive program. + GovCreateProgram(ctx context.Context, in *MsgGovCreateProgram, opts ...grpc.CallOption) (*MsgGovCreateProgramResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) Claim(ctx context.Context, in *MsgClaim, opts ...grpc.CallOption) (*MsgClaimResponse, error) { + out := new(MsgClaimResponse) + err := c.cc.Invoke(ctx, "/umeenetwork.umee.incentive.v1.Msg/Claim", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Bond(ctx context.Context, in *MsgBond, opts ...grpc.CallOption) (*MsgBondResponse, error) { + out := new(MsgBondResponse) + err := c.cc.Invoke(ctx, "/umeenetwork.umee.incentive.v1.Msg/Bond", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) BeginUnbonding(ctx context.Context, in *MsgBeginUnbonding, opts ...grpc.CallOption) (*MsgBeginUnbondingResponse, error) { + out := new(MsgBeginUnbondingResponse) + err := c.cc.Invoke(ctx, "/umeenetwork.umee.incentive.v1.Msg/BeginUnbonding", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Sponsor(ctx context.Context, in *MsgSponsor, opts ...grpc.CallOption) (*MsgSponsorResponse, error) { + out := new(MsgSponsorResponse) + err := c.cc.Invoke(ctx, "/umeenetwork.umee.incentive.v1.Msg/Sponsor", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) GovSetParams(ctx context.Context, in *MsgGovSetParams, opts ...grpc.CallOption) (*MsgGovSetParamsResponse, error) { + out := new(MsgGovSetParamsResponse) + err := c.cc.Invoke(ctx, "/umeenetwork.umee.incentive.v1.Msg/GovSetParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) GovCreateProgram(ctx context.Context, in *MsgGovCreateProgram, opts ...grpc.CallOption) (*MsgGovCreateProgramResponse, error) { + out := new(MsgGovCreateProgramResponse) + err := c.cc.Invoke(ctx, "/umeenetwork.umee.incentive.v1.Msg/GovCreateProgram", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // Claim defines a method for claiming any pending incentive rewards. + Claim(context.Context, *MsgClaim) (*MsgClaimResponse, error) + // Bond defines a method for bonding uToken collateral into reward tier. + Bond(context.Context, *MsgBond) (*MsgBondResponse, error) + // BeginUnbonding defines a method for starting to unbond uToken collateral. + BeginUnbonding(context.Context, *MsgBeginUnbonding) (*MsgBeginUnbondingResponse, error) + // Sponsor defines a permissionless method for sponsoring an upcoming, not yet funded incentive program. + // In the current implementation, the sponsor must be a single account and the MsgSponsor must fully cover the expected program rewards. + Sponsor(context.Context, *MsgSponsor) (*MsgSponsorResponse, error) + // GovSetParams is used by governance proposals to update parameters. + GovSetParams(context.Context, *MsgGovSetParams) (*MsgGovSetParamsResponse, error) + // GovCreateProgram is used by governance proposals to create (but not fund) an incentive program. + GovCreateProgram(context.Context, *MsgGovCreateProgram) (*MsgGovCreateProgramResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) Claim(ctx context.Context, req *MsgClaim) (*MsgClaimResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Claim not implemented") +} +func (*UnimplementedMsgServer) Bond(ctx context.Context, req *MsgBond) (*MsgBondResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Bond not implemented") +} +func (*UnimplementedMsgServer) BeginUnbonding(ctx context.Context, req *MsgBeginUnbonding) (*MsgBeginUnbondingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BeginUnbonding not implemented") +} +func (*UnimplementedMsgServer) Sponsor(ctx context.Context, req *MsgSponsor) (*MsgSponsorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Sponsor not implemented") +} +func (*UnimplementedMsgServer) GovSetParams(ctx context.Context, req *MsgGovSetParams) (*MsgGovSetParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GovSetParams not implemented") +} +func (*UnimplementedMsgServer) GovCreateProgram(ctx context.Context, req *MsgGovCreateProgram) (*MsgGovCreateProgramResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GovCreateProgram not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_Claim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgClaim) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Claim(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umeenetwork.umee.incentive.v1.Msg/Claim", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Claim(ctx, req.(*MsgClaim)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Bond_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgBond) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Bond(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umeenetwork.umee.incentive.v1.Msg/Bond", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Bond(ctx, req.(*MsgBond)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_BeginUnbonding_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgBeginUnbonding) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).BeginUnbonding(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umeenetwork.umee.incentive.v1.Msg/BeginUnbonding", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).BeginUnbonding(ctx, req.(*MsgBeginUnbonding)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Sponsor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSponsor) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Sponsor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umeenetwork.umee.incentive.v1.Msg/Sponsor", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Sponsor(ctx, req.(*MsgSponsor)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_GovSetParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgGovSetParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GovSetParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umeenetwork.umee.incentive.v1.Msg/GovSetParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GovSetParams(ctx, req.(*MsgGovSetParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_GovCreateProgram_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgGovCreateProgram) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GovCreateProgram(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umeenetwork.umee.incentive.v1.Msg/GovCreateProgram", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GovCreateProgram(ctx, req.(*MsgGovCreateProgram)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "umeenetwork.umee.incentive.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Claim", + Handler: _Msg_Claim_Handler, + }, + { + MethodName: "Bond", + Handler: _Msg_Bond_Handler, + }, + { + MethodName: "BeginUnbonding", + Handler: _Msg_BeginUnbonding_Handler, + }, + { + MethodName: "Sponsor", + Handler: _Msg_Sponsor_Handler, + }, + { + MethodName: "GovSetParams", + Handler: _Msg_GovSetParams_Handler, + }, + { + MethodName: "GovCreateProgram", + Handler: _Msg_GovCreateProgram_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "umee/incentive/v1/tx.proto", +} + +func (m *MsgClaim) 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 *MsgClaim) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Account) > 0 { + i -= len(m.Account) + copy(dAtA[i:], m.Account) + i = encodeVarintTx(dAtA, i, uint64(len(m.Account))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgClaimResponse) 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 *MsgClaimResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Amount[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 *MsgBond) 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 *MsgBond) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBond) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Asset.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.Tier != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Tier)) + i-- + dAtA[i] = 0x10 + } + if len(m.Account) > 0 { + i -= len(m.Account) + copy(dAtA[i:], m.Account) + i = encodeVarintTx(dAtA, i, uint64(len(m.Account))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgBondResponse) 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 *MsgBondResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBondResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgBeginUnbonding) 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 *MsgBeginUnbonding) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBeginUnbonding) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Asset.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.Tier != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Tier)) + i-- + dAtA[i] = 0x10 + } + if len(m.Account) > 0 { + i -= len(m.Account) + copy(dAtA[i:], m.Account) + i = encodeVarintTx(dAtA, i, uint64(len(m.Account))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgBeginUnbondingResponse) 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 *MsgBeginUnbondingResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBeginUnbondingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgSponsor) 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 *MsgSponsor) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSponsor) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Asset.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.Program != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Program)) + i-- + dAtA[i] = 0x10 + } + if len(m.Sponsor) > 0 { + i -= len(m.Sponsor) + copy(dAtA[i:], m.Sponsor) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sponsor))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSponsorResponse) 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 *MsgSponsorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSponsorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgGovSetParams) 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 *MsgGovSetParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovSetParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + 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] = 0x1a + } + 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] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgGovSetParamsResponse) 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 *MsgGovSetParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovSetParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgGovCreateProgram) 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 *MsgGovCreateProgram) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovCreateProgram) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.FromCommunityFund { + i-- + if m.FromCommunityFund { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + { + size, err := m.Program.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + 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] = 0x1a + } + 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] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgGovCreateProgramResponse) 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 *MsgGovCreateProgramResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovCreateProgramResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + 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 *MsgClaim) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Account) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgClaimResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Amount) > 0 { + for _, e := range m.Amount { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgBond) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Account) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Tier != 0 { + n += 1 + sovTx(uint64(m.Tier)) + } + l = m.Asset.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgBondResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgBeginUnbonding) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Account) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Tier != 0 { + n += 1 + sovTx(uint64(m.Tier)) + } + l = m.Asset.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgBeginUnbondingResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgSponsor) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sponsor) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Program != 0 { + n += 1 + sovTx(uint64(m.Program)) + } + l = m.Asset.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgSponsorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgGovSetParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(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 = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgGovSetParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgGovCreateProgram) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(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 = m.Program.Size() + n += 1 + l + sovTx(uint64(l)) + if m.FromCommunityFund { + n += 2 + } + return n +} + +func (m *MsgGovCreateProgramResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = 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 *MsgClaim) 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: MsgClaim: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgClaim: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", 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.Account = 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 *MsgClaimResponse) 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: MsgClaimResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgClaimResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount = append(m.Amount, types.Coin{}) + if err := m.Amount[len(m.Amount)-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 *MsgBond) 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: MsgBond: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBond: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", 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.Account = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Tier", wireType) + } + m.Tier = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Tier |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Asset", 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.Asset.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 *MsgBondResponse) 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: MsgBondResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBondResponse: 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 *MsgBeginUnbonding) 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: MsgBeginUnbonding: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBeginUnbonding: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", 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.Account = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Tier", wireType) + } + m.Tier = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Tier |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Asset", 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.Asset.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 *MsgBeginUnbondingResponse) 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: MsgBeginUnbondingResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBeginUnbondingResponse: 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 *MsgSponsor) 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: MsgSponsor: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSponsor: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sponsor", 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.Sponsor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Program", wireType) + } + m.Program = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Program |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Asset", 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.Asset.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 *MsgSponsorResponse) 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: MsgSponsorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSponsorResponse: 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 *MsgGovSetParams) 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: MsgGovSetParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovSetParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + 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 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 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 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 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params.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 *MsgGovSetParamsResponse) 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: MsgGovSetParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovSetParamsResponse: 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 *MsgGovCreateProgram) 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: MsgGovCreateProgram: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovCreateProgram: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + 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 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 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 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 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Program", 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.Program.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FromCommunityFund", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.FromCommunityFund = bool(v != 0) + 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 *MsgGovCreateProgramResponse) 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: MsgGovCreateProgramResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovCreateProgramResponse: 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 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") +)