Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k *Keeper) AddFixationRegistry(fixationKey string, getParamFunction func(sdk.Context) any)
- func (k Keeper) AppendStakeEntryCurrent(ctx sdk.Context, storageType string, chainID string, ...)
- func (k Keeper) AppendUnstakeEntry(ctx sdk.Context, storageType string, stakeEntry types.StakeEntry) error
- func (k Keeper) BlockInEpoch(ctx sdk.Context, block uint64) (res uint64, err error)
- func (k Keeper) BlocksToSave(ctx sdk.Context, block uint64) (res uint64, erro error)
- func (k Keeper) BypassCurrentAndAppendNewEpochStakeEntry(ctx sdk.Context, storageType string, chainID string, ...) (added bool, err error)
- func (k Keeper) CleanAllOlderFixatedParams(ctx sdk.Context, startIdx uint64)
- func (k Keeper) CleanOlderFixatedParams(ctx sdk.Context, fixationKey string, startIdx uint64)
- func (k Keeper) EpochBlocks(ctx sdk.Context, block uint64) (res uint64, err error)
- func (k Keeper) EpochBlocksRaw(ctx sdk.Context) (res uint64)
- func (k Keeper) EpochDetails(c context.Context, req *types.QueryGetEpochDetailsRequest) (*types.QueryGetEpochDetailsResponse, error)
- func (k Keeper) EpochsToSave(ctx sdk.Context, block uint64) (res uint64, err error)
- func (k Keeper) EpochsToSaveRaw(ctx sdk.Context) (res uint64)
- func (k Keeper) FixateParams(ctx sdk.Context, block uint64)
- func (k Keeper) FixatedParams(c context.Context, req *types.QueryGetFixatedParamsRequest) (*types.QueryGetFixatedParamsResponse, error)
- func (k Keeper) FixatedParamsAll(c context.Context, req *types.QueryAllFixatedParamsRequest) (*types.QueryAllFixatedParamsResponse, error)
- func (k Keeper) GetAllFixatedParams(ctx sdk.Context) (list []types.FixatedParams)
- func (k Keeper) GetAllStakeStorage(ctx sdk.Context) (list []types.StakeStorage)
- func (k Keeper) GetDeletedEpochs(ctx sdk.Context) []uint64
- func (k Keeper) GetEarliestEpochStart(ctx sdk.Context) uint64
- func (k Keeper) GetEpochDetails(ctx sdk.Context) (val types.EpochDetails, found bool)
- func (k Keeper) GetEpochStakeEntries(ctx sdk.Context, block uint64, storageType string, chainID string) (entries []types.StakeEntry, found bool)
- func (k Keeper) GetEpochStart(ctx sdk.Context) uint64
- func (k Keeper) GetEpochStartForBlock(ctx sdk.Context, block uint64) (epochStart uint64, blockInEpoch uint64, err error)
- func (k Keeper) GetFixatedParams(ctx sdk.Context, index string) (val types.FixatedParams, found bool)
- func (k Keeper) GetFixatedParamsForBlock(ctx sdk.Context, fixationKey string, block uint64) (fixated types.FixatedParams, err error)
- func (k *Keeper) GetFixationRegistries() map[string]func(sdk.Context) any
- func (k Keeper) GetNextEpoch(ctx sdk.Context, block uint64) (nextEpoch uint64, erro error)
- func (k Keeper) GetParamForBlock(ctx sdk.Context, fixationKey string, block uint64, param any) error
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetPreviousEpochStartForBlock(ctx sdk.Context, block uint64) (previousEpochStart uint64, erro error)
- func (k Keeper) GetStakeEntryByAddressCurrent(ctx sdk.Context, storageType string, chainID string, address sdk.AccAddress) (value types.StakeEntry, found bool, index uint64)
- func (k Keeper) GetStakeEntryByAddressFromStorage(ctx sdk.Context, stakeStorage types.StakeStorage, address sdk.AccAddress) (value types.StakeEntry, found bool, index uint64)
- func (k Keeper) GetStakeEntryForAllProvidersEpoch(ctx sdk.Context, chainID string, epoch uint64) (entrys *[]types.StakeEntry, err error)
- func (k Keeper) GetStakeEntryForClientEpoch(ctx sdk.Context, chainID string, selectedClient sdk.AccAddress, epoch uint64) (entry *types.StakeEntry, err error)
- func (k Keeper) GetStakeEntryForProviderEpoch(ctx sdk.Context, chainID string, selectedProvider sdk.AccAddress, epoch uint64) (entry *types.StakeEntry, err error)
- func (k Keeper) GetStakeStorage(ctx sdk.Context, index string) (val types.StakeStorage, found bool)
- func (k Keeper) GetStakeStorageCurrent(ctx sdk.Context, storageType string, chainID string) (types.StakeStorage, bool)
- func (k Keeper) GetStakeStorageUnstake(ctx sdk.Context, storageType string) (types.StakeStorage, bool)
- func (k Keeper) IsEpochStart(ctx sdk.Context) (res bool)
- func (k Keeper) LatestFixatedParams(ctx sdk.Context, fixationKey string) (fixation types.FixatedParams, found bool)
- func (k Keeper) LatestParamChange(ctx sdk.Context) (res uint64)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) ModifyStakeEntryCurrent(ctx sdk.Context, storageType string, chainID string, ...)
- func (k Keeper) ModifyUnstakeEntry(ctx sdk.Context, storageType string, stakeEntry types.StakeEntry, ...)
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) PopUnstakeEntries(ctx sdk.Context, storageType string, block uint64) (value []types.StakeEntry)
- func (k Keeper) PushFixatedParams(ctx sdk.Context, block uint64, limit uint64)
- func (k Keeper) RemoveAllEntriesPriorToBlockNumber(ctx sdk.Context, block uint64, allChainID []string)
- func (k Keeper) RemoveEpochDetails(ctx sdk.Context)
- func (k Keeper) RemoveFixatedParams(ctx sdk.Context, index string)
- func (k Keeper) RemoveOldEpochData(ctx sdk.Context, storageType string)
- func (k Keeper) RemoveStakeEntryCurrent(ctx sdk.Context, storageType string, chainID string, idx uint64) error
- func (k Keeper) RemoveStakeStorage(ctx sdk.Context, index string)
- func (k Keeper) RemoveStakeStorageByBlockAndChain(ctx sdk.Context, storageType string, block uint64, chainID string)
- func (k Keeper) SetEarliestEpochStart(ctx sdk.Context, block uint64, deletedEpochs []uint64)
- func (k Keeper) SetEpochDetails(ctx sdk.Context, epochDetails types.EpochDetails)
- func (k Keeper) SetEpochDetailsStart(ctx sdk.Context, block uint64)
- func (k Keeper) SetFixatedParams(ctx sdk.Context, fixatedParams types.FixatedParams)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetStakeStorage(ctx sdk.Context, stakeStorage types.StakeStorage)
- func (k Keeper) SetStakeStorageCurrent(ctx sdk.Context, storageType string, chainID string, ...)
- func (k Keeper) SetStakeStorageUnstake(ctx sdk.Context, storageType string, stakeStorage types.StakeStorage)
- func (k Keeper) StakeStorage(c context.Context, req *types.QueryGetStakeStorageRequest) (*types.QueryGetStakeStorageResponse, error)
- func (k Keeper) StakeStorageAll(c context.Context, req *types.QueryAllStakeStorageRequest) (*types.QueryAllStakeStorageResponse, error)
- func (k Keeper) StakeStorageKey(storageType string, block uint64, chainID string) string
- func (k Keeper) StoreCurrentEpochStakeStorage(ctx sdk.Context, block uint64, storageType string)
- func (k Keeper) UnstakeEntryByAddress(ctx sdk.Context, storageType string, address sdk.AccAddress) (value types.StakeEntry, found bool, index uint64)
- func (k Keeper) UnstakeHoldBlocks(ctx sdk.Context, block uint64) (res uint64)
- func (k Keeper) UnstakeHoldBlocksRaw(ctx sdk.Context) (res uint64)
- func (k *Keeper) UpdateEarliestEpochstart(ctx sdk.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey sdk.StoreKey, ps paramtypes.Subspace, bankKeeper types.BankKeeper, accountKeeper types.AccountKeeper, specKeeper types.SpecKeeper, ) *Keeper
func (*Keeper) AddFixationRegistry ¶
func (Keeper) AppendStakeEntryCurrent ¶
func (Keeper) AppendUnstakeEntry ¶
func (Keeper) BlockInEpoch ¶
func (Keeper) BlocksToSave ¶
func (Keeper) BypassCurrentAndAppendNewEpochStakeEntry ¶ added in v0.4.3
func (k Keeper) BypassCurrentAndAppendNewEpochStakeEntry(ctx sdk.Context, storageType string, chainID string, stakeEntry types.StakeEntry) (added bool, err error)
append to epoch stake entries ONLY if it doesn't exist
func (Keeper) CleanAllOlderFixatedParams ¶
func (Keeper) CleanOlderFixatedParams ¶
func (Keeper) EpochBlocks ¶
EpochBlocks returns the EpochBlocks fixated param
func (Keeper) EpochBlocksRaw ¶
EpochBlocks returns the EpochBlocks param
func (Keeper) EpochDetails ¶
func (k Keeper) EpochDetails(c context.Context, req *types.QueryGetEpochDetailsRequest) (*types.QueryGetEpochDetailsResponse, error)
func (Keeper) EpochsToSave ¶
EpochsToSave returns the EpochsToSave fixated param
func (Keeper) EpochsToSaveRaw ¶
EpochsToSaveRaw returns the EpochsToSave param
func (Keeper) FixatedParams ¶
func (k Keeper) FixatedParams(c context.Context, req *types.QueryGetFixatedParamsRequest) (*types.QueryGetFixatedParamsResponse, error)
func (Keeper) FixatedParamsAll ¶
func (k Keeper) FixatedParamsAll(c context.Context, req *types.QueryAllFixatedParamsRequest) (*types.QueryAllFixatedParamsResponse, error)
func (Keeper) GetAllFixatedParams ¶
func (k Keeper) GetAllFixatedParams(ctx sdk.Context) (list []types.FixatedParams)
GetAllFixatedParams returns all fixatedParams
func (Keeper) GetAllStakeStorage ¶
func (k Keeper) GetAllStakeStorage(ctx sdk.Context) (list []types.StakeStorage)
GetAllStakeStorage returns all stakeStorage
func (Keeper) GetEpochDetails ¶
GetEpochDetails returns epochDetails
func (Keeper) GetEpochStakeEntries ¶
func (Keeper) GetEpochStartForBlock ¶
func (k Keeper) GetEpochStartForBlock(ctx sdk.Context, block uint64) (epochStart uint64, blockInEpoch uint64, err error)
GetEpochStartForBlock gets a session start supports one param change
func (Keeper) GetFixatedParams ¶
func (k Keeper) GetFixatedParams( ctx sdk.Context, index string, ) (val types.FixatedParams, found bool)
GetFixatedParams returns a fixatedParams from its index
func (Keeper) GetFixatedParamsForBlock ¶
func (*Keeper) GetFixationRegistries ¶
func (Keeper) GetNextEpoch ¶
func (Keeper) GetParamForBlock ¶
func (Keeper) GetPreviousEpochStartForBlock ¶
func (Keeper) GetStakeEntryByAddressCurrent ¶
func (Keeper) GetStakeEntryByAddressFromStorage ¶
func (k Keeper) GetStakeEntryByAddressFromStorage(ctx sdk.Context, stakeStorage types.StakeStorage, address sdk.AccAddress) (value types.StakeEntry, found bool, index uint64)
func (Keeper) GetStakeEntryForAllProvidersEpoch ¶
func (Keeper) GetStakeEntryForClientEpoch ¶ added in v0.4.3
func (k Keeper) GetStakeEntryForClientEpoch(ctx sdk.Context, chainID string, selectedClient sdk.AccAddress, epoch uint64) (entry *types.StakeEntry, err error)
gets chainID, clientAddress, and epoch returns epochstoragetypes.StakeEntry which is needed to calculate allowedCU, for the selected epoch
func (Keeper) GetStakeEntryForProviderEpoch ¶
func (k Keeper) GetStakeEntryForProviderEpoch(ctx sdk.Context, chainID string, selectedProvider sdk.AccAddress, epoch uint64) (entry *types.StakeEntry, err error)
func (Keeper) GetStakeStorage ¶
func (k Keeper) GetStakeStorage( ctx sdk.Context, index string, ) (val types.StakeStorage, found bool)
GetStakeStorage returns a stakeStorage from its index
func (Keeper) GetStakeStorageCurrent ¶
func (k Keeper) GetStakeStorageCurrent(ctx sdk.Context, storageType string, chainID string) (types.StakeStorage, bool)
used to get the latest
func (Keeper) GetStakeStorageUnstake ¶
func (k Keeper) GetStakeStorageUnstake(ctx sdk.Context, storageType string) (types.StakeStorage, bool)
used to get the unstaking entries
func (Keeper) IsEpochStart ¶
return if this block is an epoch start
func (Keeper) LatestFixatedParams ¶
func (Keeper) ModifyStakeEntryCurrent ¶
func (Keeper) ModifyUnstakeEntry ¶
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) PopUnstakeEntries ¶
func (k Keeper) PopUnstakeEntries(ctx sdk.Context, storageType string, block uint64) (value []types.StakeEntry)
Returns the unstaking Entry if its deadline is lower than the provided block
func (Keeper) PushFixatedParams ¶
func (Keeper) RemoveAllEntriesPriorToBlockNumber ¶ added in v0.4.3
func (Keeper) RemoveEpochDetails ¶
RemoveEpochDetails removes epochDetails from the store
func (Keeper) RemoveFixatedParams ¶
RemoveFixatedParams removes a fixatedParams from the store
func (Keeper) RemoveOldEpochData ¶
func (Keeper) RemoveStakeEntryCurrent ¶
func (Keeper) RemoveStakeStorage ¶
RemoveStakeStorage removes a stakeStorage from the store
func (Keeper) RemoveStakeStorageByBlockAndChain ¶
func (Keeper) SetEarliestEpochStart ¶
func (Keeper) SetEpochDetails ¶
func (k Keeper) SetEpochDetails(ctx sdk.Context, epochDetails types.EpochDetails)
SetEpochDetails set epochDetails in the store
func (Keeper) SetEpochDetailsStart ¶
func (Keeper) SetFixatedParams ¶
func (k Keeper) SetFixatedParams(ctx sdk.Context, fixatedParams types.FixatedParams)
SetFixatedParams set a specific fixatedParams in the store from its index
func (Keeper) SetStakeStorage ¶
func (k Keeper) SetStakeStorage(ctx sdk.Context, stakeStorage types.StakeStorage)
SetStakeStorage set a specific stakeStorage in the store from its index
func (Keeper) SetStakeStorageCurrent ¶
func (Keeper) SetStakeStorageUnstake ¶
func (Keeper) StakeStorage ¶
func (k Keeper) StakeStorage(c context.Context, req *types.QueryGetStakeStorageRequest) (*types.QueryGetStakeStorageResponse, error)
func (Keeper) StakeStorageAll ¶
func (k Keeper) StakeStorageAll(c context.Context, req *types.QueryAllStakeStorageRequest) (*types.QueryAllStakeStorageResponse, error)
func (Keeper) StakeStorageKey ¶
func (Keeper) StoreCurrentEpochStakeStorage ¶
takes the current stake storage and puts it in epoch storage
func (Keeper) UnstakeEntryByAddress ¶
func (k Keeper) UnstakeEntryByAddress(ctx sdk.Context, storageType string, address sdk.AccAddress) (value types.StakeEntry, found bool, index uint64)
func (Keeper) UnstakeHoldBlocks ¶
func (Keeper) UnstakeHoldBlocksRaw ¶
UnstakeHoldBlocksRaw returns the UnstakeHoldBlocks param