keeper

package
v1.0.0-8-g7d58390 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(k Keeper) sdk.Querier

NewQuerier creates a new querier for halborn clients.

Types

type Cache

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

Cache caches data

func NewCache

func NewCache() *Cache

NewCache returns instance of Cache

func (*Cache) DelAdvertisement

func (c *Cache) DelAdvertisement(key string)

func (*Cache) GetAdvertisement

func (c *Cache) GetAdvertisement(key string) (*types.Advertisement, bool)

func (*Cache) GetAllAdvertisements

func (c *Cache) GetAllAdvertisements() []*types.Advertisement

func (*Cache) PrepareAdvertisements

func (c *Cache) PrepareAdvertisements(advertisements []*types.Advertisement)

func (*Cache) Reset

func (c *Cache) Reset()

Reset clears cache

func (*Cache) SetAdvertisement

func (c *Cache) SetAdvertisement(advertisement *types.Advertisement)

type Keeper

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

Keeper of the halborn store

func NewKeeper

func NewKeeper(supplyKeeper types.SupplyKeeper, cdc *codec.Codec, key sdk.StoreKey) Keeper

NewKeeper creates a halborn keeper

func (Keeper) AdvertisementExists

func (k Keeper) AdvertisementExists(ctx sdk.Context, key string) bool

Check if the key exists in the store

func (Keeper) DeleteAdvertisement

func (k Keeper) DeleteAdvertisement(ctx sdk.Context, key string)

DeleteAdvertisement deletes a advertisement

func (Keeper) Deposit

func (k Keeper) Deposit(ctx sdk.Context, key string, from sdk.AccAddress, amount sdk.Coin) error

func (Keeper) GetAdvertisement

func (k Keeper) GetAdvertisement(ctx sdk.Context, key string) (*types.Advertisement, error)

GetAdvertisement returns the advertisement information

func (Keeper) GetAdvertisements

func (k Keeper) GetAdvertisements(ctx sdk.Context) []*types.Advertisement

GetAdvertisements returns all advertisements

func (Keeper) GetAdvertisementsFromStore

func (k Keeper) GetAdvertisementsFromStore(ctx sdk.Context) []*types.Advertisement

GetAdvertisements returns all advertisements from store without cache

func (Keeper) GetSupplyKeeper

func (k Keeper) GetSupplyKeeper() types.SupplyKeeper

GetSupplyKeeper returns supply Keeper

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) SetAdvertisement

func (k Keeper) SetAdvertisement(ctx sdk.Context, advertisement *types.Advertisement)

SetAdvertisement sets a advertisement

func (Keeper) Withdraw

func (k Keeper) Withdraw(ctx sdk.Context, key string, to sdk.AccAddress, amount sdk.Coin) error

Jump to

Keyboard shortcuts

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