keeper

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: Apache-2.0 Imports: 15 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) CreateSubscription

func (k Keeper) CreateSubscription(
	ctx sdk.Context,
	creator string,
	consumer string,
	planIndex string,
	duration uint64,
	vrfpk string,
) error

CreateSubscription creates a subscription for a consumer

func (Keeper) Current

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) 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) IsEpochStart added in v0.7.0

func (k Keeper) IsEpochStart(ctx sdk.Context) bool

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