keeper

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryOwner        = "owner"
	QueryShow         = "show"
	QueryList         = "list"
	QueryCerberusAddr = "cerberus-addr"
)

query endpoints supported by the pdv Querier

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

NewQuerier creates a new querier for pdv clients.

Types

type Index added in v0.3.0

type Index interface {
	AddPDV(pdv types.PDV) error
	ListPDV(owner sdk.AccAddress, from *uint64, limit uint) ([]types.PDV, error)
}

func NewIndex added in v0.3.0

func NewIndex(db *bolt.DB) (Index, error)

type Keeper

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

Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine

func NewKeeper

func NewKeeper(cdc *codec.Codec, storeKey sdk.StoreKey, tokens TokenKeeper, index Index) Keeper

NewKeeper creates new instances of the PDV Keeper

func (Keeper) GetOwner

func (k Keeper) GetOwner(ctx sdk.Context, name string) sdk.AccAddress

GetOwner - get the current owner of a name

func (Keeper) GetPDV

func (k Keeper) GetPDV(ctx sdk.Context, address string) types.PDV

Gets the entire PDV metadata struct for an address

func (Keeper) GetPDVsIterator

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

Get an iterator over all PDVs in which the keys are the address and the values are the PDV

func (Keeper) IsHashPresent

func (k Keeper) IsHashPresent(ctx sdk.Context, address string) bool

Check if the address is present in the store or not

func (Keeper) SetPDV

func (k Keeper) SetPDV(ctx sdk.Context, address string, pdv types.PDV)

Sets the entire PDV metadata struct for an address

type TokenKeeper

type TokenKeeper interface {
	AddTokens(ctx sdk.Context, owner sdk.AccAddress, timestamp uint64, amount sdk.Int)
}

Jump to

Keyboard shortcuts

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