keeper

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const MONTHS_IN_YEAR = 12

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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 sdk.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, subscription string, projectData projectstypes.ProjectData) error

func (Keeper) BeginBlock added in v0.12.0

func (k Keeper) BeginBlock(ctx sdk.Context)

func (Keeper) ChargeComputeUnitsToSubscription

func (k Keeper) ChargeComputeUnitsToSubscription(ctx sdk.Context, subscription string, cuAmount uint64) error

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 (Keeper) DelProjectFromSubscription

func (k Keeper) DelProjectFromSubscription(ctx sdk.Context, subscription string, name string) error

func (Keeper) EpochStart added in v0.7.0

func (k Keeper) EpochStart(ctx sdk.Context)

EpochStart runs the functions that are supposed to run in epoch start

func (Keeper) GetAllSubscription added in v0.7.0

func (k Keeper) GetAllSubscription(ctx sdk.Context) []types.Subscription

GetAllSubscription returns all subscription (of all consumers)

func (Keeper) GetCondSubscription added in v0.7.0

func (k Keeper) GetCondSubscription(ctx sdk.Context, cond func(sub types.Subscription) bool) (list []types.Subscription)

GetAllSubscription returns all subscriptions that satisfy the condition

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) types.Params

GetParams get all parameters as types.Params

func (Keeper) GetPlanFromSubscription

func (k Keeper) GetPlanFromSubscription(ctx sdk.Context, consumer string) (planstypes.Plan, error)

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) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) Params

func (Keeper) RemoveSubscription added in v0.7.0

func (k Keeper) RemoveSubscription(ctx sdk.Context, consumer string)

RemoveSubscription removes the subscription (of a consumer) from the store

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams set the params

func (Keeper) SetSubscription added in v0.7.0

func (k Keeper) SetSubscription(ctx sdk.Context, sub types.Subscription)

SetSubscription sets a subscription (of a consumer) in the store

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL