keeper

package
v0.1.0-xco.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryPaymentTemplate            = "queryPaymentTemplate"
	QueryPaymentContract            = "queryPaymentContract"
	QueryPaymentContractsByIdPrefix = "queryPaymentContractsByIdPrefix"
	QuerySubscription               = "querySubscription"
)

Variables

This section is empty.

Functions

func HasBalances

func HasBalances(ctx sdk.Context, bankKeeper bankkeeper.Keeper, payerAddr sdk.AccAddress,
	requiredFunds sdk.Coins) bool

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper, bankKeeper bankkeeper.Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the gov MsgServer interface for the provided Keeper.

func NewQuerier

func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier

Types

type Keeper

type Keeper struct {
	IidKeeper          iidkeeper.Keeper
	ReservedIdPrefixes []string
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, storeKey sdk.StoreKey, bankKeeper bankkeeper.Keeper,
	iidKeeper iidkeeper.Keeper, reservedIdPrefixes []string) Keeper

func (Keeper) DiscountIdExists

func (k Keeper) DiscountIdExists(ctx sdk.Context, templateId string, discountId sdk.Uint) (bool, error)

func (Keeper) EffectPayment

func (k Keeper) EffectPayment(ctx sdk.Context, bankKeeper bankkeeper.Keeper,
	contractId string) (effected bool, err error)

func (Keeper) EffectPaymentPartial

func (k Keeper) EffectPaymentPartial(ctx sdk.Context, bankKeeper bankkeeper.Keeper,
	contractId string, partialPaymentAmount sdk.Coins) (effected bool, err error)

func (Keeper) EffectSubscriptionPayment

func (k Keeper) EffectSubscriptionPayment(ctx sdk.Context, subscriptionId string) error

func (Keeper) GetPaymentContract

func (k Keeper) GetPaymentContract(ctx sdk.Context, contractId string) (types.PaymentContract, error)

func (Keeper) GetPaymentContractIterator

func (k Keeper) GetPaymentContractIterator(ctx sdk.Context) sdk.Iterator

func (Keeper) GetPaymentContractsByPrefix

func (k Keeper) GetPaymentContractsByPrefix(ctx sdk.Context, contractIdPrefix string) []types.PaymentContract

func (Keeper) GetPaymentTemplate

func (k Keeper) GetPaymentTemplate(ctx sdk.Context, templateId string) (types.PaymentTemplate, error)

func (Keeper) GetPaymentTemplateIterator

func (k Keeper) GetPaymentTemplateIterator(ctx sdk.Context) sdk.Iterator

func (Keeper) GetSubscription

func (k Keeper) GetSubscription(ctx sdk.Context, subscriptionId string) (types.Subscription, error)

func (Keeper) GetSubscriptionIterator

func (k Keeper) GetSubscriptionIterator(ctx sdk.Context) sdk.Iterator

func (Keeper) GrantDiscount

func (k Keeper) GrantDiscount(ctx sdk.Context, contractId string, discountId sdk.Uint) error

func (Keeper) MustGetPaymentContract

func (k Keeper) MustGetPaymentContract(ctx sdk.Context, contractId string) types.PaymentContract

func (Keeper) MustGetPaymentContractByKey

func (k Keeper) MustGetPaymentContractByKey(ctx sdk.Context, key []byte) types.PaymentContract

func (Keeper) MustGetPaymentTemplate

func (k Keeper) MustGetPaymentTemplate(ctx sdk.Context, templateId string) types.PaymentTemplate

func (Keeper) MustGetPaymentTemplateByKey

func (k Keeper) MustGetPaymentTemplateByKey(ctx sdk.Context, key []byte) types.PaymentTemplate

func (Keeper) MustGetSubscriptionByKey

func (k Keeper) MustGetSubscriptionByKey(ctx sdk.Context, key []byte) types.Subscription

func (Keeper) PaymentContractExists

func (k Keeper) PaymentContractExists(ctx sdk.Context, contractId string) bool

func (Keeper) PaymentContractIdReserved

func (k Keeper) PaymentContractIdReserved(id string) bool

func (Keeper) PaymentTemplateExists

func (k Keeper) PaymentTemplateExists(ctx sdk.Context, templateId string) bool

func (Keeper) PaymentTemplateIdReserved

func (k Keeper) PaymentTemplateIdReserved(id string) bool

func (Keeper) RevokeDiscount

func (k Keeper) RevokeDiscount(ctx sdk.Context, contractId string) error

func (Keeper) SetPaymentContract

func (k Keeper) SetPaymentContract(ctx sdk.Context, contract types.PaymentContract)

func (Keeper) SetPaymentContractAuthorised

func (k Keeper) SetPaymentContractAuthorised(ctx sdk.Context, contractId string,
	authorised bool) error

func (Keeper) SetPaymentTemplate

func (k Keeper) SetPaymentTemplate(ctx sdk.Context, template types.PaymentTemplate)

func (Keeper) SetSubscription

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

func (Keeper) SubscriptionExists

func (k Keeper) SubscriptionExists(ctx sdk.Context, subscriptionId string) bool

func (Keeper) SubscriptionIdReserved

func (k Keeper) SubscriptionIdReserved(id string) bool

Jump to

Keyboard shortcuts

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