types

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package types contains data types related to Matrix consensus.

Index

Constants

View Source
const (
	// BloomByteLength represents the number of bytes used in a header log bloom.
	BloomByteLength = 256

	// BloomBitLength represents the number of bits used in a header log bloom.
	BloomBitLength = 8 * BloomByteLength
)
View Source
const (
	// ReceiptStatusFailed is the status code of a transaction if execution failed.
	ReceiptStatusFailed = uint64(0)

	// ReceiptStatusSuccessful is the status code of a transaction if execution succeeded.
	ReceiptStatusSuccessful = uint64(1)
)
View Source
const (
	NormalTxIndex    byte = iota // NormalPool save normal transaction
	BroadCastTxIndex             // BroadcastPool save broadcast transaction

)

Variables

View Source
var (
	EmptyRootHash  = common.HexToHash("0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421") //DeriveShaHash([]common.Hash{})
	EmptyUncleHash = CalcUncleHash(nil)
)
View Source
var Bloom9 = bloom9
View Source
var (
	ErrInvalidChainId = errors.New("invalid chain id for signer")
)
View Source
var (
	ErrInvalidSig = errors.New("invalid transaction v, r, s values")
)

Functions

func BatchSender added in v1.1.1

func BatchSender(txser SelfTransactions)

批量解签名

func BatchSender_self added in v1.1.3

func BatchSender_self(txs []SelfTransaction, signer Signer, fiter func(SelfTransaction) bool)

func BloomLookup

func BloomLookup(bin Bloom, topic bytesBacked) bool

func CalcUncleHash

func CalcUncleHash(uncles []*Header) common.Hash

func CoinTxHashList added in v1.1.3

func CoinTxHashList(txs []CoinSelfTransaction) (list []common.Hash)

func DeriveSha

func DeriveSha(list DerivableList) common.Hash

func DeriveShaHash added in v1.1.2

func DeriveShaHash(list []common.Hash) common.Hash

func GetCoinTXRS added in v1.1.2

func GetCoinTXRS(txs []SelfTransaction, rxs []*Receipt) ([]CoinSelfTransaction, []CoinReceipts)

func LogsBloom

func LogsBloom(logs []*Log) *big.Int

func Number

func Number(b1, b2 *Block) bool

func RlpEncodeAndHash added in v1.1.3

func RlpEncodeAndHash(x interface{}) (buff []byte, h common.Hash)

func RlpHash

func RlpHash(x interface{}) (h common.Hash)

func Sender

func Sender(signer Signer, tx SelfTransaction) (common.Address, error)

Sender returns the address derived from the signature (V, R, S) using secp256k1 elliptic curve and an error if it failed deriving or upon an incorrect signature.

Sender may cache the address, allowing it to be used regardless of signing method. The cache is invalidated if the cached signer does not match the signer used in the current call.

func Sender_self added in v1.1.1

func Sender_self(signer Signer, tx SelfTransaction, waitg *sync.WaitGroup) (common.Address, error)

func Sender_sub added in v1.1.3

func Sender_sub(signer Signer, txChan chan SelfTransaction, waitg *sync.WaitGroup)

func TxHashList added in v1.1.2

func TxHashList(txs SelfTransactions) (list []common.Hash)

func TxdataAddresToString added in v1.1.1

func TxdataAddresToString(currency string, data *txdata, data1 *txdata1)

func TxdataStringToAddres added in v1.1.1

func TxdataStringToAddres(data1 *txdata1, data *txdata)

Types

type Block

type Block struct {

	// These fields are used by package man to track
	// inter-peer block relay.
	ReceivedAt   time.Time
	ReceivedFrom interface{}
	// contains filtered or unexported fields
}

if RPC Block: Block header uncles Currencies.Transactions Tx and TxReceipts : []Currencies.Transactions,[]Currencies.Receipts Save Raw Body []Currencies.Transactions Save Receipts []Currencies.Receipts Block represents an entire block in the Matrix blockchain.

func NewBlock

func NewBlock(header *Header, currencyBlocks []CurrencyBlock, uncles []*Header) *Block

NewBlock creates a new block. The input data is copied, changes to header and to the field values will not affect the block.

The values of TxHash, UncleHash, ReceiptHash and Bloom in header are ignored and set to values derived from the given txs, uncles and receipts.

func NewBlockWithHeader

func NewBlockWithHeader(header *Header) *Block

NewBlockWithHeader creates a block with the given header data. The header data is copied, changes to header and to the field values will not affect the block.

func NewBlockWithTxs

func NewBlockWithTxs(header *Header, currencyBlocks []CurrencyBlock) *Block

NewBlockWithHeader creates a block with the given header data. The header data is copied, changes to header and to the field values will not affect the block.

func (*Block) Bloom

func (b *Block) Bloom(cointype string) Bloom

func (*Block) Body

func (b *Block) Body() *Body

Body returns the non-header content of the block.

func (*Block) Coinbase

func (b *Block) Coinbase() common.Address

func (*Block) Currencies added in v1.1.2

func (b *Block) Currencies() []CurrencyBlock

func (*Block) DecodeRLP

func (b *Block) DecodeRLP(s *rlp.Stream) error

DecodeRLP decodes the Matrix

func (*Block) DeprecatedTd

func (b *Block) DeprecatedTd() *big.Int

DeprecatedTd is an old relic for extracting the TD of a block. It is in the code solely to facilitate upgrading the database from the old format to the new, after which it should be deleted. Do not use!

func (*Block) Difficulty

func (b *Block) Difficulty() *big.Int

func (*Block) EncodeRLP

func (b *Block) EncodeRLP(w io.Writer) error

EncodeRLP serializes b into the Matrix RLP block format.

func (*Block) Extra

func (b *Block) Extra() []byte

func (*Block) GasLimit

func (b *Block) GasLimit() uint64

func (*Block) GasUsed

func (b *Block) GasUsed() uint64

func (*Block) Hash

func (b *Block) Hash() common.Hash

Hash returns the keccak256 hash of b's header. The hash is computed on the first call and cached thereafter.

func (*Block) HashNoNonce

func (b *Block) HashNoNonce() common.Hash

func (*Block) HashNoSigns added in v1.1.1

func (b *Block) HashNoSigns() common.Hash

func (*Block) HashNoSignsAndNonce added in v1.1.1

func (b *Block) HashNoSignsAndNonce() common.Hash

func (*Block) Header

func (b *Block) Header() *Header

func (*Block) IsSuperBlock added in v1.1.1

func (b *Block) IsSuperBlock() bool

func (*Block) MixDigest

func (b *Block) MixDigest() common.Hash

func (*Block) Nonce

func (b *Block) Nonce() uint64

func (*Block) Number

func (b *Block) Number() *big.Int

func (*Block) NumberU64

func (b *Block) NumberU64() uint64

func (*Block) ParentHash

func (b *Block) ParentHash() common.Hash

func (*Block) Root

func (b *Block) Root() []common.CoinRoot

func (*Block) SetCurrencies added in v1.1.2

func (b *Block) SetCurrencies(currbl []CurrencyBlock)

func (*Block) SetHeadNum added in v1.1.1

func (b *Block) SetHeadNum(num int64)

will change header num!!

func (*Block) Sharding added in v1.1.2

func (b *Block) Sharding() []common.Coinbyte

func (*Block) SignAccounts

func (b *Block) SignAccounts() []common.VerifiedSign

func (*Block) Size

func (b *Block) Size() common.StorageSize

Size returns the true RLP encoded storage size of the block, either by encoding and returning it, or returning a previsouly cached value.

func (*Block) Time

func (b *Block) Time() *big.Int

func (*Block) Transaction

func (b *Block) Transaction(hash common.Hash) SelfTransaction

func (*Block) UncleHash

func (b *Block) UncleHash() common.Hash

func (*Block) Uncles

func (b *Block) Uncles() []*Header

func (*Block) Version added in v1.1.1

func (b *Block) Version() []byte

func (*Block) VersionSignature added in v1.1.1

func (b *Block) VersionSignature() []common.Signature

func (*Block) WithBody

func (b *Block) WithBody(cb []CurrencyBlock, uncles []*Header) *Block

WithBody returns a new block with the given transaction and uncle contents.

func (*Block) WithSeal

func (b *Block) WithSeal(header *Header) *Block

WithSeal returns a new block with the data from b but the header replaced with the sealed one.

type BlockAllSt added in v1.1.1

type BlockAllSt struct {
	Sblock *Block
	Pading uint64
}

type BlockBy

type BlockBy func(b1, b2 *Block) bool

func (BlockBy) Sort

func (self BlockBy) Sort(blocks Blocks)

type BlockNonce

type BlockNonce [8]byte

A BlockNonce is a 64-bit hash which proves (combined with the mix-hash) that a sufficient amount of computation has been carried out on a block.

func EncodeNonce

func EncodeNonce(i uint64) BlockNonce

EncodeNonce converts the given integer to a block nonce.

func (BlockNonce) MarshalText

func (n BlockNonce) MarshalText() ([]byte, error)

MarshalText encodes n as a hex string with 0x prefix.

func (BlockNonce) Uint64

func (n BlockNonce) Uint64() uint64

Uint64 returns the integer value of a block nonce.

func (*BlockNonce) UnmarshalText

func (n *BlockNonce) UnmarshalText(input []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

type Blocks

type Blocks []*Block

type Bloom

type Bloom [BloomByteLength]byte

Bloom represents a 2048 bit bloom filter.

func BytesToBloom

func BytesToBloom(b []byte) Bloom

BytesToBloom converts a byte slice to a bloom filter. It panics if b is not of suitable size.

func CreateBloom

func CreateBloom(receipts Receipts) Bloom

func (*Bloom) Add

func (b *Bloom) Add(d *big.Int)

Add adds d to the filter. Future calls of Test(d) will return true.

func (Bloom) Big

func (b Bloom) Big() *big.Int

Big converts b to a big integer.

func (Bloom) Bytes

func (b Bloom) Bytes() []byte

func (Bloom) MarshalText

func (b Bloom) MarshalText() ([]byte, error)

MarshalText encodes b as a hex string with 0x prefix.

func (*Bloom) SetBytes

func (b *Bloom) SetBytes(d []byte)

SetBytes sets the content of b to the given bytes. It panics if d is not of suitable size.

func (Bloom) Test

func (b Bloom) Test(test *big.Int) bool

func (Bloom) TestBytes

func (b Bloom) TestBytes(test []byte) bool

func (*Bloom) UnmarshalText

func (b *Bloom) UnmarshalText(input []byte) error

UnmarshalText b as a hex string with 0x prefix.

type Body

type Body struct {
	CurrencyBody []CurrencyBlock
	Uncles       []*Header
}

Body is a simple (mutable, non-safe) data container for storing and moving a block's data contents (transactions and uncles) together.

type BodyReceipts added in v1.1.2

type BodyReceipts struct {
	Sharding      []uint   // if complete block sharding = []
	Rs            Receipts //complete transactions
	RsHashs       []common.Hash
	ReceiptsInfos []ReceiptsInfo //complete transactions
}

func SetReceipts added in v1.1.2

func SetReceipts(Receiptser []*Receipt, hashlist []common.Hash, shadings []uint) BodyReceipts

func (*BodyReceipts) CheckRecptHashs added in v1.1.2

func (bt *BodyReceipts) CheckRecptHashs() bool

func (*BodyReceipts) GetAReceiptsByIndex added in v1.1.2

func (bt *BodyReceipts) GetAReceiptsByIndex(index uint64) *Receipt

func (*BodyReceipts) GetReceipts added in v1.1.2

func (br *BodyReceipts) GetReceipts() Receipts

type BodyTransactions added in v1.1.2

type BodyTransactions struct {
	Sharding         []uint            // if complete block sharding = []
	Transactions     []SelfTransaction //complete transactions
	TxHashs          []common.Hash     //所有交易的hash
	TransactionInfos []TransactionInfo //sharding transactions
}

1. Complete Block transactions = []SelfTransactio 2. Sharding Block transactions = []TxInfo

func SetTransactions added in v1.1.2

func SetTransactions(txser SelfTransactions, hashlist []common.Hash, shadings []uint) BodyTransactions

func (*BodyTransactions) CheckHashs added in v1.1.2

func (bt *BodyTransactions) CheckHashs() bool

func (*BodyTransactions) DecodeRLP added in v1.1.2

func (bt *BodyTransactions) DecodeRLP(s *rlp.Stream) error

func (*BodyTransactions) EncodeRLP added in v1.1.2

func (bt *BodyTransactions) EncodeRLP(w io.Writer) error

func (*BodyTransactions) GetTransactionByIndex added in v1.1.2

func (bt *BodyTransactions) GetTransactionByIndex(index uint64) SelfTransaction

func (*BodyTransactions) GetTransactions added in v1.1.2

func (bt *BodyTransactions) GetTransactions() []SelfTransaction

type CoinLogs added in v1.1.2

type CoinLogs struct {
	CoinType string
	Logs     []*Log
}

type CoinReceipts added in v1.1.2

type CoinReceipts struct {
	CoinType    string
	Receiptlist Receipts
}

type CoinSelfTransaction added in v1.1.2

type CoinSelfTransaction struct {
	CoinType string
	Txser    SelfTransactions
}

func GetCoinTX added in v1.1.2

func GetCoinTX(txs []SelfTransaction) []CoinSelfTransaction

type CurrencyBlock added in v1.1.2

type CurrencyBlock struct {
	CurrencyName string
	Header       CurrencyHeader
	Transactions BodyTransactions
	Receipts     BodyReceipts
}

币种block 1 Validator : 2 Miner : return len([]Sharding) == 0 discard tx Call Txs : input CurrencyBlock

func MakeCurencyBlock added in v1.1.2

func MakeCurencyBlock(txser []CoinSelfTransaction, rece []CoinReceipts, shardings []uint) []CurrencyBlock

type CurrencyHeader added in v1.1.2

type CurrencyHeader struct {
	Root        common.Hash
	TxHash      common.Hash
	ReceiptHash common.Hash
}

type CurrencyReceipts added in v1.1.2

type CurrencyReceipts struct {
	Currency        string
	StorageReceipts []*ReceiptForStorage
}

type DerivableList

type DerivableList interface {
	Len() int
	GetRlp(i int) []byte
}

type EIP155Signer

type EIP155Signer struct {
	// contains filtered or unexported fields
}

EIP155Transaction implements Signer using the EIP155 rules.

func NewEIP155Signer

func NewEIP155Signer(chainId *big.Int) EIP155Signer

func (EIP155Signer) Equal

func (s EIP155Signer) Equal(s2 Signer) bool

func (EIP155Signer) Hash

func (s EIP155Signer) Hash(txer SelfTransaction) common.Hash

Hash returns the hash to be signed by the sender. It does not uniquely identify the transaction.

func (EIP155Signer) Sender

func (EIP155Signer) SignatureValues

func (s EIP155Signer) SignatureValues(tx SelfTransaction, sig []byte) (R, S, V *big.Int, err error)

WithSignature returns a new transaction with the given signature. This signature needs to be in the [R || S || V] format where V is 0 or 1.

type ExtraTo_tr

type ExtraTo_tr struct {
	To_tr    *common.Address `json:"to"`
	Value_tr *hexutil.Big    `json:"value"`
	Input_tr *hexutil.Bytes  `json:"input"`
}

type Floodtxdata

type Floodtxdata struct {
	AccountNonce uint64          `json:"nonce"    gencodec:"required"`
	Price        *big.Int        `json:"gasPrice" gencodec:"required"`
	GasLimit     uint64          `json:"gas"      gencodec:"required"`
	Recipient    *common.Address `json:"to"       rlp:"nil"` // nil means contract creation
	Amount       *big.Int        `json:"value"    gencodec:"required"`
	Payload      []byte          `json:"input"    gencodec:"required"`
	Currency     string
	// Signature values
	V           *big.Int       `json:"v" gencodec:"required"`
	R           *big.Int       `json:"r" gencodec:"required"`
	TxEnterType byte           `json:"TxEnterType" gencodec:"required"` //是否是委托
	IsEntrustTx byte           `json:"IsEntrustTx" gencodec:"required"` //是否是委托
	CommitTime  uint64         `json:"CommitTime" gencodec:"required"`  //创建交易时间
	Extra       []Matrix_Extra ` rlp:"tail"`
}

用于洪泛(传输)

func GetFloodData

func GetFloodData(tx *Transaction) *Floodtxdata
type Header struct {
	ParentHash  common.Hash        `json:"parentHash"       gencodec:"required"`
	UncleHash   common.Hash        `json:"sha3Uncles"       gencodec:"required"`
	Leader      common.Address     `json:"leader"            gencodec:"required"`
	Coinbase    common.Address     `json:"miner"            gencodec:"required"`
	Roots       []common.CoinRoot  `json:"stateRoot"        gencodec:"required"`
	Sharding    []common.Coinbyte  `json:"sharding"        gencodec:"required"`
	Difficulty  *big.Int           `json:"difficulty"       gencodec:"required"`
	Number      *big.Int           `json:"number"           gencodec:"required"`
	GasLimit    uint64             `json:"gasLimit"         gencodec:"required"`
	GasUsed     uint64             `json:"gasUsed"          gencodec:"required"`
	Time        *big.Int           `json:"timestamp"        gencodec:"required"`
	Elect       []common.Elect     `json:"elect"        gencodec:"required"`
	NetTopology common.NetTopology `json:"nettopology"        gencodec:"required"`
	Signatures  []common.Signature `json:"signatures"        gencodec:"required"`

	Extra             []byte             `json:"extraData"        gencodec:"required"`
	MixDigest         common.Hash        `json:"mixHash"          gencodec:"required"`
	Nonce             BlockNonce         `json:"nonce"            gencodec:"required"`
	Version           []byte             `json:"version"              gencodec:"required"`
	VersionSignatures []common.Signature `json:"versionSignatures"              gencodec:"required"`
	VrfValue          []byte             `json:"vrfvalue"        gencodec:"required"`
}

Header represents a block header in the Matrix blockchain.

func CopyHeader

func CopyHeader(h *Header) *Header

CopyHeader creates a deep copy of a block header to prevent side effects from modifying a header variable.

func (*Header) Hash

func (h *Header) Hash() common.Hash

Hash returns the block hash of the header, which is simply the keccak256 hash of its RLP encoding.

func (*Header) HashNoNonce

func (h *Header) HashNoNonce() common.Hash

HashNoNonce returns the hash which is used as input for the proof-of-work search.

func (*Header) HashNoSigns added in v1.1.1

func (h *Header) HashNoSigns() common.Hash

func (*Header) HashNoSignsAndNonce

func (h *Header) HashNoSignsAndNonce() common.Hash

func (*Header) IsSuperHeader added in v1.1.1

func (h *Header) IsSuperHeader() bool

func (Header) MarshalJSON

func (h Header) MarshalJSON() ([]byte, error)

func (*Header) SignAccounts

func (h *Header) SignAccounts() []common.VerifiedSign

func (*Header) Size

func (h *Header) Size() common.StorageSize

Size returns the approximate memory used by all internal contents. It is used to approximate and limit the memory consumption of various caches.

func (*Header) SuperBlockSeq added in v1.1.1

func (h *Header) SuperBlockSeq() uint64

func (*Header) UnmarshalJSON

func (h *Header) UnmarshalJSON(input []byte) error

type Log

type Log struct {
	// Consensus fields:
	// address of the contract that generated the event
	Address common.Address `json:"address" gencodec:"required"`
	// list of topics provided by the contract.
	Topics []common.Hash `json:"topics" gencodec:"required"`
	// supplied by the contract, usually ABI-encoded
	Data []byte `json:"data" gencodec:"required"`

	// Derived fields. These fields are filled in by the node
	// but not secured by consensus.
	// block in which the transaction was included
	BlockNumber uint64 `json:"blockNumber"`
	// hash of the transaction
	TxHash common.Hash `json:"transactionHash" gencodec:"required"`
	// index of the transaction in the block
	TxIndex uint `json:"transactionIndex" gencodec:"required"`
	// hash of the block in which the transaction was included
	BlockHash common.Hash `json:"blockHash"`
	// index of the log in the receipt
	Index uint `json:"logIndex" gencodec:"required"`

	// The Removed field is true if this log was reverted due to a chain reorganisation.
	// You must pay attention to this field if you receive logs through a filter query.
	Removed bool `json:"removed"`
}

Log represents a contract log event. These events are generated by the LOG opcode and stored/indexed by the node.

func (*Log) DecodeRLP

func (l *Log) DecodeRLP(s *rlp.Stream) error

DecodeRLP implements rlp.Decoder.

func (*Log) EncodeRLP

func (l *Log) EncodeRLP(w io.Writer) error

EncodeRLP implements rlp.Encoder.

func (Log) MarshalJSON

func (l Log) MarshalJSON() ([]byte, error)

func (*Log) UnmarshalJSON

func (l *Log) UnmarshalJSON(input []byte) error

type LogForStorage

type LogForStorage Log

LogForStorage is a wrapper around a Log that flattens and parses the entire content of a log including non-consensus fields.

func (*LogForStorage) DecodeRLP

func (l *LogForStorage) DecodeRLP(s *rlp.Stream) error

DecodeRLP implements rlp.Decoder.

func (*LogForStorage) EncodeRLP

func (l *LogForStorage) EncodeRLP(w io.Writer) error

EncodeRLP implements rlp.Encoder.

type Matrix_Extra

type Matrix_Extra struct {
	TxType     byte    `json:"txType" gencodec:"required"`
	LockHeight uint64  `json:"lockHeight" gencodec:"required"`
	ExtraTo    []Tx_to ` rlp:"tail"` //
}

type Matrix_Extra1 added in v1.1.1

type Matrix_Extra1 struct {
	TxType     byte     `json:"txType" gencodec:"required"`
	LockHeight uint64   `json:"lockHeight" gencodec:"required"`
	ExtraTo    []Tx_to1 `json:"extra_to" gencodec:"required"`
}

type Receipt

type Receipt struct {
	// Consensus fields
	PostState         []byte `json:"root"`
	Status            uint64 `json:"status"`
	CumulativeGasUsed uint64 `json:"cumulativeGasUsed" gencodec:"required"`
	Bloom             Bloom  `json:"logsBloom"         gencodec:"required"`
	Logs              []*Log `json:"logs"              gencodec:"required"`

	// Implementation fields (don't reorder!)
	TxHash          common.Hash    `json:"transactionHash" gencodec:"required"`
	ContractAddress common.Address `json:"contractAddress"`
	GasUsed         uint64         `json:"gasUsed" gencodec:"required"`
}

Receipt represents the results of a transaction.

func NewReceipt

func NewReceipt(root []byte, failed bool, cumulativeGasUsed uint64) *Receipt

NewReceipt creates a barebone transaction receipt, copying the init fields.

func (*Receipt) DecodeRLP

func (r *Receipt) DecodeRLP(s *rlp.Stream) error

DecodeRLP implements rlp.Decoder, and loads the consensus fields of a receipt from an RLP stream.

func (*Receipt) EncodeRLP

func (r *Receipt) EncodeRLP(w io.Writer) error

EncodeRLP implements rlp.Encoder, and flattens the consensus fields of a receipt into an RLP stream. If no post state is present, byzantium fork is assumed.

func (*Receipt) Hash added in v1.1.2

func (r *Receipt) Hash() common.Hash

func (Receipt) MarshalJSON

func (r Receipt) MarshalJSON() ([]byte, error)

MarshalJSON marshals as JSON.

func (*Receipt) Size

func (r *Receipt) Size() common.StorageSize

Size returns the approximate memory used by all internal contents. It is used to approximate and limit the memory consumption of various caches.

func (*Receipt) UnmarshalJSON

func (r *Receipt) UnmarshalJSON(input []byte) error

UnmarshalJSON unmarshals from JSON.

type ReceiptForStorage

type ReceiptForStorage Receipt

ReceiptForStorage is a wrapper around a Receipt that flattens and parses the entire content of a receipt, as opposed to only the consensus fields originally.

func (*ReceiptForStorage) DecodeRLP

func (r *ReceiptForStorage) DecodeRLP(s *rlp.Stream) error

DecodeRLP implements rlp.Decoder, and loads both consensus and implementation fields of a receipt from an RLP stream.

func (*ReceiptForStorage) EncodeRLP

func (r *ReceiptForStorage) EncodeRLP(w io.Writer) error

EncodeRLP implements rlp.Encoder, and flattens all content fields of a receipt into an RLP stream.

type Receipts

type Receipts []*Receipt

Receipts is a wrapper around a Receipt array to implement DerivableList.

func (Receipts) GetRlp

func (r Receipts) GetRlp(i int) []byte

GetRlp returns the RLP encoding of one receipt from the list.

func (Receipts) HashList added in v1.1.2

func (r Receipts) HashList() []common.Hash

func (Receipts) Len

func (r Receipts) Len() int

Len returns the number of receipts in this list.

type ReceiptsInfo added in v1.1.2

type ReceiptsInfo struct {
	Index   uint64
	Receipt Receipt
}

type SelfTransaction added in v1.1.1

type SelfTransaction interface {
	TxType() byte
	Data() []byte
	Gas() uint64
	GasPrice() *big.Int
	Value() *big.Int
	Nonce() uint64
	CheckNonce() bool
	GetMatrix_EX() []Matrix_Extra
	From() common.Address
	GetTxFrom() (common.Address, error)
	SetNonce(nc uint64)
	GetTxS() *big.Int
	GetTxR() *big.Int
	GetTxV() *big.Int
	SetTxS(S *big.Int)
	SetTxV(v *big.Int)
	SetTxR(r *big.Int)
	To() *common.Address
	Hash() common.Hash
	Size() common.StorageSize
	GetFromLoad() interface{}
	SetFromLoad(x interface{})
	ChainId() *big.Int
	WithSignature(signer Signer, sig []byte) (SelfTransaction, error)
	GetTxNLen() int
	GetTxN(index int) uint32
	RawSignatureValues() (*big.Int, *big.Int, *big.Int)
	//Protected() bool
	GetConstructorType() uint16
	GasFrom() common.Address
	AmontFrom() common.Address
	GetMatrixType() byte
	Setentrustfrom(x interface{})
	IsEntrustTx() bool
	SetTxCurrency(currency string)
	GetTxCurrency() string
	GetCreateTime() uint32
	GetLocalHeight() uint32
	GetIsEntrustGas() bool
	GetIsEntrustByTime() bool
	GetMakeHashfield(chid *big.Int) []interface{}
	SetIsEntrustGas(b bool)
	SetIsEntrustByTime(b bool)
	GetIsEntrustByCount() bool
	SetIsEntrustByCount(b bool)
}

func GetTX added in v1.1.2

func GetTX(ctx []CoinSelfTransaction) []SelfTransaction

func SetMxToTransaction added in v1.1.1

func SetMxToTransaction(txm *Transaction_Mx) (txer SelfTransaction)

func SignTx

SignTx signs the transaction using the given signer and private key

type SelfTransactions added in v1.1.1

type SelfTransactions []SelfTransaction

Transactions is a Transaction slice type for basic sorting.

func TxDifference

func TxDifference(a, b SelfTransactions) (keep SelfTransactions)

TxDifference returns a new set t which is the difference between a to b.

func (SelfTransactions) GetRlp added in v1.1.1

func (s SelfTransactions) GetRlp(i int) []byte

GetRlp implements Rlpable and returns the i'th element of s in rlp.

func (SelfTransactions) Len added in v1.1.1

func (s SelfTransactions) Len() int

Len returns the length of s.

func (SelfTransactions) Swap added in v1.1.1

func (s SelfTransactions) Swap(i, j int)

Swap swaps the i'th and the j'th element in s.

type Signer

type Signer interface {
	// Sender returns the sender address of the transaction.
	Sender(tx SelfTransaction) (common.Address, error)
	// SignatureValues returns the raw R, S, V values corresponding to the
	// given signature.
	SignatureValues(tx SelfTransaction, sig []byte) (r, s, v *big.Int, err error)
	// Hash returns the hash to be signed.
	Hash(tx SelfTransaction) common.Hash
	// Equal returns true if the given signer is the same as the receiver.
	Equal(Signer) bool
}

Signer encapsulates transaction signature handling. Note that this interface is not a stable API and may change at any time to accommodate new protocol rules.

func MakeSigner

func MakeSigner(config *params.ChainConfig, blockNumber *big.Int) Signer

MakeSigner returns a Signer based on the given chain config and block number.

type SnapSaveInfo added in v1.1.1

type SnapSaveInfo struct {
	Flg       int
	BlockNum  uint64
	BlockHash string
	SnapPath  string
}

type StorageBlock

type StorageBlock Block

[deprecated by man/63] StorageBlock defines the RLP encoding of a Block stored in the state database. The StorageBlock encoding contains fields that would otherwise need to be recomputed.

func (*StorageBlock) DecodeRLP

func (b *StorageBlock) DecodeRLP(s *rlp.Stream) error

[deprecated by man/63]

type Transaction

type Transaction struct {
	Currency string //币种
	// by
	N                []uint32
	IsEntrustGas     bool
	IsEntrustByTime  bool //是否是按时间委托
	IsEntrustByCount bool //是否按次数委托
	// contains filtered or unexported fields
}

func ConvMxtotx

func ConvMxtotx(tx_Mx *Transaction_Mx) *Transaction

func NewContractCreation

func NewContractCreation(nonce uint64, amount *big.Int, gasLimit uint64, gasPrice *big.Int, data []byte, V *big.Int, R *big.Int, S *big.Int, typ byte, isEntrustTx byte, currency string, committime uint64) *Transaction

func NewTransaction

func NewTransaction(nonce uint64, to common.Address, amount *big.Int, gasLimit uint64, gasPrice *big.Int, data []byte, V *big.Int, R *big.Int, S *big.Int, typ byte, isEntrustTx byte, currency string, committime uint64) *Transaction

func NewTransactions

func NewTransactions(nonce uint64, to common.Address, amount *big.Int, gasLimit uint64, gasPrice *big.Int, data []byte, V *big.Int, R *big.Int, S *big.Int, ex []*ExtraTo_tr, localtime uint64, txType byte, isEntrustTx byte, currency string, committime uint64) *Transaction

func SetFloodData

func SetFloodData(floodtx *Floodtxdata) *Transaction

func (*Transaction) AmontFrom added in v1.1.1

func (tx *Transaction) AmontFrom() (from common.Address)

func (*Transaction) Call added in v1.1.1

func (tx *Transaction) Call() error

func (*Transaction) ChainId

func (tx *Transaction) ChainId() *big.Int

ChainId returns which chain id this transaction was signed for (if at all)

func (*Transaction) CheckNonce

func (tx *Transaction) CheckNonce() bool

func (*Transaction) Cost

func (tx *Transaction) Cost() *big.Int

Cost returns amount + gasprice * gaslimit.

func (*Transaction) CostALL

func (tx *Transaction) CostALL() *big.Int

// Cost returns amount + gasprice * gaslimit.

func (*Transaction) Data

func (tx *Transaction) Data() []byte

func (*Transaction) DecodeRLP

func (tx *Transaction) DecodeRLP(s *rlp.Stream) error

DecodeRLP implements rlp.Decoder

func (*Transaction) EncodeRLP

func (tx *Transaction) EncodeRLP(w io.Writer) error

EncodeRLP implements rlp.Encoder

func (*Transaction) From added in v1.1.1

func (tx *Transaction) From() common.Address

Y 为了兼容去掉的Message结构体

func (*Transaction) Gas

func (tx *Transaction) Gas() uint64

func (*Transaction) GasFrom added in v1.1.1

func (tx *Transaction) GasFrom() (from common.Address)

func (*Transaction) GasPrice

func (tx *Transaction) GasPrice() *big.Int

func (*Transaction) GetConstructorType added in v1.1.1

func (tx *Transaction) GetConstructorType() uint16

func (*Transaction) GetCreateTime added in v1.1.1

func (tx *Transaction) GetCreateTime() uint32

func (*Transaction) GetFromLoad added in v1.1.1

func (tx *Transaction) GetFromLoad() interface{}

func (*Transaction) GetIsEntrustByCount added in v1.1.3

func (tx *Transaction) GetIsEntrustByCount() bool

func (*Transaction) GetIsEntrustByTime added in v1.1.1

func (tx *Transaction) GetIsEntrustByTime() bool

func (*Transaction) GetIsEntrustGas added in v1.1.1

func (tx *Transaction) GetIsEntrustGas() bool

func (*Transaction) GetLocalHeight added in v1.1.1

func (tx *Transaction) GetLocalHeight() uint32

func (*Transaction) GetMakeHashfield added in v1.1.2

func (tx *Transaction) GetMakeHashfield(chid *big.Int) []interface{}

func (*Transaction) GetMatrixType added in v1.1.1

func (tx *Transaction) GetMatrixType() byte

func (*Transaction) GetMatrix_EX

func (tx *Transaction) GetMatrix_EX() []Matrix_Extra

func (*Transaction) GetTxCurrency added in v1.1.1

func (tx *Transaction) GetTxCurrency() string

func (*Transaction) GetTxFrom added in v1.1.1

func (tx *Transaction) GetTxFrom() (from common.Address, err error)

func (*Transaction) GetTxHashStruct added in v1.1.1

func (tx *Transaction) GetTxHashStruct()

func (*Transaction) GetTxN added in v1.1.1

func (tx *Transaction) GetTxN(index int) uint32

func (*Transaction) GetTxNLen added in v1.1.1

func (tx *Transaction) GetTxNLen() int

func (*Transaction) GetTxR added in v1.1.1

func (tx *Transaction) GetTxR() *big.Int

func (*Transaction) GetTxS

func (tx *Transaction) GetTxS() *big.Int

func (*Transaction) GetTxV

func (tx *Transaction) GetTxV() *big.Int

func (*Transaction) Hash

func (tx *Transaction) Hash() common.Hash

Hash hashes the RLP encoding of tx. It uniquely identifies the transaction.

func (*Transaction) IsEntrustTx added in v1.1.1

func (tx *Transaction) IsEntrustTx() bool

func (*Transaction) ManTx_UnmarshalJSON added in v1.1.1

func (tx *Transaction) ManTx_UnmarshalJSON(input []byte) error

func (*Transaction) MarshalJSON

func (tx *Transaction) MarshalJSON() ([]byte, error)

MarshalJSON encodes the web3 RPC transaction format.

func (*Transaction) Nonce

func (tx *Transaction) Nonce() uint64

func (*Transaction) RawSignatureValues

func (tx *Transaction) RawSignatureValues() (*big.Int, *big.Int, *big.Int)

func (*Transaction) SetFromLoad added in v1.1.1

func (tx *Transaction) SetFromLoad(x interface{})

func (*Transaction) SetIsEntrustByCount added in v1.1.3

func (tx *Transaction) SetIsEntrustByCount(b bool)

func (*Transaction) SetIsEntrustByTime added in v1.1.1

func (tx *Transaction) SetIsEntrustByTime(b bool)

func (*Transaction) SetIsEntrustGas added in v1.1.1

func (tx *Transaction) SetIsEntrustGas(b bool)

func (*Transaction) SetNonce

func (tx *Transaction) SetNonce(nc uint64)

在传递交易时用来操作Nonce

func (*Transaction) SetTxCurrency added in v1.1.1

func (tx *Transaction) SetTxCurrency(currency string)

func (*Transaction) SetTxR added in v1.1.1

func (tx *Transaction) SetTxR(r *big.Int)

func (*Transaction) SetTxS

func (tx *Transaction) SetTxS(S *big.Int)

func (*Transaction) SetTxV added in v1.1.1

func (tx *Transaction) SetTxV(v *big.Int)

func (*Transaction) Setentrustfrom added in v1.1.1

func (tx *Transaction) Setentrustfrom(x interface{})

func (*Transaction) Size

func (tx *Transaction) Size() common.StorageSize

Size returns the true RLP encoded storage size of the transaction, either by encoding and returning it, or returning a previsouly cached value.

func (*Transaction) To

func (tx *Transaction) To() *common.Address

To returns the recipient address of the transaction. It returns nil if the transaction is a contract creation.

func (*Transaction) TotalAmount added in v1.1.1

func (tx *Transaction) TotalAmount() *big.Int

func (*Transaction) TxType added in v1.1.1

func (tx *Transaction) TxType() byte

func (*Transaction) UnmarshalJSON

func (tx *Transaction) UnmarshalJSON(input []byte) error

UnmarshalJSON decodes the web3 RPC transaction format.

func (*Transaction) Value

func (tx *Transaction) Value() *big.Int

func (*Transaction) WithSignature

func (tx *Transaction) WithSignature(signer Signer, sig []byte) (SelfTransaction, error)

WithSignature returns a new transaction with the given signature. This signature needs to be formatted as described in the yellow paper (v+27).

type TransactionBroad added in v1.1.1

type TransactionBroad struct {
	// contains filtered or unexported fields
}

func NewBroadCastTransaction added in v1.1.1

func NewBroadCastTransaction(txType byte, data []byte) *TransactionBroad

func SetTransactionMx

func SetTransactionMx(tx_Mx *Transaction_Mx) *TransactionBroad

//

func (tx *TransactionBroad) SetTransactionMx(tx_Mx *Transaction_Mx)(txer SelfTransaction ){
	if tx_Mx == nil{
		return nil
	}

	tx.data.AccountNonce=tx_Mx.Data.AccountNonce
	tx.data.Price=tx_Mx.Data.Price
	tx.data.GasLimit=tx_Mx.Data.GasLimit
	tx.data.Recipient=tx_Mx.Data.Recipient
	tx.data.Amount=tx_Mx.Data.Amount
	tx.data.Payload=tx_Mx.Data.Payload
	// Signature values
	tx.data.V=tx_Mx.Data.V
	tx.data.R=tx_Mx.Data.R
	tx.data.S=tx_Mx.Data.S
	tx.data.TxEnterType=BroadCastTxIndex
	tx.data.Extra=tx_Mx.Data.Extra

	mx := Matrix_Extra{
		TxType: tx_Mx.TxType_Mx,
	}
	tx.data.Extra = append(tx.data.Extra, mx)
	txa := &TransactionBroad{data: tx.data}
	txer = txa
	return
}

//

func (tx *TransactionBroad)GetTransactionMx(stx SelfTransaction) *Transaction_Mx {
	btx,ok:=stx.(*TransactionBroad)
	if !ok {
		return nil
	}
	tx_Mx := &Transaction_Mx{}
	tx_Mx.Data.AccountNonce = btx.data.AccountNonce
	tx_Mx.Data.Price = btx.data.Price
	tx_Mx.Data.GasLimit = btx.data.GasLimit
	tx_Mx.Data.Recipient = btx.data.Recipient
	tx_Mx.Data.Amount = btx.data.Amount
	tx_Mx.Data.Payload = btx.data.Payload
	// Signature values
	tx_Mx.Data.V = btx.data.V
	tx_Mx.Data.R = btx.data.R
	tx_Mx.Data.S = btx.data.S
	tx_Mx.Data.Extra = btx.data.Extra
	tx_Mx.Data.TxEnterType = btx.data.TxEnterType
	if len(btx.data.Extra) > 0 {
		tx_Mx.TxType_Mx = btx.data.Extra[0].TxType
	}
	return tx_Mx
}

func (*TransactionBroad) AmontFrom added in v1.1.1

func (tx *TransactionBroad) AmontFrom() common.Address

func (*TransactionBroad) Call added in v1.1.1

func (tx *TransactionBroad) Call() error

func (*TransactionBroad) ChainId added in v1.1.1

func (tx *TransactionBroad) ChainId() *big.Int

func (*TransactionBroad) CheckNonce added in v1.1.1

func (tx *TransactionBroad) CheckNonce() bool

func (*TransactionBroad) Data added in v1.1.1

func (tx *TransactionBroad) Data() []byte

func (*TransactionBroad) DecodeRLP added in v1.1.1

func (tx *TransactionBroad) DecodeRLP(s *rlp.Stream) error

DecodeRLP implements rlp.Decoder

func (*TransactionBroad) EncodeRLP added in v1.1.1

func (tx *TransactionBroad) EncodeRLP(w io.Writer) error

EncodeRLP implements rlp.Encoder

func (*TransactionBroad) From added in v1.1.1

func (tx *TransactionBroad) From() common.Address

func (*TransactionBroad) Gas added in v1.1.1

func (tx *TransactionBroad) Gas() uint64

func (*TransactionBroad) GasFrom added in v1.1.1

func (tx *TransactionBroad) GasFrom() common.Address

func (*TransactionBroad) GasPrice added in v1.1.1

func (tx *TransactionBroad) GasPrice() *big.Int

func (*TransactionBroad) GetConstructorType added in v1.1.1

func (tx *TransactionBroad) GetConstructorType() uint16

func (*TransactionBroad) GetCreateTime added in v1.1.1

func (tx *TransactionBroad) GetCreateTime() uint32

func (*TransactionBroad) GetFromLoad added in v1.1.1

func (tx *TransactionBroad) GetFromLoad() interface{}

func (*TransactionBroad) GetIsEntrustByCount added in v1.1.3

func (tx *TransactionBroad) GetIsEntrustByCount() bool

func (*TransactionBroad) GetIsEntrustByTime added in v1.1.1

func (tx *TransactionBroad) GetIsEntrustByTime() bool

func (*TransactionBroad) GetIsEntrustGas added in v1.1.1

func (tx *TransactionBroad) GetIsEntrustGas() bool

func (*TransactionBroad) GetLocalHeight added in v1.1.1

func (tx *TransactionBroad) GetLocalHeight() uint32

func (*TransactionBroad) GetMakeHashfield added in v1.1.2

func (tx *TransactionBroad) GetMakeHashfield(chid *big.Int) []interface{}

func (*TransactionBroad) GetMatrixType added in v1.1.1

func (tx *TransactionBroad) GetMatrixType() byte

func (*TransactionBroad) GetMatrix_EX added in v1.1.1

func (tx *TransactionBroad) GetMatrix_EX() []Matrix_Extra

func (*TransactionBroad) GetTxCurrency added in v1.1.1

func (tx *TransactionBroad) GetTxCurrency() string

func (*TransactionBroad) GetTxFrom added in v1.1.1

func (tx *TransactionBroad) GetTxFrom() (common.Address, error)

func (*TransactionBroad) GetTxHashStruct added in v1.1.1

func (tx *TransactionBroad) GetTxHashStruct()

func (*TransactionBroad) GetTxN added in v1.1.1

func (tx *TransactionBroad) GetTxN(index int) uint32

func (*TransactionBroad) GetTxNLen added in v1.1.1

func (tx *TransactionBroad) GetTxNLen() int

func (*TransactionBroad) GetTxR added in v1.1.1

func (tx *TransactionBroad) GetTxR() *big.Int

func (*TransactionBroad) GetTxS added in v1.1.1

func (tx *TransactionBroad) GetTxS() *big.Int

func (*TransactionBroad) GetTxV added in v1.1.1

func (tx *TransactionBroad) GetTxV() *big.Int

func (*TransactionBroad) Hash added in v1.1.1

func (tx *TransactionBroad) Hash() common.Hash

Hash hashes the RLP encoding of tx. It uniquely identifies the transaction.

func (*TransactionBroad) IsEntrustTx added in v1.1.1

func (tx *TransactionBroad) IsEntrustTx() bool

func (*TransactionBroad) Nonce added in v1.1.1

func (tx *TransactionBroad) Nonce() uint64

func (*TransactionBroad) Protected added in v1.1.1

func (tx *TransactionBroad) Protected() bool

func (*TransactionBroad) RawSignatureValues added in v1.1.1

func (tx *TransactionBroad) RawSignatureValues() (*big.Int, *big.Int, *big.Int)

func (*TransactionBroad) SetCoinType added in v1.1.1

func (tx *TransactionBroad) SetCoinType(typ string)

func (*TransactionBroad) SetFromLoad added in v1.1.1

func (tx *TransactionBroad) SetFromLoad(x interface{})

func (*TransactionBroad) SetIsEntrustByCount added in v1.1.3

func (tx *TransactionBroad) SetIsEntrustByCount(b bool)

func (*TransactionBroad) SetIsEntrustByTime added in v1.1.1

func (tx *TransactionBroad) SetIsEntrustByTime(b bool)

func (*TransactionBroad) SetIsEntrustGas added in v1.1.1

func (tx *TransactionBroad) SetIsEntrustGas(b bool)

func (*TransactionBroad) SetNonce added in v1.1.1

func (tx *TransactionBroad) SetNonce(nc uint64)

在传递交易时用来操作Nonce

func (*TransactionBroad) SetTxCurrency added in v1.1.1

func (tx *TransactionBroad) SetTxCurrency(currency string)

func (*TransactionBroad) SetTxR added in v1.1.1

func (tx *TransactionBroad) SetTxR(r *big.Int)

func (*TransactionBroad) SetTxS added in v1.1.1

func (tx *TransactionBroad) SetTxS(S *big.Int)

func (*TransactionBroad) SetTxV added in v1.1.1

func (tx *TransactionBroad) SetTxV(v *big.Int)

func (*TransactionBroad) Setentrustfrom added in v1.1.1

func (tx *TransactionBroad) Setentrustfrom(x interface{})

func (*TransactionBroad) Size added in v1.1.1

func (tx *TransactionBroad) Size() common.StorageSize

func (*TransactionBroad) To added in v1.1.1

func (tx *TransactionBroad) To() *common.Address

func (*TransactionBroad) TxType added in v1.1.1

func (tx *TransactionBroad) TxType() byte

func (*TransactionBroad) Value added in v1.1.1

func (tx *TransactionBroad) Value() *big.Int

func (*TransactionBroad) WithSignature added in v1.1.1

func (tx *TransactionBroad) WithSignature(signer Signer, sig []byte) (SelfTransaction, error)

WithSignature returns a new transaction with the given signature. This signature needs to be formatted as described in the yellow paper (v+27).

type TransactionCall added in v1.1.1

type TransactionCall struct {
	*Transaction
}

func (*TransactionCall) CheckNonce added in v1.1.1

func (tc *TransactionCall) CheckNonce() bool

type TransactionInfo added in v1.1.2

type TransactionInfo struct {
	Index uint64
	Tx    SelfTransaction
}

type Transaction_Mx

type Transaction_Mx struct {
	Data       txdata
	Currency   string
	TxType_Mx  byte
	LockHeight uint64  `json:"lockHeight" gencodec:"required"`
	ExtraTo    []Tx_to `json:"extra_to" gencodec:"required"`
}

func ConvTxtoMxtx

func ConvTxtoMxtx(txer SelfTransaction) *Transaction_Mx

func GetTransactionMx

func GetTransactionMx(stx SelfTransaction) *Transaction_Mx

func SetTransactionToMx added in v1.1.1

func SetTransactionToMx(txer SelfTransaction) (txm *Transaction_Mx)

type TransactionsByPriceAndNonce

type TransactionsByPriceAndNonce struct {
	// contains filtered or unexported fields
}

TransactionsByPriceAndNonce represents a set of transactions that can return transactions in a profit-maximizing sorted order, while supporting removing entire batches of transactions for non-executable accounts.

func NewTransactionsByPriceAndNonce

func NewTransactionsByPriceAndNonce(signer Signer, txs map[common.Address]SelfTransactions) *TransactionsByPriceAndNonce

NewTransactionsByPriceAndNonce creates a transaction set that can retrieve price sorted transactions in a nonce-honouring way.

Note, the input map is reowned so the caller should not interact any more with if after providing it to the constructor.

func (*TransactionsByPriceAndNonce) Peek

Peek returns the next transaction by price.

func (*TransactionsByPriceAndNonce) Pop

func (t *TransactionsByPriceAndNonce) Pop()

Pop removes the best transaction, *not* replacing it with the next one from the same account. This should be used when a transaction cannot be executed and hence all subsequent ones should be discarded from the same account.

func (*TransactionsByPriceAndNonce) Shift

func (t *TransactionsByPriceAndNonce) Shift()

Shift replaces the current best head with the next one from the same account.

type TxByNonce

type TxByNonce []SelfTransaction

TxByNonce implements the sort interface to allow sorting a list of transactions by their nonces. This is usually only useful for sorting transactions from a single account, otherwise a nonce comparison doesn't make much sense.

func (TxByNonce) Len

func (s TxByNonce) Len() int

func (TxByNonce) Less

func (s TxByNonce) Less(i, j int) bool

func (*TxByNonce) Pop added in v1.1.1

func (s *TxByNonce) Pop() interface{}

func (*TxByNonce) Push added in v1.1.1

func (s *TxByNonce) Push(x interface{})

func (TxByNonce) Swap

func (s TxByNonce) Swap(i, j int)

type TxByPrice

type TxByPrice SelfTransactions

TxByPrice implements both the sort and the heap interface, making it useful for all at once sorting as well as individually adding and removing elements.

func (TxByPrice) Len

func (s TxByPrice) Len() int

func (TxByPrice) Less

func (s TxByPrice) Less(i, j int) bool

func (*TxByPrice) Pop

func (s *TxByPrice) Pop() interface{}

func (*TxByPrice) Push

func (s *TxByPrice) Push(x interface{})

func (TxByPrice) Swap

func (s TxByPrice) Swap(i, j int)

type Tx_to

type Tx_to struct {
	Recipient *common.Address `json:"to"       rlp:"nil"` // nil means contract creation
	Amount    *big.Int        `json:"value"    gencodec:"required"`
	Payload   []byte          `json:"input"    gencodec:"required"`
}

type Tx_to1 added in v1.1.1

type Tx_to1 struct {
	Recipient *string  `json:"to"       rlp:"nil"` // nil means contract creation
	Amount    *big.Int `json:"value"    gencodec:"required"`
	Payload   []byte   `json:"input"    gencodec:"required"`
}

Jump to

Keyboard shortcuts

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