txs

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MaxDescriptionLen = 1000

	GasForCreateQSC = int64(1.8*qtypes.UnitQOS) * qtypes.UnitQOSGas  // 1.8 QOS
	GasForIssueQSC  = int64(0.18*qtypes.UnitQOS) * qtypes.UnitQOSGas // 0.18 QOS
)

Functions

func RegisterCodec

func RegisterCodec(cdc *amino.Codec)

Types

type TxCreateQSC

type TxCreateQSC struct {
	Creator      btypes.AccAddress    `json:"creator"`       // QSC创建账户
	ExchangeRate string               `json:"exchange_rate"` // qcs:qos汇率
	QSCCA        *cert.Certificate    `json:"qsc_crt"`       // CA信息
	Description  string               `json:"description"`   // 描述信息
	Accounts     []*qtypes.QOSAccount `json:"accounts"`      // 初始账户
}

初始化代币Tx

func (TxCreateQSC) CalcGas

func (tx TxCreateQSC) CalcGas() btypes.BigInt

func (TxCreateQSC) Exec

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

func (TxCreateQSC) GetGasPayer

func (tx TxCreateQSC) GetGasPayer() btypes.AccAddress

func (TxCreateQSC) GetSignData

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

func (TxCreateQSC) GetSigner

func (tx TxCreateQSC) GetSigner() []btypes.AccAddress

func (TxCreateQSC) ValidateData

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

func (TxCreateQSC) ValidateInputs added in v0.0.8

func (tx TxCreateQSC) ValidateInputs() error

type TxIssueQSC

type TxIssueQSC struct {
	QSCName string            `json:"qsc_name"` //币名
	Amount  btypes.BigInt     `json:"amount"`   //币量
	Banker  btypes.AccAddress `json:"banker"`   //banker地址
}

发行代币Tx,多次执行表现为代币累加

func (TxIssueQSC) CalcGas

func (tx TxIssueQSC) CalcGas() btypes.BigInt

func (TxIssueQSC) Exec

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

func (TxIssueQSC) GetGasPayer

func (tx TxIssueQSC) GetGasPayer() btypes.AccAddress

func (TxIssueQSC) GetSignData

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

func (TxIssueQSC) GetSigner

func (tx TxIssueQSC) GetSigner() []btypes.AccAddress

func (TxIssueQSC) ValidateData

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

Jump to

Keyboard shortcuts

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