ethapi

package
v0.0.0-...-24e5678 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: LGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecutionResult

type ExecutionResult struct {
	Gas         uint64         `json:"gas"`
	Failed      bool           `json:"failed"`
	ReturnValue string         `json:"returnValue"`
	StructLogs  []StructLogRes `json:"structLogs"`
}

ExecutionResult groups all structured logs emitted by the EVM while replaying a transaction in debug mode as well as transaction execution status, the amount of gas used and the return value

type RPCTransaction

type RPCTransaction struct {
	BlockHash        string      `json:"blockHash"`
	BlockNumber      string      `json:"blockNumber"`
	From             string      `json:"from"`
	Gas              string      `json:"gas"`
	GasPrice         string      `json:"gasPrice"`
	GasFeeCap        string      `json:"maxFeePerGas,omitempty"`
	GasTipCap        string      `json:"maxPriorityFeePerGas,omitempty"`
	Hash             string      `json:"hash"`
	Input            string      `json:"input"`
	Nonce            interface{} `json:"nonce"`
	To               interface{} `json:"to"`
	TransactionIndex string      `json:"transactionIndex"`
	Value            string      `json:"value"`
	Type             string      `json:"type,omitempty"`
	Accesses         string      `json:"accessList,omitempty"`
	ChainID          string      `json:"chainId,omitempty"`
	V                string      `json:"v"`
	R                string      `json:"r"`
	S                string      `json:"s"`
}

RPCTransaction represents a transaction that will serialize to the RPC representation of a transaction

type StructLogRes

type StructLogRes struct {
	Pc      uint64             `json:"pc"`
	Op      string             `json:"op"`
	Gas     uint64             `json:"gas"`
	GasCost uint64             `json:"gasCost"`
	Depth   int                `json:"depth"`
	Error   string             `json:"error,omitempty"`
	Stack   *[]string          `json:"stack,omitempty"`
	Memory  *[]string          `json:"memory,omitempty"`
	Storage *map[string]string `json:"storage,omitempty"`
}

StructLogRes stores a structured log emitted by the EVM while replaying a transaction in debug mode

func FormatLogs

func FormatLogs(logs []logger.StructLog) []StructLogRes

FormatLogs formats EVM returned structured logs for json output

Jump to

Keyboard shortcuts

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