types

package
v0.0.15 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	CodeSpaceBankx sdk.CodespaceType = ModuleName

	// 301 ~ 399
	CodeMemoMissing                     sdk.CodeType = 301
	CodeInsufficientCETForActivationFee sdk.CodeType = 302
	CodeInvalidActivationFee            sdk.CodeType = 303
	CodeInvalidUnlockTime               sdk.CodeType = 304
	CodeTokenForbiddenByOwner           sdk.CodeType = 305
	CodeInvalidLockCoinsFee             sdk.CodeType = 306
	CodeNoInputs                        sdk.CodeType = 307
	CodeNoOutputs                       sdk.CodeType = 308
	CodeInputOutputMismatch             sdk.CodeType = 309
)
View Source
const (
	ModuleName        = "bankx"
	StoreKey          = ModuleName
	DefaultParamspace = ModuleName
	RouterKey         = ModuleName

	AttributeKeyAddr         = "address"
	AttributeKeyMemoRequired = "memo-required"

	Topic = ModuleName
)

Variables

View Source
var (
	KeyActivationFee = []byte("ActivationFee")
	KeyLockCoinsFee  = []byte("LockCoinsFee")
)
View Source
var ModuleCdc = codec.New()

Functions

func ErrInputOutputMismatch

func ErrInputOutputMismatch(msg string) sdk.Error

func ErrMemoMissing

func ErrMemoMissing() sdk.Error

func ErrNoInputs

func ErrNoInputs() sdk.Error

func ErrNoOutputs

func ErrNoOutputs() sdk.Error

func ErrTokenForbiddenByOwner

func ErrTokenForbiddenByOwner() sdk.Error

func ErrUnlockTime

func ErrUnlockTime(msg string) sdk.Error

func ErrorInsufficientCETForActivatingFee

func ErrorInsufficientCETForActivatingFee() sdk.Error

func ErrorInvalidActivatingFee added in v0.0.15

func ErrorInvalidActivatingFee() sdk.Error

func ErrorInvalidLockCoinsFee added in v0.0.15

func ErrorInvalidLockCoinsFee() sdk.Error

func ParamKeyTable

func ParamKeyTable() params.KeyTable

ParamKeyTable type declaration for parameters

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on the codec

func ValidateInputsOutputs

func ValidateInputsOutputs(inputs []bank.Input, outputs []bank.Output) sdk.Error

ValidateInputsOutputs validates that each respective input and output is valid and that the sum of inputs is equal to the sum of outputs.

Types

type ExpectedAccountXKeeper

type ExpectedAccountXKeeper interface {
	GetOrCreateAccountX(ctx sdk.Context, addr sdk.AccAddress) authx.AccountX
	GetAccountX(ctx sdk.Context, addr sdk.AccAddress) (ax authx.AccountX, ok bool)
	SetAccountX(ctx sdk.Context, ax authx.AccountX)
	IterateAccounts(ctx sdk.Context, process func(authx.AccountX) (stop bool))
	InsertUnlockedCoinsQueue(ctx sdk.Context, unlockedTime int64, address sdk.AccAddress)
}

type ExpectedAssetStatusKeeper

type ExpectedAssetStatusKeeper interface {
	IsTokenForbidden(ctx sdk.Context, symbol string) bool
	IsForbiddenByTokenIssuer(ctx sdk.Context, symbol string, addr sdk.AccAddress) bool
	UpdateTokenSendLock(ctx sdk.Context, symbol string, amount sdk.Int, lock bool) sdk.Error
}

type MsgMultiSend

type MsgMultiSend struct {
	Inputs  []bank.Input  `json:"inputs" yaml:"inputs"`
	Outputs []bank.Output `json:"outputs" yaml:"outputs"`
}

MsgMultiSend - high level transaction of the coin module

func NewMsgMultiSend

func NewMsgMultiSend(in []bank.Input, out []bank.Output) MsgMultiSend

NewMsgMultiSend - construct arbitrary multi-in, multi-out send msg.

func (MsgMultiSend) GetSignBytes

func (msg MsgMultiSend) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgMultiSend) GetSigners

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

GetSigners Implements Msg.

func (MsgMultiSend) Route

func (msg MsgMultiSend) Route() string

Route Implements Msg

func (MsgMultiSend) Type

func (msg MsgMultiSend) Type() string

Type Implements Msg

func (MsgMultiSend) ValidateBasic

func (msg MsgMultiSend) ValidateBasic() sdk.Error

ValidateBasic Implements Msg.

type MsgSend

type MsgSend struct {
	FromAddress sdk.AccAddress `json:"from_address"`
	ToAddress   sdk.AccAddress `json:"to_address"`
	Amount      sdk.Coins      `json:"amount"`
	UnlockTime  int64          `json:"unlock_time"`
}

func NewMsgSend

func NewMsgSend(fromAddr, toAddr sdk.AccAddress, amount sdk.Coins, unlockTime int64) MsgSend

func (MsgSend) GetSignBytes

func (msg MsgSend) GetSignBytes() []byte

func (MsgSend) GetSigners

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

func (MsgSend) Route

func (msg MsgSend) Route() string

func (*MsgSend) SetAccAddress added in v0.0.15

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

func (MsgSend) Type

func (msg MsgSend) Type() string

func (MsgSend) ValidateBasic

func (msg MsgSend) ValidateBasic() sdk.Error

type MsgSetMemoRequired

type MsgSetMemoRequired struct {
	Address  sdk.AccAddress `json:"address"`
	Required bool           `json:"required"`
}

func NewMsgSetTransferMemoRequired

func NewMsgSetTransferMemoRequired(addr sdk.AccAddress, required bool) MsgSetMemoRequired

func (MsgSetMemoRequired) GetSignBytes

func (msg MsgSetMemoRequired) GetSignBytes() []byte

func (MsgSetMemoRequired) GetSigners

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

func (MsgSetMemoRequired) Route

func (msg MsgSetMemoRequired) Route() string

func (*MsgSetMemoRequired) SetAccAddress added in v0.0.15

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

func (MsgSetMemoRequired) Type

func (msg MsgSetMemoRequired) Type() string

func (MsgSetMemoRequired) ValidateBasic

func (msg MsgSetMemoRequired) ValidateBasic() sdk.Error

type Params

type Params struct {
	ActivationFee int64 `json:"activation_fee"`
	LockCoinsFee  int64 `json:"lock_coins_fee"`
}

func DefaultParams

func DefaultParams() Params

func NewParams added in v0.0.15

func NewParams(activation int64, lock int64) Params

func (*Params) ParamSetPairs

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

func (Params) String added in v0.0.13

func (p Params) String() string

type SupplyKeeper

type SupplyKeeper interface {
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) sdk.Error
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) sdk.Error
}

SupplyKeeper defines the expected supply keeper

Jump to

Keyboard shortcuts

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