keeper

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 10 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 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, paramSpace params.Subspace) Keeper

NewKeeper creates new instances of the PDV Keeper

func (*Keeper) GetCerberusAddr added in v1.0.0

func (k *Keeper) GetCerberusAddr(ctx sdk.Context) string

GetCerberusAddr returns the current Cerberus address

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) ListPDV added in v0.5.3

func (k *Keeper) ListPDV(ctx sdk.Context, owner sdk.AccAddress, from *uint64, limit uint) []types.PDV

func (*Keeper) SetCerberusAddr added in v1.0.0

func (k *Keeper) SetCerberusAddr(ctx sdk.Context, addr string)

SetCerberusAddr sets the Cerberus address

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, amount sdk.Int, description []byte)
}

Jump to

Keyboard shortcuts

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