types

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrivateReceipt

type PrivateReceipt struct {
	// Consensus fields: These fields are defined by the Yellow Paper
	PostState []byte `json:"root"`
	Status    uint64 `json:"status"`
	// CumulativeGasUsed uint64       `json:"cumulativeGasUsed" gencodec:"required"`
	Bloom types.Bloom  `json:"logsBloom"         gencodec:"required"`
	Logs  []*types.Log `json:"logs"              gencodec:"required"`

	// Implementation fields: These fields are added by geth when processing a transaction.
	// They are stored in the chain database.
	TxHash          common.Hash    `json:"transactionHash" gencodec:"required"`
	ContractAddress common.Address `json:"contractAddress"`

	// Inclusion information: These fields provide information about the inclusion of the
	// transaction corresponding to this receipt.
	BlockHash        common.Hash `json:"blockHash,omitempty"`
	BlockNumber      *big.Int    `json:"blockNumber,omitempty"`
	TransactionIndex uint        `json:"transactionIndex"`

	// Privacy
	PrivateFrom privacy.PublicKey   `json:"privateFrom"    gencodec:"required"`
	PrivateFor  []privacy.PublicKey `json:"privateFor"    gencodec:"required"`
	Restriction string

	// Private
	CommitmentHash common.Hash `json:"commitmentHash" gencodec:"required"`
	Output         []byte      `json:"output"`
}

PrivateReceipt represents the results of a transaction.

func MarshalPrivateReceipt

func MarshalPrivateReceipt(r map[string]interface{}) (*PrivateReceipt, error)

MarshalPrivateReceipt .

type PrivateTransaction

type PrivateTransaction struct {
	Data txdata
}

PrivateTransaction .

func MarshalPrivateTransaction

func MarshalPrivateTransaction(r map[string]interface{}) (*PrivateTransaction, error)

MarshalPrivateTransaction .

func NewContractCreation

func NewContractCreation(nonce uint64, amount *big.Int, gasLimit uint64, gasPrice *big.Int, data []byte, privateFrom []byte, privateFor [][]byte) *PrivateTransaction

NewContractCreation .

func NewTransaction

func NewTransaction(nonce uint64, to *common.Address, amount *big.Int, gasLimit uint64, gasPrice *big.Int, data []byte, privateFrom []byte, privateFor [][]byte) *PrivateTransaction

NewTransaction .

func (*PrivateTransaction) SignTx

func (tx *PrivateTransaction) SignTx(chainID *big.Int, prv *ecdsa.PrivateKey) (*PrivateTransaction, error)

SignTx .

Jump to

Keyboard shortcuts

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