keeper

package
v0.11.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2023 License: Apache-2.0 Imports: 20 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(keeper Keeper) types.MsgServiceServer

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

func NewQueryServiceServer added in v0.6.0

func NewQueryServiceServer(keeper 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, feeCollectorName string) Keeper

func (*Keeper) DeleteSession added in v0.9.0

func (k *Keeper) DeleteSession(ctx sdk.Context, id uint64)

func (*Keeper) DeleteSessionForAccount added in v0.11.0

func (k *Keeper) DeleteSessionForAccount(ctx sdk.Context, addr sdk.AccAddress, id uint64)

func (*Keeper) DeleteSessionForAllocation added in v0.11.0

func (k *Keeper) DeleteSessionForAllocation(ctx sdk.Context, subscriptionID uint64, addr sdk.AccAddress, sessionID uint64)

func (*Keeper) DeleteSessionForInactiveAt added in v0.11.0

func (k *Keeper) DeleteSessionForInactiveAt(ctx sdk.Context, at time.Time, id uint64)

func (*Keeper) DeleteSessionForNode added in v0.11.0

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

func (*Keeper) DeleteSessionForSubscription added in v0.11.0

func (k *Keeper) DeleteSessionForSubscription(ctx sdk.Context, subscriptionID, sessionID uint64)

func (*Keeper) EndBlock added in v0.11.0

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

EndBlock is a function that gets called at the end of every block. It processes the inactive sessions and updates their status accordingly. The function returns a slice of ValidatorUpdate, but in this case, it always returns nil.

func (*Keeper) GetAccount added in v0.5.0

func (k *Keeper) GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI

func (*Keeper) GetAllocation added in v0.11.0

func (k *Keeper) GetAllocation(ctx sdk.Context, id uint64, addr sdk.AccAddress) (subscriptiontypes.Allocation, bool)

func (*Keeper) GetCount added in v0.4.0

func (k *Keeper) GetCount(ctx sdk.Context) uint64

func (*Keeper) GetLatestPayoutForAccountByNode added in v0.11.0

func (k *Keeper) GetLatestPayoutForAccountByNode(ctx sdk.Context, accAddr sdk.AccAddress, nodeAddr hubtypes.NodeAddress) (subscriptiontypes.Payout, bool)

func (*Keeper) GetLatestSessionForAllocation added in v0.11.0

func (k *Keeper) GetLatestSessionForAllocation(ctx sdk.Context, subscriptionID uint64, addr sdk.AccAddress) (session types.Session, found bool)

func (*Keeper) GetLatestSessionForSubscription added in v0.11.0

func (k *Keeper) GetLatestSessionForSubscription(ctx sdk.Context, subscriptionID uint64) (session types.Session, found bool)

func (*Keeper) GetNode added in v0.6.1

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

func (*Keeper) GetParams

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

func (*Keeper) GetPlan added in v0.11.0

func (k *Keeper) GetPlan(ctx sdk.Context, id uint64) (plantypes.Plan, bool)

func (*Keeper) GetSession

func (k *Keeper) GetSession(ctx sdk.Context, id uint64) (session types.Session, found bool)

func (*Keeper) GetSessions

func (k *Keeper) GetSessions(ctx sdk.Context) (items types.Sessions)

func (*Keeper) GetSessionsForAccount added in v0.11.0

func (k *Keeper) GetSessionsForAccount(ctx sdk.Context, addr sdk.AccAddress) (items types.Sessions)

func (*Keeper) GetSessionsForNode

func (k *Keeper) GetSessionsForNode(ctx sdk.Context, addr hubtypes.NodeAddress) (items types.Sessions)

func (*Keeper) GetSessionsForSubscription

func (k *Keeper) GetSessionsForSubscription(ctx sdk.Context, id uint64) (items types.Sessions)

func (*Keeper) GetSubscription

func (k *Keeper) GetSubscription(ctx sdk.Context, id uint64) (subscriptiontypes.Subscription, bool)

func (*Keeper) HasNodeForPlan

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

func (*Keeper) IterateSessions

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

func (*Keeper) IterateSessionsForAllocation added in v0.11.0

func (k *Keeper) IterateSessionsForAllocation(ctx sdk.Context, id uint64, addr sdk.AccAddress, fn func(index int, item types.Session) (stop bool))

func (*Keeper) IterateSessionsForInactiveAt added in v0.11.0

func (k *Keeper) IterateSessionsForInactiveAt(ctx sdk.Context, end time.Time, fn func(index int, item types.Session) (stop bool))

func (*Keeper) IterateSessionsForSubscription added in v0.11.0

func (k *Keeper) IterateSessionsForSubscription(ctx sdk.Context, id uint64, fn func(index int, item types.Session) (stop bool))

func (*Keeper) Logger

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

func (*Keeper) ProofVerificationEnabled added in v0.5.0

func (k *Keeper) ProofVerificationEnabled(ctx sdk.Context) (yes bool)

func (*Keeper) SendCoinFromDepositToAccount added in v0.8.0

func (k *Keeper) SendCoinFromDepositToAccount(ctx sdk.Context, from, to sdk.AccAddress, coin sdk.Coin) error

func (*Keeper) SendCoinFromDepositToModule added in v0.10.0

func (k *Keeper) SendCoinFromDepositToModule(ctx sdk.Context, from sdk.AccAddress, to string, coin sdk.Coin) error

func (*Keeper) SetAllocation added in v0.11.0

func (k *Keeper) SetAllocation(ctx sdk.Context, alloc subscriptiontypes.Allocation)

func (*Keeper) SetCount added in v0.4.0

func (k *Keeper) SetCount(ctx sdk.Context, count uint64)

func (*Keeper) SetParams

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

func (*Keeper) SetSession

func (k *Keeper) SetSession(ctx sdk.Context, session types.Session)

func (*Keeper) SetSessionForAccount added in v0.11.0

func (k *Keeper) SetSessionForAccount(ctx sdk.Context, addr sdk.AccAddress, id uint64)

func (*Keeper) SetSessionForAllocation added in v0.11.0

func (k *Keeper) SetSessionForAllocation(ctx sdk.Context, subscriptionID uint64, addr sdk.AccAddress, sessionID uint64)

func (*Keeper) SetSessionForInactiveAt added in v0.11.0

func (k *Keeper) SetSessionForInactiveAt(ctx sdk.Context, at time.Time, id uint64)

func (*Keeper) SetSessionForNode

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

func (*Keeper) SetSessionForSubscription

func (k *Keeper) SetSessionForSubscription(ctx sdk.Context, subscriptionID, sessionID uint64)

func (*Keeper) StatusChangeDelay added in v0.11.0

func (k *Keeper) StatusChangeDelay(ctx sdk.Context) (duration time.Duration)

func (*Keeper) Store

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

func (*Keeper) SubscriptionInactivePendingHook added in v0.11.0

func (k *Keeper) SubscriptionInactivePendingHook(ctx sdk.Context, id uint64) error

func (*Keeper) VerifySignature added in v0.11.0

func (k *Keeper) VerifySignature(ctx sdk.Context, addr sdk.AccAddress, proof types.Proof, signature []byte) error

func (*Keeper) WithAccountKeeper added in v0.5.0

func (k *Keeper) WithAccountKeeper(keeper expected.AccountKeeper)

func (*Keeper) WithBankKeeper added in v0.10.0

func (k *Keeper) WithBankKeeper(keeper expected.BankKeeper)

func (*Keeper) WithDepositKeeper added in v0.3.1

func (k *Keeper) WithDepositKeeper(keeper expected.DepositKeeper)

func (*Keeper) WithNodeKeeper added in v0.6.1

func (k *Keeper) WithNodeKeeper(keeper expected.NodeKeeper)

func (*Keeper) WithPlanKeeper

func (k *Keeper) WithPlanKeeper(keeper expected.PlanKeeper)

func (*Keeper) WithSubscriptionKeeper

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

Jump to

Keyboard shortcuts

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