Documentation
¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AddDepositReward(ctx sdk.Context, address string, amount sdk.Coin)
- func (k Keeper) AddWithdrawReward(ctx sdk.Context, address string, amount sdk.Coin)
- func (k Keeper) DepositIncentiveEnabled(ctx sdk.Context) bool
- func (k Keeper) DepositRewardDenom(ctx sdk.Context) string
- func (k Keeper) DistributeDepositReward(ctx sdk.Context, address string) error
- func (k Keeper) DistributeWithdrawReward(ctx sdk.Context, address string) error
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetRewardStats(ctx sdk.Context) *types.RewardStats
- func (k Keeper) GetRewards(ctx sdk.Context, address string) *types.Rewards
- func (k Keeper) HasRewards(ctx sdk.Context, address string) bool
- func (k Keeper) IncentiveEnabled(ctx sdk.Context) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) RewardPerDeposit(ctx sdk.Context) sdk.Coin
- func (k Keeper) RewardPerWithdraw(ctx sdk.Context) sdk.Coin
- func (k Keeper) RewardStats(goCtx context.Context, req *types.QueryRewardStatsRequest) (*types.QueryRewardStatsResponse, error)
- func (k Keeper) Rewards(goCtx context.Context, req *types.QueryRewardsRequest) (*types.QueryRewardsResponse, error)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetRewardStats(ctx sdk.Context, rewardStats *types.RewardStats)
- func (k Keeper) SetRewards(ctx sdk.Context, rewards *types.Rewards)
- func (k Keeper) UpdateRewardStats(ctx sdk.Context, address string, reward sdk.Coin)
- func (k Keeper) WithdrawIncentiveEnabled(ctx sdk.Context) bool
- func (k Keeper) WithdrawRewardDenom(ctx sdk.Context) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
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 ¶
AddDepositReward adds the deposit reward for the specified address by the given amount
func (Keeper) AddWithdrawReward ¶
AddWithdrawReward adds the withdrawal reward for the specified address by the given amount
func (Keeper) DepositIncentiveEnabled ¶
DepositIncentiveEnabled returns true if the incentive is enabled for deposit, false otherwise
func (Keeper) DepositRewardDenom ¶
DepositRewardDenom returns the denom for deposit reward
func (Keeper) DistributeDepositReward ¶
DistributeDepositReward distributes reward for deposit
func (Keeper) DistributeWithdrawReward ¶
DistributeWithdrawReward distributes reward for withdrawal
func (Keeper) GetRewardStats ¶
func (k Keeper) GetRewardStats(ctx sdk.Context) *types.RewardStats
GetRewardStats gets the reward statistics
func (Keeper) GetRewards ¶
GetRewards gets the rewards of the given address
func (Keeper) HasRewards ¶
HasRewards returns true if the given address has received rewards, false otherwise
func (Keeper) IncentiveEnabled ¶
IncentiveEnabled returns true if the incentive mechanism is enabled, false otherwise
func (Keeper) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) RewardPerDeposit ¶
RewardPerDeposit returns the reward amount for each deposit
func (Keeper) RewardPerWithdraw ¶
RewardPerWithdraw returns the reward amount for each withdrawal
func (Keeper) RewardStats ¶
func (k Keeper) RewardStats(goCtx context.Context, req *types.QueryRewardStatsRequest) (*types.QueryRewardStatsResponse, error)
func (Keeper) Rewards ¶
func (k Keeper) Rewards(goCtx context.Context, req *types.QueryRewardsRequest) (*types.QueryRewardsResponse, error)
func (Keeper) SetRewardStats ¶
func (k Keeper) SetRewardStats(ctx sdk.Context, rewardStats *types.RewardStats)
SetRewardStats sets the reward statistics
func (Keeper) SetRewards ¶
SetRewards sets the given rewards
func (Keeper) UpdateRewardStats ¶
UpdateRewardStats updates the reward statistics
func (Keeper) WithdrawIncentiveEnabled ¶
WithdrawIncentiveEnabled returns true if the incentive is enabled for withdrawal, false otherwise