keeper

package
v0.4.0-dev.6 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PubKeyRegistrationInvariant

func PubKeyRegistrationInvariant(k *Keeper) sdk.Invariant

PubKeyRegistrationInvariant checks for the invariant that once the secp256k1 proving scheme is enabled, all validators have registered their public keys.

func RegisterInvariants

func RegisterInvariants(ir sdk.InvariantRegistry, k *Keeper)

RegisterInvariants registers all staking invariants.

Types

type Keeper added in v0.0.6

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

func NewKeeper added in v0.0.6

func NewKeeper(sdkStakingKeeper *sdkkeeper.Keeper, valAddrCdc addresscodec.Codec) *Keeper

func (*Keeper) SetHooks added in v0.0.6

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

func (*Keeper) SetPubKeyKeeper

func (k *Keeper) SetPubKeyKeeper(pubKeyKeeper types.PubKeyKeeper)

func (Keeper) TransferDelegation added in v0.0.6

func (k Keeper) TransferDelegation(ctx context.Context, fromAddr, toAddr sdk.AccAddress, valAddr sdk.ValAddress, wantShares sdkmath.LegacyDec) (sdkmath.LegacyDec, error)

NOTE: This code was taken from https://github.com/agoric-labs/cosmos-sdk/blob/f42d86980ddfc07869846c391a03622cbd7e9188/x/staking/keeper/delegation.go#L701 with slight modifications.

TransferDelegation changes the ownership of at most the desired number of shares. Returns the actual number of shares transferred. Will also transfer redelegation entries to ensure that all redelegations are matched by sufficient shares. Note that no tokens are transferred to or from any pool or account, since no delegation is actually changing state.

func (Keeper) TransferUnbonding added in v0.0.6

func (k Keeper) TransferUnbonding(ctx context.Context, fromAddr, toAddr sdk.AccAddress, valAddr sdk.ValAddress, wantAmt sdkmath.Int) (sdkmath.Int, error)

NOTE: This code was taken from https://github.com/agoric-labs/cosmos-sdk/blob/f42d86980ddfc07869846c391a03622cbd7e9188/x/staking/keeper/delegation.go#L979 with slight modifications.

TransferUnbonding changes the ownership of UnbondingDelegation entries until the desired number of tokens have changed hands. Returns the actual number of tokens transferred.

type StakingMsgServer

type StakingMsgServer interface {
	stakingtypes.MsgServer
	types.MsgServer
}

StakingMsgServer is the full staking module msg server that combines SDK and SEDA msg servers.

func NewMsgServerImpl

func NewMsgServerImpl(sdkMsgServer stakingtypes.MsgServer, keeper *Keeper) StakingMsgServer

Jump to

Keyboard shortcuts

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