common

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestEntry added in v0.3.0

func NewTestEntry(t *testing.T) *logrus.Entry

NewTestEntry creates a logrus entry for testing.T

Types

type AccountMap

type AccountMap map[string]struct {
	Code        string            `json:"code"`
	Storage     map[string]string `json:"storage"`
	Balance     string            `json:"balance"`
	Authorising bool              `json:"authorising"`
	Nonce       uint64            `json:"nonce,omitempty"`
}

AccountMap holds the alloc section of the genesis file

type Genesis

type Genesis struct {
	Alloc AccountMap
	Poa   PoaMap
}

Genesis File Structure

type JSONReceipt added in v0.3.6

type JSONReceipt struct {
	Root              ethcommon.Hash     `json:"root"`
	TransactionHash   ethcommon.Hash     `json:"transactionHash"`
	From              ethcommon.Address  `json:"from"`
	To                *ethcommon.Address `json:"to"`
	GasUsed           uint64             `json:"gasUsed"`
	CumulativeGasUsed uint64             `json:"cumulativeGasUsed"`
	ContractAddress   ethcommon.Address  `json:"contractAddress"`
	Logs              []*ethTypes.Log    `json:"logs"`
	LogsBloom         ethTypes.Bloom     `json:"logsBloom"`
	Status            uint64             `json:"status"`
}

JSONReceipt is the JSON structure for the return receipt from the tx end point

func ToJSONReceipt added in v0.3.3

func ToJSONReceipt(receipt *ethTypes.Receipt, tx *ethTypes.Transaction, signer ethTypes.Signer) *JSONReceipt

ToJSONReceipt uses a transaction, its from address, and a receipt to create a JSONReceipt. The "from" addressed is derived from the transaction's signature.

type PoaMap

type PoaMap struct {
	Address string
	Balance string
	Storage map[string]string
	Abi     string
	Code    string
	Nonce   uint64 `json:"nonce,omitempty"`
}

PoaMap holds the poa section of the genesis file

Jump to

Keyboard shortcuts

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