keepers

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2019 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultFeeForAliasLength2         = 2000000
	DefaultFeeForAliasLength3         = 300000
	DefaultFeeForAliasLength4         = 40000
	DefaultFeeForAliasLength5         = 5000
	DefaultFeeForAliasLength6         = 600
	DefaultFeeForAliasLength7OrHigher = 70
	DefaultMaxAliasCount              = 5
)
View Source
const (
	GetAddressFromAlias = 1
	ListAliasOfAccount  = 2
)
View Source
const (
	QueryAliasInfo = "alias-info"
)

Variables

View Source
var (
	AliasToAccountKey    = []byte{0x10}
	AliasToAccountKeyEnd = []byte{0x11}
	AccountToAliasKey    = []byte{0x12}
)
View Source
var (
	KeyFeeForAliasLength2         = []byte("FeeForAliasLength2")
	KeyFeeForAliasLength3         = []byte("FeeForAliasLength3")
	KeyFeeForAliasLength4         = []byte("FeeForAliasLength4")
	KeyFeeForAliasLength5         = []byte("FeeForAliasLength5")
	KeyFeeForAliasLength6         = []byte("FeeForAliasLength6")
	KeyFeeForAliasLength7OrHigher = []byte("FeeForAliasLength7OrHigher")
	KeyMaxAliasCount              = []byte("MaxAliasCount")
)

Functions

func NewQuerier

func NewQuerier(keeper Keeper, cdc *codec.Codec) sdk.Querier

creates a querier for asset REST endpoints

func ParamKeyTable

func ParamKeyTable() params.KeyTable

ParamKeyTable for asset module

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 {
	AliasKeeper *AliasKeeper
	BankKeeper  types.ExpectedBankxKeeper
	AssetKeeper types.ExpectedAssetStatusKeeper
	// contains filtered or unexported fields
}

func NewKeeper

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

func (Keeper) GetParams

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

GetParams gets the asset module's parameters.

func (Keeper) SetParams

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

SetParams sets the asset module's parameters.

type Params

type Params struct {
	FeeForAliasLength2         int64 `json:"fee_for_alias_length_2"`
	FeeForAliasLength3         int64 `json:"fee_for_alias_length_3"`
	FeeForAliasLength4         int64 `json:"fee_for_alias_length_4"`
	FeeForAliasLength5         int64 `json:"fee_for_alias_length_5"`
	FeeForAliasLength6         int64 `json:"fee_for_alias_length_6"`
	FeeForAliasLength7OrHigher int64 `json:"fee_for_alias_length_7_or_higher"`
	MaxAliasCount              int   `json:"max_alias_count"`
}

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters.

func (Params) Equal

func (p Params) Equal(p2 Params) bool

Equal returns a boolean determining if two Params types are identical.

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() params.ParamSetPairs

ParamSetPairs implements the ParamSet interface and returns all the key/value pairs pairs of asset module's parameters. nolint

func (*Params) ValidateGenesis

func (p *Params) ValidateGenesis() error

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