Documentation ¶
Index ¶
- Constants
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NextMonth(date time.Time) time.Time
- type Keeper
- func (k Keeper) AddProjectToSubscription(ctx sdk.Context, consumer string, projectData projectstypes.ProjectData) error
- func (k Keeper) BeginBlock(ctx sdk.Context)
- func (k Keeper) ChargeComputeUnitsToSubscription(ctx sdk.Context, consumer string, block, cuAmount uint64) error
- func (k Keeper) CreateSubscription(ctx sdk.Context, creator string, consumer string, planIndex string, ...) error
- func (k Keeper) Current(goCtx context.Context, req *types.QueryCurrentRequest) (*types.QueryCurrentResponse, error)
- func (k Keeper) DelProjectFromSubscription(ctx sdk.Context, consumer, name string) error
- func (k Keeper) ExportSubscriptions(ctx sdk.Context) commontypes.GenesisState
- func (k Keeper) ExportSubscriptionsTimers(ctx sdk.Context) []commontypes.RawMessage
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetPlanFromSubscription(ctx sdk.Context, consumer string) (planstypes.Plan, error)
- func (k Keeper) GetSubscription(ctx sdk.Context, consumer string) (val types.Subscription, found bool)
- func (k Keeper) InitSubscriptions(ctx sdk.Context, gs commontypes.GenesisState)
- func (k Keeper) InitSubscriptionsTimers(ctx sdk.Context, data []commontypes.RawMessage)
- func (k Keeper) List(goCtx context.Context, req *types.QueryListRequest) (*types.QueryListResponse, error)
- func (k Keeper) ListProjects(goCtx context.Context, req *types.QueryListProjectsRequest) (*types.QueryListProjectsResponse, error)
- 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) SetParams(ctx sdk.Context, params types.Params)
- type Migrator
Constants ¶
View Source
const MONTHS_IN_YEAR = 12
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, epochstorageKeeper types.EpochstorageKeeper, projectsKeeper types.ProjectsKeeper, plansKeeper types.PlansKeeper, ) *Keeper
func (Keeper) AddProjectToSubscription ¶
func (k Keeper) AddProjectToSubscription(ctx sdk.Context, consumer string, projectData projectstypes.ProjectData) error
func (Keeper) BeginBlock ¶ added in v0.12.0
func (Keeper) ChargeComputeUnitsToSubscription ¶
func (Keeper) CreateSubscription ¶
func (k Keeper) CreateSubscription( ctx sdk.Context, creator string, consumer string, planIndex string, duration uint64, ) error
CreateSubscription creates a subscription for a consumer
func (Keeper) Current ¶
func (k Keeper) Current(goCtx context.Context, req *types.QueryCurrentRequest) (*types.QueryCurrentResponse, error)
func (Keeper) DelProjectFromSubscription ¶
func (Keeper) ExportSubscriptions ¶
func (k Keeper) ExportSubscriptions(ctx sdk.Context) commontypes.GenesisState
ExportSubscriptions exports subscriptions data (for genesis)
func (Keeper) ExportSubscriptionsTimers ¶
func (k Keeper) ExportSubscriptionsTimers(ctx sdk.Context) []commontypes.RawMessage
ExportSubscriptionsTimers exports subscriptions timers data (for genesis)
func (Keeper) GetPlanFromSubscription ¶
func (Keeper) GetSubscription ¶
func (k Keeper) GetSubscription(ctx sdk.Context, consumer string) (val types.Subscription, found bool)
GetSubscription returns the subscription of a given consumer
func (Keeper) InitSubscriptions ¶
func (k Keeper) InitSubscriptions(ctx sdk.Context, gs commontypes.GenesisState)
InitSubscriptions imports subscriptions data (from genesis)
func (Keeper) InitSubscriptionsTimers ¶
func (k Keeper) InitSubscriptionsTimers(ctx sdk.Context, data []commontypes.RawMessage)
InitSubscriptions imports subscriptions timers data (from genesis)
func (Keeper) List ¶
func (k Keeper) List(goCtx context.Context, req *types.QueryListRequest) (*types.QueryListResponse, error)
func (Keeper) ListProjects ¶
func (k Keeper) ListProjects(goCtx context.Context, req *types.QueryListProjectsRequest) (*types.QueryListProjectsResponse, error)
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
func NewMigrator ¶
func (Migrator) Migrate2to3 ¶
Migrate2to3 implements store migration from v2 to v3:
- Convert subscription store to fixation store and use timers
func (Migrator) Migrate3to4 ¶
Migrate3to4 implements store migration from v3 to v4: -- trigger fixation migration (v4->v5), initialize IsLatest field
Click to show internal directories.
Click to hide internal directories.