Documentation ¶
Index ¶
- func NewMsgServerImpl(sdkMsgServer stakingtypes.MsgServer, keeper *Keeper, ...) types.MsgServer
- type Keeper
- func (k *Keeper) SetHooks(sh types.StakingHooks)
- func (k Keeper) TransferDelegation(ctx context.Context, fromAddr, toAddr sdk.AccAddress, valAddr sdk.ValAddress, ...) (sdkmath.LegacyDec, error)
- func (k Keeper) TransferUnbonding(ctx context.Context, fromAddr, toAddr sdk.AccAddress, valAddr sdk.ValAddress, ...) (sdkmath.Int, error)
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
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 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.