transfer

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCodeSpace btypes.CodespaceType = "transfer"

	CodeInvalidInput                btypes.CodeType = 201 // 基础数据输入有误
	CodeSenderAccountNotExists      btypes.CodeType = 202 // 转出账户不存在
	CodeSenderAccountCoinsNotEnough btypes.CodeType = 203 // 转出账户余额不足
)

Transfer errors reserve 200 ~ 299.

Variables

This section is empty.

Functions

func ErrInvalidInput

func ErrInvalidInput(codeSpace btypes.CodespaceType, msg string) btypes.Error

func ErrSenderAccountCoinsNotEnough

func ErrSenderAccountCoinsNotEnough(codeSpace btypes.CodespaceType, msg string) btypes.Error

func ErrSenderAccountNotExists

func ErrSenderAccountNotExists(codeSpace btypes.CodespaceType, msg string) btypes.Error

func RegisterCodec

func RegisterCodec(cdc *amino.Codec)

Types

type TxTransfer

type TxTransfer struct {
	Senders   transfertypes.TransItems `json:"senders"`   // 发送集合
	Receivers transfertypes.TransItems `json:"receivers"` // 接收集合
}

func (TxTransfer) CalcGas

func (tx TxTransfer) CalcGas() btypes.BigInt

Gas TODO

func (TxTransfer) Exec

func (tx TxTransfer) Exec(ctx context.Context) (result btypes.Result, crossTxQcp *txs.TxQcp)

转账

func (TxTransfer) GetGasPayer

func (tx TxTransfer) GetGasPayer() btypes.Address

Senders[0]

func (TxTransfer) GetSignData

func (tx TxTransfer) GetSignData() (ret []byte)

签名字节

func (TxTransfer) GetSigner

func (tx TxTransfer) GetSigner() []btypes.Address

所有Senders

func (TxTransfer) ValidateData

func (tx TxTransfer) ValidateData(ctx context.Context) error

数据校验

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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