vm

package
v0.0.0-...-6ec8c49 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEVM

func NewEVM(config *config.ChainConfig, msg vmcore.Message, header *types.Header, chain vmcore.ChainContext,
	author *common.Address, statedb vmcore.StateDB) vmcore.EVM

func NewEVMForGeneration

func NewEVMForGeneration(config *config.ChainConfig, header *types.Header,
	author common.Address, statedb vmcore.StateDB, getHash func(uint64) common.Hash, gasPrice int64) vmcore.EVM

Types

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   error             `json:"error"`
	Stack   []string          `json:"stack"`
	Memory  []string          `json:"memory"`
	Storage map[string]string `json:"storage"`
}

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

func FormatLogs

func FormatLogs(structLogs []evm.StructLog) []StructLogRes

func FormatLogs2

func FormatLogs2(structLogs []vm.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