keeper

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

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,
	epochStorageKeeper types.EpochStorageKeeper,
) *Keeper

func (Keeper) AddAdminKey added in v0.10.0

func (k Keeper) AddAdminKey(project *types.Project, adminKey string, vrfpk string)

func (Keeper) AddDeveloperKey added in v0.10.0

func (k Keeper) AddDeveloperKey(ctx sdk.Context, developerKey string, project *types.Project, blockHeight uint64, vrfpk string) error

func (Keeper) AddKeysToProject

func (k Keeper) AddKeysToProject(ctx sdk.Context, projectID string, adminKey string, projectKeys []types.ProjectKey) error

func (Keeper) BeginBlock added in v0.10.0

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

func (Keeper) ChargeComputeUnitsToProject

func (k Keeper) ChargeComputeUnitsToProject(ctx sdk.Context, project types.Project, cu uint64) (err error)

func (Keeper) CreateAdminProject

func (k Keeper) CreateAdminProject(ctx sdk.Context, subscriptionAddress string, plan plantypes.Plan, vrfpk string) error

add a default project to a subscription, add the subscription key as

func (Keeper) CreateProject

func (k Keeper) CreateProject(ctx sdk.Context, subscriptionAddress string, projectData types.ProjectData, plan plantypes.Plan) error

add a new project to the subscription

func (Keeper) DeleteProject

func (k Keeper) DeleteProject(ctx sdk.Context, projectID string) error

func (Keeper) Developer

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetProjectDeveloperData

func (k Keeper) GetProjectDeveloperData(ctx sdk.Context, developerKey string, blockHeight uint64) (types.ProtoDeveloperData, error)

func (Keeper) GetProjectForBlock

func (k Keeper) GetProjectForBlock(ctx sdk.Context, projectID string, blockHeight uint64) (types.Project, error)

func (Keeper) GetProjectForDeveloper

func (k Keeper) GetProjectForDeveloper(ctx sdk.Context, developerKey string, blockHeight uint64) (proj types.Project, vrfpk string, errRet error)

func (Keeper) Info

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) RegisterKey added in v0.10.0

func (k Keeper) RegisterKey(ctx sdk.Context, key types.ProjectKey, project *types.Project, blockHeight uint64) error

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SetPolicy added in v0.10.0

func (k Keeper) SetPolicy(ctx sdk.Context, projectIDs []string, policy *types.Policy, key string, setPolicyEnum types.SetPolicyEnum) error

func (Keeper) SnapshotSubscriptionProjects

func (k Keeper) SnapshotSubscriptionProjects(ctx sdk.Context, subscriptionAddr string)

Snapshot all projects of a given subscription

type Migrator

type Migrator struct {
	// contains filtered or unexported fields
}

func NewMigrator

func NewMigrator(keeper Keeper) Migrator

func (Migrator) Migrate2to3

func (m Migrator) Migrate2to3(ctx sdk.Context) error

Migrate2to3 implements store migration from v2 to v3: Trigger version upgrade of the projectsFS, develooperKeysFS fixation stores

Jump to

Keyboard shortcuts

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