tracer

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallTracer

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

func NewCallTracer

func NewCallTracer() *CallTracer

func (*CallTracer) CaptureEnd

func (tracer *CallTracer) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) error

CaptureEnd is called after the call finishes to finalize the tracing.

func (*CallTracer) CaptureFault

func (tracer *CallTracer) CaptureFault(env *vm.EVM, pc uint64, op vm.OpCode, gas, cost uint64, memory *vm.Memory, stack *vm.Stack, contract *vm.Contract, depth int, err error) error

CaptureFault implements the Tracer interface to trace an execution fault while running an opcode.

func (*CallTracer) CaptureStart

func (tracer *CallTracer) CaptureStart(from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) error

CaptureStart implements the Tracer interface to initialize the tracing operation.

func (*CallTracer) CaptureState

func (tracer *CallTracer) CaptureState(env *vm.EVM, pc uint64, op vm.OpCode, gas, cost uint64, memory *vm.Memory, stack *vm.Stack, contract *vm.Contract, depth int, err error) error

CaptureState logs a new structured log message and pushes it out to the environment

func (*CallTracer) Error

func (tracer *CallTracer) Error() error

Error returns the VM error captured by the trace.

func (*CallTracer) Frames

func (tracer *CallTracer) Frames() []Frame

Frames returns the captured call frames.

func (*CallTracer) Output

func (tracer *CallTracer) Output() hexutil.Bytes

Output returns the VM return value captured by the trace.

type Frame

type Frame struct {
	Op     vm.OpCode      `json:"-"`
	From   common.Address `json:"from"`
	To     common.Address `json:"to"`
	Input  hexutil.Bytes  `json:"input"`
	Output hexutil.Bytes  `json:"output"`
	Gas    uint64         `json:"gas"`
	Cost   uint64         `json:"cost"`
	Value  *big.Int       `json:"value"`
}

Jump to

Keyboard shortcuts

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