transfer

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCodec

func RegisterCodec(cdc *amino.Codec)

Types

type TransItem

type TransItem struct {
	Address btypes.Address `json:"addr"` // 账户地址
	QOS     btypes.BigInt  `json:"qos"`  // QOS
	QSCs    types.QSCs     `json:"qscs"` // QSCs
}

type TxTransfer

type TxTransfer struct {
	Senders   []TransItem `json:"senders"`   // 发送集合
	Receivers []TransItem `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

数据校验 1.Senders、Receivers不为空,地址不重复,币值大于0 2.Senders、Receivers 币值总和对应币种相等 3.Senders中账号对应币种币值足够

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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