keeper

package
v0.11.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 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(k Keeper) types.MsgServiceServer

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) BeginBlock added in v0.11.0

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

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) (*types.NodeSubscription, error)

func (*Keeper) CreateSubscriptionForPlan added in v0.11.0

func (k *Keeper) CreateSubscriptionForPlan(ctx sdk.Context, accAddr sdk.AccAddress, id uint64, denom string) (*types.PlanSubscription, error)

func (*Keeper) DeleteAllocation added in v0.11.0

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

func (*Keeper) DeletePayout added in v0.11.0

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

func (*Keeper) DeletePayoutForAccount added in v0.11.0

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

func (*Keeper) DeletePayoutForNode added in v0.11.0

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

func (*Keeper) DeletePayoutForTimestamp

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

func (*Keeper) DeleteSubscription added in v0.9.0

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

func (*Keeper) DeleteSubscriptionForAccount added in v0.11.0

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

func (*Keeper) DeleteSubscriptionForExpiryAt

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

func (*Keeper) DeleteSubscriptionForNode added in v0.11.0

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

func (*Keeper) DeleteSubscriptionForPlan added in v0.11.0

func (k *Keeper) DeleteSubscriptionForPlan(ctx sdk.Context, planID, subscriptionID uint64)

func (*Keeper) DepositAdd

func (k *Keeper) DepositAdd(ctx sdk.Context, addr sdk.AccAddress, coin sdk.Coin) error

func (*Keeper) DepositSubtract

func (k *Keeper) DepositSubtract(ctx sdk.Context, addr sdk.AccAddress, coin sdk.Coin) error

func (*Keeper) EndBlock added in v0.11.0

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

func (*Keeper) ExpiryDuration

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

func (*Keeper) GetAllocation added in v0.11.0

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

func (*Keeper) GetAllocations

func (k *Keeper) GetAllocations(ctx sdk.Context, id uint64) (items types.Allocations)

func (*Keeper) GetCount added in v0.4.0

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

func (*Keeper) GetNode

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

func (*Keeper) GetParams

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

func (*Keeper) GetPayout added in v0.11.0

func (k *Keeper) GetPayout(ctx sdk.Context, id uint64) (payout types.Payout, found bool)

func (*Keeper) GetPayouts added in v0.11.0

func (k *Keeper) GetPayouts(ctx sdk.Context) (items types.Payouts)

func (*Keeper) GetPlan

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

func (*Keeper) GetSubscription

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

func (*Keeper) GetSubscriptions

func (k *Keeper) GetSubscriptions(ctx sdk.Context) (items types.Subscriptions)

func (*Keeper) GetSubscriptionsForAccount added in v0.11.0

func (k *Keeper) GetSubscriptionsForAccount(ctx sdk.Context, addr sdk.AccAddress) (items types.Subscriptions)

func (*Keeper) GetSubscriptionsForNode

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

func (*Keeper) GetSubscriptionsForPlan

func (k *Keeper) GetSubscriptionsForPlan(ctx sdk.Context, id uint64) (items types.Subscriptions)

func (*Keeper) HasAllocation added in v0.11.0

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

func (*Keeper) HasPayout added in v0.11.0

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

func (*Keeper) HasSubscriptionForAccount added in v0.11.0

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

func (*Keeper) HashPayoutForAccount added in v0.11.0

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

func (*Keeper) HashPayoutForNode added in v0.11.0

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

func (*Keeper) HashSubscriptionForNode added in v0.11.0

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

func (*Keeper) HashSubscriptionForPlan added in v0.11.0

func (k *Keeper) HashSubscriptionForPlan(ctx sdk.Context, planID, subscriptionID uint64) bool

func (*Keeper) HookEndSession

func (k *Keeper) HookEndSession(ctx sdk.Context, subscriptionID uint64, accAddr sdk.AccAddress, nodeAddr hubtypes.NodeAddress, bytes sdk.Int) error

func (*Keeper) IterateAllocations

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

func (*Keeper) IteratePayouts added in v0.11.0

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

func (*Keeper) IteratePayoutsForTimestamp

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

func (*Keeper) IterateSubscriptionsForExpiryAt

func (k *Keeper) IterateSubscriptionsForExpiryAt(ctx sdk.Context, endTime time.Time, fn func(index int, item types.Subscription) (stop bool))

func (*Keeper) Logger

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

func (*Keeper) SendCoin

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

func (*Keeper) SendCoinFromAccountToModule added in v0.10.0

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

func (*Keeper) SendCoinFromDepositToAccount added in v0.11.0

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

func (*Keeper) SendCoinFromDepositToModule added in v0.11.0

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

func (*Keeper) SetAllocation added in v0.11.0

func (k *Keeper) SetAllocation(ctx sdk.Context, alloc types.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) SetPayout added in v0.11.0

func (k *Keeper) SetPayout(ctx sdk.Context, payout types.Payout)

func (*Keeper) SetPayoutForAccount added in v0.11.0

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

func (*Keeper) SetPayoutForNode added in v0.11.0

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

func (*Keeper) SetPayoutForTimestamp

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

func (*Keeper) SetSubscription

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

func (*Keeper) SetSubscriptionForAccount added in v0.11.0

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

func (*Keeper) SetSubscriptionForExpiryAt

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

func (*Keeper) SetSubscriptionForNode

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

func (*Keeper) SetSubscriptionForPlan

func (k *Keeper) SetSubscriptionForPlan(ctx sdk.Context, planID, subscriptionID uint64)

func (*Keeper) Store

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

func (*Keeper) WithBankKeeper

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

func (*Keeper) WithDepositKeeper

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

func (*Keeper) WithNodeKeeper

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

func (*Keeper) WithPlanKeeper

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

func (*Keeper) WithProviderKeeper added in v0.10.0

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

func (*Keeper) WithSessionKeeper added in v0.8.0

func (k *Keeper) WithSessionKeeper(keeper expected.SessionKeeper)

Jump to

Keyboard shortcuts

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