keeper

package
v0.1.0-warmage....-c068d24 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

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

func (Keeper) BeginRedelegation

func (k Keeper) BeginRedelegation(
	ctx sdk.Context, delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress, sharesAmount sdk.Dec,
) (completionTime time.Time, err error)

func (Keeper) BlockValidatorUpdates

func (k Keeper) BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate

BlockValidatorUpdates calculates the ValidatorUpdates for the current block Called in each EndBlock

func (*Keeper) CheckDenom

func (k *Keeper) CheckDenom(ctx sdk.Context)

func (Keeper) CompleteRedelegation

func (k Keeper) CompleteRedelegation(
	ctx sdk.Context, delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress,
) (sdk.Coins, error)

func (Keeper) CompleteUnbonding

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

func (Keeper) GetVeDelegatedAmount

func (k Keeper) GetVeDelegatedAmount(ctx sdk.Context, veID uint64) sdk.Int

func (Keeper) GetVeDelegation

func (k Keeper) GetVeDelegation(ctx sdk.Context,
	delAddr sdk.AccAddress, valAddr sdk.ValAddress) (delegation types.VeDelegation, found bool)

GetVeDelegation returns a specific ve delegation.

func (Keeper) GetVeRedelegation

func (k Keeper) GetVeRedelegation(
	ctx sdk.Context, delAddr sdk.AccAddress, valSrcAddr sdk.ValAddress, valDstAddr sdk.ValAddress,
) (red types.VeRedelegation, found bool)

func (Keeper) GetVeUnbondingDelegation

func (k Keeper) GetVeUnbondingDelegation(
	ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress,
) (ubd types.VeUnbondingDelegation, found bool)

func (Keeper) GetVeValidator

func (k Keeper) GetVeValidator(ctx sdk.Context, addr sdk.ValAddress) (validator types.VeValidator, found bool)

func (Keeper) RemoveVeDelegatedAmount

func (k Keeper) RemoveVeDelegatedAmount(ctx sdk.Context, veID uint64)

func (Keeper) RemoveVeDelegation

func (k Keeper) RemoveVeDelegation(ctx sdk.Context, delegation types.VeDelegation)

RemoveVeDelegation deletes a ve delegation.

func (Keeper) RemoveVeRedelegation

func (k Keeper) RemoveVeRedelegation(
	ctx sdk.Context, red types.VeRedelegation,
)

func (Keeper) RemoveVeUnbondingDelegation

func (k Keeper) RemoveVeUnbondingDelegation(
	ctx sdk.Context, ubd types.VeUnbondingDelegation,
)

func (Keeper) RemoveVeValidator

func (k Keeper) RemoveVeValidator(ctx sdk.Context, addr sdk.ValAddress)

func (*Keeper) SetHooks

func (k *Keeper) SetHooks(sh stakingtypes.StakingHooks) *Keeper

func (Keeper) SetVeDelegatedAmount

func (k Keeper) SetVeDelegatedAmount(ctx sdk.Context, veID uint64, amount sdk.Int)

func (Keeper) SetVeDelegation

func (k Keeper) SetVeDelegation(ctx sdk.Context, delegation types.VeDelegation)

SetVeDelegation sets a ve delegation.

func (Keeper) SetVeRedelegation

func (k Keeper) SetVeRedelegation(ctx sdk.Context, red types.VeRedelegation)

func (Keeper) SetVeRedelegationEntry

func (k Keeper) SetVeRedelegationEntry(
	ctx sdk.Context, delegatorAddr sdk.AccAddress, valSrcAddr sdk.ValAddress, valDstAddr sdk.ValAddress,
	totalAmount sdk.Int, veTokens types.VeTokensSlice, totalShares sdk.Dec,
) types.VeRedelegation

func (Keeper) SetVeUnbondingDelegation

func (k Keeper) SetVeUnbondingDelegation(ctx sdk.Context, ubd types.VeUnbondingDelegation)

func (Keeper) SetVeUnbondingDelegationEntry

func (k Keeper) SetVeUnbondingDelegationEntry(
	ctx sdk.Context, delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress,
	veTokens types.VeTokensSlice,
) types.VeUnbondingDelegation

func (Keeper) SetVeValidator

func (k Keeper) SetVeValidator(ctx sdk.Context, validator types.VeValidator)

func (Keeper) SettleVeDelegation

func (k Keeper) SettleVeDelegation(ctx sdk.Context, delegation types.VeDelegation, validator stakingtypes.Validator) types.VeDelegation

func (Keeper) Slash

func (k Keeper) Slash(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeight int64, power int64, slashFactor sdk.Dec)

func (Keeper) SlashRedelegation

func (k Keeper) SlashRedelegation(
	ctx sdk.Context,
	srcValidator stakingtypes.Validator,
	redelegation stakingtypes.Redelegation,
	infractionHeight int64,
	slashFactor sdk.Dec,
) (totalSlashAmount sdk.Int)

func (Keeper) SlashUnbondingDelegation

func (k Keeper) SlashUnbondingDelegation(
	ctx sdk.Context,
	unbondingDelegation stakingtypes.UnbondingDelegation,
	infractionHeight int64,
	slashFactor sdk.Dec,
) (totalSlashAmount sdk.Int)

func (Keeper) SlashVeDelegatedAmount

func (k Keeper) SlashVeDelegatedAmount(ctx sdk.Context, veID uint64, burnAmount sdk.Int)

func (Keeper) SubVeDelegatedAmount

func (k Keeper) SubVeDelegatedAmount(ctx sdk.Context, veID uint64, subAmount sdk.Int)

func (Keeper) Unbond

func (k Keeper) Unbond(
	ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, shares sdk.Dec, updateVeAmt bool,
) (amount sdk.Int, veTokens types.VeTokensSlice, err error)

func (Keeper) Undelegate

func (k Keeper) Undelegate(
	ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, sharesAmount sdk.Dec,
) (time.Time, error)

func (Keeper) VeDelegate

func (k Keeper) VeDelegate(
	ctx sdk.Context, delAddr sdk.AccAddress, bondAmt sdk.Int, veTokens types.VeTokensSlice,
	tokenSrc stakingtypes.BondStatus, validator stakingtypes.Validator, subtractAccount bool,
) (newShares sdk.Dec, err error)

type MsgServer

type MsgServer struct {
	stakingtypes.MsgServer
	Keeper
}

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) MsgServer

func (MsgServer) Delegate

func (MsgServer) VeDelegate

Jump to

Keyboard shortcuts

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