types

package
v0.0.0-...-a4757fd Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CODE_VAR_ENT = "ent_params"
	CODE_VAR_RET = "ret_params"
)
View Source
const (
	QueryTypeContract = iota
	QueryTypeNonce
	QueryTypeBalance
	QueryTypeReceipt
	QueryTypeContractExistance
	QueryTypeShare
)

Variables

View Source
var (
	TxTagApp = []byte{1}

	TxTagAppEvm       = []byte{1, 1}
	TxTagAppEvmCommon = []byte{1, 1, 1}

	TxTagAppEco              = []byte{1, 2}
	TxTagAppEcoShareTransfer = []byte{1, 2, 1}
	TxTagAppEcoGuarantee     = []byte{1, 2, 2}
	TxTagAppEcoRedeem        = []byte{1, 2, 3}
)
View Source
var (
	TxTagAngine = []byte{2}

	TxTagAngineEco        = []byte{2, 1}
	TxTagAngineEcoSuspect = []byte{2, 1, 1}

	TxTagAngineInit      = []byte{2, 2}
	TxTagAngineInitToken = []byte{2, 2, 1}
	TxTagAngineInitShare = []byte{2, 2, 2}

	TxTagAngineWorld     = []byte{2, 3}
	TxTagAngineWorldRand = []byte{2, 3, 1}
)

Functions

func BigInt0

func BigInt0() *big.Int

Types

type BlockTx

type BlockTx struct {
	GasLimit  *big.Int
	GasPrice  *big.Int
	Nonce     uint64
	Sender    []byte
	Payload   []byte
	Signature []byte
}

func NewBlockTx

func NewBlockTx(gasLimit, gasPrice *big.Int, nonce uint64, sender, payload []byte) *BlockTx

func SortTxs

func SortTxs(txs []BlockTx) []BlockTx

SortTxs sorts txs

func (*BlockTx) SigObject

func (tx *BlockTx) SigObject() interface{}

type BlockTxsToSort

type BlockTxsToSort []BlockTx

sort BlockTx

func (BlockTxsToSort) Len

func (txs BlockTxsToSort) Len() int

func (BlockTxsToSort) Less

func (txs BlockTxsToSort) Less(i, j int) bool

func (BlockTxsToSort) Swap

func (txs BlockTxsToSort) Swap(i, j int)

type EcoInitShareTx

type EcoInitShareTx struct {
	To     []byte   `json:"to"`
	Amount *big.Int `json:"amount"`
	Extra  []byte   `json:"extra"`
}

type EcoInitTokenTx

type EcoInitTokenTx struct {
	To     []byte   `json:"to"`
	Amount *big.Int `json:"amount"`
	Extra  []byte   `json:"extra"`
}

type QueryShareResult

type QueryShareResult struct {
	ShareBalance  *big.Int
	ShareGuaranty *big.Int
	GHeight       uint64
}

type TxEvmCommon

type TxEvmCommon struct {
	To     []byte
	Amount *big.Int
	Load   []byte
}

type TxShareEco

type TxShareEco struct {
	Source    []byte
	Amount    *big.Int
	Signature []byte
}

func (*TxShareEco) SigObject

func (tx *TxShareEco) SigObject() interface{}

type TxShareTransfer

type TxShareTransfer struct {
	ShareSrc []byte
	ShareDst []byte
	Amount   *big.Int
	ShareSig []byte
}

func (*TxShareTransfer) SigObject

func (tx *TxShareTransfer) SigObject() interface{}

type WorldRandTx

type WorldRandTx struct {
	Height uint64
	Pubkey []byte
	Sig    []byte
}

type WorldRandVote

type WorldRandVote struct {
	Pubkey []byte
	Sig    []byte
}

Jump to

Keyboard shortcuts

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