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, chainID string, stakeEntry types.StakeEntry)
- func (k Keeper) AppendUnstakeEntry(ctx sdk.Context, stakeEntry types.StakeEntry, unstakeHoldBlocks uint64) error
- 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) 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, chainID string) (entries []types.StakeEntry, found bool, epochHash []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) 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, 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) 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, chainID string) (types.StakeStorage, bool)
- func (k Keeper) GetStakeStorageEpoch(ctx sdk.Context, block uint64, chainID string) (stakeStorage types.StakeStorage, found bool)
- func (k Keeper) GetStakeStorageUnstake(ctx sdk.Context) (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, chainID string, stakeEntry types.StakeEntry, ...)
- func (k Keeper) ModifyUnstakeEntry(ctx sdk.Context, stakeEntry types.StakeEntry, removeIndex uint64)
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) PopUnstakeEntries(ctx sdk.Context, block uint64) (value []types.StakeEntry)
- func (k Keeper) PushFixatedParams(ctx sdk.Context, block, limit uint64)
- func (k Keeper) RemoveEpochDetails(ctx sdk.Context)
- func (k Keeper) RemoveFixatedParams(ctx sdk.Context, index string)
- func (k Keeper) RemoveOldEpochData(ctx sdk.Context)
- func (k Keeper) RemoveStakeEntryCurrent(ctx sdk.Context, chainID string, idx uint64) error
- func (k Keeper) RemoveStakeStorage(ctx sdk.Context, index string)
- func (k Keeper) RemoveStakeStorageByBlockAndChain(ctx sdk.Context, 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, chainID string, stakeStorage types.StakeStorage)
- func (k Keeper) SetStakeStorageUnstake(ctx sdk.Context, stakeStorage types.StakeStorage)
- func (k Keeper) SetUnstakeHoldBlocksStaticRaw(ctx sdk.Context, unstakeHoldBlocksStatic 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) StakeStorageKey(block uint64, chainID string) string
- func (k Keeper) StoreCurrentEpochStakeStorage(ctx sdk.Context, block uint64)
- func (k Keeper) UnstakeEntryByAddress(ctx sdk.Context, 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) UnstakeHoldBlocksStatic(ctx sdk.Context, block uint64) (res uint64)
- func (k Keeper) UnstakeHoldBlocksStaticRaw(ctx sdk.Context) (res 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, ) *Keeper
func (*Keeper) AddFixationRegistry ¶
func (Keeper) AppendStakeEntryCurrent ¶
func (Keeper) AppendUnstakeEntry ¶
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) 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, 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 (k Keeper) GetStakeEntryByAddressCurrent(ctx sdk.Context, chainID string, address sdk.AccAddress) (value types.StakeEntry, found bool, index uint64)
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) 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 ¶
used to get the latest
func (Keeper) GetStakeStorageEpoch ¶
func (Keeper) GetStakeStorageUnstake ¶
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 ¶
Returns the unstaking Entry if its stakeAppliedBlock is lower than the provided block
func (Keeper) PushFixatedParams ¶
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 (k Keeper) SetStakeStorageUnstake(ctx sdk.Context, stakeStorage types.StakeStorage)
func (Keeper) SetUnstakeHoldBlocksStaticRaw ¶
UnstakeHoldBlocksRaw sets the UnstakeHoldBlocks param
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, address sdk.AccAddress) (value types.StakeEntry, found bool, index uint64)
func (Keeper) UnstakeHoldBlocks ¶
func (Keeper) UnstakeHoldBlocksRaw ¶
UnstakeHoldBlocksRaw returns the UnstakeHoldBlocks param
func (Keeper) UnstakeHoldBlocksStatic ¶
func (Keeper) UnstakeHoldBlocksStaticRaw ¶
UnstakeHoldBlocksRaw returns the UnstakeHoldBlocks param
func (*Keeper) UpdateEarliestEpochstart ¶
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
func NewMigrator ¶
func (Migrator) Migrate2to3 ¶
Migrate2to3 implements store migration from v2 to v3: - refund all clients stake - migrate providers to a new key
func (Migrator) Migrate3to4 ¶
Migrate3to4 implements store migration from v3 to v4: set geolocation to int32