keeper

package
v4.0.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SERIES_ONE = 1
)

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Keeper

type Keeper struct {
	GovKeeper govkeeper.Keeper
	// contains filtered or unexported fields
}

func (Keeper) BeginBlocker

func (k Keeper) BeginBlocker(ctx sdk.Context)

func (Keeper) CreateModuleAccount

func (k Keeper) CreateModuleAccount(ctx sdk.Context, name string, permissions ...string)

func (Keeper) CreateRewardsModuleAccount

func (k Keeper) CreateRewardsModuleAccount(ctx sdk.Context, params types.Params) error

func (Keeper) GetAllRewards

func (k Keeper) GetAllRewards(ctx sdk.Context) (list []types.Reward)

GetAllRewards returns all rewards

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the x/rewards module's authority.

func (Keeper) GetDecayedRewardAmount

func (k Keeper) GetDecayedRewardAmount(ctx sdk.Context, totalReward sdk.Coin, series types.Series) (sdk.Coin, error)

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (p types.Params)

GetParams get all parameters as types.Params

func (Keeper) GetParamsOfType

func (k Keeper) GetParamsOfType(ctx sdk.Context, p interface{})

func (Keeper) GetReward

func (k Keeper) GetReward(
	ctx sdk.Context,
	recipient string,

) (val types.Reward, found bool)

GetReward returns a rewards from its index

func (Keeper) GetTotalClaimableAmount

func (k Keeper) GetTotalClaimableAmount(ctx sdk.Context, addr string, totalReward sdk.Coin) (sdk.Coin, error)

func (Keeper) IterateRewards

func (k Keeper) IterateRewards(ctx sdk.Context, fn func(validator types.Reward))

iterate through the rewards and perform the provided function

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) MintRewardsModuleAccount

func (k Keeper) MintRewardsModuleAccount(ctx sdk.Context, rp *types.RewardPool, accountName string) error

func (Keeper) Params

func (Keeper) RemoveReward

func (k Keeper) RemoveReward(
	ctx sdk.Context,
	recipient string,

)

RemoveReward removes a rewards from the store

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, p types.Params) error

SetParams set the params

func (Keeper) SetReward

func (k Keeper) SetReward(ctx sdk.Context, reward types.Reward)

SetReward set a specific rewards in the store from its index

func (Keeper) Tasks

func (Keeper) TransferRewardPoolBalance

func (k Keeper) TransferRewardPoolBalance(ctx sdk.Context, rewardPool *types.RewardPool, moduleAcc string) error

Jump to

Keyboard shortcuts

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