Documentation ¶
Index ¶
- type Keeper
- func (k Keeper) Balances(goCtx context.Context, req *types.QueryBalancesRequest) (*types.QueryBalancesResponse, error)
- func (k Keeper) Clawback(goCtx context.Context, msg *types.MsgClawback) (*types.MsgClawbackResponse, error)
- func (k Keeper) CreateClawbackVestingAccount(goCtx context.Context, msg *types.MsgCreateClawbackVestingAccount) (*types.MsgCreateClawbackVestingAccountResponse, error)
- func (k Keeper) GetDelegatorBonded(ctx sdk.Context, delegator sdk.AccAddress) sdk.Int
- func (k Keeper) GetDelegatorUnbonding(ctx sdk.Context, delegator sdk.AccAddress) sdk.Int
- func (k Keeper) IterateDelegatorDelegations(ctx sdk.Context, delegator sdk.AccAddress, ...)
- func (k Keeper) IterateDelegatorRedelegations(ctx sdk.Context, delegator sdk.AccAddress, ...)
- func (k Keeper) IterateDelegatorUnbondingDelegations(ctx sdk.Context, delegator sdk.AccAddress, ...)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) TransferDelegation(ctx sdk.Context, fromAddr, toAddr sdk.AccAddress, valAddr sdk.ValAddress, ...) sdk.Dec
- func (k Keeper) TransferUnbonding(ctx sdk.Context, fromAddr, toAddr sdk.AccAddress, valAddr sdk.ValAddress, ...) sdk.Int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of this module maintains collections of vesting.
func NewKeeper ¶
func NewKeeper( storeKey sdk.StoreKey, cdc codec.BinaryCodec, ak types.AccountKeeper, bk types.BankKeeper, sk types.StakingKeeper, ) Keeper
NewKeeper creates new instances of the vesting Keeper
func (Keeper) Balances ¶
func (k Keeper) Balances( goCtx context.Context, req *types.QueryBalancesRequest, ) (*types.QueryBalancesResponse, error)
Balances returns the locked, unvested and vested amount of tokens for a clawback vesting account
func (Keeper) Clawback ¶
func (k Keeper) Clawback( goCtx context.Context, msg *types.MsgClawback, ) (*types.MsgClawbackResponse, error)
Clawback removes the unvested amount from a ClawbackVestingAccount. The destination defaults to the funder address, but can be overridden.
func (Keeper) CreateClawbackVestingAccount ¶
func (k Keeper) CreateClawbackVestingAccount( goCtx context.Context, msg *types.MsgCreateClawbackVestingAccount, ) (*types.MsgCreateClawbackVestingAccountResponse, error)
CreateClawbackVestingAccount creates a new ClawbackVestingAccount, or merges a grant into an existing one.
func (Keeper) GetDelegatorBonded ¶
GetDelegatorBonded returs the total amount a delegator has bonded
func (Keeper) GetDelegatorUnbonding ¶
GetDelegatorUnbonding returns the total amount a delegator has unbonding
func (Keeper) IterateDelegatorDelegations ¶
func (k Keeper) IterateDelegatorDelegations( ctx sdk.Context, delegator sdk.AccAddress, cb func(delegation types.Delegation) (stop bool), )
IterateDelegatorDelegations iterates through one delegator's delegations
func (Keeper) IterateDelegatorRedelegations ¶
func (k Keeper) IterateDelegatorRedelegations( ctx sdk.Context, delegator sdk.AccAddress, fn func(red types.Redelegation) (stop bool), )
iterate through one delegator's redelegations
func (Keeper) IterateDelegatorUnbondingDelegations ¶
func (k Keeper) IterateDelegatorUnbondingDelegations( ctx sdk.Context, delegator sdk.AccAddress, cb func(ubd types.UnbondingDelegation) (stop bool), )
iterate through a delegator's unbonding delegations
func (Keeper) TransferDelegation ¶
func (k Keeper) TransferDelegation( ctx sdk.Context, fromAddr, toAddr sdk.AccAddress, valAddr sdk.ValAddress, wantShares sdk.Dec, ) sdk.Dec
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 ¶
func (k Keeper) TransferUnbonding( ctx sdk.Context, fromAddr, toAddr sdk.AccAddress, valAddr sdk.ValAddress, wantAmt sdk.Int, ) sdk.Int
TransferUnbonding changes the ownership of UnbondingDelegation entries until the desired number of tokens have changed hands. Returns the actual number of tokens transferred.