Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- type AdminKeeper
- type Keeper
- func (k Keeper) AccountLockIterator(ctx sdk.Context, isUnlocking bool, addr sdk.AccAddress) sdk.Iterator
- func (k Keeper) AccountLockIteratorAfterTime(ctx sdk.Context, isUnlocking bool, addr sdk.AccAddress, time time.Time) sdk.Iterator
- func (k Keeper) AccountLockIteratorAfterTimeDenom(ctx sdk.Context, isUnlocking bool, addr sdk.AccAddress, denom string, ...) sdk.Iterator
- func (k Keeper) AccountLockIteratorBeforeTime(ctx sdk.Context, isUnlocking bool, addr sdk.AccAddress, time time.Time) sdk.Iterator
- func (k Keeper) AccountLockIteratorBeforeTimeDenom(ctx sdk.Context, isUnlocking bool, addr sdk.AccAddress, denom string, ...) sdk.Iterator
- func (k Keeper) AccountLockIteratorDenom(ctx sdk.Context, isUnlocking bool, addr sdk.AccAddress, denom string) sdk.Iterator
- func (k Keeper) AccountLockIteratorDurationDenom(ctx sdk.Context, isUnlocking bool, addr sdk.AccAddress, denom string, ...) sdk.Iterator
- func (k Keeper) AccountLockIteratorLongerDuration(ctx sdk.Context, isUnlocking bool, addr sdk.AccAddress, duration time.Duration) sdk.Iterator
- func (k Keeper) AccountLockIteratorLongerDurationDenom(ctx sdk.Context, isUnlocking bool, addr sdk.AccAddress, denom string, ...) sdk.Iterator
- func (k Keeper) AccountLockIteratorShorterThanDuration(ctx sdk.Context, isUnlocking bool, addr sdk.AccAddress, duration time.Duration) sdk.Iterator
- func (k Keeper) AccountLockedCoins(goCtx context.Context, req *types.AccountLockedCoinsRequest) (*types.AccountLockedCoinsResponse, error)
- func (k Keeper) AccountLockedLongerDuration(goCtx context.Context, req *types.AccountLockedLongerDurationRequest) (*types.AccountLockedLongerDurationResponse, error)
- func (k Keeper) AccountLockedLongerDurationDenom(goCtx context.Context, req *types.AccountLockedLongerDurationDenomRequest) (*types.AccountLockedLongerDurationDenomResponse, error)
- func (k Keeper) AccountLockedLongerDurationNotUnlockingOnly(goCtx context.Context, ...) (*types.AccountLockedLongerDurationNotUnlockingOnlyResponse, error)
- func (k Keeper) AccountLockedPastTime(goCtx context.Context, req *types.AccountLockedPastTimeRequest) (*types.AccountLockedPastTimeResponse, error)
- func (k Keeper) AccountLockedPastTimeDenom(goCtx context.Context, req *types.AccountLockedPastTimeDenomRequest) (*types.AccountLockedPastTimeDenomResponse, error)
- func (k Keeper) AccountLockedPastTimeNotUnlockingOnly(goCtx context.Context, req *types.AccountLockedPastTimeNotUnlockingOnlyRequest) (*types.AccountLockedPastTimeNotUnlockingOnlyResponse, error)
- func (k Keeper) AccountUnlockableCoins(goCtx context.Context, req *types.AccountUnlockableCoinsRequest) (*types.AccountUnlockableCoinsResponse, error)
- func (k Keeper) AccountUnlockedBeforeTime(goCtx context.Context, req *types.AccountUnlockedBeforeTimeRequest) (*types.AccountUnlockedBeforeTimeResponse, error)
- func (k Keeper) AccountUnlockingCoins(goCtx context.Context, req *types.AccountUnlockingCoinsRequest) (*types.AccountUnlockingCoinsResponse, error)
- func (k Keeper) AddTokensToLockByID(ctx sdk.Context, owner sdk.AccAddress, lockID uint64, coins sdk.Coins) (*types.PeriodLock, error)
- func (k Keeper) BeginUnlock(ctx sdk.Context, lock types.PeriodLock) error
- func (k Keeper) BeginUnlockAllNotUnlockings(ctx sdk.Context, account sdk.AccAddress) ([]types.PeriodLock, sdk.Coins, error)
- func (k Keeper) BeginUnlockPeriodLockByID(ctx sdk.Context, LockID uint64) (*types.PeriodLock, error)
- func (k Keeper) ClearAccumulationStores(ctx sdk.Context)
- func (k Keeper) ClearAllAccumulationStores(ctx sdk.Context)
- func (k Keeper) ClearAllLockRefKeys(ctx sdk.Context)
- func (k Keeper) GetAccountLockedCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
- func (k Keeper) GetAccountLockedDurationNotUnlockingOnly(ctx sdk.Context, addr sdk.AccAddress, denom string, duration time.Duration) []types.PeriodLock
- func (k Keeper) GetAccountLockedLongerDuration(ctx sdk.Context, addr sdk.AccAddress, duration time.Duration) []types.PeriodLock
- func (k Keeper) GetAccountLockedLongerDurationDenom(ctx sdk.Context, addr sdk.AccAddress, denom string, duration time.Duration) []types.PeriodLock
- func (k Keeper) GetAccountLockedLongerDurationNotUnlockingOnly(ctx sdk.Context, addr sdk.AccAddress, duration time.Duration) []types.PeriodLock
- func (k Keeper) GetAccountLockedPastTime(ctx sdk.Context, addr sdk.AccAddress, timestamp time.Time) []types.PeriodLock
- func (k Keeper) GetAccountLockedPastTimeDenom(ctx sdk.Context, addr sdk.AccAddress, denom string, timestamp time.Time) []types.PeriodLock
- func (k Keeper) GetAccountLockedPastTimeNotUnlockingOnly(ctx sdk.Context, addr sdk.AccAddress, timestamp time.Time) []types.PeriodLock
- func (k Keeper) GetAccountPeriodLocks(ctx sdk.Context, addr sdk.AccAddress) []types.PeriodLock
- func (k Keeper) GetAccountUnlockableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
- func (k Keeper) GetAccountUnlockedBeforeTime(ctx sdk.Context, addr sdk.AccAddress, timestamp time.Time) []types.PeriodLock
- func (k Keeper) GetAccountUnlockingCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
- func (k Keeper) GetLastLockID(ctx sdk.Context) uint64
- func (k Keeper) GetLegacyPeriodLocks(ctx sdk.Context) ([]types.PeriodLock, error)
- func (k Keeper) GetLockByID(ctx sdk.Context, lockID uint64) (*types.PeriodLock, error)
- func (k Keeper) GetLockedDenom(ctx sdk.Context, denom string, duration time.Duration) sdk.Int
- func (k Keeper) GetLocksLongerThanDurationDenom(ctx sdk.Context, denom string, duration time.Duration) []types.PeriodLock
- func (k Keeper) GetLocksPastTimeDenom(ctx sdk.Context, denom string, timestamp time.Time) []types.PeriodLock
- func (k Keeper) GetModuleBalance(ctx sdk.Context) sdk.Coins
- func (k Keeper) GetModuleLockedCoins(ctx sdk.Context) sdk.Coins
- func (k Keeper) GetPeriodLocks(ctx sdk.Context) ([]types.PeriodLock, error)
- func (k Keeper) GetPeriodLocksAccumulation(ctx sdk.Context, query types.QueryCondition) sdk.Int
- func (k Keeper) LegacyBeginUnlock(ctx sdk.Context, lock types.PeriodLock) error
- func (k Keeper) LegacyLock(ctx sdk.Context, lock types.PeriodLock) error
- func (k Keeper) LegacyLockTokens(ctx sdk.Context, owner sdk.AccAddress, coins sdk.Coins, duration time.Duration) (types.PeriodLock, error)
- func (k Keeper) Lock(ctx sdk.Context, lock types.PeriodLock) error
- func (k Keeper) LockIterator(ctx sdk.Context, isUnlocking bool) sdk.Iterator
- func (k Keeper) LockIteratorAfterTime(ctx sdk.Context, isUnlocking bool, time time.Time) sdk.Iterator
- func (k Keeper) LockIteratorAfterTimeDenom(ctx sdk.Context, isUnlocking bool, denom string, time time.Time) sdk.Iterator
- func (k Keeper) LockIteratorBeforeTime(ctx sdk.Context, isUnlocking bool, time time.Time) sdk.Iterator
- func (k Keeper) LockIteratorBeforeTimeDenom(ctx sdk.Context, isUnlocking bool, denom string, time time.Time) sdk.Iterator
- func (k Keeper) LockIteratorDenom(ctx sdk.Context, isUnlocking bool, denom string) sdk.Iterator
- func (k Keeper) LockIteratorLongerThanDurationDenom(ctx sdk.Context, isUnlocking bool, denom string, duration time.Duration) sdk.Iterator
- func (k Keeper) LockTokens(ctx sdk.Context, owner sdk.AccAddress, coins sdk.Coins, duration time.Duration) (types.PeriodLock, error)
- func (k Keeper) LockedByID(goCtx context.Context, req *types.LockedRequest) (*types.LockedResponse, error)
- func (k Keeper) LockedDenom(goCtx context.Context, req *types.LockedDenomRequest) (*types.LockedDenomResponse, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) ModuleBalance(goCtx context.Context, req *types.ModuleBalanceRequest) (*types.ModuleBalanceResponse, error)
- func (k Keeper) ModuleLockedAmount(goCtx context.Context, req *types.ModuleLockedAmountRequest) (*types.ModuleLockedAmountResponse, error)
- func (k Keeper) ResetAllLocks(ctx sdk.Context, locks []types.PeriodLock) error
- func (k *Keeper) SetHooks(lh types.LockupHooks) *Keeper
- func (k Keeper) SetLastLockID(ctx sdk.Context, ID uint64)
- func (k Keeper) Unlock(ctx sdk.Context, lock types.PeriodLock) error
- func (k Keeper) UnlockPeriodLockByID(ctx sdk.Context, LockID uint64) (*types.PeriodLock, error)
- func (k Keeper) WithdrawAllMaturedLocks(ctx sdk.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an instance of MsgServer
func NewQuerier ¶
func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
NewQuerier returns an instance of querier
Types ¶
type AdminKeeper ¶
type AdminKeeper struct {
Keeper
}
AdminKeeper defines a god priviledge keeper functions to remove tokens from locks and create new locks For the governance system of token pools, we want a "ragequit" feature So governance changes will take 1 week to go into effect During that time, people can choose to "ragequit" which means they would leave the original pool and form a new pool with the old parameters but if they still had 2 months of lockup left, their liquidity still needs to be 2 month lockup-ed, just in the new pool And we need to replace their pool1 LP tokens with pool2 LP tokens with the same lock duration and end time
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper provides a way to manage module storage
func NewKeeper ¶
func NewKeeper(cdc codec.Codec, storeKey sdk.StoreKey, ak types.AccountKeeper, bk types.BankKeeper) *Keeper
NewKeeper returns an instance of Keeper
func (Keeper) AccountLockIterator ¶
func (k Keeper) AccountLockIterator(ctx sdk.Context, isUnlocking bool, addr sdk.AccAddress) sdk.Iterator
AccountLockIterator returns the iterator used for getting all locks by account
func (Keeper) AccountLockIteratorAfterTime ¶
func (k Keeper) AccountLockIteratorAfterTime(ctx sdk.Context, isUnlocking bool, addr sdk.AccAddress, time time.Time) sdk.Iterator
AccountLockIteratorAfterTime returns the iterator to get locked coins by account
func (Keeper) AccountLockIteratorAfterTimeDenom ¶
func (k Keeper) AccountLockIteratorAfterTimeDenom(ctx sdk.Context, isUnlocking bool, addr sdk.AccAddress, denom string, time time.Time) sdk.Iterator
AccountLockIteratorAfterTimeDenom returns the iterator to get locked coins by account and denom
func (Keeper) AccountLockIteratorBeforeTime ¶
func (k Keeper) AccountLockIteratorBeforeTime(ctx sdk.Context, isUnlocking bool, addr sdk.AccAddress, time time.Time) sdk.Iterator
AccountLockIteratorBeforeTime returns the iterator to get unlockable coins by account
func (Keeper) AccountLockIteratorBeforeTimeDenom ¶
func (k Keeper) AccountLockIteratorBeforeTimeDenom(ctx sdk.Context, isUnlocking bool, addr sdk.AccAddress, denom string, time time.Time) sdk.Iterator
AccountLockIteratorBeforeTimeDenom returns the iterator to get unlockable coins by account and denom
func (Keeper) AccountLockIteratorDenom ¶
func (k Keeper) AccountLockIteratorDenom(ctx sdk.Context, isUnlocking bool, addr sdk.AccAddress, denom string) sdk.Iterator
AccountLockIteratorDenom returns the iterator used for getting all locks by account and denom
func (Keeper) AccountLockIteratorDurationDenom ¶
func (k Keeper) AccountLockIteratorDurationDenom(ctx sdk.Context, isUnlocking bool, addr sdk.AccAddress, denom string, duration time.Duration) sdk.Iterator
AccountLockIteratorDurationDenom returns iterator used for getting all locks by account and denom with specific duration
func (Keeper) AccountLockIteratorLongerDuration ¶
func (k Keeper) AccountLockIteratorLongerDuration(ctx sdk.Context, isUnlocking bool, addr sdk.AccAddress, duration time.Duration) sdk.Iterator
AccountLockIteratorLongerDuration returns iterator used for getting all locks by account longer than duration
func (Keeper) AccountLockIteratorLongerDurationDenom ¶
func (k Keeper) AccountLockIteratorLongerDurationDenom(ctx sdk.Context, isUnlocking bool, addr sdk.AccAddress, denom string, duration time.Duration) sdk.Iterator
AccountLockIteratorLongerDurationDenom returns iterator used for getting all locks by account and denom longer than duration
func (Keeper) AccountLockIteratorShorterThanDuration ¶
func (k Keeper) AccountLockIteratorShorterThanDuration(ctx sdk.Context, isUnlocking bool, addr sdk.AccAddress, duration time.Duration) sdk.Iterator
AccountLockIteratorShorterThanDuration returns iterator used for getting all locks by account longer than duration
func (Keeper) AccountLockedCoins ¶
func (k Keeper) AccountLockedCoins(goCtx context.Context, req *types.AccountLockedCoinsRequest) (*types.AccountLockedCoinsResponse, error)
AccountLockedCoins Returns a locked coins that can't be withdrawn
func (Keeper) AccountLockedLongerDuration ¶
func (k Keeper) AccountLockedLongerDuration(goCtx context.Context, req *types.AccountLockedLongerDurationRequest) (*types.AccountLockedLongerDurationResponse, error)
AccountLockedLongerDuration Returns account locked with duration longer than specified
func (Keeper) AccountLockedLongerDurationDenom ¶
func (k Keeper) AccountLockedLongerDurationDenom(goCtx context.Context, req *types.AccountLockedLongerDurationDenomRequest) (*types.AccountLockedLongerDurationDenomResponse, error)
AccountLockedLongerDurationDenom Returns account locked with duration longer than specified with specific denom
func (Keeper) AccountLockedLongerDurationNotUnlockingOnly ¶
func (k Keeper) AccountLockedLongerDurationNotUnlockingOnly(goCtx context.Context, req *types.AccountLockedLongerDurationNotUnlockingOnlyRequest) (*types.AccountLockedLongerDurationNotUnlockingOnlyResponse, error)
AccountLockedLongerDurationNotUnlockingOnly Returns account locked records with longer duration excluding tokens started unlocking
func (Keeper) AccountLockedPastTime ¶
func (k Keeper) AccountLockedPastTime(goCtx context.Context, req *types.AccountLockedPastTimeRequest) (*types.AccountLockedPastTimeResponse, error)
AccountLockedPastTime Returns the total locks of an account whose unlock time is beyond timestamp
func (Keeper) AccountLockedPastTimeDenom ¶
func (k Keeper) AccountLockedPastTimeDenom(goCtx context.Context, req *types.AccountLockedPastTimeDenomRequest) (*types.AccountLockedPastTimeDenomResponse, error)
AccountLockedPastTimeDenom is equal to GetAccountLockedPastTime but denom specific
func (Keeper) AccountLockedPastTimeNotUnlockingOnly ¶
func (k Keeper) AccountLockedPastTimeNotUnlockingOnly(goCtx context.Context, req *types.AccountLockedPastTimeNotUnlockingOnlyRequest) (*types.AccountLockedPastTimeNotUnlockingOnlyResponse, error)
AccountLockedPastTimeNotUnlockingOnly Returns locked records of an account with unlock time beyond timestamp excluding tokens started unlocking
func (Keeper) AccountUnlockableCoins ¶
func (k Keeper) AccountUnlockableCoins(goCtx context.Context, req *types.AccountUnlockableCoinsRequest) (*types.AccountUnlockableCoinsResponse, error)
AccountUnlockableCoins returns unlockable coins which are not withdrawn yet
func (Keeper) AccountUnlockedBeforeTime ¶
func (k Keeper) AccountUnlockedBeforeTime(goCtx context.Context, req *types.AccountUnlockedBeforeTimeRequest) (*types.AccountUnlockedBeforeTimeResponse, error)
AccountUnlockedBeforeTime Returns the total unlocks of an account whose unlock time is before timestamp
func (Keeper) AccountUnlockingCoins ¶
func (k Keeper) AccountUnlockingCoins(goCtx context.Context, req *types.AccountUnlockingCoinsRequest) (*types.AccountUnlockingCoinsResponse, error)
AccountUnlockingCoins returns whole unlocking coins
func (Keeper) AddTokensToLockByID ¶
func (k Keeper) AddTokensToLockByID(ctx sdk.Context, owner sdk.AccAddress, lockID uint64, coins sdk.Coins) (*types.PeriodLock, error)
AddTokensToLock locks more tokens into a lockup This also saves the lock to the store.
func (Keeper) BeginUnlock ¶
BeginUnlock is a utility to start unlocking coins from NotUnlocking queue
func (Keeper) BeginUnlockAllNotUnlockings ¶
func (k Keeper) BeginUnlockAllNotUnlockings(ctx sdk.Context, account sdk.AccAddress) ([]types.PeriodLock, sdk.Coins, error)
BeginUnlockAllNotUnlockings begins unlock for all not unlocking coins
func (Keeper) BeginUnlockPeriodLockByID ¶
func (k Keeper) BeginUnlockPeriodLockByID(ctx sdk.Context, LockID uint64) (*types.PeriodLock, error)
BeginUnlockPeriodLockByID begin unlock by period lock ID
func (Keeper) ClearAccumulationStores ¶
func (Keeper) ClearAllAccumulationStores ¶
func (Keeper) ClearAllLockRefKeys ¶
func (Keeper) GetAccountLockedCoins ¶
GetAccountLockedCoins Returns a locked coins that can't be withdrawn
func (Keeper) GetAccountLockedDurationNotUnlockingOnly ¶
func (k Keeper) GetAccountLockedDurationNotUnlockingOnly(ctx sdk.Context, addr sdk.AccAddress, denom string, duration time.Duration) []types.PeriodLock
GetAccountLockedDurationNotUnlockingOnly Returns account locked with specific duration within not unlockings
func (Keeper) GetAccountLockedLongerDuration ¶
func (k Keeper) GetAccountLockedLongerDuration(ctx sdk.Context, addr sdk.AccAddress, duration time.Duration) []types.PeriodLock
GetAccountLockedLongerDuration Returns account locked with duration longer than specified
func (Keeper) GetAccountLockedLongerDurationDenom ¶
func (k Keeper) GetAccountLockedLongerDurationDenom(ctx sdk.Context, addr sdk.AccAddress, denom string, duration time.Duration) []types.PeriodLock
GetAccountLockedLongerDurationDenom Returns account locked with duration longer than specified with specific denom
func (Keeper) GetAccountLockedLongerDurationNotUnlockingOnly ¶
func (k Keeper) GetAccountLockedLongerDurationNotUnlockingOnly(ctx sdk.Context, addr sdk.AccAddress, duration time.Duration) []types.PeriodLock
GetAccountLockedLongerDurationNotUnlockingOnly Returns account locked with duration longer than specified
func (Keeper) GetAccountLockedPastTime ¶
func (k Keeper) GetAccountLockedPastTime(ctx sdk.Context, addr sdk.AccAddress, timestamp time.Time) []types.PeriodLock
GetAccountLockedPastTime Returns the total locks of an account whose unlock time is beyond timestamp
func (Keeper) GetAccountLockedPastTimeDenom ¶
func (k Keeper) GetAccountLockedPastTimeDenom(ctx sdk.Context, addr sdk.AccAddress, denom string, timestamp time.Time) []types.PeriodLock
GetAccountLockedPastTimeDenom is equal to GetAccountLockedPastTime but denom specific
func (Keeper) GetAccountLockedPastTimeNotUnlockingOnly ¶
func (k Keeper) GetAccountLockedPastTimeNotUnlockingOnly(ctx sdk.Context, addr sdk.AccAddress, timestamp time.Time) []types.PeriodLock
GetAccountLockedPastTimeNotUnlockingOnly Returns the total locks of an account whose unlock time is beyond timestamp
func (Keeper) GetAccountPeriodLocks ¶
func (k Keeper) GetAccountPeriodLocks(ctx sdk.Context, addr sdk.AccAddress) []types.PeriodLock
GetAccountPeriodLocks Returns the period locks associated to an account
func (Keeper) GetAccountUnlockableCoins ¶
GetAccountUnlockableCoins Returns whole unlockable coins which are not withdrawn yet
func (Keeper) GetAccountUnlockedBeforeTime ¶
func (k Keeper) GetAccountUnlockedBeforeTime(ctx sdk.Context, addr sdk.AccAddress, timestamp time.Time) []types.PeriodLock
GetAccountUnlockedBeforeTime Returns the total unlocks of an account whose unlock time is before timestamp
func (Keeper) GetAccountUnlockingCoins ¶
GetAccountUnlockingCoins Returns whole unlocking coins
func (Keeper) GetLastLockID ¶
GetLastLockID returns ID used last time
func (Keeper) GetLegacyPeriodLocks ¶
GetLegacyPeriodLocks Returns the period locks on pool
func (Keeper) GetLockByID ¶
GetLockByID Returns lock from lockID
func (Keeper) GetLockedDenom ¶
GetLockedDenom Returns the total amount of denom that are locked
func (Keeper) GetLocksLongerThanDurationDenom ¶
func (k Keeper) GetLocksLongerThanDurationDenom(ctx sdk.Context, denom string, duration time.Duration) []types.PeriodLock
GetLocksLongerThanDurationDenom Returns the locks whose unlock duration is longer than duration
func (Keeper) GetLocksPastTimeDenom ¶
func (k Keeper) GetLocksPastTimeDenom(ctx sdk.Context, denom string, timestamp time.Time) []types.PeriodLock
GetLocksPastTimeDenom Returns the locks whose unlock time is beyond timestamp
func (Keeper) GetModuleBalance ¶
GetModuleBalance Returns full balance of the module
func (Keeper) GetModuleLockedCoins ¶
GetModuleLockedCoins Returns locked balance of the module
func (Keeper) GetPeriodLocks ¶
GetPeriodLocks Returns the period locks on pool
func (Keeper) GetPeriodLocksAccumulation ¶
GetPeriodLocksByDuration returns the total amount of query.Denom tokens locked for longer than query.Duration
func (Keeper) LegacyBeginUnlock ¶
LegacyBeginUnlock is a utility to start unlocking coins from NotUnlocking queue
func (Keeper) LegacyLock ¶
Lock is a utility to lock coins into module account
func (Keeper) LegacyLockTokens ¶
func (k Keeper) LegacyLockTokens(ctx sdk.Context, owner sdk.AccAddress, coins sdk.Coins, duration time.Duration) (types.PeriodLock, error)
LegacyLockTokens lock tokens from an account for specified duration
func (Keeper) LockIterator ¶
LockIterator returns the iterator used for getting all locks
func (Keeper) LockIteratorAfterTime ¶
func (k Keeper) LockIteratorAfterTime(ctx sdk.Context, isUnlocking bool, time time.Time) sdk.Iterator
LockIteratorAfterTime returns the iterator to get locked coins
func (Keeper) LockIteratorAfterTimeDenom ¶
func (k Keeper) LockIteratorAfterTimeDenom(ctx sdk.Context, isUnlocking bool, denom string, time time.Time) sdk.Iterator
LockIteratorAfterTimeDenom returns the iterator to get locked coins by denom
func (Keeper) LockIteratorBeforeTime ¶
func (k Keeper) LockIteratorBeforeTime(ctx sdk.Context, isUnlocking bool, time time.Time) sdk.Iterator
LockIteratorBeforeTime returns the iterator to get unlockable coins
func (Keeper) LockIteratorBeforeTimeDenom ¶
func (k Keeper) LockIteratorBeforeTimeDenom(ctx sdk.Context, isUnlocking bool, denom string, time time.Time) sdk.Iterator
LockIteratorBeforeTimeDenom returns the iterator to get unlockable coins by denom
func (Keeper) LockIteratorDenom ¶
LockIteratorDenom returns the iterator used for getting all locks by denom
func (Keeper) LockIteratorLongerThanDurationDenom ¶
func (k Keeper) LockIteratorLongerThanDurationDenom(ctx sdk.Context, isUnlocking bool, denom string, duration time.Duration) sdk.Iterator
LockIteratorLongerThanDurationDenom returns the iterator to get locked locks by denom
func (Keeper) LockTokens ¶
func (k Keeper) LockTokens(ctx sdk.Context, owner sdk.AccAddress, coins sdk.Coins, duration time.Duration) (types.PeriodLock, error)
LockTokens lock tokens from an account for specified duration
func (Keeper) LockedByID ¶
func (k Keeper) LockedByID(goCtx context.Context, req *types.LockedRequest) (*types.LockedResponse, error)
LockedByID Returns lock by lock ID
func (Keeper) LockedDenom ¶
func (k Keeper) LockedDenom(goCtx context.Context, req *types.LockedDenomRequest) (*types.LockedDenomResponse, error)
func (Keeper) ModuleBalance ¶
func (k Keeper) ModuleBalance(goCtx context.Context, req *types.ModuleBalanceRequest) (*types.ModuleBalanceResponse, error)
ModuleBalance Return full balance of the module
func (Keeper) ModuleLockedAmount ¶
func (k Keeper) ModuleLockedAmount(goCtx context.Context, req *types.ModuleLockedAmountRequest) (*types.ModuleLockedAmountResponse, error)
ModuleLockedAmount Returns locked balance of the module
func (Keeper) ResetAllLocks ¶
ResetAllLocks takes a set of locks, and initializes state to be storing them all correctly. This utilizes batch optimizations to improve efficiency, as this becomes a bottleneck at chain initialization & upgrades.
func (*Keeper) SetHooks ¶
func (k *Keeper) SetHooks(lh types.LockupHooks) *Keeper
Set the lockup hooks
func (Keeper) SetLastLockID ¶
SetLastLockID save ID used by last lock
func (Keeper) UnlockPeriodLockByID ¶
UnlockPeriodLockByID unlock by period lock ID
func (Keeper) WithdrawAllMaturedLocks ¶
WithdrawAllMaturedLocks withdraws every lock thats in the process of unlocking, and has finished unlocking by the current block time.