keeper

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	bankKeeper types.BankKeeper,
	authority string,
) Keeper

func (Keeper) AddDepositReward

func (k Keeper) AddDepositReward(ctx sdk.Context, address string, amount sdk.Coin)

AddDepositReward adds the deposit reward for the specified address by the given amount

func (Keeper) AddWithdrawReward

func (k Keeper) AddWithdrawReward(ctx sdk.Context, address string, amount sdk.Coin)

AddWithdrawReward adds the withdrawal reward for the specified address by the given amount

func (Keeper) DepositIncentiveEnabled

func (k Keeper) DepositIncentiveEnabled(ctx sdk.Context) bool

DepositIncentiveEnabled returns true if the incentive is enabled for deposit, false otherwise

func (Keeper) DepositRewardDenom

func (k Keeper) DepositRewardDenom(ctx sdk.Context) string

DepositRewardDenom returns the denom for deposit reward

func (Keeper) DistributeDepositReward

func (k Keeper) DistributeDepositReward(ctx sdk.Context, address string) error

DistributeDepositReward distributes reward for deposit

func (Keeper) DistributeWithdrawReward

func (k Keeper) DistributeWithdrawReward(ctx sdk.Context, address string) error

DistributeWithdrawReward distributes reward for withdrawal

func (Keeper) GetParams

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

func (Keeper) GetRewardStats

func (k Keeper) GetRewardStats(ctx sdk.Context) *types.RewardStats

GetRewardStats gets the reward statistics

func (Keeper) GetRewards

func (k Keeper) GetRewards(ctx sdk.Context, address string) *types.Rewards

GetRewards gets the rewards of the given address

func (Keeper) HasRewards

func (k Keeper) HasRewards(ctx sdk.Context, address string) bool

HasRewards returns true if the given address has received rewards, false otherwise

func (Keeper) IncentiveEnabled

func (k Keeper) IncentiveEnabled(ctx sdk.Context) bool

IncentiveEnabled returns true if the incentive mechanism is enabled, false otherwise

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) RewardPerDeposit

func (k Keeper) RewardPerDeposit(ctx sdk.Context) sdk.Coin

RewardPerDeposit returns the reward amount for each deposit

func (Keeper) RewardPerWithdraw

func (k Keeper) RewardPerWithdraw(ctx sdk.Context) sdk.Coin

RewardPerWithdraw returns the reward amount for each withdrawal

func (Keeper) Rewards

func (Keeper) SetParams

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

func (Keeper) SetRewardStats

func (k Keeper) SetRewardStats(ctx sdk.Context, rewardStats *types.RewardStats)

SetRewardStats sets the reward statistics

func (Keeper) SetRewards

func (k Keeper) SetRewards(ctx sdk.Context, rewards *types.Rewards)

SetRewards sets the given rewards

func (Keeper) UpdateRewardStats

func (k Keeper) UpdateRewardStats(ctx sdk.Context, address string, reward sdk.Coin)

UpdateRewardStats updates the reward statistics

func (Keeper) WithdrawIncentiveEnabled

func (k Keeper) WithdrawIncentiveEnabled(ctx sdk.Context) bool

WithdrawIncentiveEnabled returns true if the incentive is enabled for withdrawal, false otherwise

func (Keeper) WithdrawRewardDenom

func (k Keeper) WithdrawRewardDenom(ctx sdk.Context) string

WithdrawRewardDenom returns the denom for withdrawal reward

Jump to

Keyboard shortcuts

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