keeper

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(k Keeper) types.MsgServer

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

Types

type Hooks

type Hooks struct {
	keeper.Hooks
	// contains filtered or unexported fields
}

func (Hooks) AfterValidatorRemoved

func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress) error

AfterValidatorRemoved performs clean up after a validator is removed

func (Hooks) BeforeDelegationSharesModified

func (h Hooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error

BeforeDelegationSharesModified withdraw delegation rewards (which also increments period)

type Keeper

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

func NewKeeper

func NewKeeper(keeper keeper.Keeper, bankKeeper types.BankKeeper, stakingKeeper types.StakingKeeper) Keeper

NewKeeper creates a new distribution Keeper instance

func (Keeper) AfterWithdrawDelegationRewards

func (k Keeper) AfterWithdrawDelegationRewards(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, rewards sdk.Coins) error

func (Keeper) AfterWithdrawValidatorCommission

func (k Keeper) AfterWithdrawValidatorCommission(ctx sdk.Context, valAddr sdk.ValAddress, commission sdk.Coins) error

func (Keeper) Hooks

func (k Keeper) Hooks() Hooks

Hooks create new distribution hooks

func (*Keeper) SetHooks

func (k *Keeper) SetHooks(hooks distributiontypes.DistributionHooks) *Keeper

SetHooks sets the distribution hooks

func (Keeper) WithdrawDelegationRewards

func (k Keeper) WithdrawDelegationRewards(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (sdk.Coins, error)

WithdrawDelegationRewards withdraw rewards from a delegation

Jump to

Keyboard shortcuts

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