transaction

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ReceiptStatusFailed is the status code of a transaction if execution failed.
	ReceiptStatusFailed = uint(0)

	// ReceiptStatusSuccessful is the status code of a transaction if execution succeeded.
	ReceiptStatusSuccessful = uint(1)
)

Variables

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 CreateBloom

func CreateBloom(receipts Receipts) types.Bloom

func Sender

func Sender(signer Signer, tx *Transaction) (types.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.

Types

type Action

type Action struct {
	Contract types.Address `json:"contract" gencodec:"required"`
	Params   []byte        `json:"params"   gencodec:"required"`
}

func NewAction

func NewAction() *Action

func (*Action) DecodeMsg

func (z *Action) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*Action) EncodeMsg

func (z *Action) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (Action) MarshalJSON

func (a Action) MarshalJSON() ([]byte, error)

func (*Action) MarshalMsg

func (z *Action) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Action) Msgsize

func (z *Action) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Action) String

func (tx *Action) String() string

String just print action, simple is best

func (*Action) UnmarshalJSON

func (a *Action) UnmarshalJSON(input []byte) error

func (*Action) UnmarshalMsg

func (z *Action) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Actions

type Actions []*Action

func (*Actions) DecodeMsg

func (z *Actions) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (Actions) EncodeMsg

func (z Actions) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (Actions) MarshalMsg

func (z Actions) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Actions) Msgsize

func (z Actions) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Actions) UnmarshalMsg

func (z *Actions) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Log

type Log struct {
	// Consensus fields:
	// address of the contract that generated the event
	Address types.Address `json:"address" gencodec:"required"`
	// list of topics provided by the contract.
	Topics []types.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 types.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 types.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"  msg:"-"`
}

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

func (*Log) DecodeMsg

func (z *Log) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*Log) EncodeMsg

func (z *Log) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (Log) MarshalJSON

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

func (*Log) MarshalMsg

func (z *Log) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Log) Msgsize

func (z *Log) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Log) String

func (l *Log) String() string

func (*Log) UnmarshalJSON

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

func (*Log) UnmarshalMsg

func (z *Log) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type LogProtocol

type LogProtocol struct {
	Address types.Address
	// list of topics provided by the contract.
	Topics []types.Hash
	// supplied by the contract, usually ABI-encoded
	Data [][]byte
}

LogProtocol is the consensus encoding of a Log.

func (*LogProtocol) DecodeMsg

func (z *LogProtocol) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*LogProtocol) EncodeMsg

func (z *LogProtocol) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*LogProtocol) MarshalMsg

func (z *LogProtocol) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*LogProtocol) Msgsize

func (z *LogProtocol) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*LogProtocol) UnmarshalMsg

func (z *LogProtocol) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type MSigner

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

func NewMSigner

func NewMSigner(chainId *big.Int) MSigner

func (MSigner) Equal

func (s MSigner) Equal(s2 Signer) bool

func (MSigner) Hash

func (s MSigner) Hash(tx *Transaction) types.Hash

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

func (MSigner) Sender

func (s MSigner) Sender(tx *Transaction) (types.Address, error)

func (MSigner) SignatureValues

func (s MSigner) SignatureValues(tx *Transaction, 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 Message

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

Message is a fully derived transaction and implements core.Message

NOTE: In a future PR this will be removed.

func NewMessage

func NewMessage(from types.Address, nonce uint64, actions Actions, checkNonce bool) Message

func (Message) Actions

func (m Message) Actions() Actions

func (Message) CheckNonce

func (m Message) CheckNonce() bool

func (Message) From

func (m Message) From() types.Address

func (Message) Nonce

func (m Message) Nonce() uint64

type Receipt

type Receipt struct {
	// Consensus fields
	Status uint        `json:"status"`
	Bloom  types.Bloom `json:"logsBloom"         gencodec:"required"`
	Logs   []*Log      `json:"logs"              gencodec:"required"`

	// Implementation fields (don't reorder!)
	TxHash          types.Hash      `json:"transactionHash"   gencodec:"required"`
	ContractAddress []types.Address `json:"contractAddress"`
}

Receipt represents the results of a transaction.

func NewReceipt

func NewReceipt(failed bool) *Receipt

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

func (*Receipt) DecodeMsg

func (z *Receipt) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*Receipt) EncodeMsg

func (z *Receipt) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*Receipt) MarshalMsg

func (z *Receipt) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Receipt) Msgsize

func (z *Receipt) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Receipt) String

func (r *Receipt) String() string

String implements the Stringer interface.

func (*Receipt) UnmarshalMsg

func (z *Receipt) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type ReceiptProtocol

type ReceiptProtocol struct {
	Status uint
	Bloom  types.Bloom
	Logs   []*LogProtocol
}

ReceiptProtocol is the consensus encoding of a receipt

func (*ReceiptProtocol) DecodeMsg

func (z *ReceiptProtocol) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*ReceiptProtocol) EncodeMsg

func (z *ReceiptProtocol) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*ReceiptProtocol) MarshalMsg

func (z *ReceiptProtocol) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*ReceiptProtocol) Msgsize

func (z *ReceiptProtocol) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*ReceiptProtocol) UnmarshalMsg

func (z *ReceiptProtocol) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type ReceiptProtocols

type ReceiptProtocols []*ReceiptProtocol

type Receipts_s [][]*Receipt

func (*ReceiptProtocols) DecodeMsg

func (z *ReceiptProtocols) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (ReceiptProtocols) EncodeMsg

func (z ReceiptProtocols) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (ReceiptProtocols) MarshalMsg

func (z ReceiptProtocols) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (ReceiptProtocols) Msgsize

func (z ReceiptProtocols) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*ReceiptProtocols) UnmarshalMsg

func (z *ReceiptProtocols) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Receipts

type Receipts []*Receipt

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

func (*Receipts) DecodeMsg

func (z *Receipts) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (Receipts) EncodeMsg

func (z Receipts) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (Receipts) GetMsgp

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

func (Receipts) Len

func (r Receipts) Len() int

Len returns the number of receipts in this list.

func (Receipts) MarshalMsg

func (z Receipts) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Receipts) Msgsize

func (z Receipts) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Receipts) UnmarshalMsg

func (z *Receipts) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Receipts_s

type Receipts_s struct {
	Receipts_s []ReceiptProtocols
}

func (*Receipts_s) DecodeMsg

func (z *Receipts_s) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*Receipts_s) EncodeMsg

func (z *Receipts_s) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*Receipts_s) MarshalMsg

func (z *Receipts_s) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Receipts_s) Msgsize

func (z *Receipts_s) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Receipts_s) UnmarshalMsg

func (z *Receipts_s) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Signer

type Signer interface {
	// Sender returns the sender address of the transaction.
	Sender(tx *Transaction) (types.Address, error)
	// SignatureValues returns the raw R, S, V values corresponding to the
	// given signature.
	SignatureValues(tx *Transaction, sig []byte) (r, s, v *big.Int, err error)
	// Hash returns the hash to be signed.
	Hash(tx *Transaction) types.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 Transaction

type Transaction struct {
	Data Txdata
	// contains filtered or unexported fields
}

func NewTransaction

func NewTransaction(nonce uint64, actions Actions) *Transaction

All actions is made by interpreter

func SignTx

func SignTx(tx *Transaction, s Signer, prv *ecdsa.PrivateKey) (*Transaction, error)

SignTx signs the transaction using the given signer and private key

func (*Transaction) Actions

func (tx *Transaction) Actions() Actions

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) DecodeMsg

func (z *Transaction) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*Transaction) EncodeMsg

func (z *Transaction) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*Transaction) Hash

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

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

func (*Transaction) MarshalJSON

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

MarshalJSON encodes the web3 RPC transaction format.

func (*Transaction) MarshalMsg

func (z *Transaction) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Transaction) Msgsize

func (z *Transaction) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Transaction) Nonce

func (tx *Transaction) Nonce() uint64

func (*Transaction) ParsePriority

func (tx *Transaction) ParsePriority()

func (*Transaction) PrintVSR

func (this *Transaction) PrintVSR()

for test

func (*Transaction) Priority

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

get priority from 1st action by interpreter

func (*Transaction) Protected

func (tx *Transaction) Protected() bool

Protected returns whether the transaction is protected from replay protection.

func (*Transaction) RawSignatureValues

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

func (*Transaction) SetPriority

func (tx *Transaction) SetPriority(newPriority *big.Int)

func (*Transaction) Size

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

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

func (*Transaction) String

func (tx *Transaction) String() string

String just print transaction, simple is best

func (*Transaction) UnmarshalJSON

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

UnmarshalJSON decodes the web3 RPC transaction format.

func (*Transaction) UnmarshalMsg

func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

func (*Transaction) WithSignature

func (tx *Transaction) WithSignature(signer Signer, sig []byte) (*Transaction, 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 Transactions

type Transactions []*Transaction

Transactions is a Transaction slice type for basic sorting.

func TxDifference

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

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

func (*Transactions) DecodeMsg

func (z *Transactions) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (Transactions) EncodeMsg

func (z Transactions) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (Transactions) GetMsgp

func (s Transactions) GetMsgp(i int) []byte

GetMsgp implements Msgpable and returns the i'th element of s in msgp.

func (Transactions) Len

func (s Transactions) Len() int

Len returns the length of s.

func (Transactions) MarshalMsg

func (z Transactions) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Transactions) Msgsize

func (z Transactions) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (Transactions) Swap

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

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

func (*Transactions) UnmarshalMsg

func (z *Transactions) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type TransactionsByPriorityAndNonce

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

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

func NewTransactionsByPriorityAndNonce

func NewTransactionsByPriorityAndNonce(signer Signer, txs map[types.Address]Transactions, txsReward *Transaction) *TransactionsByPriorityAndNonce

NewTransactionsByPriorityAndNonce creates a transaction set that can retrieve priority 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 (*TransactionsByPriorityAndNonce) Length

func (t *TransactionsByPriorityAndNonce) Length() int

func (*TransactionsByPriorityAndNonce) Peek

Peek returns the next transaction by priority.

func (*TransactionsByPriorityAndNonce) 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 (*TransactionsByPriorityAndNonce) Shift

func (t *TransactionsByPriorityAndNonce) Shift()

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

type TxByNonce

type TxByNonce Transactions

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) DecodeMsg

func (z *TxByNonce) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (TxByNonce) EncodeMsg

func (z TxByNonce) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (TxByNonce) Len

func (s TxByNonce) Len() int

func (TxByNonce) Less

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

func (TxByNonce) MarshalMsg

func (z TxByNonce) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (TxByNonce) Msgsize

func (z TxByNonce) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (TxByNonce) Swap

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

func (*TxByNonce) UnmarshalMsg

func (z *TxByNonce) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type TxByPriority

type TxByPriority Transactions

TxByPriority implements the sort interface to allow sorting a list of transactions by their priority. TxByPriority 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 (*TxByPriority) DecodeMsg

func (z *TxByPriority) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (TxByPriority) EncodeMsg

func (z TxByPriority) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (TxByPriority) Len

func (s TxByPriority) Len() int

func (TxByPriority) Less

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

func (TxByPriority) MarshalMsg

func (z TxByPriority) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (TxByPriority) Msgsize

func (z TxByPriority) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*TxByPriority) Pop

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

func (*TxByPriority) Push

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

func (TxByPriority) Swap

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

func (*TxByPriority) UnmarshalMsg

func (z *TxByPriority) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type TxHeader

type TxHeader struct {
	Nonce uint64 `json:"AccountNonce"   gencodec:"required"`
}

func (*TxHeader) DecodeMsg

func (z *TxHeader) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (TxHeader) EncodeMsg

func (z TxHeader) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (TxHeader) MarshalJSON

func (t TxHeader) MarshalJSON() ([]byte, error)

func (TxHeader) MarshalMsg

func (z TxHeader) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (TxHeader) Msgsize

func (z TxHeader) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*TxHeader) UnmarshalJSON

func (t *TxHeader) UnmarshalJSON(input []byte) error

func (*TxHeader) UnmarshalMsg

func (z *TxHeader) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Txdata

type Txdata struct {
	H    TxHeader `json:"header"  gencodec:"required"`
	Acts Actions  `json:"actions" gencodec:"required"`

	// Signature values
	V *types.BigInt `json:"v"       gencodec:"required"`
	R *types.BigInt `json:"r"       gencodec:"required"`
	S *types.BigInt `json:"s"       gencodec:"required"`

	// This is only used when marshaling to JSON.
	Hash *types.Hash `json:"hash"    msg:"-"`
}

func (*Txdata) DecodeMsg

func (z *Txdata) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*Txdata) EncodeMsg

func (z *Txdata) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (Txdata) MarshalJSON

func (t Txdata) MarshalJSON() ([]byte, error)

func (*Txdata) MarshalMsg

func (z *Txdata) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Txdata) Msgsize

func (z *Txdata) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Txdata) UnmarshalJSON

func (t *Txdata) UnmarshalJSON(input []byte) error

func (*Txdata) UnmarshalMsg

func (z *Txdata) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

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