Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k *Keeper) AddFixationRegistry(fixationKey string, getParamFunction func(sdk.Context) any)
- func (k Keeper) BeginBlock(ctx sdk.Context)
- 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) BlocksToSaveRaw(ctx sdk.Context) (res uint64)
- 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) EpochStart(ctx sdk.Context)
- 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) GetAllMetadata(ctx sdk.Context) ([]types.ProviderMetadata, error)
- func (k Keeper) GetAllStakeEntriesCurrent(ctx sdk.Context) []types.StakeEntry
- func (k Keeper) GetAllStakeEntriesCurrentForChainId(ctx sdk.Context, chainID string) []types.StakeEntry
- func (k Keeper) GetAllStakeEntriesForEpoch(ctx sdk.Context, epoch uint64) []types.StakeEntry
- func (k Keeper) GetAllStakeEntriesForEpochChainId(ctx sdk.Context, epoch uint64, chainID string) []types.StakeEntry
- func (k Keeper) GetAllStakeEntriesForGenesis(ctx sdk.Context) []types.StakeStorage
- func (k Keeper) GetCurrentNextEpoch(ctx sdk.Context) (nextEpoch uint64)
- 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) GetEpochHash(ctx sdk.Context, epoch uint64) []byte
- func (k Keeper) GetEpochStart(ctx sdk.Context) uint64
- func (k Keeper) GetEpochStartForBlock(ctx sdk.Context, block uint64) (epochStart, 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) GetMetadata(ctx sdk.Context, provider string) (types.ProviderMetadata, error)
- 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) GetStakeEntry(ctx sdk.Context, epoch uint64, chainID string, provider string) (types.StakeEntry, bool)
- func (k Keeper) GetStakeEntryCurrent(ctx sdk.Context, chainID string, provider string) (val types.StakeEntry, found bool)
- func (k Keeper) GetStakeEntryCurrentForChainIdByVault(ctx sdk.Context, chainID string, vault string) (val types.StakeEntry, found 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) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) ProviderMetaData(c context.Context, req *types.QueryProviderMetaDataRequest) (*types.QueryProviderMetaDataResponse, error)
- func (k Keeper) PushFixatedParams(ctx sdk.Context, block, limit uint64)
- func (k Keeper) RemoveAllStakeEntriesForEpoch(ctx sdk.Context, epoch uint64)
- func (k Keeper) RemoveEpochDetails(ctx sdk.Context)
- func (k Keeper) RemoveEpochHash(ctx sdk.Context, epoch uint64)
- func (k Keeper) RemoveFixatedParams(ctx sdk.Context, index string)
- func (k Keeper) RemoveMetadata(ctx sdk.Context, provider string) error
- func (k Keeper) RemoveOldEpochData(ctx sdk.Context)
- func (k Keeper) RemoveStakeEntryCurrent(ctx sdk.Context, chainID string, provider string)
- func (k Keeper) SetAllMetadata(ctx sdk.Context, metadata []types.ProviderMetadata)
- 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) SetEpochHash(ctx sdk.Context)
- func (k Keeper) SetFixatedParams(ctx sdk.Context, fixatedParams types.FixatedParams)
- func (k Keeper) SetMetadata(ctx sdk.Context, metadata types.ProviderMetadata)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetStakeEntry(ctx sdk.Context, epoch uint64, stakeEntry types.StakeEntry)
- func (k Keeper) SetStakeEntryCurrent(ctx sdk.Context, stakeEntry types.StakeEntry)
- func (k Keeper) SetStakeEntryForMigrator(ctx sdk.Context, epoch uint64, stakeEntry types.StakeEntry, idx uint64)
- 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) StoreCurrentStakeEntries(ctx sdk.Context, epoch uint64)
- func (k *Keeper) UpdateEarliestEpochstart(ctx sdk.Context)
- type Migrator
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 storetypes.StoreKey, ps paramtypes.Subspace, bankKeeper types.BankKeeper, accountKeeper types.AccountKeeper, specKeeper types.SpecKeeper, stakingKeeper types.StakingKeeper, ) *Keeper
func (*Keeper) AddFixationRegistry ¶
func (Keeper) BeginBlock ¶
func (Keeper) BlockInEpoch ¶
func (Keeper) BlocksToSave ¶
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) EpochStart ¶
Function that calls all the functions that are supposed to run in epoch start
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) GetAllMetadata ¶
func (Keeper) GetAllStakeEntriesCurrent ¶
func (k Keeper) GetAllStakeEntriesCurrent(ctx sdk.Context) []types.StakeEntry
GetAllStakeEntriesCurrent gets all the current stake entries
func (Keeper) GetAllStakeEntriesCurrentForChainId ¶
func (k Keeper) GetAllStakeEntriesCurrentForChainId(ctx sdk.Context, chainID string) []types.StakeEntry
GetAllStakeEntriesCurrentForChainId gets all the current stake entries for a specific chain
func (Keeper) GetAllStakeEntriesForEpoch ¶
GetAllStakeEntriesForEpoch gets all the stake entries of a specific epoch
func (Keeper) GetAllStakeEntriesForEpochChainId ¶
func (k Keeper) GetAllStakeEntriesForEpochChainId(ctx sdk.Context, epoch uint64, chainID string) []types.StakeEntry
GetAllStakeEntriesForEpochChainId gets all the stake entries of a specific epoch and a specific chain
func (Keeper) GetAllStakeEntriesForGenesis ¶
func (k Keeper) GetAllStakeEntriesForGenesis(ctx sdk.Context) []types.StakeStorage
GetAllStakeEntries gets all the stake entries of a specific epoch
func (Keeper) GetCurrentNextEpoch ¶
func (Keeper) GetEpochDetails ¶
GetEpochDetails returns epochDetails
func (Keeper) GetEpochStartForBlock ¶
func (k Keeper) GetEpochStartForBlock(ctx sdk.Context, block uint64) (epochStart, 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) GetMetadata ¶
func (Keeper) GetNextEpoch ¶
func (Keeper) GetParamForBlock ¶
func (Keeper) GetPreviousEpochStartForBlock ¶
func (Keeper) GetStakeEntry ¶
func (k Keeper) GetStakeEntry(ctx sdk.Context, epoch uint64, chainID string, provider string) (types.StakeEntry, bool)
GetStakeEntry gets a specific stake entry from the stake entries KV store Since the stake entries KV store's key includes the provider's stake (which is not known), we iterate over all the providers with the same epoch and chainID and compare the requested address to find the provider
func (Keeper) GetStakeEntryCurrent ¶
func (k Keeper) GetStakeEntryCurrent(ctx sdk.Context, chainID string, provider string) (val types.StakeEntry, found bool)
GetStakeEntryCurrent returns a specific current stake entry (with both vault/provider)
func (Keeper) GetStakeEntryCurrentForChainIdByVault ¶
func (k Keeper) GetStakeEntryCurrentForChainIdByVault(ctx sdk.Context, chainID string, vault string) (val types.StakeEntry, found bool)
GetStakeEntryCurrentForChainIdByVault gets all the current stake entry for a specific chain by vault address
func (Keeper) IsEpochStart ¶
return if this block is an epoch start
func (Keeper) LatestFixatedParams ¶
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) ProviderMetaData ¶
func (k Keeper) ProviderMetaData(c context.Context, req *types.QueryProviderMetaDataRequest) (*types.QueryProviderMetaDataResponse, error)
func (Keeper) PushFixatedParams ¶
func (Keeper) RemoveAllStakeEntriesForEpoch ¶
RemoveAllStakeEntriesForEpoch removes all the stake entries of a specific epoch
func (Keeper) RemoveEpochDetails ¶
RemoveEpochDetails removes epochDetails from the store
func (Keeper) RemoveFixatedParams ¶
RemoveFixatedParams removes a fixatedParams from the store
func (Keeper) RemoveMetadata ¶
func (Keeper) RemoveOldEpochData ¶
func (Keeper) RemoveStakeEntryCurrent ¶
RemoveStakeEntryCurrent deletes a current stake entry from the store
func (Keeper) SetAllMetadata ¶
func (k Keeper) SetAllMetadata(ctx sdk.Context, metadata []types.ProviderMetadata)
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) SetEpochHash ¶
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) SetMetadata ¶
func (k Keeper) SetMetadata(ctx sdk.Context, metadata types.ProviderMetadata)
func (Keeper) SetStakeEntry ¶
Set stake entry
func (Keeper) SetStakeEntryCurrent ¶
func (k Keeper) SetStakeEntryCurrent(ctx sdk.Context, stakeEntry types.StakeEntry)
SetStakeEntryCurrent sets a current stake entry in the store
func (Keeper) SetStakeEntryForMigrator ¶
func (k Keeper) SetStakeEntryForMigrator(ctx sdk.Context, epoch uint64, stakeEntry types.StakeEntry, idx uint64)
Set stake entry
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) StoreCurrentStakeEntries ¶
StoreCurrentStakeEntries store the current stake entries in the epoch-prefixed stake entries store
func (*Keeper) UpdateEarliestEpochstart ¶
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
func NewMigrator ¶
func (Migrator) Migrate7to8 ¶
Migrate7to8 transfers all the stake entries from the old stake storage to the new stake entries store StakeStorage is set to the stake entries store StakeStorageCurrent is set to the stake entries current store StakeStorageUnstake is deleted