Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AfterEpochEnd(ctx sdk.Context, identifier string, epochNumber int64)
- func (k Keeper) AllEpochInfos(ctx sdk.Context) []types.EpochInfo
- func (k Keeper) BeforeEpochStart(ctx sdk.Context, identifier string, epochNumber int64)
- func (k Keeper) BeginBlocker(goCtx context.Context)
- func (k Keeper) CurrentEpoch(c context.Context, req *types.QueryCurrentEpochRequest) (*types.QueryCurrentEpochResponse, error)
- func (k Keeper) DeleteEpochInfo(ctx sdk.Context, identifier string)
- func (k Keeper) EpochInfos(c context.Context, req *types.QueryEpochsInfoRequest) (*types.QueryEpochsInfoResponse, error)
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetEpochInfo(ctx sdk.Context, identifier string) (types.EpochInfo, bool)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- 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) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetEpochInfo(ctx sdk.Context, epoch types.EpochInfo)
- func (k *Keeper) SetHooks(eh types.EpochHooks) *Keeper
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error
- type MultiEpochHooks
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, authority string, ) *Keeper
func (Keeper) AfterEpochEnd ¶
AfterEpochEnd executes the indicated hook after epochs ends
func (Keeper) AllEpochInfos ¶
AllEpochInfos returns every epochInfo in the store
func (Keeper) BeforeEpochStart ¶
BeforeEpochStart executes the indicated hook before the epochs
func (Keeper) BeginBlocker ¶
BeginBlocker of epochs module
func (Keeper) CurrentEpoch ¶
func (k Keeper) CurrentEpoch( c context.Context, req *types.QueryCurrentEpochRequest, ) (*types.QueryCurrentEpochResponse, error)
CurrentEpoch provides current epoch of specified identifier
func (Keeper) DeleteEpochInfo ¶
DeleteEpochInfo delete epoch info
func (Keeper) EpochInfos ¶
func (k Keeper) EpochInfos( c context.Context, req *types.QueryEpochsInfoRequest, ) (*types.QueryEpochsInfoResponse, error)
EpochInfos provide running epochInfos
func (Keeper) GetAuthority ¶
GetAuthority returns the module's authority.
func (Keeper) GetEpochInfo ¶
GetEpochInfo returns epoch info by identifier
func (Keeper) IterateEpochInfo ¶
func (k Keeper) IterateEpochInfo(ctx sdk.Context, fn func(index int64, epochInfo types.EpochInfo) (stop bool))
IterateEpochInfo iterate through epochs
func (Keeper) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) SetEpochInfo ¶
SetEpochInfo set epoch info
type MultiEpochHooks ¶
type MultiEpochHooks []types.EpochHooks
combine multiple epoch hooks, all hook functions are run in array sequence
func NewMultiEpochHooks ¶
func NewMultiEpochHooks(hooks ...types.EpochHooks) MultiEpochHooks
func (MultiEpochHooks) AfterEpochEnd ¶
func (mh MultiEpochHooks) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64)
AfterEpochEnd is called when epoch is going to be ended, epochNumber is the number of epoch that is ending
func (MultiEpochHooks) BeforeEpochStart ¶
func (mh MultiEpochHooks) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64)
BeforeEpochStart is called when epoch is going to be started, epochNumber is the number of epoch that is starting