keepers

package
v0.2.6-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2020 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryAliasInfo  = "alias-info"
	QueryParameters = "parameters"
)
View Source
const (
	GetAddressFromAlias = 1
	ListAliasOfAccount  = 2
)

Variables

View Source
var (
	AliasToAccountKey    = []byte{0x10}
	AliasToAccountKeyEnd = []byte{0x11}
	AccountToAliasKey    = []byte{0x12}
)

Functions

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

creates a querier for asset REST endpoints

Types

type AliasEntry

type AliasEntry struct {
	Alias     string         `json:"alias"`
	Addr      sdk.AccAddress `json:"addr"`
	AsDefault bool           `json:"is_default"`
}

type AliasKeeper

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

func NewAliasKeeper

func NewAliasKeeper(key sdk.StoreKey) *AliasKeeper

func (*AliasKeeper) AddAlias

func (keeper *AliasKeeper) AddAlias(ctx sdk.Context, alias string, addr sdk.AccAddress, asDefault bool, maxCount int) (bool, bool)

func (*AliasKeeper) GetAddressFromAlias

func (keeper *AliasKeeper) GetAddressFromAlias(ctx sdk.Context, alias string) ([]byte, bool)

func (*AliasKeeper) GetAliasListOfAccount

func (keeper *AliasKeeper) GetAliasListOfAccount(ctx sdk.Context, addr sdk.AccAddress) []string

func (*AliasKeeper) GetAllAlias

func (keeper *AliasKeeper) GetAllAlias(ctx sdk.Context) []AliasEntry

func (*AliasKeeper) RemoveAlias

func (keeper *AliasKeeper) RemoveAlias(ctx sdk.Context, alias string, addr sdk.AccAddress)

type Keeper

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

func NewKeeper

func NewKeeper(key sdk.StoreKey,
	bankKeeper types.ExpectedBankxKeeper,
	assetKeeper types.ExpectedAssetStatusKeeper,
	paramstore params.Subspace) Keeper

func (*Keeper) AddAlias

func (k *Keeper) AddAlias(ctx sdk.Context, alias string, addr sdk.AccAddress, asDefault bool, maxCount int) (bool, bool)

func (*Keeper) DeductInt64CetFee

func (k *Keeper) DeductInt64CetFee(ctx sdk.Context, addr sdk.AccAddress, amt int64) sdk.Error

func (*Keeper) GetAddressFromAlias

func (k *Keeper) GetAddressFromAlias(ctx sdk.Context, alias string) ([]byte, bool)

func (*Keeper) GetAliasListOfAccount

func (k *Keeper) GetAliasListOfAccount(ctx sdk.Context, addr sdk.AccAddress) []string

func (*Keeper) GetAllAlias

func (k *Keeper) GetAllAlias(ctx sdk.Context) []AliasEntry

func (Keeper) GetParams

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

GetParams gets the asset module's parameters.

func (*Keeper) IsTokenIssuer

func (k *Keeper) IsTokenIssuer(ctx sdk.Context, denom string, addr sdk.AccAddress) bool

func (*Keeper) RemoveAlias

func (k *Keeper) RemoveAlias(ctx sdk.Context, alias string, addr sdk.AccAddress)

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams sets the asset module's parameters.

type QueryAliasInfoParam

type QueryAliasInfoParam struct {
	Owner   sdk.AccAddress `json:"owner"`
	Alias   string         `json:"alias"`
	QueryOp int32          `json:"query_op"`
}

Jump to

Keyboard shortcuts

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