keeper

package
v0.23.5 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 21 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,
	ps paramtypes.Subspace,
	bankKeeper types.BankKeeper,
	accountKeeper types.AccountKeeper,
	epochstorageKeeper types.EpochstorageKeeper,
	specKeeper types.SpecKeeper,
) *Keeper

func (Keeper) BeginBlock added in v0.22.1

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

func (Keeper) Delegate added in v0.22.1

func (k Keeper) Delegate(ctx sdk.Context, delegator, provider, chainID string, amount sdk.Coin) error

Delegate lets a delegator delegate an amount of coins to a provider. (effective on next epoch)

func (Keeper) DelegatorProviders

func (Keeper) ExportDelegations

func (k Keeper) ExportDelegations(ctx sdk.Context) commontypes.GenesisState

ExportDelegations exports dualstaking delegations data (for genesis)

func (Keeper) ExportDelegators

func (k Keeper) ExportDelegators(ctx sdk.Context) commontypes.GenesisState

ExportDelegators exports dualstaking delegators data (for genesis)

func (Keeper) ExportUnbondings added in v0.22.1

func (k Keeper) ExportUnbondings(ctx sdk.Context) []commontypes.RawMessage

ExportUnbondings exports dualstaking unbonding timers data (for genesis)

func (Keeper) GetBondedPool added in v0.22.1

func (k Keeper) GetBondedPool(ctx sdk.Context) (bondedPool authtypes.ModuleAccountI)

GetBondedPool returns the bonded tokens pool's module account

func (Keeper) GetDelegatorProviders

func (k Keeper) GetDelegatorProviders(ctx sdk.Context, delegator string, epoch uint64) (providers []string, err error)

GetDelegatorProviders gets all the providers the delegator is delegated to

func (Keeper) GetNotBondedPool added in v0.22.1

func (k Keeper) GetNotBondedPool(ctx sdk.Context) (notBondedPool authtypes.ModuleAccountI)

GetNotBondedPool returns the not bonded tokens pool's module account

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) InitDelegations

func (k Keeper) InitDelegations(ctx sdk.Context, data commontypes.GenesisState)

InitDelegations imports dualstaking delegations data (from genesis)

func (Keeper) InitDelegators

func (k Keeper) InitDelegators(ctx sdk.Context, data commontypes.GenesisState)

InitDelegators imports dualstaking delegators data (from genesis)

func (Keeper) InitUnbondings added in v0.22.1

func (k Keeper) InitUnbondings(ctx sdk.Context, data []commontypes.RawMessage)

InitUnbondings imports subscriptions timers data (from genesis)

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) Redelegate

func (k Keeper) Redelegate(ctx sdk.Context, delegator, from, to, fromChainID, toChainID string, amount sdk.Coin) error

Redelegate lets a delegator transfer its delegation between providers, but without the funds being subject to unstakeHoldBlocks witholding period. (effective on next epoch)

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) TotalBondedTokens added in v0.22.1

func (k Keeper) TotalBondedTokens(ctx sdk.Context) math.Int

totalBondedTokens total staking tokens supply which is bonded

func (Keeper) TotalNotBondedTokens added in v0.22.1

func (k Keeper) TotalNotBondedTokens(ctx sdk.Context) math.Int

totalNotBondedTokens total staking tokens supply which is not bonded

func (Keeper) Unbond added in v0.22.1

func (k Keeper) Unbond(ctx sdk.Context, delegator, provider, chainID string, amount sdk.Coin) error

Unbond lets a delegator get its delegated coins back from a provider. The delegation ends immediately, but coins are held for unstakeHoldBlocks period before released and transferred back to the delegator. The rewards from the provider will be updated accordingly (or terminate) from the next epoch. (effective on next epoch)

Jump to

Keyboard shortcuts

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