keeper

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: Apache-2.0 Imports: 16 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 Hooks

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

Wrapper struct

func (Hooks) AfterDelegationModified

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

create new delegation period record

func (Hooks) AfterValidatorBeginUnbonding

func (h Hooks) AfterValidatorBeginUnbonding(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error

func (Hooks) AfterValidatorBonded

func (h Hooks) AfterValidatorBonded(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error

func (Hooks) AfterValidatorCreated

func (h Hooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error

initialize validator distribution record

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) BeforeDelegationCreated

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

increment period

func (Hooks) BeforeDelegationRemoved

func (h Hooks) BeforeDelegationRemoved(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error

func (Hooks) BeforeDelegationSharesModified

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

withdraw delegation rewards (which also increments period)

func (Hooks) BeforeValidatorModified

func (h Hooks) BeforeValidatorModified(_ sdk.Context, _ sdk.ValAddress) error

func (Hooks) BeforeValidatorSlashed

func (h Hooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) error

record the slash event

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	ps paramtypes.Subspace,
	bankKeeper types.BankKeeper,
	sudoKeeper types.SudoKeeper,
	feeCollectorName string,
) *Keeper

func (Keeper) AddDelegatorAddressToWhitelist

func (k Keeper) AddDelegatorAddressToWhitelist(ctx sdk.Context, delegatorAddress sdk.AccAddress)

func (Keeper) AddValAddressToWhitelist

func (k Keeper) AddValAddressToWhitelist(ctx sdk.Context, valAddress sdk.ValAddress)

func (Keeper) BondedRatio

func (k Keeper) BondedRatio(ctx sdk.Context) sdk.Dec

impl for mint keeper

func (Keeper) GetBankKeeper

func (k Keeper) GetBankKeeper() types.BankKeeper

func (Keeper) GetDelegatorAddressWhitelist

func (k Keeper) GetDelegatorAddressWhitelist(ctx sdk.Context) []string

func (Keeper) GetDelegatorWhitelistSwitch

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

func (Keeper) GetFeeCollectorName

func (k Keeper) GetFeeCollectorName() string

func (Keeper) GetInflationBase

func (k Keeper) GetInflationBase(ctx sdk.Context) (sdk.Int, bool)

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetValAddressWhitelist

func (k Keeper) GetValAddressWhitelist(ctx sdk.Context) []string

func (Keeper) GetValidatorWhitelistSwitch

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

func (Keeper) HasDelegatorAddressInWhitelist

func (k Keeper) HasDelegatorAddressInWhitelist(ctx sdk.Context, delegatorAddress sdk.AccAddress) bool

func (Keeper) HasValAddressInWhitelist

func (k Keeper) HasValAddressInWhitelist(ctx sdk.Context, valAddress sdk.ValAddress) bool

func (Keeper) Hooks

func (k Keeper) Hooks() Hooks

Create new distribution hooks

func (Keeper) Logger

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

func (Keeper) MintCoins

func (k Keeper) MintCoins(ctx sdk.Context, newCoins sdk.Coins) error

func (Keeper) Params

func (Keeper) RemoveDelegatorAddressFromWhitelist added in v0.2.1

func (k Keeper) RemoveDelegatorAddressFromWhitelist(ctx sdk.Context, delegatorAddress sdk.AccAddress)

func (Keeper) SetDelegatorWhitelistSwitch

func (k Keeper) SetDelegatorWhitelistSwitch(ctx sdk.Context, isOpen bool)

func (Keeper) SetInflationBase

func (k Keeper) SetInflationBase(ctx sdk.Context, inflationBase sdk.Int)

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SetValidatorWhitelistSwitch

func (k Keeper) SetValidatorWhitelistSwitch(ctx sdk.Context, isOpen bool)

func (Keeper) StakingTokenSupply

func (k Keeper) StakingTokenSupply(ctx sdk.Context) sdk.Int

impl for mint keeper

func (Keeper) ToggleDelegatorWhitelistSwitch

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

func (Keeper) ToggleValidatorWhitelistSwitch

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

Jump to

Keyboard shortcuts

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