Documentation ¶
Index ¶
- Constants
- Variables
- func BeginBlocker(ctx sdk.Context, k Keeper)
- func InitGenesis(ctx sdk.Context, k Keeper, supplyKeeper types.SupplyKeeper, gs GenesisState)
- func NewHandler(k Keeper) sdk.Handler
- type AccountKeeper
- type AppModule
- func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock)
- func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
- func (AppModule) Name() string
- func (am AppModule) NewHandler() sdk.Handler
- func (am AppModule) NewQuerierHandler() sdk.Querier
- func (AppModule) QuerierRoute() string
- func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
- func (AppModule) Route() string
- func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.WeightedOperation
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis() json.RawMessage
- func (AppModuleBasic) GenerateGenesisState(simState *module.SimulationState)
- func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) ProposalContents(_ module.SimulationState) []sim.WeightedProposalContent
- func (AppModuleBasic) RandomizedParams(r *rand.Rand) []sim.ParamChange
- func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
- func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
- func (AppModuleBasic) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)
- func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
- type Claim
- type Claims
- type DelegatorDistributionSchedule
- type DelegatorDistributionSchedules
- type Deposit
- type DepositType
- type Deposits
- type DistributionSchedule
- type DistributionSchedules
- type GenesisDistributionTime
- type GenesisDistributionTimes
- type GenesisState
- type Keeper
- type MsgClaimReward
- type MsgDeposit
- type MsgWithdraw
- type Multiplier
- type MultiplierName
- type Multipliers
- type Params
- type QueryAccountParams
- type QueryClaimParams
- type QueryDepositParams
- type StakingKeeper
- type SupplyKeeper
Constants ¶
const ( BeginningOfMonth = keeper.BeginningOfMonth MidMonth = keeper.MidMonth PaymentHour = keeper.PaymentHour AttributeKeyBlockHeight = types.AttributeKeyBlockHeight AttributeKeyClaimAmount = types.AttributeKeyClaimAmount AttributeKeyClaimHolder = types.AttributeKeyClaimHolder AttributeKeyClaimMultiplier = types.AttributeKeyClaimMultiplier AttributeKeyDeposit = types.AttributeKeyDeposit AttributeKeyDepositDenom = types.AttributeKeyDepositDenom AttributeKeyDepositType = types.AttributeKeyDepositType AttributeKeyDepositor = types.AttributeKeyDepositor AttributeKeyRewardsDistribution = types.AttributeKeyRewardsDistribution AttributeValueCategory = types.AttributeValueCategory DefaultParamspace = types.DefaultParamspace DelegatorAccount = types.DelegatorAccount EventTypeClaimHarvestReward = types.EventTypeClaimHarvestReward EventTypeDeleteHarvestDeposit = types.EventTypeDeleteHarvestDeposit EventTypeHarvestDelegatorDistribution = types.EventTypeHarvestDelegatorDistribution EventTypeHarvestDeposit = types.EventTypeHarvestDeposit EventTypeHarvestLPDistribution = types.EventTypeHarvestLPDistribution EventTypeHarvestWithdrawal = types.EventTypeHarvestWithdrawal LP = types.LP LPAccount = types.LPAccount Large = types.Large Medium = types.Medium ModuleAccountName = types.ModuleAccountName ModuleName = types.ModuleName QuerierRoute = types.QuerierRoute QueryGetClaims = types.QueryGetClaims QueryGetDeposits = types.QueryGetDeposits QueryGetModuleAccounts = types.QueryGetModuleAccounts QueryGetParams = types.QueryGetParams RouterKey = types.RouterKey Small = types.Small Stake = types.Stake StoreKey = types.StoreKey )
Variables ¶
var ( // function aliases NewKeeper = keeper.NewKeeper NewQuerier = keeper.NewQuerier ClaimKey = types.ClaimKey DefaultGenesisState = types.DefaultGenesisState DefaultParams = types.DefaultParams DepositKey = types.DepositKey DepositTypeIteratorKey = types.DepositTypeIteratorKey GetTotalVestingPeriodLength = types.GetTotalVestingPeriodLength NewClaim = types.NewClaim NewDelegatorDistributionSchedule = types.NewDelegatorDistributionSchedule NewDeposit = types.NewDeposit NewDistributionSchedule = types.NewDistributionSchedule NewGenesisState = types.NewGenesisState NewMsgClaimReward = types.NewMsgClaimReward NewMsgDeposit = types.NewMsgDeposit NewMsgWithdraw = types.NewMsgWithdraw NewMultiplier = types.NewMultiplier NewParams = types.NewParams NewPeriod = types.NewPeriod NewQueryAccountParams = types.NewQueryAccountParams NewQueryClaimParams = types.NewQueryClaimParams NewQueryDepositParams = types.NewQueryDepositParams ParamKeyTable = types.ParamKeyTable RegisterCodec = types.RegisterCodec // variable aliases ClaimsKeyPrefix = types.ClaimsKeyPrefix DefaultActive = types.DefaultActive DefaultClaims = types.DefaultClaims DefaultDelegatorSchedules = types.DefaultDelegatorSchedules DefaultDeposits = types.DefaultDeposits DefaultDistributionTimes = types.DefaultDistributionTimes DefaultGovSchedules = types.DefaultGovSchedules DefaultLPSchedules = types.DefaultLPSchedules DefaultPreviousBlockTime = types.DefaultPreviousBlockTime DepositTypesClaimQuery = types.DepositTypesClaimQuery DepositTypesDepositQuery = types.DepositTypesDepositQuery DepositsKeyPrefix = types.DepositsKeyPrefix ErrAccountNotFound = types.ErrAccountNotFound ErrClaimExpired = types.ErrClaimExpired ErrClaimNotFound = types.ErrClaimNotFound ErrDepositNotFound = types.ErrDepositNotFound ErrGovScheduleNotFound = types.ErrGovScheduleNotFound ErrInsufficientModAccountBalance = types.ErrInsufficientModAccountBalance ErrInvaliWithdrawAmount = types.ErrInvaliWithdrawAmount ErrInvalidAccountType = types.ErrInvalidAccountType ErrInvalidDepositDenom = types.ErrInvalidDepositDenom ErrInvalidDepositType = types.ErrInvalidDepositType ErrInvalidMultiplier = types.ErrInvalidMultiplier ErrInvalidReceiver = types.ErrInvalidReceiver ErrLPScheduleNotFound = types.ErrLPScheduleNotFound ErrZeroClaim = types.ErrZeroClaim GovDenom = types.GovDenom KeyActive = types.KeyActive KeyDelegatorSchedule = types.KeyDelegatorSchedule KeyLPSchedules = types.KeyLPSchedules ModuleCdc = types.ModuleCdc PreviousBlockTimeKey = types.PreviousBlockTimeKey PreviousDelegationDistributionKey = types.PreviousDelegationDistributionKey )
Functions ¶
func BeginBlocker ¶
BeginBlocker applies rewards to liquidity providers and delegators according to params
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, k Keeper, supplyKeeper types.SupplyKeeper, gs GenesisState)
InitGenesis initializes the store state from a genesis state.
func NewHandler ¶
NewHandler creates an sdk.Handler for harvest messages
Types ¶
type AccountKeeper ¶
type AccountKeeper = types.AccountKeeper
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule app module type
func NewAppModule ¶
func NewAppModule(keeper Keeper, supplyKeeper types.SupplyKeeper) AppModule
NewAppModule creates a new AppModule object
func (AppModule) BeginBlock ¶
func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock)
BeginBlock module begin-block
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate
EndBlock module end-block
func (AppModule) ExportGenesis ¶
func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage
ExportGenesis module export genesis
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate
InitGenesis module init-genesis
func (AppModule) NewHandler ¶
NewHandler module handler
func (AppModule) NewQuerierHandler ¶
NewQuerierHandler returns no sdk.Querier.
func (AppModule) QuerierRoute ¶
QuerierRoute module querier route name
func (AppModule) RegisterInvariants ¶
func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
RegisterInvariants register module invariants
func (AppModule) WeightedOperations ¶
func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.WeightedOperation
WeightedOperations returns the all the harvest module operations with their respective weights.
type AppModuleBasic ¶
type AppModuleBasic struct{}
AppModuleBasic app module basics object
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis() json.RawMessage
DefaultGenesis default genesis state
func (AppModuleBasic) GenerateGenesisState ¶
func (AppModuleBasic) GenerateGenesisState(simState *module.SimulationState)
GenerateGenesisState creates a randomized GenState of the harvest module
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command
GetQueryCmd returns no root query command for the harvest module.
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command
GetTxCmd returns the root tx command for the harvest module.
func (AppModuleBasic) ProposalContents ¶
func (AppModuleBasic) ProposalContents(_ module.SimulationState) []sim.WeightedProposalContent
ProposalContents doesn't return any content functions for governance proposals.
func (AppModuleBasic) RandomizedParams ¶
func (AppModuleBasic) RandomizedParams(r *rand.Rand) []sim.ParamChange
RandomizedParams returns nil because harvest has no params.
func (AppModuleBasic) RegisterCodec ¶
func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)
RegisterCodec register module codec
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)
RegisterRESTRoutes registers REST routes for the harvest module.
func (AppModuleBasic) RegisterStoreDecoder ¶
func (AppModuleBasic) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)
RegisterStoreDecoder registers a decoder for harvest module's types
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error
ValidateGenesis module validate genesis
type DelegatorDistributionSchedule ¶
type DelegatorDistributionSchedule = types.DelegatorDistributionSchedule
type DelegatorDistributionSchedules ¶
type DelegatorDistributionSchedules = types.DelegatorDistributionSchedules
type DepositType ¶
type DepositType = types.DepositType
type DistributionSchedule ¶
type DistributionSchedule = types.DistributionSchedule
type DistributionSchedules ¶
type DistributionSchedules = types.DistributionSchedules
type GenesisDistributionTime ¶
type GenesisDistributionTime = types.GenesisDistributionTime
type GenesisDistributionTimes ¶
type GenesisDistributionTimes = types.GenesisDistributionTimes
type GenesisState ¶
type GenesisState = types.GenesisState
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState
ExportGenesis export genesis state for harvest module
type MsgClaimReward ¶
type MsgClaimReward = types.MsgClaimReward
type MsgDeposit ¶
type MsgDeposit = types.MsgDeposit
type MsgWithdraw ¶
type MsgWithdraw = types.MsgWithdraw
type Multiplier ¶
type Multiplier = types.Multiplier
type MultiplierName ¶
type MultiplierName = types.MultiplierName
type Multipliers ¶
type Multipliers = types.Multipliers
type QueryAccountParams ¶
type QueryAccountParams = types.QueryAccountParams
type QueryClaimParams ¶
type QueryClaimParams = types.QueryClaimParams
type QueryDepositParams ¶
type QueryDepositParams = types.QueryDepositParams
type StakingKeeper ¶
type StakingKeeper = types.StakingKeeper
type SupplyKeeper ¶
type SupplyKeeper = types.SupplyKeeper