types

package
v0.2.17 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeSpaceAlias sdk.CodespaceType = "alias"

	// 1101 ~ 1199
	CodeEmptyAlias              sdk.CodeType = 1101
	CodeInvalidAlias            sdk.CodeType = 1102
	CodeUnknownOperation        sdk.CodeType = 1103
	CodeMarshalFailed           sdk.CodeType = 1104
	CodeUnMarshalFailed         sdk.CodeType = 1105
	CodeAliasAlreadyExists      sdk.CodeType = 1106
	CodeNoSuchAlias             sdk.CodeType = 1107
	CodeCanOnlyBeUsedByCetOwner sdk.CodeType = 1108
	CodeMaxAliasCountReached    sdk.CodeType = 1109
)
View Source
const (
	EventTypeAddAlias    = "add_alias"
	EventTypeRemoveAlias = "remove_alias"

	AttributeValueCategory = "alias"

	AttributeKeyAlias     = "alias"
	AttributeKeyAsDefault = "as_default"
)
View Source
const (
	// Query
	// ModuleName is the name of the module
	ModuleName = "alias"

	// StoreKey is string representation of the store key for asset
	StoreKey = ModuleName

	// RouterKey is the message route for asset
	RouterKey = ModuleName

	// QuerierRoute is the querier route for asset
	QuerierRoute = ModuleName

	DefaultParamspace = ModuleName

	// Kafka topic name
	Topic = ModuleName
)
View Source
const (
	DefaultFeeForAliasLength2         = 10000e8
	DefaultFeeForAliasLength3         = 5000e8
	DefaultFeeForAliasLength4         = 2000e8
	DefaultFeeForAliasLength5         = 1000e8
	DefaultFeeForAliasLength6         = 100e8
	DefaultFeeForAliasLength7OrHigher = 10e8
	DefaultMaxAliasCount              = 5
)

Variables

View Source
var (
	KeyFeeForAliasLength2         = []byte("FeeForAliasLength2")
	KeyFeeForAliasLength3         = []byte("FeeForAliasLength3")
	KeyFeeForAliasLength4         = []byte("FeeForAliasLength4")
	KeyFeeForAliasLength5         = []byte("FeeForAliasLength5")
	KeyFeeForAliasLength6         = []byte("FeeForAliasLength6")
	KeyFeeForAliasLength7OrHigher = []byte("FeeForAliasLength7OrHigher")
	KeyMaxAliasCount              = []byte("MaxAliasCount")
)
View Source
var (
	ModuleCdc = codec.New()
)

Functions

func ErrAliasAlreadyExists

func ErrAliasAlreadyExists() sdk.Error

func ErrCanOnlyBeUsedByCetOwner

func ErrCanOnlyBeUsedByCetOwner(a string) sdk.Error

func ErrEmptyAlias

func ErrEmptyAlias() sdk.Error

func ErrInvalidAlias

func ErrInvalidAlias() sdk.Error

func ErrMaxAliasCountReached

func ErrMaxAliasCountReached() sdk.Error

func ErrNoSuchAlias

func ErrNoSuchAlias() sdk.Error

func IsOnlyForCoinEx

func IsOnlyForCoinEx(alias string) bool

func IsValidAlias

func IsValidAlias(alias string) bool

func ParamKeyTable

func ParamKeyTable() params.KeyTable

ParamKeyTable for alias module

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

Types

type ExpectedAssetStatusKeeper

type ExpectedAssetStatusKeeper interface {
	IsTokenIssuer(ctx sdk.Context, denom string, addr sdk.AccAddress) bool
}

Asset Keeper will implement the interface

type ExpectedBankxKeeper

type ExpectedBankxKeeper interface {
	DeductInt64CetFee(ctx sdk.Context, addr sdk.AccAddress, amt int64) sdk.Error
}

Bankx Keeper will implement the interface

type MsgAliasUpdate

type MsgAliasUpdate struct {
	Owner     sdk.AccAddress `json:"owner"`
	Alias     string         `json:"alias"`
	IsAdd     bool           `json:"is_add"`
	AsDefault bool           `json:"as_default"`
}

func (MsgAliasUpdate) GetSignBytes

func (msg MsgAliasUpdate) GetSignBytes() []byte

func (MsgAliasUpdate) GetSigners

func (msg MsgAliasUpdate) GetSigners() []sdk.AccAddress

func (MsgAliasUpdate) Route

func (msg MsgAliasUpdate) Route() string

func (*MsgAliasUpdate) SetAccAddress

func (msg *MsgAliasUpdate) SetAccAddress(addr sdk.AccAddress)

func (MsgAliasUpdate) Type

func (msg MsgAliasUpdate) Type() string

func (MsgAliasUpdate) ValidateBasic

func (msg MsgAliasUpdate) ValidateBasic() sdk.Error

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) GetFeeForAlias

func (p *Params) GetFeeForAlias(alias string) int64

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) String

func (p Params) String() string

func (*Params) ValidateGenesis

func (p *Params) ValidateGenesis() error

Jump to

Keyboard shortcuts

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