keeper

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServiceServer added in v0.6.0

func NewMsgServiceServer(k Keeper) types.MsgServiceServer

NewMsgServiceServer creates a new instance of `types.MsgServiceServer` using the provided Keeper.

func NewQueryServiceServer added in v0.6.0

func NewQueryServiceServer(k Keeper) types.QueryServiceServer

Types

type Keeper

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

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, key sdk.StoreKey, params paramstypes.Subspace) Keeper

func (*Keeper) ActiveDuration added in v0.11.0

func (k *Keeper) ActiveDuration(ctx sdk.Context) (v time.Duration)

func (*Keeper) CreateSubscriptionForNode added in v0.11.0

func (k *Keeper) CreateSubscriptionForNode(ctx sdk.Context, accAddr sdk.AccAddress, nodeAddr hubtypes.NodeAddress, gigabytes, hours int64, denom string) (*subscriptiontypes.NodeSubscription, error)

func (*Keeper) DeleteActiveNode added in v0.4.0

func (k *Keeper) DeleteActiveNode(ctx sdk.Context, addr hubtypes.NodeAddress)

func (*Keeper) DeleteInactiveNode added in v0.4.0

func (k *Keeper) DeleteInactiveNode(ctx sdk.Context, addr hubtypes.NodeAddress)

func (*Keeper) DeleteNodeForInactiveAt added in v0.11.0

func (k *Keeper) DeleteNodeForInactiveAt(ctx sdk.Context, at time.Time, addr hubtypes.NodeAddress)

func (*Keeper) DeleteNodeForPlan

func (k *Keeper) DeleteNodeForPlan(ctx sdk.Context, id uint64, addr hubtypes.NodeAddress)

func (*Keeper) Deposit added in v0.4.0

func (k *Keeper) Deposit(ctx sdk.Context) (v sdk.Coin)

func (*Keeper) EndBlock added in v0.11.0

func (k *Keeper) EndBlock(ctx sdk.Context) []abcitypes.ValidatorUpdate

func (*Keeper) FundCommunityPool added in v0.4.0

func (k *Keeper) FundCommunityPool(ctx sdk.Context, fromAddr sdk.AccAddress, coin sdk.Coin) error

func (*Keeper) GetActiveNode added in v0.11.0

func (k *Keeper) GetActiveNode(ctx sdk.Context, addr hubtypes.NodeAddress) (v types.Node, found bool)

func (*Keeper) GetInactiveNode added in v0.11.0

func (k *Keeper) GetInactiveNode(ctx sdk.Context, addr hubtypes.NodeAddress) (v types.Node, found bool)

func (*Keeper) GetNode

func (k *Keeper) GetNode(ctx sdk.Context, addr hubtypes.NodeAddress) (node types.Node, found bool)

func (*Keeper) GetNodes

func (k *Keeper) GetNodes(ctx sdk.Context) (items types.Nodes)

func (*Keeper) GetNodesForPlan added in v0.11.0

func (k *Keeper) GetNodesForPlan(ctx sdk.Context, id uint64) (items types.Nodes)

func (*Keeper) GetParams

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

func (*Keeper) HasActiveNode added in v0.11.0

func (k *Keeper) HasActiveNode(ctx sdk.Context, addr hubtypes.NodeAddress) bool

func (*Keeper) HasInactiveNode added in v0.11.0

func (k *Keeper) HasInactiveNode(ctx sdk.Context, addr hubtypes.NodeAddress) bool

func (*Keeper) HasNode

func (k *Keeper) HasNode(ctx sdk.Context, addr hubtypes.NodeAddress) bool

func (*Keeper) HasNodeForPlan added in v0.11.0

func (k *Keeper) HasNodeForPlan(ctx sdk.Context, id uint64, addr hubtypes.NodeAddress) bool

func (*Keeper) HasProvider

func (k *Keeper) HasProvider(ctx sdk.Context, addr hubtypes.ProvAddress) bool

func (*Keeper) IsMaxGigabytePricesModified added in v0.11.0

func (k *Keeper) IsMaxGigabytePricesModified(ctx sdk.Context) bool

func (*Keeper) IsMaxHourlyPricesModified added in v0.11.0

func (k *Keeper) IsMaxHourlyPricesModified(ctx sdk.Context) bool

func (*Keeper) IsMinGigabytePricesModified added in v0.11.0

func (k *Keeper) IsMinGigabytePricesModified(ctx sdk.Context) bool

func (*Keeper) IsMinHourlyPricesModified added in v0.11.0

func (k *Keeper) IsMinHourlyPricesModified(ctx sdk.Context) bool

func (*Keeper) IsValidGigabytePrices added in v0.11.0

func (k *Keeper) IsValidGigabytePrices(ctx sdk.Context, prices sdk.Coins) bool

func (*Keeper) IsValidHourlyPrices added in v0.11.0

func (k *Keeper) IsValidHourlyPrices(ctx sdk.Context, prices sdk.Coins) bool

func (*Keeper) IsValidSubscriptionGigabytes added in v0.11.0

func (k *Keeper) IsValidSubscriptionGigabytes(ctx sdk.Context, gigabytes int64) bool

func (*Keeper) IsValidSubscriptionHours added in v0.11.0

func (k *Keeper) IsValidSubscriptionHours(ctx sdk.Context, hours int64) bool

func (*Keeper) IterateNodes

func (k *Keeper) IterateNodes(ctx sdk.Context, fn func(index int, item types.Node) (stop bool))

func (*Keeper) IterateNodesForInactiveAt added in v0.11.0

func (k *Keeper) IterateNodesForInactiveAt(ctx sdk.Context, at time.Time, fn func(index int, item types.Node) (stop bool))

func (*Keeper) Logger

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

func (*Keeper) MaxGigabytePrices added in v0.11.0

func (k *Keeper) MaxGigabytePrices(ctx sdk.Context) (v sdk.Coins)

func (*Keeper) MaxHourlyPrices added in v0.11.0

func (k *Keeper) MaxHourlyPrices(ctx sdk.Context) (v sdk.Coins)

func (*Keeper) MaxSubscriptionGigabytes added in v0.11.0

func (k *Keeper) MaxSubscriptionGigabytes(ctx sdk.Context) (v int64)

func (*Keeper) MaxSubscriptionHours added in v0.11.0

func (k *Keeper) MaxSubscriptionHours(ctx sdk.Context) (v int64)

func (*Keeper) MinGigabytePrices added in v0.11.0

func (k *Keeper) MinGigabytePrices(ctx sdk.Context) (v sdk.Coins)

func (*Keeper) MinHourlyPrices added in v0.11.0

func (k *Keeper) MinHourlyPrices(ctx sdk.Context) (v sdk.Coins)

func (*Keeper) MinSubscriptionGigabytes added in v0.11.0

func (k *Keeper) MinSubscriptionGigabytes(ctx sdk.Context) (v int64)

func (*Keeper) MinSubscriptionHours added in v0.11.0

func (k *Keeper) MinSubscriptionHours(ctx sdk.Context) (v int64)

func (*Keeper) SetActiveNode added in v0.4.0

func (k *Keeper) SetActiveNode(ctx sdk.Context, node types.Node)

func (*Keeper) SetInactiveNode added in v0.4.0

func (k *Keeper) SetInactiveNode(ctx sdk.Context, node types.Node)

func (*Keeper) SetNode

func (k *Keeper) SetNode(ctx sdk.Context, node types.Node)

func (*Keeper) SetNodeForInactiveAt added in v0.11.0

func (k *Keeper) SetNodeForInactiveAt(ctx sdk.Context, at time.Time, addr hubtypes.NodeAddress)

func (*Keeper) SetNodeForPlan added in v0.11.0

func (k *Keeper) SetNodeForPlan(ctx sdk.Context, id uint64, addr hubtypes.NodeAddress)

func (*Keeper) SetParams

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

func (*Keeper) StakingShare added in v0.10.0

func (k *Keeper) StakingShare(ctx sdk.Context) (v sdk.Dec)

func (*Keeper) Store

func (k *Keeper) Store(ctx sdk.Context) sdk.KVStore

func (*Keeper) WithDistributionKeeper added in v0.4.0

func (k *Keeper) WithDistributionKeeper(keeper expected.DistributionKeeper)

func (*Keeper) WithProviderKeeper

func (k *Keeper) WithProviderKeeper(keeper expected.ProviderKeeper)

func (*Keeper) WithSubscriptionKeeper added in v0.11.0

func (k *Keeper) WithSubscriptionKeeper(keeper expected.SubscriptionKeeper)

type Migrator added in v0.9.0

type Migrator struct {
	Keeper
}

func NewMigrator added in v0.9.0

func NewMigrator(k Keeper) Migrator

func (Migrator) Migrate2to3 added in v0.11.0

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

Jump to

Keyboard shortcuts

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