Documentation ¶
Index ¶
- type Keeper
- func (k Keeper) AddEpochInfo(ctx sdk.Context, epoch types.EpochInfo) error
- func (k Keeper) AfterEpochEnd(ctx sdk.Context, identifier string, epochNumber uint64)
- func (k Keeper) AllEpochInfos(ctx sdk.Context) []types.EpochInfo
- func (k Keeper) BeforeEpochStart(ctx sdk.Context, identifier string, epochNumber uint64)
- func (k Keeper) DeleteEpochInfo(ctx sdk.Context, identifier string)
- func (k Keeper) EpochExists(ctx sdk.Context, identifier string) bool
- func (k Keeper) GetEpochInfo(ctx sdk.Context, identifier string) types.EpochInfo
- func (k Keeper) IterateEpochInfo(ctx sdk.Context, fn func(index int64, epochInfo types.EpochInfo) (stop bool))
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k *Keeper) SetHooks(eh types.EpochHooks) *Keeper
- type Querier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct { Epochs collections.Map[string, types.EpochInfo] // contains filtered or unexported fields }
func (Keeper) AddEpochInfo ¶ added in v0.15.0
AddEpochInfo adds a new epoch info. Will return an error if the epoch fails validation, or re-uses an existing identifier. This method also sets the start time if left unset, and sets the epoch start height.
func (Keeper) AfterEpochEnd ¶
AfterEpochEnd epoch hook
func (Keeper) AllEpochInfos ¶
AllEpochInfos iterate through epochs to return all epochs info.
func (Keeper) BeforeEpochStart ¶
BeforeEpochStart epoch hook
func (Keeper) DeleteEpochInfo ¶
DeleteEpochInfo delete epoch info.
func (Keeper) EpochExists ¶ added in v0.15.0
EpochExists checks if the epoch exists
func (Keeper) GetEpochInfo ¶
GetEpochInfo returns epoch info by identifier.
type Querier ¶
type Querier struct {
Keeper
}
Querier defines a wrapper around the x/epochs keeper providing gRPC method handlers.
func NewQuerier ¶
func (Querier) CurrentEpoch ¶
func (q Querier) CurrentEpoch(c context.Context, req *types.QueryCurrentEpochRequest) (*types.QueryCurrentEpochResponse, error)
CurrentEpoch provides current epoch of specified identifier.
func (Querier) EpochInfos ¶
func (q Querier) EpochInfos(c context.Context, _ *types.QueryEpochsInfoRequest) (*types.QueryEpochsInfoResponse, error)
EpochInfos provide running epochInfos.