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: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 描述信息长度限制
	MaxDescriptionLen = 1000
)

Variables

Functions

func RegisterCodec

func RegisterCodec(cdc *amino.Codec)

Types

type TxAddGuardian

type TxAddGuardian struct {
	Description string            `json:"description"` // 描述信息
	Address     btypes.AccAddress `json:"address"`     // 账户地址
	Creator     btypes.AccAddress `json:"creator"`     // 创建账户地址
}

创建系统账户

func NewTxAddGuardian

func NewTxAddGuardian(description string, address, creator btypes.AccAddress) *TxAddGuardian

func (TxAddGuardian) CalcGas

func (tx TxAddGuardian) CalcGas() btypes.BigInt

交易费:0

func (TxAddGuardian) Exec

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

交易执行

func (TxAddGuardian) GetGasPayer

func (tx TxAddGuardian) GetGasPayer() btypes.AccAddress

交易费支付账户:创建账户

func (TxAddGuardian) GetSignData

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

签名字节

func (TxAddGuardian) GetSigner

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

签名账户:创建账户

func (TxAddGuardian) ValidateData

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

数据校验

func (TxAddGuardian) ValidateInputs added in v0.0.8

func (tx TxAddGuardian) ValidateInputs() error

基础数据校验

type TxDeleteGuardian

type TxDeleteGuardian struct {
	Address   btypes.AccAddress `json:"address"`    // this guardian's address
	DeletedBy btypes.AccAddress `json:"deleted_by"` // address that initiated the AddGuardian tx
}

删除系统账户

func NewTxDeleteGuardian

func NewTxDeleteGuardian(address, deletedBy btypes.AccAddress) *TxDeleteGuardian

func (TxDeleteGuardian) CalcGas

func (tx TxDeleteGuardian) CalcGas() btypes.BigInt

交易费:0

func (TxDeleteGuardian) Exec

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

执行

func (TxDeleteGuardian) GetGasPayer

func (tx TxDeleteGuardian) GetGasPayer() btypes.AccAddress

Gas payer: DeletedBy

func (TxDeleteGuardian) GetSignData

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

签名字节

func (TxDeleteGuardian) GetSigner

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

签名账户:DeletedBy

func (TxDeleteGuardian) ValidateData

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

数据校验

func (TxDeleteGuardian) ValidateInputs added in v0.0.8

func (tx TxDeleteGuardian) ValidateInputs() error

基础数据校验

type TxHaltNetwork

type TxHaltNetwork struct {
	Guardian btypes.AccAddress `json:"guardian"` // guardian's address
	Reason   string            `json:"reason"`   // reason for halting the network
}

停网

func NewTxHaltNetwork

func NewTxHaltNetwork(address btypes.AccAddress, reason string) *TxHaltNetwork

func (TxHaltNetwork) CalcGas

func (tx TxHaltNetwork) CalcGas() btypes.BigInt

交易费:0

func (TxHaltNetwork) Exec

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

执行停网

func (TxHaltNetwork) GetGasPayer

func (tx TxHaltNetwork) GetGasPayer() btypes.AccAddress

Gas payer:操作账户

func (TxHaltNetwork) GetSignData

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

签名字节

func (TxHaltNetwork) GetSigner

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

签名账户:操作账户

func (TxHaltNetwork) ValidateData

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

数据校验

func (TxHaltNetwork) ValidateInputs added in v0.0.8

func (tx TxHaltNetwork) ValidateInputs() error

数据校验

Jump to

Keyboard shortcuts

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