keeper

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(sdkMsgServer stakingtypes.MsgServer, keeper *Keeper, accKeeper types.AccountKeeper, randKeeper types.RandomnessKeeper) types.MsgServer

Types

type Keeper added in v0.0.6

type Keeper struct {
	*sdkkeeper.Keeper
}

func NewKeeper added in v0.0.6

func NewKeeper(sdkStakingKeeper *sdkkeeper.Keeper) *Keeper

func (*Keeper) SetHooks added in v0.0.6

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

func (Keeper) TransferDelegation added in v0.0.6

func (k Keeper) TransferDelegation(ctx context.Context, fromAddr, toAddr sdk.AccAddress, valAddr sdk.ValAddress, wantShares math.LegacyDec) (math.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 math.Int) (math.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.

Jump to

Keyboard shortcuts

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