incentive

package
v6.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

README

Incentive Module

Abstract

This document specifies the x/incentive module of the Umee chain.

The incentive module allows users to Bond collateral uTokens from the x/leverage module, and governance to create and fund Incentive Programs which distribute rewards to users with bonded uTokens over time.

Users can Unbond tokens over a period of time, after which they can be withdrawn. UnbondingDuration is a module parameter (the same for all tokens) set by governance. Typical values might be 1 day, 7 days, or 0 days (instant unbonding).

The incentive module depends on the x/leverage module for information about users' bonded collateral, and also requires that the leverage module prevent bonded or currently unbonding collateral from being withdrawn. There are also a few more advanced interactions, such as instantly unbonding collateral when it is liquidated, and registering an exponent when a uToken denom is incentivized for the first time.

Contents

  1. Concepts
  2. State
  3. Messages

Concepts

Bonding Collateral

A user can bond their x/leverage collaterized uTokens in a x/incentive module to receive extra rewards.

Bonding prevents the user from using any leverage.MsgDecollateralize or leverage.MsgWithdraw which would reduce the user's collateral below the bonded amount.

Example: a user has 100 u/UMEE in their wallet and 50 u/UMEE collateral in the leverage module. 40 u/UMEE from that 50 u/UMEE is bonded in the incentive module. Their maximum leverage.MsgDecollateralize allowed by their bond is 10 u/UMEE and their maximum leverage.MsgWithdraw is 110u/UMEE.

Bonded collateral is eligible for incentive program rewards as long as it is not currently unbonding.

When the user starts unbonding a uToken, the module's UnbondingDuration determines the time after which the tokens are unlocked to the user.

Unbonding uTokens are not eligible for incentive rewards while they unbond, but are still subject to the same restrictions on leverage.MsgWithdraw and leverage.MsgDecollateralize as bonded tokens.

For example, if a user has 10u/UMEE bonded and 3u/UMEE more unbonding, out of a total of 20u/UMEE collateral, then their current max withdraw is 7u/UMEE, and they are earning incentive rewards on only 10u/UMEE uTokens.

The module parameter MaxUnbondings limits how many concurrent unbondings a user can have of the same uToken denom, to prevent spam.

Additionally, MsgEmergencyUnbond can instantly unbond collateral, starting with in-progress unbondings then bonded tokens. This costs a fee - for example, if the parameter EmergencyUnbondFee is 0.01, then 1% of the uTokens unbonded would be donated to the x/leverage module reserves while the other 99% are returned to the user.

Incentive Programs

An IncentiveProgram is a fixed-duration program which distributes a predetermined amount of one reward token to users which have bonded selected uTokens during its duration.

For example, the following incentive program would, at each block during the 864000 seconds after its start at unix time 1679659746, distribute a portion of its total 1000 UMEE rewards to users who have bonded (but are not currently unbonding) u/uumee to the incentive module.

ip := IncentiveProgram {
   StartTime: 1679659746, // Mar 24 2023
   Duration: 864000, // 10 days
   UToken: "u/uumee",
   TotalRewards: sdk.Coin{"uumee",1000_000000},
}

Reward distribution math is

  • Constant Rate: Regardless of how much u/uumee is bonded to the incentive module at any given block, the program distributes the fraction blockTime / duration of its total rewards across users every block it is active (with some corrective rounding).
  • Weighted by Amount: A user with 200u/uumee bonded received twice as many rewards on a given block as a user with 100u/uumee bonded.

When multiple incentive programs are active simultaneously, they compute their rewards independently.

Additionally, if no users are bonded while it is active, a program refrains from distributing any rewards until bonded users exist.

For example, an incentive program which saw no bonded users for the first 25% of its duration would distribute 100% of its rewards over the remaining 75% duration.

If no users are bonded at the end of an incentive program, it will end with nonzero RemainingRewards and those rewards will stay in the module balance.

Claiming Rewards

A user can claim rewards for all of their bonded uTokens at once using MsgClaim. When a user claims rewards, an appropriate amount of tokens are sent from the x/incentive module account to their wallet.

There are also times where rewards must be claimed automatically to maintain rewards-tracking math. These times are:

  • On MsgBond
  • On MsgBeginUnbonding
  • When a leverage.MsgLiquidate forcefully reduces the user's bonded collateral

Any of the actions above cause the same tokens to be transferred to the user as would have been generated by a MsgClaim at the same moment.

By automatically claiming rewards whenever a user's bonded amount changes, the module guarantees the following invariant:

Between any two consecutive reward claims by an account associated with a specific bonded uToken denom, the amount of bonded uTokens of the given denom for that account remained constant.

Reward Accumulators

The incentive module must calculate rewards each block without iterating over accounts and past incentive programs. It does so by storing a number of RewardAccumulator

ra := RewardAccumulator{
   denom: "u/uumee",
   exponent: 6,
   rewards: "0.00023uumee, 0.00014ibc/1234",
}

The example reward accumulator above can be interpreted as:

If 10^6 u/uumee was bonded at genesis and had remained bonded since, it would have accumulated 0.00023uumee and 0.00014ibc/1234 in rewards.

The incentive module must store one RewardAccumulator for each uToken denom that is currently (or has been previously) incentivized.

During EndBlock when rewards are being distributed by incentive programs, the module divides the amount of tokens to distribute by the current TotalBonded which it stores for each uToken denom, to increment the rewards field in each RewardAccumulator.

The exponent field is based on the exponent of the base asset associated with the uToken in denom. It reduces the loss of precision that may result from dividing the (relatively small) amount of rewards distributed in a single block by the (relatively large) total amount of uTokens bonded.

Note that the rewards field must never decrease, nor can any nonzero RewardAccumulator be deleted, even after associated incentive programs have ended. The exponent field should also never be changed.

Reward Trackers

RewardTracker is stored per-user, and is used in combination with RewardAccumulator to calculate rewards since the user's last claim.

rt := RewardTracker{
   account: "umee1s84d29zk3k20xk9f0hvczkax90l9t94g72n6wm",
   denom: "u/uumee",
   rewards: "0.00020uumee, 0.00014ibc/1234",
}

The example reward tracker above can be interpreted as:

The last time account umee1s84d29zk3k20xk9f0hvczkax90l9t94g72n6wm claimed rewards for bonded u/uumee, the value of RewardAccumulator (not tracker) for that denom was "0.00020uumee, 0.00014ibc/1234". Therefore, the rewards to claim this time should be based on the increase since then.

Because the amount of bonded uTokens for this user was constant between the previous RewardTracker increase and the current moment, the following simple calculation determines rewards:

rewards to claim = (RewardAccumulator - RewardTracker) * (AmoundBonded / 10^Exponent)

Whenever an account claims rewards (including the times when rewards are claimed automatically due to MsgBond, MsgBeginUnbonding, or leverage.MsgLiquidate), the account's RewardTracker of the affected denom must be updated to the current value of RewardAccumulator.

A RewardTracker can also be deleted from the module's store once an account's bonded amount has reached zero for a uToken denom. The tracker will be initialized to the accumulator's current value if the account decides to bond again later.

State

The incentive module stores the following in its KVStore and genesis state:

  • Params
  • Every upcoming, ongoing, and completed IncentiveProgram
  • The next available program ID (an integer)
  • The last unix time rewards were calculated
  • RewardAccumulator of every bonded uToken denom, unless zero
  • RewardTracker for each user associated with nonzero bonded uTokens with a nonzero a reward accumulator above
  • All nonzero bonded uTokens amounts for each account (excldes unbondings)
  • All unbondings in progress for each account

Additionally, some mathematically redundant information is maintained in KVStore but not genesis state for efficient operations:

  • TotalBonded for every bonded uToken denom (total excludes unbondings).
  • TotalUnbonding for every bonded uToken denom.
  • AmountUnbonding for each account with one or more unbondings in progress.

These totals are kept in sync with the values they track by the functions in keeper/store.go, which update the totals whenever any of the values they reference are changed for any reason (including when importing genesis state).

Messages

See proto for detailed fields.

Permissionless:

  • MsgClaim Claims any pending rewards for all bonded uTokens
  • MsgBond Bonds uToken collateral (and claims pending rewarda)
  • MsgBeginUnbonding Starts unbonding uToken collateral (and claims pending rewards)
  • MsgEmergencyUnbond Instantly unbonds uToken collateral for a fee based on amount unbonded (and claims pending rewards)
  • MsgSponsor Funds an entire incentive program with rewards, if it has been passed by governance but not yet funded.

Governance controlled:

  • MsgGovSetParams Sets module parameters
  • MsgGovCreatePrograms Creates one or more incentive programs. These programs can be set for community funding or manual funding in the proposal.

Documentation

Overview

Package incentive is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName defines the module name
	ModuleName = "incentive"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName
)

Variables

View Source
var (
	// 1XX = General
	ErrInvalidProgramID        = errors.Register(ModuleName, 100, "invalid program ID")
	ErrNilAsset                = errors.Register(ModuleName, 101, "nil asset")
	ErrEmptyAddress            = errors.Register(ModuleName, 102, "empty address")
	ErrInvalidProgramStatus    = errors.Register(ModuleName, 103, "invalid program status")
	ErrInvalidProgramDuration  = errors.Register(ModuleName, 104, "invalid program duration")
	ErrInvalidProgramStart     = errors.Register(ModuleName, 105, "invalid program start time")
	ErrProgramRewardMismatch   = errors.Register(ModuleName, 106, "program total and remaining reward denoms mismatched")
	ErrNonfundedProgramRewards = errors.Register(ModuleName, 107, "nonzero remaining rewards on a non-funded program")
	ErrProgramWithoutRewards   = errors.Register(ModuleName, 108, "incentive program must have nonzero rewards")
	ErrInvalidUnbonding        = errors.Register(ModuleName, 109, "invalid unbonding")

	// 3XX = Gov Proposal
	ErrNonzeroRemainingRewards = errors.Register(ModuleName, 300, "remaining rewards must be zero in proposal")
	ErrProposedFundedProgram   = errors.Register(ModuleName, 301, "proposed program must have funded = false")
	ErrEmptyProposal           = errors.Register(ModuleName, 302, "proposal contains no incentive programs")

	// 4XX = Messages
	ErrSponsorIneligible      = errors.Register(ModuleName, 400, "incentive program not eligible for sponsorship")
	ErrSponsorInvalid         = errors.Register(ModuleName, 401, "incorrect funding for incentive program")
	ErrMaxUnbondings          = errors.Register(ModuleName, 402, "exceeds max concurrent unbondings for a single uToken")
	ErrInsufficientBonded     = errors.Register(ModuleName, 403, "insufficient bonded, but not already unbonding, uTokens")
	ErrInsufficientCollateral = errors.Register(ModuleName, 404, "insufficient collateral to create bond")

	// 5XX = Misc
	ErrDecreaseNextProgramID  = errors.Register(ModuleName, 500, "cannot decrease NextProgramID")
	ErrDecreaseLastRewardTime = errors.Register(ModuleName, 501, "cannot decrease LastRewardTime")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthIncentive        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowIncentive          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupIncentive = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary x/incentive interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

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 RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

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 RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type AccountUnbondings

type AccountUnbondings struct {
	Account    string      `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	UToken     string      `protobuf:"bytes,2,opt,name=uToken,proto3" json:"uToken,omitempty"`
	Unbondings []Unbonding `protobuf:"bytes,3,rep,name=unbondings,proto3" json:"unbondings"`
}

AccountUnbondings is a structure that is used to store all of an account's unbondings for a single bonded uToken denom in both KVStore and genesis state.

func NewAccountUnbondings

func NewAccountUnbondings(addr, uDenom string, unbondings []Unbonding) AccountUnbondings

NewAccountUnbondings creates the AccountUnbondings struct used in GenesisState

func (*AccountUnbondings) Descriptor

func (*AccountUnbondings) Descriptor() ([]byte, []int)

func (*AccountUnbondings) GetAccount

func (m *AccountUnbondings) GetAccount() string

func (*AccountUnbondings) GetUToken

func (m *AccountUnbondings) GetUToken() string

func (*AccountUnbondings) GetUnbondings

func (m *AccountUnbondings) GetUnbondings() []Unbonding

func (*AccountUnbondings) Marshal

func (m *AccountUnbondings) Marshal() (dAtA []byte, err error)

func (*AccountUnbondings) MarshalTo

func (m *AccountUnbondings) MarshalTo(dAtA []byte) (int, error)

func (*AccountUnbondings) MarshalToSizedBuffer

func (m *AccountUnbondings) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AccountUnbondings) ProtoMessage

func (*AccountUnbondings) ProtoMessage()

func (*AccountUnbondings) Reset

func (m *AccountUnbondings) Reset()

func (*AccountUnbondings) Size

func (m *AccountUnbondings) Size() (n int)

func (*AccountUnbondings) String

func (m *AccountUnbondings) String() string

func (*AccountUnbondings) Unmarshal

func (m *AccountUnbondings) Unmarshal(dAtA []byte) error

func (AccountUnbondings) Validate

func (au AccountUnbondings) Validate() error

func (*AccountUnbondings) XXX_DiscardUnknown

func (m *AccountUnbondings) XXX_DiscardUnknown()

func (*AccountUnbondings) XXX_Marshal

func (m *AccountUnbondings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccountUnbondings) XXX_Merge

func (m *AccountUnbondings) XXX_Merge(src proto.Message)

func (*AccountUnbondings) XXX_Size

func (m *AccountUnbondings) XXX_Size() int

func (*AccountUnbondings) XXX_Unmarshal

func (m *AccountUnbondings) XXX_Unmarshal(b []byte) error

type BankKeeper

type BankKeeper interface {
	SendCoinsFromModuleToAccount(ctx sdk.Context, fromModule string, toAddr sdk.AccAddress, coins sdk.Coins) error
	SendCoinsFromAccountToModule(ctx sdk.Context, fromAddr sdk.AccAddress, toModule string, coins sdk.Coins) error
	SendCoinsFromModuleToModule(ctx sdk.Context, fromModule string, toModule string, coins sdk.Coins) error
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}

BankKeeper defines the expected x/bank keeper interface.

type Bond

type Bond struct {
	Account string     `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	UToken  types.Coin `protobuf:"bytes,2,opt,name=uToken,proto3" json:"uToken"`
}

Bond tracks the amount of coins of one uToken denomination bonded by a single account.

func NewBond

func NewBond(addr string, coin sdk.Coin) Bond

NewBond creates the Bond struct used in GenesisState

func (*Bond) Descriptor

func (*Bond) Descriptor() ([]byte, []int)

func (*Bond) GetAccount

func (m *Bond) GetAccount() string

func (*Bond) GetUToken

func (m *Bond) GetUToken() types.Coin

func (*Bond) Marshal

func (m *Bond) Marshal() (dAtA []byte, err error)

func (*Bond) MarshalTo

func (m *Bond) MarshalTo(dAtA []byte) (int, error)

func (*Bond) MarshalToSizedBuffer

func (m *Bond) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Bond) ProtoMessage

func (*Bond) ProtoMessage()

func (*Bond) Reset

func (m *Bond) Reset()

func (*Bond) Size

func (m *Bond) Size() (n int)

func (*Bond) String

func (m *Bond) String() string

func (*Bond) Unmarshal

func (m *Bond) Unmarshal(dAtA []byte) error

func (Bond) Validate

func (b Bond) Validate() error

func (*Bond) XXX_DiscardUnknown

func (m *Bond) XXX_DiscardUnknown()

func (*Bond) XXX_Marshal

func (m *Bond) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Bond) XXX_Merge

func (m *Bond) XXX_Merge(src proto.Message)

func (*Bond) XXX_Size

func (m *Bond) XXX_Size() int

func (*Bond) XXX_Unmarshal

func (m *Bond) XXX_Unmarshal(b []byte) error

type GenesisState

type GenesisState struct {
	Params             Params              `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	NextProgramId      uint32              `protobuf:"varint,2,opt,name=next_program_id,json=nextProgramId,proto3" json:"next_program_id,omitempty"`
	LastRewardsTime    int64               `protobuf:"varint,3,opt,name=last_rewards_time,json=lastRewardsTime,proto3" json:"last_rewards_time,omitempty"`
	RewardTrackers     []RewardTracker     `protobuf:"bytes,4,rep,name=reward_trackers,json=rewardTrackers,proto3" json:"reward_trackers"`
	RewardAccumulators []RewardAccumulator `protobuf:"bytes,5,rep,name=reward_accumulators,json=rewardAccumulators,proto3" json:"reward_accumulators"`
	UpcomingPrograms   []IncentiveProgram  `protobuf:"bytes,6,rep,name=upcoming_programs,json=upcomingPrograms,proto3" json:"upcoming_programs"`
	OngoingPrograms    []IncentiveProgram  `protobuf:"bytes,7,rep,name=ongoing_programs,json=ongoingPrograms,proto3" json:"ongoing_programs"`
	CompletedPrograms  []IncentiveProgram  `protobuf:"bytes,8,rep,name=completed_programs,json=completedPrograms,proto3" json:"completed_programs"`
	Bonds              []Bond              `protobuf:"bytes,9,rep,name=bonds,proto3" json:"bonds"`
	AccountUnbondings  []AccountUnbondings `protobuf:"bytes,10,rep,name=account_unbondings,json=accountUnbondings,proto3" json:"account_unbondings"`
}

GenesisState defines the x/incentive module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func GetGenesisStateFromAppState

func GetGenesisStateFromAppState(cdc codec.JSONCodec, appState map[string]json.RawMessage) *GenesisState

GetGenesisStateFromAppState returns x/incentive GenesisState given raw application genesis state.

func NewGenesisState

func NewGenesisState(
	params Params,
	completedPrograms []IncentiveProgram,
	ongoingPrograms []IncentiveProgram,
	upcomingPrograms []IncentiveProgram,
	nextProgramID uint32,
	lastRewardTime int64,
	bonds []Bond,
	rewardTrackers []RewardTracker,
	rewardAccumulators []RewardAccumulator,
	accountUnbondings []AccountUnbondings,
) *GenesisState

NewGenesisState creates a new GenesisState object

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetAccountUnbondings

func (m *GenesisState) GetAccountUnbondings() []AccountUnbondings

func (*GenesisState) GetBonds

func (m *GenesisState) GetBonds() []Bond

func (*GenesisState) GetCompletedPrograms

func (m *GenesisState) GetCompletedPrograms() []IncentiveProgram

func (*GenesisState) GetLastRewardsTime

func (m *GenesisState) GetLastRewardsTime() int64

func (*GenesisState) GetNextProgramId

func (m *GenesisState) GetNextProgramId() uint32

func (*GenesisState) GetOngoingPrograms

func (m *GenesisState) GetOngoingPrograms() []IncentiveProgram

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetRewardAccumulators

func (m *GenesisState) GetRewardAccumulators() []RewardAccumulator

func (*GenesisState) GetRewardTrackers

func (m *GenesisState) GetRewardTrackers() []RewardTracker

func (*GenesisState) GetUpcomingPrograms

func (m *GenesisState) GetUpcomingPrograms() []IncentiveProgram

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate checks a genesis state for basic issues

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type IncentiveProgram

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, and is set
	// to its final value when the proposal passes.
	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.
	// If a program is passed after its intended start time, its start time
	// will be increased to the current time, with program duration unchanged.
	StartTime int64 `protobuf:"varint,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// duration is the length of the incentive program from start time to
	// completion in seconds.
	Duration int64 `protobuf:"varint,3,opt,name=duration,proto3" json:"duration,omitempty"`
	// uToken is the incentivized uToken collateral denom. Suppliers who collateralize
	// this asset then bond it to the incentive module are eligible for this program's
	// rewards.
	UToken string `protobuf:"bytes,4,opt,name=uToken,proto3" json:"uToken,omitempty"`
	// funded indicates whether a program bas been funded. This can happen when
	// a program passes if funding from community fund, or any time before the
	// program's start time if funding with MsgSponsor. A program that reaches
	// its start time without being funded is cancelled.
	Funded bool `protobuf:"varint,5,opt,name=funded,proto3" json:"funded,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,6,opt,name=total_rewards,json=totalRewards,proto3" json:"total_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, at which point it
	// starts at the same value as total_rewards then begins decreasing
	// to zero as the program runs to completion.
	RemainingRewards types.Coin `protobuf:"bytes,7,opt,name=remaining_rewards,json=remainingRewards,proto3" json:"remaining_rewards"`
}

IncentiveProgram defines a liquidity mining incentive program on a single locked uToken denom that will run for a set amount of time.

func NewIncentiveProgram

func NewIncentiveProgram(
	id uint32,
	startTime int64,
	duration int64,
	uDenom string,
	totalRewards, remainingRewards sdk.Coin,
	funded bool,
) IncentiveProgram

NewIncentiveProgram creates the IncentiveProgram struct used in GenesisState

func (*IncentiveProgram) Descriptor

func (*IncentiveProgram) Descriptor() ([]byte, []int)

func (*IncentiveProgram) Equal

func (this *IncentiveProgram) Equal(that interface{}) bool

func (*IncentiveProgram) GetDuration

func (m *IncentiveProgram) GetDuration() int64

func (*IncentiveProgram) GetFunded

func (m *IncentiveProgram) GetFunded() bool

func (*IncentiveProgram) GetID

func (m *IncentiveProgram) GetID() uint32

func (*IncentiveProgram) GetRemainingRewards

func (m *IncentiveProgram) GetRemainingRewards() types.Coin

func (*IncentiveProgram) GetStartTime

func (m *IncentiveProgram) GetStartTime() int64

func (*IncentiveProgram) GetTotalRewards

func (m *IncentiveProgram) GetTotalRewards() types.Coin

func (*IncentiveProgram) GetUToken

func (m *IncentiveProgram) GetUToken() string

func (*IncentiveProgram) Marshal

func (m *IncentiveProgram) Marshal() (dAtA []byte, err error)

func (*IncentiveProgram) MarshalTo

func (m *IncentiveProgram) MarshalTo(dAtA []byte) (int, error)

func (*IncentiveProgram) MarshalToSizedBuffer

func (m *IncentiveProgram) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*IncentiveProgram) ProtoMessage

func (*IncentiveProgram) ProtoMessage()

func (*IncentiveProgram) Reset

func (m *IncentiveProgram) Reset()

func (*IncentiveProgram) Size

func (m *IncentiveProgram) Size() (n int)

func (*IncentiveProgram) String

func (m *IncentiveProgram) String() string

func (*IncentiveProgram) Unmarshal

func (m *IncentiveProgram) Unmarshal(dAtA []byte) error

func (IncentiveProgram) Validate

func (ip IncentiveProgram) Validate() error

Validate performs validation on an IncentiveProgram type returning an error if the program is invalid.

func (IncentiveProgram) ValidatePassed

func (ip IncentiveProgram) ValidatePassed() error

ValidatePassed runs IncentiveProgram.Validate and also checks additional requirements applying to incentive programs which have already been passed by governance

func (IncentiveProgram) ValidateProposed

func (ip IncentiveProgram) ValidateProposed() error

ValidateProposed runs IncentiveProgram.Validate and also checks additional requirements applying to incentive programs which have not yet been funded or passed by governance

func (*IncentiveProgram) XXX_DiscardUnknown

func (m *IncentiveProgram) XXX_DiscardUnknown()

func (*IncentiveProgram) XXX_Marshal

func (m *IncentiveProgram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IncentiveProgram) XXX_Merge

func (m *IncentiveProgram) XXX_Merge(src proto.Message)

func (*IncentiveProgram) XXX_Size

func (m *IncentiveProgram) XXX_Size() int

func (*IncentiveProgram) XXX_Unmarshal

func (m *IncentiveProgram) XXX_Unmarshal(b []byte) error

type LeverageKeeper

type LeverageKeeper interface {
	GetCollateral(ctx sdk.Context, borrowerAddr sdk.AccAddress, denom string) sdk.Coin
	DonateCollateral(ctx sdk.Context, fromAddr sdk.AccAddress, uToken sdk.Coin) error
	GetTokenSettings(ctx sdk.Context, denom string) (leveragetypes.Token, error)
	// These are used for APY queries only
	TotalTokenValue(ctx sdk.Context, coins sdk.Coins, mode leveragetypes.PriceMode) (sdk.Dec, error)
	ToToken(ctx sdk.Context, uToken sdk.Coin) (sdk.Coin, error)
}

LeverageKeeper defines the expected x/leverage keeper interface.

type MsgBeginUnbonding

type MsgBeginUnbonding struct {
	Account string     `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	UToken  types.Coin `protobuf:"bytes,2,opt,name=uToken,proto3" json:"uToken"`
}

MsgBeginUnbonding represents a account's request to begin unbonding uToken collateral.

func NewMsgBeginUnbonding

func NewMsgBeginUnbonding(account sdk.AccAddress, asset sdk.Coin) *MsgBeginUnbonding

func (*MsgBeginUnbonding) Descriptor

func (*MsgBeginUnbonding) Descriptor() ([]byte, []int)

func (*MsgBeginUnbonding) GetAccount

func (m *MsgBeginUnbonding) GetAccount() string

func (MsgBeginUnbonding) GetSignBytes

func (msg MsgBeginUnbonding) GetSignBytes() []byte

GetSignBytes get the bytes for the message signer to sign on

func (MsgBeginUnbonding) GetSigners

func (msg MsgBeginUnbonding) GetSigners() []sdk.AccAddress

func (*MsgBeginUnbonding) GetUToken

func (m *MsgBeginUnbonding) GetUToken() types.Coin

func (*MsgBeginUnbonding) Marshal

func (m *MsgBeginUnbonding) Marshal() (dAtA []byte, err error)

func (*MsgBeginUnbonding) MarshalTo

func (m *MsgBeginUnbonding) MarshalTo(dAtA []byte) (int, error)

func (*MsgBeginUnbonding) MarshalToSizedBuffer

func (m *MsgBeginUnbonding) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgBeginUnbonding) ProtoMessage

func (*MsgBeginUnbonding) ProtoMessage()

func (*MsgBeginUnbonding) Reset

func (m *MsgBeginUnbonding) Reset()

func (MsgBeginUnbonding) Route

func (msg MsgBeginUnbonding) Route() string

Route implements the LegacyMsg interface.

func (*MsgBeginUnbonding) Size

func (m *MsgBeginUnbonding) Size() (n int)

func (*MsgBeginUnbonding) String

func (m *MsgBeginUnbonding) String() string

func (MsgBeginUnbonding) Type

func (msg MsgBeginUnbonding) Type() string

Type implements the sdk.Msg interface.

func (*MsgBeginUnbonding) Unmarshal

func (m *MsgBeginUnbonding) Unmarshal(dAtA []byte) error

func (MsgBeginUnbonding) ValidateBasic

func (msg MsgBeginUnbonding) ValidateBasic() error

func (*MsgBeginUnbonding) XXX_DiscardUnknown

func (m *MsgBeginUnbonding) XXX_DiscardUnknown()

func (*MsgBeginUnbonding) XXX_Marshal

func (m *MsgBeginUnbonding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgBeginUnbonding) XXX_Merge

func (m *MsgBeginUnbonding) XXX_Merge(src proto.Message)

func (*MsgBeginUnbonding) XXX_Size

func (m *MsgBeginUnbonding) XXX_Size() int

func (*MsgBeginUnbonding) XXX_Unmarshal

func (m *MsgBeginUnbonding) XXX_Unmarshal(b []byte) error

type MsgBeginUnbondingResponse

type MsgBeginUnbondingResponse struct {
}

MsgBeginUnbondingResponse defines the Msg/BeginUnbonding response type.

func (*MsgBeginUnbondingResponse) Descriptor

func (*MsgBeginUnbondingResponse) Descriptor() ([]byte, []int)

func (*MsgBeginUnbondingResponse) Marshal

func (m *MsgBeginUnbondingResponse) Marshal() (dAtA []byte, err error)

func (*MsgBeginUnbondingResponse) MarshalTo

func (m *MsgBeginUnbondingResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgBeginUnbondingResponse) MarshalToSizedBuffer

func (m *MsgBeginUnbondingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgBeginUnbondingResponse) ProtoMessage

func (*MsgBeginUnbondingResponse) ProtoMessage()

func (*MsgBeginUnbondingResponse) Reset

func (m *MsgBeginUnbondingResponse) Reset()

func (*MsgBeginUnbondingResponse) Size

func (m *MsgBeginUnbondingResponse) Size() (n int)

func (*MsgBeginUnbondingResponse) String

func (m *MsgBeginUnbondingResponse) String() string

func (*MsgBeginUnbondingResponse) Unmarshal

func (m *MsgBeginUnbondingResponse) Unmarshal(dAtA []byte) error

func (*MsgBeginUnbondingResponse) XXX_DiscardUnknown

func (m *MsgBeginUnbondingResponse) XXX_DiscardUnknown()

func (*MsgBeginUnbondingResponse) XXX_Marshal

func (m *MsgBeginUnbondingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgBeginUnbondingResponse) XXX_Merge

func (m *MsgBeginUnbondingResponse) XXX_Merge(src proto.Message)

func (*MsgBeginUnbondingResponse) XXX_Size

func (m *MsgBeginUnbondingResponse) XXX_Size() int

func (*MsgBeginUnbondingResponse) XXX_Unmarshal

func (m *MsgBeginUnbondingResponse) XXX_Unmarshal(b []byte) error

type MsgBond

type MsgBond struct {
	Account string     `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	UToken  types.Coin `protobuf:"bytes,2,opt,name=uToken,proto3" json:"uToken"`
}

MsgBond represents a account's request to bond uToken collateral.

func NewMsgBond

func NewMsgBond(account sdk.AccAddress, asset sdk.Coin) *MsgBond

func (*MsgBond) Descriptor

func (*MsgBond) Descriptor() ([]byte, []int)

func (*MsgBond) GetAccount

func (m *MsgBond) GetAccount() string

func (MsgBond) GetSignBytes

func (msg MsgBond) GetSignBytes() []byte

GetSignBytes get the bytes for the message signer to sign on

func (MsgBond) GetSigners

func (msg MsgBond) GetSigners() []sdk.AccAddress

func (*MsgBond) GetUToken

func (m *MsgBond) GetUToken() types.Coin

func (*MsgBond) Marshal

func (m *MsgBond) Marshal() (dAtA []byte, err error)

func (*MsgBond) MarshalTo

func (m *MsgBond) MarshalTo(dAtA []byte) (int, error)

func (*MsgBond) MarshalToSizedBuffer

func (m *MsgBond) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgBond) ProtoMessage

func (*MsgBond) ProtoMessage()

func (*MsgBond) Reset

func (m *MsgBond) Reset()

func (MsgBond) Route

func (msg MsgBond) Route() string

Route implements the LegacyMsg interface.

func (*MsgBond) Size

func (m *MsgBond) Size() (n int)

func (*MsgBond) String

func (m *MsgBond) String() string

func (MsgBond) Type

func (msg MsgBond) Type() string

Type implements the sdk.Msg interface.

func (*MsgBond) Unmarshal

func (m *MsgBond) Unmarshal(dAtA []byte) error

func (MsgBond) ValidateBasic

func (msg MsgBond) ValidateBasic() error

func (*MsgBond) XXX_DiscardUnknown

func (m *MsgBond) XXX_DiscardUnknown()

func (*MsgBond) XXX_Marshal

func (m *MsgBond) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgBond) XXX_Merge

func (m *MsgBond) XXX_Merge(src proto.Message)

func (*MsgBond) XXX_Size

func (m *MsgBond) XXX_Size() int

func (*MsgBond) XXX_Unmarshal

func (m *MsgBond) XXX_Unmarshal(b []byte) error

type MsgBondResponse

type MsgBondResponse struct {
}

MsgBondResponse defines the Msg/Lock response type.

func (*MsgBondResponse) Descriptor

func (*MsgBondResponse) Descriptor() ([]byte, []int)

func (*MsgBondResponse) Marshal

func (m *MsgBondResponse) Marshal() (dAtA []byte, err error)

func (*MsgBondResponse) MarshalTo

func (m *MsgBondResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgBondResponse) MarshalToSizedBuffer

func (m *MsgBondResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgBondResponse) ProtoMessage

func (*MsgBondResponse) ProtoMessage()

func (*MsgBondResponse) Reset

func (m *MsgBondResponse) Reset()

func (*MsgBondResponse) Size

func (m *MsgBondResponse) Size() (n int)

func (*MsgBondResponse) String

func (m *MsgBondResponse) String() string

func (*MsgBondResponse) Unmarshal

func (m *MsgBondResponse) Unmarshal(dAtA []byte) error

func (*MsgBondResponse) XXX_DiscardUnknown

func (m *MsgBondResponse) XXX_DiscardUnknown()

func (*MsgBondResponse) XXX_Marshal

func (m *MsgBondResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgBondResponse) XXX_Merge

func (m *MsgBondResponse) XXX_Merge(src proto.Message)

func (*MsgBondResponse) XXX_Size

func (m *MsgBondResponse) XXX_Size() int

func (*MsgBondResponse) XXX_Unmarshal

func (m *MsgBondResponse) XXX_Unmarshal(b []byte) error

type MsgClaim

type MsgClaim struct {
	Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
}

MsgClaim represents a account's request to claim pending rewards.

func NewMsgClaim

func NewMsgClaim(account sdk.AccAddress) *MsgClaim

func (*MsgClaim) Descriptor

func (*MsgClaim) Descriptor() ([]byte, []int)

func (*MsgClaim) GetAccount

func (m *MsgClaim) GetAccount() string

func (MsgClaim) GetSignBytes

func (msg MsgClaim) GetSignBytes() []byte

GetSignBytes get the bytes for the message signer to sign on

func (MsgClaim) GetSigners

func (msg MsgClaim) GetSigners() []sdk.AccAddress

func (*MsgClaim) Marshal

func (m *MsgClaim) Marshal() (dAtA []byte, err error)

func (*MsgClaim) MarshalTo

func (m *MsgClaim) MarshalTo(dAtA []byte) (int, error)

func (*MsgClaim) MarshalToSizedBuffer

func (m *MsgClaim) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgClaim) ProtoMessage

func (*MsgClaim) ProtoMessage()

func (*MsgClaim) Reset

func (m *MsgClaim) Reset()

func (MsgClaim) Route

func (msg MsgClaim) Route() string

Route implements the sdk.Msg interface.

func (*MsgClaim) Size

func (m *MsgClaim) Size() (n int)

func (*MsgClaim) String

func (m *MsgClaim) String() string

func (MsgClaim) Type

func (msg MsgClaim) Type() string

Type implements the LegacyMsg interface.

func (*MsgClaim) Unmarshal

func (m *MsgClaim) Unmarshal(dAtA []byte) error

func (MsgClaim) ValidateBasic

func (msg MsgClaim) ValidateBasic() error

func (*MsgClaim) XXX_DiscardUnknown

func (m *MsgClaim) XXX_DiscardUnknown()

func (*MsgClaim) XXX_Marshal

func (m *MsgClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgClaim) XXX_Merge

func (m *MsgClaim) XXX_Merge(src proto.Message)

func (*MsgClaim) XXX_Size

func (m *MsgClaim) XXX_Size() int

func (*MsgClaim) XXX_Unmarshal

func (m *MsgClaim) XXX_Unmarshal(b []byte) error

type MsgClaimResponse

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"`
}

MsgClaimResponse defines the Msg/Claim response type.

func (*MsgClaimResponse) Descriptor

func (*MsgClaimResponse) Descriptor() ([]byte, []int)

func (*MsgClaimResponse) GetAmount

func (*MsgClaimResponse) Marshal

func (m *MsgClaimResponse) Marshal() (dAtA []byte, err error)

func (*MsgClaimResponse) MarshalTo

func (m *MsgClaimResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgClaimResponse) MarshalToSizedBuffer

func (m *MsgClaimResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgClaimResponse) ProtoMessage

func (*MsgClaimResponse) ProtoMessage()

func (*MsgClaimResponse) Reset

func (m *MsgClaimResponse) Reset()

func (*MsgClaimResponse) Size

func (m *MsgClaimResponse) Size() (n int)

func (*MsgClaimResponse) String

func (m *MsgClaimResponse) String() string

func (*MsgClaimResponse) Unmarshal

func (m *MsgClaimResponse) Unmarshal(dAtA []byte) error

func (*MsgClaimResponse) XXX_DiscardUnknown

func (m *MsgClaimResponse) XXX_DiscardUnknown()

func (*MsgClaimResponse) XXX_Marshal

func (m *MsgClaimResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgClaimResponse) XXX_Merge

func (m *MsgClaimResponse) XXX_Merge(src proto.Message)

func (*MsgClaimResponse) XXX_Size

func (m *MsgClaimResponse) XXX_Size() int

func (*MsgClaimResponse) XXX_Unmarshal

func (m *MsgClaimResponse) XXX_Unmarshal(b []byte) error

type MsgClient

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.
	Bond(ctx context.Context, in *MsgBond, opts ...grpc.CallOption) (*MsgBondResponse, error)
	// BeginUnbonding defines a method for starting to unbond uToken collateral.
	// Only max_unbondings unbondings can be active at per user, per denom, at once.
	BeginUnbonding(ctx context.Context, in *MsgBeginUnbonding, opts ...grpc.CallOption) (*MsgBeginUnbondingResponse, error)
	// EmergencyUnbond defines a method for instantly unbonding uToken collateral in exchange for a fee.
	// This can finish existing unbondings or unbond bonded tokens, and is not restricted by max_unbondings.
	EmergencyUnbond(ctx context.Context, in *MsgEmergencyUnbond, opts ...grpc.CallOption) (*MsgEmergencyUnbondResponse, error)
	// Sponsor defines a permissionless method for sponsoring an upcoming, not yet funded incentive program.
	// 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)
	// GovCreatePrograms is used by governance proposals to create and optionally fund incentive programs.
	GovCreatePrograms(ctx context.Context, in *MsgGovCreatePrograms, opts ...grpc.CallOption) (*MsgGovCreateProgramsResponse, error)
}

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.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgEmergencyUnbond

type MsgEmergencyUnbond struct {
	Account string     `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	UToken  types.Coin `protobuf:"bytes,2,opt,name=uToken,proto3" json:"uToken"`
}

MsgEmergencyUnbond represents a account's request to instantly unbond uToken collateral for a fee.

func NewMsgEmergencyUnbond

func NewMsgEmergencyUnbond(account sdk.AccAddress, asset sdk.Coin) *MsgEmergencyUnbond

func (*MsgEmergencyUnbond) Descriptor

func (*MsgEmergencyUnbond) Descriptor() ([]byte, []int)

func (*MsgEmergencyUnbond) GetAccount

func (m *MsgEmergencyUnbond) GetAccount() string

func (MsgEmergencyUnbond) GetSignBytes

func (msg MsgEmergencyUnbond) GetSignBytes() []byte

GetSignBytes get the bytes for the message signer to sign on

func (MsgEmergencyUnbond) GetSigners

func (msg MsgEmergencyUnbond) GetSigners() []sdk.AccAddress

func (*MsgEmergencyUnbond) GetUToken

func (m *MsgEmergencyUnbond) GetUToken() types.Coin

func (*MsgEmergencyUnbond) Marshal

func (m *MsgEmergencyUnbond) Marshal() (dAtA []byte, err error)

func (*MsgEmergencyUnbond) MarshalTo

func (m *MsgEmergencyUnbond) MarshalTo(dAtA []byte) (int, error)

func (*MsgEmergencyUnbond) MarshalToSizedBuffer

func (m *MsgEmergencyUnbond) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgEmergencyUnbond) ProtoMessage

func (*MsgEmergencyUnbond) ProtoMessage()

func (*MsgEmergencyUnbond) Reset

func (m *MsgEmergencyUnbond) Reset()

func (MsgEmergencyUnbond) Route

func (msg MsgEmergencyUnbond) Route() string

Route implements the LegacyMsg interface.

func (*MsgEmergencyUnbond) Size

func (m *MsgEmergencyUnbond) Size() (n int)

func (*MsgEmergencyUnbond) String

func (m *MsgEmergencyUnbond) String() string

func (MsgEmergencyUnbond) Type

func (msg MsgEmergencyUnbond) Type() string

Type implements the sdk.Msg interface.

func (*MsgEmergencyUnbond) Unmarshal

func (m *MsgEmergencyUnbond) Unmarshal(dAtA []byte) error

func (MsgEmergencyUnbond) ValidateBasic

func (msg MsgEmergencyUnbond) ValidateBasic() error

func (*MsgEmergencyUnbond) XXX_DiscardUnknown

func (m *MsgEmergencyUnbond) XXX_DiscardUnknown()

func (*MsgEmergencyUnbond) XXX_Marshal

func (m *MsgEmergencyUnbond) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgEmergencyUnbond) XXX_Merge

func (m *MsgEmergencyUnbond) XXX_Merge(src proto.Message)

func (*MsgEmergencyUnbond) XXX_Size

func (m *MsgEmergencyUnbond) XXX_Size() int

func (*MsgEmergencyUnbond) XXX_Unmarshal

func (m *MsgEmergencyUnbond) XXX_Unmarshal(b []byte) error

type MsgEmergencyUnbondResponse

type MsgEmergencyUnbondResponse struct {
}

MsgEmergencyUnbondResponse defines the Msg/EmergencyUnbond response type.

func (*MsgEmergencyUnbondResponse) Descriptor

func (*MsgEmergencyUnbondResponse) Descriptor() ([]byte, []int)

func (*MsgEmergencyUnbondResponse) Marshal

func (m *MsgEmergencyUnbondResponse) Marshal() (dAtA []byte, err error)

func (*MsgEmergencyUnbondResponse) MarshalTo

func (m *MsgEmergencyUnbondResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgEmergencyUnbondResponse) MarshalToSizedBuffer

func (m *MsgEmergencyUnbondResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgEmergencyUnbondResponse) ProtoMessage

func (*MsgEmergencyUnbondResponse) ProtoMessage()

func (*MsgEmergencyUnbondResponse) Reset

func (m *MsgEmergencyUnbondResponse) Reset()

func (*MsgEmergencyUnbondResponse) Size

func (m *MsgEmergencyUnbondResponse) Size() (n int)

func (*MsgEmergencyUnbondResponse) String

func (m *MsgEmergencyUnbondResponse) String() string

func (*MsgEmergencyUnbondResponse) Unmarshal

func (m *MsgEmergencyUnbondResponse) Unmarshal(dAtA []byte) error

func (*MsgEmergencyUnbondResponse) XXX_DiscardUnknown

func (m *MsgEmergencyUnbondResponse) XXX_DiscardUnknown()

func (*MsgEmergencyUnbondResponse) XXX_Marshal

func (m *MsgEmergencyUnbondResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgEmergencyUnbondResponse) XXX_Merge

func (m *MsgEmergencyUnbondResponse) XXX_Merge(src proto.Message)

func (*MsgEmergencyUnbondResponse) XXX_Size

func (m *MsgEmergencyUnbondResponse) XXX_Size() int

func (*MsgEmergencyUnbondResponse) XXX_Unmarshal

func (m *MsgEmergencyUnbondResponse) XXX_Unmarshal(b []byte) error

type MsgGovCreatePrograms

type MsgGovCreatePrograms struct {
	// authority must be the address of the governance account.
	Authority string             `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	Programs  []IncentiveProgram `protobuf:"bytes,2,rep,name=programs,proto3" json:"programs"`
	// from_community_fund defines the source of funds for proposed incentive programs.
	FromCommunityFund bool `protobuf:"varint,3,opt,name=from_community_fund,json=fromCommunityFund,proto3" json:"from_community_fund,omitempty"`
}

MsgGovCreatePrograms is used by governance to create one or more incentive programs. There are two funding scenarios. 1) If from_community_fund is true, once the proposal passes, the programs' total rewards will be automatically funded by withdrawing from the community fund to the incentive module account. Will fail if the community fund doesn't have enough coins. 2) If from_community_fund is false, a transaction with MsgSponsor must be submitted to fund all programs with full amount. It must be sent after this message passes and before the program's start_time. If it won't be funded on time, the program will be cancelled.

func NewMsgGovCreatePrograms

func NewMsgGovCreatePrograms(authority string, programs []IncentiveProgram) *MsgGovCreatePrograms

func (*MsgGovCreatePrograms) Descriptor

func (*MsgGovCreatePrograms) Descriptor() ([]byte, []int)

func (*MsgGovCreatePrograms) Equal

func (this *MsgGovCreatePrograms) Equal(that interface{}) bool

func (MsgGovCreatePrograms) GetSignBytes

func (msg MsgGovCreatePrograms) GetSignBytes() []byte

GetSignBytes implements Msg

func (MsgGovCreatePrograms) GetSigners

func (msg MsgGovCreatePrograms) GetSigners() []sdk.AccAddress

GetSigners implements Msg

func (*MsgGovCreatePrograms) Marshal

func (m *MsgGovCreatePrograms) Marshal() (dAtA []byte, err error)

func (*MsgGovCreatePrograms) MarshalTo

func (m *MsgGovCreatePrograms) MarshalTo(dAtA []byte) (int, error)

func (*MsgGovCreatePrograms) MarshalToSizedBuffer

func (m *MsgGovCreatePrograms) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgGovCreatePrograms) ProtoMessage

func (*MsgGovCreatePrograms) ProtoMessage()

func (*MsgGovCreatePrograms) Reset

func (m *MsgGovCreatePrograms) Reset()

func (MsgGovCreatePrograms) Route

func (msg MsgGovCreatePrograms) Route() string

Route implements the LegacyMsg interface.

func (*MsgGovCreatePrograms) Size

func (m *MsgGovCreatePrograms) Size() (n int)

func (*MsgGovCreatePrograms) String

func (m *MsgGovCreatePrograms) String() string

func (MsgGovCreatePrograms) Type

func (msg MsgGovCreatePrograms) Type() string

Type implements the sdk.Msg interface.

func (*MsgGovCreatePrograms) Unmarshal

func (m *MsgGovCreatePrograms) Unmarshal(dAtA []byte) error

func (MsgGovCreatePrograms) ValidateBasic

func (msg MsgGovCreatePrograms) ValidateBasic() error

func (*MsgGovCreatePrograms) XXX_DiscardUnknown

func (m *MsgGovCreatePrograms) XXX_DiscardUnknown()

func (*MsgGovCreatePrograms) XXX_Marshal

func (m *MsgGovCreatePrograms) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgGovCreatePrograms) XXX_Merge

func (m *MsgGovCreatePrograms) XXX_Merge(src proto.Message)

func (*MsgGovCreatePrograms) XXX_Size

func (m *MsgGovCreatePrograms) XXX_Size() int

func (*MsgGovCreatePrograms) XXX_Unmarshal

func (m *MsgGovCreatePrograms) XXX_Unmarshal(b []byte) error

type MsgGovCreateProgramsResponse

type MsgGovCreateProgramsResponse struct {
}

MsgGovCreateProgramsResponse defines the Msg/CreatePrograms response type.

func (*MsgGovCreateProgramsResponse) Descriptor

func (*MsgGovCreateProgramsResponse) Descriptor() ([]byte, []int)

func (*MsgGovCreateProgramsResponse) Marshal

func (m *MsgGovCreateProgramsResponse) Marshal() (dAtA []byte, err error)

func (*MsgGovCreateProgramsResponse) MarshalTo

func (m *MsgGovCreateProgramsResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgGovCreateProgramsResponse) MarshalToSizedBuffer

func (m *MsgGovCreateProgramsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgGovCreateProgramsResponse) ProtoMessage

func (*MsgGovCreateProgramsResponse) ProtoMessage()

func (*MsgGovCreateProgramsResponse) Reset

func (m *MsgGovCreateProgramsResponse) Reset()

func (*MsgGovCreateProgramsResponse) Size

func (m *MsgGovCreateProgramsResponse) Size() (n int)

func (*MsgGovCreateProgramsResponse) String

func (*MsgGovCreateProgramsResponse) Unmarshal

func (m *MsgGovCreateProgramsResponse) Unmarshal(dAtA []byte) error

func (*MsgGovCreateProgramsResponse) XXX_DiscardUnknown

func (m *MsgGovCreateProgramsResponse) XXX_DiscardUnknown()

func (*MsgGovCreateProgramsResponse) XXX_Marshal

func (m *MsgGovCreateProgramsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgGovCreateProgramsResponse) XXX_Merge

func (m *MsgGovCreateProgramsResponse) XXX_Merge(src proto.Message)

func (*MsgGovCreateProgramsResponse) XXX_Size

func (m *MsgGovCreateProgramsResponse) XXX_Size() int

func (*MsgGovCreateProgramsResponse) XXX_Unmarshal

func (m *MsgGovCreateProgramsResponse) XXX_Unmarshal(b []byte) error

type MsgGovSetParams

type MsgGovSetParams struct {
	// authority must be the address of the governance account.
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	Params    Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}

MsgGovSetParams is used by governance to update module parameters.

func NewMsgGovSetParams

func NewMsgGovSetParams(authority string, params Params) *MsgGovSetParams

func (*MsgGovSetParams) Descriptor

func (*MsgGovSetParams) Descriptor() ([]byte, []int)

func (*MsgGovSetParams) Equal

func (this *MsgGovSetParams) Equal(that interface{}) bool

func (MsgGovSetParams) GetSignBytes

func (msg MsgGovSetParams) GetSignBytes() []byte

GetSignBytes implements Msg

func (MsgGovSetParams) GetSigners

func (msg MsgGovSetParams) GetSigners() []sdk.AccAddress

GetSigners implements Msg

func (*MsgGovSetParams) Marshal

func (m *MsgGovSetParams) Marshal() (dAtA []byte, err error)

func (*MsgGovSetParams) MarshalTo

func (m *MsgGovSetParams) MarshalTo(dAtA []byte) (int, error)

func (*MsgGovSetParams) MarshalToSizedBuffer

func (m *MsgGovSetParams) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgGovSetParams) ProtoMessage

func (*MsgGovSetParams) ProtoMessage()

func (*MsgGovSetParams) Reset

func (m *MsgGovSetParams) Reset()

func (MsgGovSetParams) Route

func (msg MsgGovSetParams) Route() string

Route implements the LegacyMsg interface.

func (*MsgGovSetParams) Size

func (m *MsgGovSetParams) Size() (n int)

func (*MsgGovSetParams) String

func (m *MsgGovSetParams) String() string

func (MsgGovSetParams) Type

func (msg MsgGovSetParams) Type() string

Type implements the sdk.Msg interface.

func (*MsgGovSetParams) Unmarshal

func (m *MsgGovSetParams) Unmarshal(dAtA []byte) error

func (MsgGovSetParams) ValidateBasic

func (msg MsgGovSetParams) ValidateBasic() error

func (*MsgGovSetParams) XXX_DiscardUnknown

func (m *MsgGovSetParams) XXX_DiscardUnknown()

func (*MsgGovSetParams) XXX_Marshal

func (m *MsgGovSetParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgGovSetParams) XXX_Merge

func (m *MsgGovSetParams) XXX_Merge(src proto.Message)

func (*MsgGovSetParams) XXX_Size

func (m *MsgGovSetParams) XXX_Size() int

func (*MsgGovSetParams) XXX_Unmarshal

func (m *MsgGovSetParams) XXX_Unmarshal(b []byte) error

type MsgGovSetParamsResponse

type MsgGovSetParamsResponse struct {
}

MsgGovSetParamsResponse defines the Msg/SetParams response type.

func (*MsgGovSetParamsResponse) Descriptor

func (*MsgGovSetParamsResponse) Descriptor() ([]byte, []int)

func (*MsgGovSetParamsResponse) Marshal

func (m *MsgGovSetParamsResponse) Marshal() (dAtA []byte, err error)

func (*MsgGovSetParamsResponse) MarshalTo

func (m *MsgGovSetParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgGovSetParamsResponse) MarshalToSizedBuffer

func (m *MsgGovSetParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgGovSetParamsResponse) ProtoMessage

func (*MsgGovSetParamsResponse) ProtoMessage()

func (*MsgGovSetParamsResponse) Reset

func (m *MsgGovSetParamsResponse) Reset()

func (*MsgGovSetParamsResponse) Size

func (m *MsgGovSetParamsResponse) Size() (n int)

func (*MsgGovSetParamsResponse) String

func (m *MsgGovSetParamsResponse) String() string

func (*MsgGovSetParamsResponse) Unmarshal

func (m *MsgGovSetParamsResponse) Unmarshal(dAtA []byte) error

func (*MsgGovSetParamsResponse) XXX_DiscardUnknown

func (m *MsgGovSetParamsResponse) XXX_DiscardUnknown()

func (*MsgGovSetParamsResponse) XXX_Marshal

func (m *MsgGovSetParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgGovSetParamsResponse) XXX_Merge

func (m *MsgGovSetParamsResponse) XXX_Merge(src proto.Message)

func (*MsgGovSetParamsResponse) XXX_Size

func (m *MsgGovSetParamsResponse) XXX_Size() int

func (*MsgGovSetParamsResponse) XXX_Unmarshal

func (m *MsgGovSetParamsResponse) XXX_Unmarshal(b []byte) error

type MsgServer

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.
	Bond(context.Context, *MsgBond) (*MsgBondResponse, error)
	// BeginUnbonding defines a method for starting to unbond uToken collateral.
	// Only max_unbondings unbondings can be active at per user, per denom, at once.
	BeginUnbonding(context.Context, *MsgBeginUnbonding) (*MsgBeginUnbondingResponse, error)
	// EmergencyUnbond defines a method for instantly unbonding uToken collateral in exchange for a fee.
	// This can finish existing unbondings or unbond bonded tokens, and is not restricted by max_unbondings.
	EmergencyUnbond(context.Context, *MsgEmergencyUnbond) (*MsgEmergencyUnbondResponse, error)
	// Sponsor defines a permissionless method for sponsoring an upcoming, not yet funded incentive program.
	// 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)
	// GovCreatePrograms is used by governance proposals to create and optionally fund incentive programs.
	GovCreatePrograms(context.Context, *MsgGovCreatePrograms) (*MsgGovCreateProgramsResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSponsor

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"`
}

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.

func NewMsgSponsor

func NewMsgSponsor(sponsor sdk.AccAddress, programID uint32) *MsgSponsor

func (*MsgSponsor) Descriptor

func (*MsgSponsor) Descriptor() ([]byte, []int)

func (*MsgSponsor) GetProgram

func (m *MsgSponsor) GetProgram() uint32

func (MsgSponsor) GetSignBytes

func (msg MsgSponsor) GetSignBytes() []byte

GetSignBytes get the bytes for the message signer to sign on

func (MsgSponsor) GetSigners

func (msg MsgSponsor) GetSigners() []sdk.AccAddress

func (*MsgSponsor) GetSponsor

func (m *MsgSponsor) GetSponsor() string

func (*MsgSponsor) Marshal

func (m *MsgSponsor) Marshal() (dAtA []byte, err error)

func (*MsgSponsor) MarshalTo

func (m *MsgSponsor) MarshalTo(dAtA []byte) (int, error)

func (*MsgSponsor) MarshalToSizedBuffer

func (m *MsgSponsor) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSponsor) ProtoMessage

func (*MsgSponsor) ProtoMessage()

func (*MsgSponsor) Reset

func (m *MsgSponsor) Reset()

func (MsgSponsor) Route

func (msg MsgSponsor) Route() string

Route implements the LegacyMsg interface.

func (*MsgSponsor) Size

func (m *MsgSponsor) Size() (n int)

func (*MsgSponsor) String

func (m *MsgSponsor) String() string

func (MsgSponsor) Type

func (msg MsgSponsor) Type() string

Type implements the sdk.Msg interface.

func (*MsgSponsor) Unmarshal

func (m *MsgSponsor) Unmarshal(dAtA []byte) error

func (MsgSponsor) ValidateBasic

func (msg MsgSponsor) ValidateBasic() error

func (*MsgSponsor) XXX_DiscardUnknown

func (m *MsgSponsor) XXX_DiscardUnknown()

func (*MsgSponsor) XXX_Marshal

func (m *MsgSponsor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSponsor) XXX_Merge

func (m *MsgSponsor) XXX_Merge(src proto.Message)

func (*MsgSponsor) XXX_Size

func (m *MsgSponsor) XXX_Size() int

func (*MsgSponsor) XXX_Unmarshal

func (m *MsgSponsor) XXX_Unmarshal(b []byte) error

type MsgSponsorResponse

type MsgSponsorResponse struct {
}

MsgSponsorResponse defines the Msg/Sponsor response type.

func (*MsgSponsorResponse) Descriptor

func (*MsgSponsorResponse) Descriptor() ([]byte, []int)

func (*MsgSponsorResponse) Marshal

func (m *MsgSponsorResponse) Marshal() (dAtA []byte, err error)

func (*MsgSponsorResponse) MarshalTo

func (m *MsgSponsorResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgSponsorResponse) MarshalToSizedBuffer

func (m *MsgSponsorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgSponsorResponse) ProtoMessage

func (*MsgSponsorResponse) ProtoMessage()

func (*MsgSponsorResponse) Reset

func (m *MsgSponsorResponse) Reset()

func (*MsgSponsorResponse) Size

func (m *MsgSponsorResponse) Size() (n int)

func (*MsgSponsorResponse) String

func (m *MsgSponsorResponse) String() string

func (*MsgSponsorResponse) Unmarshal

func (m *MsgSponsorResponse) Unmarshal(dAtA []byte) error

func (*MsgSponsorResponse) XXX_DiscardUnknown

func (m *MsgSponsorResponse) XXX_DiscardUnknown()

func (*MsgSponsorResponse) XXX_Marshal

func (m *MsgSponsorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgSponsorResponse) XXX_Merge

func (m *MsgSponsorResponse) XXX_Merge(src proto.Message)

func (*MsgSponsorResponse) XXX_Size

func (m *MsgSponsorResponse) XXX_Size() int

func (*MsgSponsorResponse) XXX_Unmarshal

func (m *MsgSponsorResponse) XXX_Unmarshal(b []byte) error

type Params

type Params struct {
	// max_unbondings is the maximum amount of concurrent unbondings an address can have
	// of each bonded uToken denom. Zero is interpreted as no limit.
	MaxUnbondings uint32 `protobuf:"varint,1,opt,name=max_unbondings,json=maxUnbondings,proto3" json:"max_unbondings,omitempty"`
	// unbonding_duration is the unbonding duration (in seconds).
	UnbondingDuration int64 `protobuf:"varint,2,opt,name=unbonding_duration,json=unbondingDuration,proto3" json:"unbonding_duration,omitempty"`
	// emergency_unbond_fee is the portion of a bond that is paid when it is instantly
	// released using MsgEmergencyUnbond. For example, 0.01 is a 1% fee. Ranges 0-1.
	EmergencyUnbondFee github_com_cosmos_cosmos_sdk_types.Dec `` /* 157-byte string literal not displayed */
}

Params defines the parameters for the incentive module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters.

func (*Params) Descriptor

func (*Params) Descriptor() ([]byte, []int)

func (*Params) Equal

func (this *Params) Equal(that interface{}) bool

func (*Params) GetMaxUnbondings

func (m *Params) GetMaxUnbondings() uint32

func (*Params) GetUnbondingDuration

func (m *Params) GetUnbondingDuration() int64

func (*Params) Marshal

func (m *Params) Marshal() (dAtA []byte, err error)

func (*Params) MarshalTo

func (m *Params) MarshalTo(dAtA []byte) (int, error)

func (*Params) MarshalToSizedBuffer

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

func (m *Params) Size() (n int)

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

func (m *Params) Unmarshal(dAtA []byte) error

func (Params) Validate

func (p Params) Validate() error

validate a set of params

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Params) XXX_Merge

func (m *Params) XXX_Merge(src proto.Message)

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

func (m *Params) XXX_Unmarshal(b []byte) error

type ProgramStatus

type ProgramStatus uint8
const (
	ProgramStatusNotExist ProgramStatus = iota
	ProgramStatusUpcoming
	ProgramStatusOngoing
	ProgramStatusCompleted
)

func (ProgramStatus) Validate

func (p ProgramStatus) Validate() error

type QueryAccountBonds

type QueryAccountBonds struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

QueryAccountBonds defines the request structure for the AccountBonds gRPC service handler.

func (*QueryAccountBonds) Descriptor

func (*QueryAccountBonds) Descriptor() ([]byte, []int)

func (*QueryAccountBonds) GetAddress

func (m *QueryAccountBonds) GetAddress() string

func (*QueryAccountBonds) Marshal

func (m *QueryAccountBonds) Marshal() (dAtA []byte, err error)

func (*QueryAccountBonds) MarshalTo

func (m *QueryAccountBonds) MarshalTo(dAtA []byte) (int, error)

func (*QueryAccountBonds) MarshalToSizedBuffer

func (m *QueryAccountBonds) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAccountBonds) ProtoMessage

func (*QueryAccountBonds) ProtoMessage()

func (*QueryAccountBonds) Reset

func (m *QueryAccountBonds) Reset()

func (*QueryAccountBonds) Size

func (m *QueryAccountBonds) Size() (n int)

func (*QueryAccountBonds) String

func (m *QueryAccountBonds) String() string

func (*QueryAccountBonds) Unmarshal

func (m *QueryAccountBonds) Unmarshal(dAtA []byte) error

func (*QueryAccountBonds) XXX_DiscardUnknown

func (m *QueryAccountBonds) XXX_DiscardUnknown()

func (*QueryAccountBonds) XXX_Marshal

func (m *QueryAccountBonds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAccountBonds) XXX_Merge

func (m *QueryAccountBonds) XXX_Merge(src proto.Message)

func (*QueryAccountBonds) XXX_Size

func (m *QueryAccountBonds) XXX_Size() int

func (*QueryAccountBonds) XXX_Unmarshal

func (m *QueryAccountBonds) XXX_Unmarshal(b []byte) error

type QueryAccountBondsResponse

type QueryAccountBondsResponse struct {
	Bonded     github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=bonded,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"bonded"`
	Unbonding  github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=unbonding,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"unbonding"`
	Unbondings []Unbonding                              `protobuf:"bytes,3,rep,name=unbondings,proto3" json:"unbondings"`
}

QueryAccountBondsResponse defines the response structure for the AccountBonds gRPC service handler.

func (*QueryAccountBondsResponse) Descriptor

func (*QueryAccountBondsResponse) Descriptor() ([]byte, []int)

func (*QueryAccountBondsResponse) GetBonded

func (*QueryAccountBondsResponse) GetUnbonding

func (*QueryAccountBondsResponse) GetUnbondings

func (m *QueryAccountBondsResponse) GetUnbondings() []Unbonding

func (*QueryAccountBondsResponse) Marshal

func (m *QueryAccountBondsResponse) Marshal() (dAtA []byte, err error)

func (*QueryAccountBondsResponse) MarshalTo

func (m *QueryAccountBondsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryAccountBondsResponse) MarshalToSizedBuffer

func (m *QueryAccountBondsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAccountBondsResponse) ProtoMessage

func (*QueryAccountBondsResponse) ProtoMessage()

func (*QueryAccountBondsResponse) Reset

func (m *QueryAccountBondsResponse) Reset()

func (*QueryAccountBondsResponse) Size

func (m *QueryAccountBondsResponse) Size() (n int)

func (*QueryAccountBondsResponse) String

func (m *QueryAccountBondsResponse) String() string

func (*QueryAccountBondsResponse) Unmarshal

func (m *QueryAccountBondsResponse) Unmarshal(dAtA []byte) error

func (*QueryAccountBondsResponse) XXX_DiscardUnknown

func (m *QueryAccountBondsResponse) XXX_DiscardUnknown()

func (*QueryAccountBondsResponse) XXX_Marshal

func (m *QueryAccountBondsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAccountBondsResponse) XXX_Merge

func (m *QueryAccountBondsResponse) XXX_Merge(src proto.Message)

func (*QueryAccountBondsResponse) XXX_Size

func (m *QueryAccountBondsResponse) XXX_Size() int

func (*QueryAccountBondsResponse) XXX_Unmarshal

func (m *QueryAccountBondsResponse) XXX_Unmarshal(b []byte) error

type QueryActualRates

type QueryActualRates struct {
	// uToken is the uToken denomination whose current annual rate of rewards is being queried
	UToken string `protobuf:"bytes,1,opt,name=uToken,proto3" json:"uToken,omitempty"`
}

QueryActualRates defines the request structure for the ActualRates gRPC service handler.

func (*QueryActualRates) Descriptor

func (*QueryActualRates) Descriptor() ([]byte, []int)

func (*QueryActualRates) GetUToken

func (m *QueryActualRates) GetUToken() string

func (*QueryActualRates) Marshal

func (m *QueryActualRates) Marshal() (dAtA []byte, err error)

func (*QueryActualRates) MarshalTo

func (m *QueryActualRates) MarshalTo(dAtA []byte) (int, error)

func (*QueryActualRates) MarshalToSizedBuffer

func (m *QueryActualRates) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryActualRates) ProtoMessage

func (*QueryActualRates) ProtoMessage()

func (*QueryActualRates) Reset

func (m *QueryActualRates) Reset()

func (*QueryActualRates) Size

func (m *QueryActualRates) Size() (n int)

func (*QueryActualRates) String

func (m *QueryActualRates) String() string

func (*QueryActualRates) Unmarshal

func (m *QueryActualRates) Unmarshal(dAtA []byte) error

func (*QueryActualRates) XXX_DiscardUnknown

func (m *QueryActualRates) XXX_DiscardUnknown()

func (*QueryActualRates) XXX_Marshal

func (m *QueryActualRates) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryActualRates) XXX_Merge

func (m *QueryActualRates) XXX_Merge(src proto.Message)

func (*QueryActualRates) XXX_Size

func (m *QueryActualRates) XXX_Size() int

func (*QueryActualRates) XXX_Unmarshal

func (m *QueryActualRates) XXX_Unmarshal(b []byte) error

type QueryActualRatesResponse

type QueryActualRatesResponse struct {
	// APY is the oracle price-adjusted APY of the bonded uToken.
	APY github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=APY,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"APY"`
}

QueryActualRatesResponse defines the response structure for the ActualRates gRPC service handler.

func (*QueryActualRatesResponse) Descriptor

func (*QueryActualRatesResponse) Descriptor() ([]byte, []int)

func (*QueryActualRatesResponse) Marshal

func (m *QueryActualRatesResponse) Marshal() (dAtA []byte, err error)

func (*QueryActualRatesResponse) MarshalTo

func (m *QueryActualRatesResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryActualRatesResponse) MarshalToSizedBuffer

func (m *QueryActualRatesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryActualRatesResponse) ProtoMessage

func (*QueryActualRatesResponse) ProtoMessage()

func (*QueryActualRatesResponse) Reset

func (m *QueryActualRatesResponse) Reset()

func (*QueryActualRatesResponse) Size

func (m *QueryActualRatesResponse) Size() (n int)

func (*QueryActualRatesResponse) String

func (m *QueryActualRatesResponse) String() string

func (*QueryActualRatesResponse) Unmarshal

func (m *QueryActualRatesResponse) Unmarshal(dAtA []byte) error

func (*QueryActualRatesResponse) XXX_DiscardUnknown

func (m *QueryActualRatesResponse) XXX_DiscardUnknown()

func (*QueryActualRatesResponse) XXX_Marshal

func (m *QueryActualRatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryActualRatesResponse) XXX_Merge

func (m *QueryActualRatesResponse) XXX_Merge(src proto.Message)

func (*QueryActualRatesResponse) XXX_Size

func (m *QueryActualRatesResponse) XXX_Size() int

func (*QueryActualRatesResponse) XXX_Unmarshal

func (m *QueryActualRatesResponse) XXX_Unmarshal(b []byte) error

type QueryClient

type QueryClient interface {
	// Params queries the parameters of the x/incentive module.
	Params(ctx context.Context, in *QueryParams, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// TotalBonded queries the sum of all bonded collateral uTokens.
	TotalBonded(ctx context.Context, in *QueryTotalBonded, opts ...grpc.CallOption) (*QueryTotalBondedResponse, error)
	// TotalUnbonding queries the sum of all unbonding collateral uTokens.
	TotalUnbonding(ctx context.Context, in *QueryTotalUnbonding, opts ...grpc.CallOption) (*QueryTotalUnbondingResponse, error)
	// AccountBonds queries all bonded collateral and unbondings associated with an account.
	AccountBonds(ctx context.Context, in *QueryAccountBonds, opts ...grpc.CallOption) (*QueryAccountBondsResponse, error)
	// PendingRewards queries unclaimed incentive rewards associated with an account.
	PendingRewards(ctx context.Context, in *QueryPendingRewards, opts ...grpc.CallOption) (*QueryPendingRewardsResponse, 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)
	// CurrentRates queries the hypothetical return of a bonded uToken denomination
	// if current incentive rewards continued for one year. The response is an sdk.Coins
	// of base token rewards, per reference amount (usually 10^exponent of the uToken.)
	CurrentRates(ctx context.Context, in *QueryCurrentRates, opts ...grpc.CallOption) (*QueryCurrentRatesResponse, error)
	// ActualRates queries the hypothetical return of a bonded uToken denomination
	// if current incentive rewards continued for one year. The response is an sdk.Dec
	// representing an oracle-adjusted APY.
	ActualRates(ctx context.Context, in *QueryActualRates, opts ...grpc.CallOption) (*QueryActualRatesResponse, error)
	// LastRewardTime queries the last block time at which incentive rewards were calculated.
	LastRewardTime(ctx context.Context, in *QueryLastRewardTime, opts ...grpc.CallOption) (*QueryLastRewardTimeResponse, error)
}

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.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryCompletedIncentivePrograms

type QueryCompletedIncentivePrograms struct {
}

QueryCompletedIncentivePrograms defines the request structure for the CompletedIncentivePrograms gRPC service handler.

func (*QueryCompletedIncentivePrograms) Descriptor

func (*QueryCompletedIncentivePrograms) Descriptor() ([]byte, []int)

func (*QueryCompletedIncentivePrograms) Marshal

func (m *QueryCompletedIncentivePrograms) Marshal() (dAtA []byte, err error)

func (*QueryCompletedIncentivePrograms) MarshalTo

func (m *QueryCompletedIncentivePrograms) MarshalTo(dAtA []byte) (int, error)

func (*QueryCompletedIncentivePrograms) MarshalToSizedBuffer

func (m *QueryCompletedIncentivePrograms) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryCompletedIncentivePrograms) ProtoMessage

func (*QueryCompletedIncentivePrograms) ProtoMessage()

func (*QueryCompletedIncentivePrograms) Reset

func (*QueryCompletedIncentivePrograms) Size

func (m *QueryCompletedIncentivePrograms) Size() (n int)

func (*QueryCompletedIncentivePrograms) String

func (*QueryCompletedIncentivePrograms) Unmarshal

func (m *QueryCompletedIncentivePrograms) Unmarshal(dAtA []byte) error

func (*QueryCompletedIncentivePrograms) XXX_DiscardUnknown

func (m *QueryCompletedIncentivePrograms) XXX_DiscardUnknown()

func (*QueryCompletedIncentivePrograms) XXX_Marshal

func (m *QueryCompletedIncentivePrograms) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryCompletedIncentivePrograms) XXX_Merge

func (m *QueryCompletedIncentivePrograms) XXX_Merge(src proto.Message)

func (*QueryCompletedIncentivePrograms) XXX_Size

func (m *QueryCompletedIncentivePrograms) XXX_Size() int

func (*QueryCompletedIncentivePrograms) XXX_Unmarshal

func (m *QueryCompletedIncentivePrograms) XXX_Unmarshal(b []byte) error

type QueryCompletedIncentiveProgramsResponse

type QueryCompletedIncentiveProgramsResponse struct {
	Programs []IncentiveProgram `protobuf:"bytes,1,rep,name=programs,proto3" json:"programs"`
}

QueryCompletedIncentiveProgramsResponse defines the response structure for the CompletedIncentivePrograms gRPC service handler.

func (*QueryCompletedIncentiveProgramsResponse) Descriptor

func (*QueryCompletedIncentiveProgramsResponse) Descriptor() ([]byte, []int)

func (*QueryCompletedIncentiveProgramsResponse) GetPrograms

func (*QueryCompletedIncentiveProgramsResponse) Marshal

func (m *QueryCompletedIncentiveProgramsResponse) Marshal() (dAtA []byte, err error)

func (*QueryCompletedIncentiveProgramsResponse) MarshalTo

func (m *QueryCompletedIncentiveProgramsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryCompletedIncentiveProgramsResponse) MarshalToSizedBuffer

func (m *QueryCompletedIncentiveProgramsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryCompletedIncentiveProgramsResponse) ProtoMessage

func (*QueryCompletedIncentiveProgramsResponse) Reset

func (*QueryCompletedIncentiveProgramsResponse) Size

func (*QueryCompletedIncentiveProgramsResponse) String

func (*QueryCompletedIncentiveProgramsResponse) Unmarshal

func (m *QueryCompletedIncentiveProgramsResponse) Unmarshal(dAtA []byte) error

func (*QueryCompletedIncentiveProgramsResponse) XXX_DiscardUnknown

func (m *QueryCompletedIncentiveProgramsResponse) XXX_DiscardUnknown()

func (*QueryCompletedIncentiveProgramsResponse) XXX_Marshal

func (m *QueryCompletedIncentiveProgramsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryCompletedIncentiveProgramsResponse) XXX_Merge

func (*QueryCompletedIncentiveProgramsResponse) XXX_Size

func (*QueryCompletedIncentiveProgramsResponse) XXX_Unmarshal

func (m *QueryCompletedIncentiveProgramsResponse) XXX_Unmarshal(b []byte) error

type QueryCurrentRates

type QueryCurrentRates struct {
	// uToken is the uToken denomination whose current annual rate of rewards is being queried
	UToken string `protobuf:"bytes,1,opt,name=uToken,proto3" json:"uToken,omitempty"`
}

QueryCurrentRates defines the request structure for the CurrentRates gRPC service handler.

func (*QueryCurrentRates) Descriptor

func (*QueryCurrentRates) Descriptor() ([]byte, []int)

func (*QueryCurrentRates) GetUToken

func (m *QueryCurrentRates) GetUToken() string

func (*QueryCurrentRates) Marshal

func (m *QueryCurrentRates) Marshal() (dAtA []byte, err error)

func (*QueryCurrentRates) MarshalTo

func (m *QueryCurrentRates) MarshalTo(dAtA []byte) (int, error)

func (*QueryCurrentRates) MarshalToSizedBuffer

func (m *QueryCurrentRates) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryCurrentRates) ProtoMessage

func (*QueryCurrentRates) ProtoMessage()

func (*QueryCurrentRates) Reset

func (m *QueryCurrentRates) Reset()

func (*QueryCurrentRates) Size

func (m *QueryCurrentRates) Size() (n int)

func (*QueryCurrentRates) String

func (m *QueryCurrentRates) String() string

func (*QueryCurrentRates) Unmarshal

func (m *QueryCurrentRates) Unmarshal(dAtA []byte) error

func (*QueryCurrentRates) XXX_DiscardUnknown

func (m *QueryCurrentRates) XXX_DiscardUnknown()

func (*QueryCurrentRates) XXX_Marshal

func (m *QueryCurrentRates) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryCurrentRates) XXX_Merge

func (m *QueryCurrentRates) XXX_Merge(src proto.Message)

func (*QueryCurrentRates) XXX_Size

func (m *QueryCurrentRates) XXX_Size() int

func (*QueryCurrentRates) XXX_Unmarshal

func (m *QueryCurrentRates) XXX_Unmarshal(b []byte) error

type QueryCurrentRatesResponse

type QueryCurrentRatesResponse struct {
	// Reference Bond is an amount of bonded uTokens (usually 10^exponent) whose current rewards are being
	// calculated. This amount can be used to compute an individual user's rewards: for example, if a user has
	// 2.5x the reference amount currently bonded, then they would receive 2.5x the rewards below annually
	// at current rates.
	ReferenceBond types.Coin `protobuf:"bytes,1,opt,name=reference_bond,json=referenceBond,proto3" json:"reference_bond"`
	// Rewards are the amount of base token rewards that the reference amount of bonded uTokens would earn
	// if current rates continued for a full year.
	Rewards github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=rewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"rewards"`
}

QueryCurrentRatesResponse defines the response structure for the CurrentRates gRPC service handler.

func (*QueryCurrentRatesResponse) Descriptor

func (*QueryCurrentRatesResponse) Descriptor() ([]byte, []int)

func (*QueryCurrentRatesResponse) GetReferenceBond

func (m *QueryCurrentRatesResponse) GetReferenceBond() types.Coin

func (*QueryCurrentRatesResponse) GetRewards

func (*QueryCurrentRatesResponse) Marshal

func (m *QueryCurrentRatesResponse) Marshal() (dAtA []byte, err error)

func (*QueryCurrentRatesResponse) MarshalTo

func (m *QueryCurrentRatesResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryCurrentRatesResponse) MarshalToSizedBuffer

func (m *QueryCurrentRatesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryCurrentRatesResponse) ProtoMessage

func (*QueryCurrentRatesResponse) ProtoMessage()

func (*QueryCurrentRatesResponse) Reset

func (m *QueryCurrentRatesResponse) Reset()

func (*QueryCurrentRatesResponse) Size

func (m *QueryCurrentRatesResponse) Size() (n int)

func (*QueryCurrentRatesResponse) String

func (m *QueryCurrentRatesResponse) String() string

func (*QueryCurrentRatesResponse) Unmarshal

func (m *QueryCurrentRatesResponse) Unmarshal(dAtA []byte) error

func (*QueryCurrentRatesResponse) XXX_DiscardUnknown

func (m *QueryCurrentRatesResponse) XXX_DiscardUnknown()

func (*QueryCurrentRatesResponse) XXX_Marshal

func (m *QueryCurrentRatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryCurrentRatesResponse) XXX_Merge

func (m *QueryCurrentRatesResponse) XXX_Merge(src proto.Message)

func (*QueryCurrentRatesResponse) XXX_Size

func (m *QueryCurrentRatesResponse) XXX_Size() int

func (*QueryCurrentRatesResponse) XXX_Unmarshal

func (m *QueryCurrentRatesResponse) XXX_Unmarshal(b []byte) error

type QueryIncentiveProgram

type QueryIncentiveProgram struct {
	// ID specifies which program to query for
	Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}

QueryIncentiveProgram defines the request structure for the IncentiveProgram gRPC service handler.

func (*QueryIncentiveProgram) Descriptor

func (*QueryIncentiveProgram) Descriptor() ([]byte, []int)

func (*QueryIncentiveProgram) GetId

func (m *QueryIncentiveProgram) GetId() uint32

func (*QueryIncentiveProgram) Marshal

func (m *QueryIncentiveProgram) Marshal() (dAtA []byte, err error)

func (*QueryIncentiveProgram) MarshalTo

func (m *QueryIncentiveProgram) MarshalTo(dAtA []byte) (int, error)

func (*QueryIncentiveProgram) MarshalToSizedBuffer

func (m *QueryIncentiveProgram) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryIncentiveProgram) ProtoMessage

func (*QueryIncentiveProgram) ProtoMessage()

func (*QueryIncentiveProgram) Reset

func (m *QueryIncentiveProgram) Reset()

func (*QueryIncentiveProgram) Size

func (m *QueryIncentiveProgram) Size() (n int)

func (*QueryIncentiveProgram) String

func (m *QueryIncentiveProgram) String() string

func (*QueryIncentiveProgram) Unmarshal

func (m *QueryIncentiveProgram) Unmarshal(dAtA []byte) error

func (*QueryIncentiveProgram) XXX_DiscardUnknown

func (m *QueryIncentiveProgram) XXX_DiscardUnknown()

func (*QueryIncentiveProgram) XXX_Marshal

func (m *QueryIncentiveProgram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryIncentiveProgram) XXX_Merge

func (m *QueryIncentiveProgram) XXX_Merge(src proto.Message)

func (*QueryIncentiveProgram) XXX_Size

func (m *QueryIncentiveProgram) XXX_Size() int

func (*QueryIncentiveProgram) XXX_Unmarshal

func (m *QueryIncentiveProgram) XXX_Unmarshal(b []byte) error

type QueryIncentiveProgramResponse

type QueryIncentiveProgramResponse struct {
	Program IncentiveProgram `protobuf:"bytes,1,opt,name=program,proto3" json:"program"`
}

QueryIncentivePrograResponse defines the response structure for the IncentiveProgram gRPC service handler.

func (*QueryIncentiveProgramResponse) Descriptor

func (*QueryIncentiveProgramResponse) Descriptor() ([]byte, []int)

func (*QueryIncentiveProgramResponse) GetProgram

func (*QueryIncentiveProgramResponse) Marshal

func (m *QueryIncentiveProgramResponse) Marshal() (dAtA []byte, err error)

func (*QueryIncentiveProgramResponse) MarshalTo

func (m *QueryIncentiveProgramResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryIncentiveProgramResponse) MarshalToSizedBuffer

func (m *QueryIncentiveProgramResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryIncentiveProgramResponse) ProtoMessage

func (*QueryIncentiveProgramResponse) ProtoMessage()

func (*QueryIncentiveProgramResponse) Reset

func (m *QueryIncentiveProgramResponse) Reset()

func (*QueryIncentiveProgramResponse) Size

func (m *QueryIncentiveProgramResponse) Size() (n int)

func (*QueryIncentiveProgramResponse) String

func (*QueryIncentiveProgramResponse) Unmarshal

func (m *QueryIncentiveProgramResponse) Unmarshal(dAtA []byte) error

func (*QueryIncentiveProgramResponse) XXX_DiscardUnknown

func (m *QueryIncentiveProgramResponse) XXX_DiscardUnknown()

func (*QueryIncentiveProgramResponse) XXX_Marshal

func (m *QueryIncentiveProgramResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryIncentiveProgramResponse) XXX_Merge

func (m *QueryIncentiveProgramResponse) XXX_Merge(src proto.Message)

func (*QueryIncentiveProgramResponse) XXX_Size

func (m *QueryIncentiveProgramResponse) XXX_Size() int

func (*QueryIncentiveProgramResponse) XXX_Unmarshal

func (m *QueryIncentiveProgramResponse) XXX_Unmarshal(b []byte) error

type QueryLastRewardTime

type QueryLastRewardTime struct {
}

QueryLastRewardTime defines the request structure for the LastRewardTime gRPC service handler.

func (*QueryLastRewardTime) Descriptor

func (*QueryLastRewardTime) Descriptor() ([]byte, []int)

func (*QueryLastRewardTime) Marshal

func (m *QueryLastRewardTime) Marshal() (dAtA []byte, err error)

func (*QueryLastRewardTime) MarshalTo

func (m *QueryLastRewardTime) MarshalTo(dAtA []byte) (int, error)

func (*QueryLastRewardTime) MarshalToSizedBuffer

func (m *QueryLastRewardTime) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryLastRewardTime) ProtoMessage

func (*QueryLastRewardTime) ProtoMessage()

func (*QueryLastRewardTime) Reset

func (m *QueryLastRewardTime) Reset()

func (*QueryLastRewardTime) Size

func (m *QueryLastRewardTime) Size() (n int)

func (*QueryLastRewardTime) String

func (m *QueryLastRewardTime) String() string

func (*QueryLastRewardTime) Unmarshal

func (m *QueryLastRewardTime) Unmarshal(dAtA []byte) error

func (*QueryLastRewardTime) XXX_DiscardUnknown

func (m *QueryLastRewardTime) XXX_DiscardUnknown()

func (*QueryLastRewardTime) XXX_Marshal

func (m *QueryLastRewardTime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryLastRewardTime) XXX_Merge

func (m *QueryLastRewardTime) XXX_Merge(src proto.Message)

func (*QueryLastRewardTime) XXX_Size

func (m *QueryLastRewardTime) XXX_Size() int

func (*QueryLastRewardTime) XXX_Unmarshal

func (m *QueryLastRewardTime) XXX_Unmarshal(b []byte) error

type QueryLastRewardTimeResponse

type QueryLastRewardTimeResponse struct {
	Time int64 `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"`
}

QueryLastRewardTimeResponse defines the response structure for the LastRewardTime gRPC service handler.

func (*QueryLastRewardTimeResponse) Descriptor

func (*QueryLastRewardTimeResponse) Descriptor() ([]byte, []int)

func (*QueryLastRewardTimeResponse) GetTime

func (m *QueryLastRewardTimeResponse) GetTime() int64

func (*QueryLastRewardTimeResponse) Marshal

func (m *QueryLastRewardTimeResponse) Marshal() (dAtA []byte, err error)

func (*QueryLastRewardTimeResponse) MarshalTo

func (m *QueryLastRewardTimeResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryLastRewardTimeResponse) MarshalToSizedBuffer

func (m *QueryLastRewardTimeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryLastRewardTimeResponse) ProtoMessage

func (*QueryLastRewardTimeResponse) ProtoMessage()

func (*QueryLastRewardTimeResponse) Reset

func (m *QueryLastRewardTimeResponse) Reset()

func (*QueryLastRewardTimeResponse) Size

func (m *QueryLastRewardTimeResponse) Size() (n int)

func (*QueryLastRewardTimeResponse) String

func (m *QueryLastRewardTimeResponse) String() string

func (*QueryLastRewardTimeResponse) Unmarshal

func (m *QueryLastRewardTimeResponse) Unmarshal(dAtA []byte) error

func (*QueryLastRewardTimeResponse) XXX_DiscardUnknown

func (m *QueryLastRewardTimeResponse) XXX_DiscardUnknown()

func (*QueryLastRewardTimeResponse) XXX_Marshal

func (m *QueryLastRewardTimeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryLastRewardTimeResponse) XXX_Merge

func (m *QueryLastRewardTimeResponse) XXX_Merge(src proto.Message)

func (*QueryLastRewardTimeResponse) XXX_Size

func (m *QueryLastRewardTimeResponse) XXX_Size() int

func (*QueryLastRewardTimeResponse) XXX_Unmarshal

func (m *QueryLastRewardTimeResponse) XXX_Unmarshal(b []byte) error

type QueryOngoingIncentivePrograms

type QueryOngoingIncentivePrograms struct {
}

QueryOngoingIncentivePrograms defines the request structure for the OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service handlers.

func (*QueryOngoingIncentivePrograms) Descriptor

func (*QueryOngoingIncentivePrograms) Descriptor() ([]byte, []int)

func (*QueryOngoingIncentivePrograms) Marshal

func (m *QueryOngoingIncentivePrograms) Marshal() (dAtA []byte, err error)

func (*QueryOngoingIncentivePrograms) MarshalTo

func (m *QueryOngoingIncentivePrograms) MarshalTo(dAtA []byte) (int, error)

func (*QueryOngoingIncentivePrograms) MarshalToSizedBuffer

func (m *QueryOngoingIncentivePrograms) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryOngoingIncentivePrograms) ProtoMessage

func (*QueryOngoingIncentivePrograms) ProtoMessage()

func (*QueryOngoingIncentivePrograms) Reset

func (m *QueryOngoingIncentivePrograms) Reset()

func (*QueryOngoingIncentivePrograms) Size

func (m *QueryOngoingIncentivePrograms) Size() (n int)

func (*QueryOngoingIncentivePrograms) String

func (*QueryOngoingIncentivePrograms) Unmarshal

func (m *QueryOngoingIncentivePrograms) Unmarshal(dAtA []byte) error

func (*QueryOngoingIncentivePrograms) XXX_DiscardUnknown

func (m *QueryOngoingIncentivePrograms) XXX_DiscardUnknown()

func (*QueryOngoingIncentivePrograms) XXX_Marshal

func (m *QueryOngoingIncentivePrograms) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryOngoingIncentivePrograms) XXX_Merge

func (m *QueryOngoingIncentivePrograms) XXX_Merge(src proto.Message)

func (*QueryOngoingIncentivePrograms) XXX_Size

func (m *QueryOngoingIncentivePrograms) XXX_Size() int

func (*QueryOngoingIncentivePrograms) XXX_Unmarshal

func (m *QueryOngoingIncentivePrograms) XXX_Unmarshal(b []byte) error

type QueryOngoingIncentiveProgramsResponse

type QueryOngoingIncentiveProgramsResponse struct {
	Programs []IncentiveProgram `protobuf:"bytes,1,rep,name=programs,proto3" json:"programs"`
}

QueryOngoingIncentiveProgramsResponse defines the response structure for the OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service handlers.

func (*QueryOngoingIncentiveProgramsResponse) Descriptor

func (*QueryOngoingIncentiveProgramsResponse) Descriptor() ([]byte, []int)

func (*QueryOngoingIncentiveProgramsResponse) GetPrograms

func (*QueryOngoingIncentiveProgramsResponse) Marshal

func (m *QueryOngoingIncentiveProgramsResponse) Marshal() (dAtA []byte, err error)

func (*QueryOngoingIncentiveProgramsResponse) MarshalTo

func (m *QueryOngoingIncentiveProgramsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryOngoingIncentiveProgramsResponse) MarshalToSizedBuffer

func (m *QueryOngoingIncentiveProgramsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryOngoingIncentiveProgramsResponse) ProtoMessage

func (*QueryOngoingIncentiveProgramsResponse) ProtoMessage()

func (*QueryOngoingIncentiveProgramsResponse) Reset

func (*QueryOngoingIncentiveProgramsResponse) Size

func (*QueryOngoingIncentiveProgramsResponse) String

func (*QueryOngoingIncentiveProgramsResponse) Unmarshal

func (m *QueryOngoingIncentiveProgramsResponse) Unmarshal(dAtA []byte) error

func (*QueryOngoingIncentiveProgramsResponse) XXX_DiscardUnknown

func (m *QueryOngoingIncentiveProgramsResponse) XXX_DiscardUnknown()

func (*QueryOngoingIncentiveProgramsResponse) XXX_Marshal

func (m *QueryOngoingIncentiveProgramsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryOngoingIncentiveProgramsResponse) XXX_Merge

func (*QueryOngoingIncentiveProgramsResponse) XXX_Size

func (*QueryOngoingIncentiveProgramsResponse) XXX_Unmarshal

func (m *QueryOngoingIncentiveProgramsResponse) XXX_Unmarshal(b []byte) error

type QueryParams

type QueryParams struct {
}

QueryParams defines the request structure for the Params gRPC service handler.

func (*QueryParams) Descriptor

func (*QueryParams) Descriptor() ([]byte, []int)

func (*QueryParams) Marshal

func (m *QueryParams) Marshal() (dAtA []byte, err error)

func (*QueryParams) MarshalTo

func (m *QueryParams) MarshalTo(dAtA []byte) (int, error)

func (*QueryParams) MarshalToSizedBuffer

func (m *QueryParams) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryParams) ProtoMessage

func (*QueryParams) ProtoMessage()

func (*QueryParams) Reset

func (m *QueryParams) Reset()

func (*QueryParams) Size

func (m *QueryParams) Size() (n int)

func (*QueryParams) String

func (m *QueryParams) String() string

func (*QueryParams) Unmarshal

func (m *QueryParams) Unmarshal(dAtA []byte) error

func (*QueryParams) XXX_DiscardUnknown

func (m *QueryParams) XXX_DiscardUnknown()

func (*QueryParams) XXX_Marshal

func (m *QueryParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParams) XXX_Merge

func (m *QueryParams) XXX_Merge(src proto.Message)

func (*QueryParams) XXX_Size

func (m *QueryParams) XXX_Size() int

func (*QueryParams) XXX_Unmarshal

func (m *QueryParams) XXX_Unmarshal(b []byte) error

type QueryParamsResponse

type QueryParamsResponse struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse defines the response structure for the Params gRPC service handler.

func (*QueryParamsResponse) Descriptor

func (*QueryParamsResponse) Descriptor() ([]byte, []int)

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)

func (*QueryParamsResponse) MarshalTo

func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryParamsResponse) MarshalToSizedBuffer

func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

func (m *QueryParamsResponse) Size() (n int)

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParamsResponse) XXX_Merge

func (m *QueryParamsResponse) XXX_Merge(src proto.Message)

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error

type QueryPendingRewards

type QueryPendingRewards struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

QueryPendingRewards defines the request structure for the PendingRewards gRPC service handler.

func (*QueryPendingRewards) Descriptor

func (*QueryPendingRewards) Descriptor() ([]byte, []int)

func (*QueryPendingRewards) GetAddress

func (m *QueryPendingRewards) GetAddress() string

func (*QueryPendingRewards) Marshal

func (m *QueryPendingRewards) Marshal() (dAtA []byte, err error)

func (*QueryPendingRewards) MarshalTo

func (m *QueryPendingRewards) MarshalTo(dAtA []byte) (int, error)

func (*QueryPendingRewards) MarshalToSizedBuffer

func (m *QueryPendingRewards) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryPendingRewards) ProtoMessage

func (*QueryPendingRewards) ProtoMessage()

func (*QueryPendingRewards) Reset

func (m *QueryPendingRewards) Reset()

func (*QueryPendingRewards) Size

func (m *QueryPendingRewards) Size() (n int)

func (*QueryPendingRewards) String

func (m *QueryPendingRewards) String() string

func (*QueryPendingRewards) Unmarshal

func (m *QueryPendingRewards) Unmarshal(dAtA []byte) error

func (*QueryPendingRewards) XXX_DiscardUnknown

func (m *QueryPendingRewards) XXX_DiscardUnknown()

func (*QueryPendingRewards) XXX_Marshal

func (m *QueryPendingRewards) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryPendingRewards) XXX_Merge

func (m *QueryPendingRewards) XXX_Merge(src proto.Message)

func (*QueryPendingRewards) XXX_Size

func (m *QueryPendingRewards) XXX_Size() int

func (*QueryPendingRewards) XXX_Unmarshal

func (m *QueryPendingRewards) XXX_Unmarshal(b []byte) error

type QueryPendingRewardsResponse

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"`
}

QueryPendingRewardsResponse defines the response structure for the PendingRewards gRPC service handler.

func (*QueryPendingRewardsResponse) Descriptor

func (*QueryPendingRewardsResponse) Descriptor() ([]byte, []int)

func (*QueryPendingRewardsResponse) GetRewards

func (*QueryPendingRewardsResponse) Marshal

func (m *QueryPendingRewardsResponse) Marshal() (dAtA []byte, err error)

func (*QueryPendingRewardsResponse) MarshalTo

func (m *QueryPendingRewardsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryPendingRewardsResponse) MarshalToSizedBuffer

func (m *QueryPendingRewardsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryPendingRewardsResponse) ProtoMessage

func (*QueryPendingRewardsResponse) ProtoMessage()

func (*QueryPendingRewardsResponse) Reset

func (m *QueryPendingRewardsResponse) Reset()

func (*QueryPendingRewardsResponse) Size

func (m *QueryPendingRewardsResponse) Size() (n int)

func (*QueryPendingRewardsResponse) String

func (m *QueryPendingRewardsResponse) String() string

func (*QueryPendingRewardsResponse) Unmarshal

func (m *QueryPendingRewardsResponse) Unmarshal(dAtA []byte) error

func (*QueryPendingRewardsResponse) XXX_DiscardUnknown

func (m *QueryPendingRewardsResponse) XXX_DiscardUnknown()

func (*QueryPendingRewardsResponse) XXX_Marshal

func (m *QueryPendingRewardsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryPendingRewardsResponse) XXX_Merge

func (m *QueryPendingRewardsResponse) XXX_Merge(src proto.Message)

func (*QueryPendingRewardsResponse) XXX_Size

func (m *QueryPendingRewardsResponse) XXX_Size() int

func (*QueryPendingRewardsResponse) XXX_Unmarshal

func (m *QueryPendingRewardsResponse) XXX_Unmarshal(b []byte) error

type QueryServer

type QueryServer interface {
	// Params queries the parameters of the x/incentive module.
	Params(context.Context, *QueryParams) (*QueryParamsResponse, error)
	// TotalBonded queries the sum of all bonded collateral uTokens.
	TotalBonded(context.Context, *QueryTotalBonded) (*QueryTotalBondedResponse, error)
	// TotalUnbonding queries the sum of all unbonding collateral uTokens.
	TotalUnbonding(context.Context, *QueryTotalUnbonding) (*QueryTotalUnbondingResponse, error)
	// AccountBonds queries all bonded collateral and unbondings associated with an account.
	AccountBonds(context.Context, *QueryAccountBonds) (*QueryAccountBondsResponse, error)
	// PendingRewards queries unclaimed incentive rewards associated with an account.
	PendingRewards(context.Context, *QueryPendingRewards) (*QueryPendingRewardsResponse, 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)
	// CurrentRates queries the hypothetical return of a bonded uToken denomination
	// if current incentive rewards continued for one year. The response is an sdk.Coins
	// of base token rewards, per reference amount (usually 10^exponent of the uToken.)
	CurrentRates(context.Context, *QueryCurrentRates) (*QueryCurrentRatesResponse, error)
	// ActualRates queries the hypothetical return of a bonded uToken denomination
	// if current incentive rewards continued for one year. The response is an sdk.Dec
	// representing an oracle-adjusted APY.
	ActualRates(context.Context, *QueryActualRates) (*QueryActualRatesResponse, error)
	// LastRewardTime queries the last block time at which incentive rewards were calculated.
	LastRewardTime(context.Context, *QueryLastRewardTime) (*QueryLastRewardTimeResponse, error)
}

QueryServer is the server API for Query service.

type QueryTotalBonded

type QueryTotalBonded struct {
	// denom is an optional field which causes the query to return the totals of only one uToken
	Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
}

QueryTotalBonded defines the request structure for the TotalBonded gRPC service handler.

func (*QueryTotalBonded) Descriptor

func (*QueryTotalBonded) Descriptor() ([]byte, []int)

func (*QueryTotalBonded) GetDenom

func (m *QueryTotalBonded) GetDenom() string

func (*QueryTotalBonded) Marshal

func (m *QueryTotalBonded) Marshal() (dAtA []byte, err error)

func (*QueryTotalBonded) MarshalTo

func (m *QueryTotalBonded) MarshalTo(dAtA []byte) (int, error)

func (*QueryTotalBonded) MarshalToSizedBuffer

func (m *QueryTotalBonded) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryTotalBonded) ProtoMessage

func (*QueryTotalBonded) ProtoMessage()

func (*QueryTotalBonded) Reset

func (m *QueryTotalBonded) Reset()

func (*QueryTotalBonded) Size

func (m *QueryTotalBonded) Size() (n int)

func (*QueryTotalBonded) String

func (m *QueryTotalBonded) String() string

func (*QueryTotalBonded) Unmarshal

func (m *QueryTotalBonded) Unmarshal(dAtA []byte) error

func (*QueryTotalBonded) XXX_DiscardUnknown

func (m *QueryTotalBonded) XXX_DiscardUnknown()

func (*QueryTotalBonded) XXX_Marshal

func (m *QueryTotalBonded) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryTotalBonded) XXX_Merge

func (m *QueryTotalBonded) XXX_Merge(src proto.Message)

func (*QueryTotalBonded) XXX_Size

func (m *QueryTotalBonded) XXX_Size() int

func (*QueryTotalBonded) XXX_Unmarshal

func (m *QueryTotalBonded) XXX_Unmarshal(b []byte) error

type QueryTotalBondedResponse

type QueryTotalBondedResponse struct {
	Bonded github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=bonded,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"bonded"`
}

QueryTotalBondedResponse defines the response structure for the TotalBonded gRPC service handler.

func (*QueryTotalBondedResponse) Descriptor

func (*QueryTotalBondedResponse) Descriptor() ([]byte, []int)

func (*QueryTotalBondedResponse) GetBonded

func (*QueryTotalBondedResponse) Marshal

func (m *QueryTotalBondedResponse) Marshal() (dAtA []byte, err error)

func (*QueryTotalBondedResponse) MarshalTo

func (m *QueryTotalBondedResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryTotalBondedResponse) MarshalToSizedBuffer

func (m *QueryTotalBondedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryTotalBondedResponse) ProtoMessage

func (*QueryTotalBondedResponse) ProtoMessage()

func (*QueryTotalBondedResponse) Reset

func (m *QueryTotalBondedResponse) Reset()

func (*QueryTotalBondedResponse) Size

func (m *QueryTotalBondedResponse) Size() (n int)

func (*QueryTotalBondedResponse) String

func (m *QueryTotalBondedResponse) String() string

func (*QueryTotalBondedResponse) Unmarshal

func (m *QueryTotalBondedResponse) Unmarshal(dAtA []byte) error

func (*QueryTotalBondedResponse) XXX_DiscardUnknown

func (m *QueryTotalBondedResponse) XXX_DiscardUnknown()

func (*QueryTotalBondedResponse) XXX_Marshal

func (m *QueryTotalBondedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryTotalBondedResponse) XXX_Merge

func (m *QueryTotalBondedResponse) XXX_Merge(src proto.Message)

func (*QueryTotalBondedResponse) XXX_Size

func (m *QueryTotalBondedResponse) XXX_Size() int

func (*QueryTotalBondedResponse) XXX_Unmarshal

func (m *QueryTotalBondedResponse) XXX_Unmarshal(b []byte) error

type QueryTotalUnbonding

type QueryTotalUnbonding struct {
	// denom is an optional field which causes the query to return the totals of only one uToken
	Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
}

QueryTotalUnbonding defines the request structure for the TotalUnbonding gRPC service handler.

func (*QueryTotalUnbonding) Descriptor

func (*QueryTotalUnbonding) Descriptor() ([]byte, []int)

func (*QueryTotalUnbonding) GetDenom

func (m *QueryTotalUnbonding) GetDenom() string

func (*QueryTotalUnbonding) Marshal

func (m *QueryTotalUnbonding) Marshal() (dAtA []byte, err error)

func (*QueryTotalUnbonding) MarshalTo

func (m *QueryTotalUnbonding) MarshalTo(dAtA []byte) (int, error)

func (*QueryTotalUnbonding) MarshalToSizedBuffer

func (m *QueryTotalUnbonding) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryTotalUnbonding) ProtoMessage

func (*QueryTotalUnbonding) ProtoMessage()

func (*QueryTotalUnbonding) Reset

func (m *QueryTotalUnbonding) Reset()

func (*QueryTotalUnbonding) Size

func (m *QueryTotalUnbonding) Size() (n int)

func (*QueryTotalUnbonding) String

func (m *QueryTotalUnbonding) String() string

func (*QueryTotalUnbonding) Unmarshal

func (m *QueryTotalUnbonding) Unmarshal(dAtA []byte) error

func (*QueryTotalUnbonding) XXX_DiscardUnknown

func (m *QueryTotalUnbonding) XXX_DiscardUnknown()

func (*QueryTotalUnbonding) XXX_Marshal

func (m *QueryTotalUnbonding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryTotalUnbonding) XXX_Merge

func (m *QueryTotalUnbonding) XXX_Merge(src proto.Message)

func (*QueryTotalUnbonding) XXX_Size

func (m *QueryTotalUnbonding) XXX_Size() int

func (*QueryTotalUnbonding) XXX_Unmarshal

func (m *QueryTotalUnbonding) XXX_Unmarshal(b []byte) error

type QueryTotalUnbondingResponse

type QueryTotalUnbondingResponse struct {
	Unbonding github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=unbonding,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"unbonding"`
}

QueryTotalUnbondingResponse defines the response structure for the TotalUnbonding gRPC service handler.

func (*QueryTotalUnbondingResponse) Descriptor

func (*QueryTotalUnbondingResponse) Descriptor() ([]byte, []int)

func (*QueryTotalUnbondingResponse) GetUnbonding

func (*QueryTotalUnbondingResponse) Marshal

func (m *QueryTotalUnbondingResponse) Marshal() (dAtA []byte, err error)

func (*QueryTotalUnbondingResponse) MarshalTo

func (m *QueryTotalUnbondingResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryTotalUnbondingResponse) MarshalToSizedBuffer

func (m *QueryTotalUnbondingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryTotalUnbondingResponse) ProtoMessage

func (*QueryTotalUnbondingResponse) ProtoMessage()

func (*QueryTotalUnbondingResponse) Reset

func (m *QueryTotalUnbondingResponse) Reset()

func (*QueryTotalUnbondingResponse) Size

func (m *QueryTotalUnbondingResponse) Size() (n int)

func (*QueryTotalUnbondingResponse) String

func (m *QueryTotalUnbondingResponse) String() string

func (*QueryTotalUnbondingResponse) Unmarshal

func (m *QueryTotalUnbondingResponse) Unmarshal(dAtA []byte) error

func (*QueryTotalUnbondingResponse) XXX_DiscardUnknown

func (m *QueryTotalUnbondingResponse) XXX_DiscardUnknown()

func (*QueryTotalUnbondingResponse) XXX_Marshal

func (m *QueryTotalUnbondingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryTotalUnbondingResponse) XXX_Merge

func (m *QueryTotalUnbondingResponse) XXX_Merge(src proto.Message)

func (*QueryTotalUnbondingResponse) XXX_Size

func (m *QueryTotalUnbondingResponse) XXX_Size() int

func (*QueryTotalUnbondingResponse) XXX_Unmarshal

func (m *QueryTotalUnbondingResponse) XXX_Unmarshal(b []byte) error

type QueryUpcomingIncentivePrograms

type QueryUpcomingIncentivePrograms struct {
}

QueryUpcomingIncentivePrograms defines the request structure for the OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service handlers.

func (*QueryUpcomingIncentivePrograms) Descriptor

func (*QueryUpcomingIncentivePrograms) Descriptor() ([]byte, []int)

func (*QueryUpcomingIncentivePrograms) Marshal

func (m *QueryUpcomingIncentivePrograms) Marshal() (dAtA []byte, err error)

func (*QueryUpcomingIncentivePrograms) MarshalTo

func (m *QueryUpcomingIncentivePrograms) MarshalTo(dAtA []byte) (int, error)

func (*QueryUpcomingIncentivePrograms) MarshalToSizedBuffer

func (m *QueryUpcomingIncentivePrograms) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryUpcomingIncentivePrograms) ProtoMessage

func (*QueryUpcomingIncentivePrograms) ProtoMessage()

func (*QueryUpcomingIncentivePrograms) Reset

func (m *QueryUpcomingIncentivePrograms) Reset()

func (*QueryUpcomingIncentivePrograms) Size

func (m *QueryUpcomingIncentivePrograms) Size() (n int)

func (*QueryUpcomingIncentivePrograms) String

func (*QueryUpcomingIncentivePrograms) Unmarshal

func (m *QueryUpcomingIncentivePrograms) Unmarshal(dAtA []byte) error

func (*QueryUpcomingIncentivePrograms) XXX_DiscardUnknown

func (m *QueryUpcomingIncentivePrograms) XXX_DiscardUnknown()

func (*QueryUpcomingIncentivePrograms) XXX_Marshal

func (m *QueryUpcomingIncentivePrograms) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryUpcomingIncentivePrograms) XXX_Merge

func (m *QueryUpcomingIncentivePrograms) XXX_Merge(src proto.Message)

func (*QueryUpcomingIncentivePrograms) XXX_Size

func (m *QueryUpcomingIncentivePrograms) XXX_Size() int

func (*QueryUpcomingIncentivePrograms) XXX_Unmarshal

func (m *QueryUpcomingIncentivePrograms) XXX_Unmarshal(b []byte) error

type QueryUpcomingIncentiveProgramsResponse

type QueryUpcomingIncentiveProgramsResponse struct {
	Programs []IncentiveProgram `protobuf:"bytes,1,rep,name=programs,proto3" json:"programs"`
}

QueryUpcomingIncentiveProgramsResponse defines the response structure for the OngoingIncentivePrograms and UpcomingIncentivePrograms gRPC service handlers.

func (*QueryUpcomingIncentiveProgramsResponse) Descriptor

func (*QueryUpcomingIncentiveProgramsResponse) Descriptor() ([]byte, []int)

func (*QueryUpcomingIncentiveProgramsResponse) GetPrograms

func (*QueryUpcomingIncentiveProgramsResponse) Marshal

func (m *QueryUpcomingIncentiveProgramsResponse) Marshal() (dAtA []byte, err error)

func (*QueryUpcomingIncentiveProgramsResponse) MarshalTo

func (m *QueryUpcomingIncentiveProgramsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryUpcomingIncentiveProgramsResponse) MarshalToSizedBuffer

func (m *QueryUpcomingIncentiveProgramsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryUpcomingIncentiveProgramsResponse) ProtoMessage

func (*QueryUpcomingIncentiveProgramsResponse) Reset

func (*QueryUpcomingIncentiveProgramsResponse) Size

func (*QueryUpcomingIncentiveProgramsResponse) String

func (*QueryUpcomingIncentiveProgramsResponse) Unmarshal

func (m *QueryUpcomingIncentiveProgramsResponse) Unmarshal(dAtA []byte) error

func (*QueryUpcomingIncentiveProgramsResponse) XXX_DiscardUnknown

func (m *QueryUpcomingIncentiveProgramsResponse) XXX_DiscardUnknown()

func (*QueryUpcomingIncentiveProgramsResponse) XXX_Marshal

func (m *QueryUpcomingIncentiveProgramsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryUpcomingIncentiveProgramsResponse) XXX_Merge

func (*QueryUpcomingIncentiveProgramsResponse) XXX_Size

func (*QueryUpcomingIncentiveProgramsResponse) XXX_Unmarshal

func (m *QueryUpcomingIncentiveProgramsResponse) XXX_Unmarshal(b []byte) error

type RewardAccumulator

type RewardAccumulator struct {
	UToken   string                                      `protobuf:"bytes,1,opt,name=uToken,proto3" json:"uToken,omitempty"`
	Rewards  github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,2,rep,name=rewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"rewards"`
	Exponent uint32                                      `protobuf:"varint,3,opt,name=exponent,proto3" json:"exponent,omitempty"`
}

RewardAccumulator is a global reward tracking struct that indicates the amount of rewards that a reference amount of a bonded uToken denom would have accumulated if it was bonded since genesis. To prevent rounding issues, the reference amount is 10^exponent of the uToken's smallest possible amount, generally matching the exponent of the associated base token registered with the leverage module.

func NewRewardAccumulator

func NewRewardAccumulator(uDenom string, exponent uint32, coins sdk.DecCoins) RewardAccumulator

NewRewardAccumulator creates the RewardAccumulator struct used in GenesisState

func (*RewardAccumulator) Descriptor

func (*RewardAccumulator) Descriptor() ([]byte, []int)

func (*RewardAccumulator) GetExponent

func (m *RewardAccumulator) GetExponent() uint32

func (*RewardAccumulator) GetRewards

func (*RewardAccumulator) GetUToken

func (m *RewardAccumulator) GetUToken() string

func (*RewardAccumulator) Marshal

func (m *RewardAccumulator) Marshal() (dAtA []byte, err error)

func (*RewardAccumulator) MarshalTo

func (m *RewardAccumulator) MarshalTo(dAtA []byte) (int, error)

func (*RewardAccumulator) MarshalToSizedBuffer

func (m *RewardAccumulator) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RewardAccumulator) ProtoMessage

func (*RewardAccumulator) ProtoMessage()

func (*RewardAccumulator) Reset

func (m *RewardAccumulator) Reset()

func (*RewardAccumulator) Size

func (m *RewardAccumulator) Size() (n int)

func (*RewardAccumulator) String

func (m *RewardAccumulator) String() string

func (*RewardAccumulator) Unmarshal

func (m *RewardAccumulator) Unmarshal(dAtA []byte) error

func (RewardAccumulator) Validate

func (ra RewardAccumulator) Validate() error

func (*RewardAccumulator) XXX_DiscardUnknown

func (m *RewardAccumulator) XXX_DiscardUnknown()

func (*RewardAccumulator) XXX_Marshal

func (m *RewardAccumulator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RewardAccumulator) XXX_Merge

func (m *RewardAccumulator) XXX_Merge(src proto.Message)

func (*RewardAccumulator) XXX_Size

func (m *RewardAccumulator) XXX_Size() int

func (*RewardAccumulator) XXX_Unmarshal

func (m *RewardAccumulator) XXX_Unmarshal(b []byte) error

type RewardTracker

type RewardTracker struct {
	Account string                                      `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	UToken  string                                      `protobuf:"bytes,2,opt,name=uToken,proto3" json:"uToken,omitempty"`
	Rewards github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,3,rep,name=rewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"rewards"`
}

RewardTracker tracks the value of a given 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 uToken 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.

func NewRewardTracker

func NewRewardTracker(addr, uDenom string, coins sdk.DecCoins) RewardTracker

NewRewardTracker creates the RewardTracker struct used in GenesisState

func (*RewardTracker) Descriptor

func (*RewardTracker) Descriptor() ([]byte, []int)

func (*RewardTracker) GetAccount

func (m *RewardTracker) GetAccount() string

func (*RewardTracker) GetRewards

func (*RewardTracker) GetUToken

func (m *RewardTracker) GetUToken() string

func (*RewardTracker) Marshal

func (m *RewardTracker) Marshal() (dAtA []byte, err error)

func (*RewardTracker) MarshalTo

func (m *RewardTracker) MarshalTo(dAtA []byte) (int, error)

func (*RewardTracker) MarshalToSizedBuffer

func (m *RewardTracker) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*RewardTracker) ProtoMessage

func (*RewardTracker) ProtoMessage()

func (*RewardTracker) Reset

func (m *RewardTracker) Reset()

func (*RewardTracker) Size

func (m *RewardTracker) Size() (n int)

func (*RewardTracker) String

func (m *RewardTracker) String() string

func (*RewardTracker) Unmarshal

func (m *RewardTracker) Unmarshal(dAtA []byte) error

func (RewardTracker) Validate

func (rt RewardTracker) Validate() error

func (*RewardTracker) XXX_DiscardUnknown

func (m *RewardTracker) XXX_DiscardUnknown()

func (*RewardTracker) XXX_Marshal

func (m *RewardTracker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RewardTracker) XXX_Merge

func (m *RewardTracker) XXX_Merge(src proto.Message)

func (*RewardTracker) XXX_Size

func (m *RewardTracker) XXX_Size() int

func (*RewardTracker) XXX_Unmarshal

func (m *RewardTracker) XXX_Unmarshal(b []byte) error

type Unbonding

type Unbonding struct {
	Start  int64      `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
	End    int64      `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
	UToken types.Coin `protobuf:"bytes,3,opt,name=uToken,proto3" json:"uToken"`
}

Unbonding is a structure that tracks an in-progress token unbonding. It tracks both its start time and end time, so that if the module's unbonding time changes, the unbonding can complete at the earlier of its original end time or its new one based on the new parameter.

func NewUnbonding

func NewUnbonding(startTime, endTime int64, coin sdk.Coin) Unbonding

NewUnbonding creates the Unbonding struct used in GenesisState

func (*Unbonding) Descriptor

func (*Unbonding) Descriptor() ([]byte, []int)

func (*Unbonding) GetEnd

func (m *Unbonding) GetEnd() int64

func (*Unbonding) GetStart

func (m *Unbonding) GetStart() int64

func (*Unbonding) GetUToken

func (m *Unbonding) GetUToken() types.Coin

func (*Unbonding) Marshal

func (m *Unbonding) Marshal() (dAtA []byte, err error)

func (*Unbonding) MarshalTo

func (m *Unbonding) MarshalTo(dAtA []byte) (int, error)

func (*Unbonding) MarshalToSizedBuffer

func (m *Unbonding) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Unbonding) ProtoMessage

func (*Unbonding) ProtoMessage()

func (*Unbonding) Reset

func (m *Unbonding) Reset()

func (*Unbonding) Size

func (m *Unbonding) Size() (n int)

func (*Unbonding) String

func (m *Unbonding) String() string

func (*Unbonding) Unmarshal

func (m *Unbonding) Unmarshal(dAtA []byte) error

func (Unbonding) Validate

func (u Unbonding) Validate() error

func (*Unbonding) XXX_DiscardUnknown

func (m *Unbonding) XXX_DiscardUnknown()

func (*Unbonding) XXX_Marshal

func (m *Unbonding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Unbonding) XXX_Merge

func (m *Unbonding) XXX_Merge(src proto.Message)

func (*Unbonding) XXX_Size

func (m *Unbonding) XXX_Size() int

func (*Unbonding) XXX_Unmarshal

func (m *Unbonding) XXX_Unmarshal(b []byte) error

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) BeginUnbonding

func (*UnimplementedMsgServer) Bond

func (*UnimplementedMsgServer) Claim

func (*UnimplementedMsgServer) EmergencyUnbond

func (*UnimplementedMsgServer) GovCreatePrograms

func (*UnimplementedMsgServer) GovSetParams

func (*UnimplementedMsgServer) Sponsor

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) AccountBonds

func (*UnimplementedQueryServer) ActualRates

func (*UnimplementedQueryServer) CurrentRates

func (*UnimplementedQueryServer) IncentiveProgram

func (*UnimplementedQueryServer) LastRewardTime

func (*UnimplementedQueryServer) OngoingIncentivePrograms

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) PendingRewards

func (*UnimplementedQueryServer) TotalBonded

func (*UnimplementedQueryServer) TotalUnbonding

Directories

Path Synopsis
client
cli

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL