go-ethereum: github.com/axiomzen/go-ethereum/eth/tracers Index | Files

package tracers

import "github.com/axiomzen/go-ethereum/eth/tracers"

Package tracers is a collection of JavaScript transaction tracers.

Index

Package Files

tracer.go tracers.go

type Tracer Uses

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

Tracer provides an implementation of Tracer that evaluates a Javascript function for each VM execution step.

func New Uses

func New(code string) (*Tracer, error)

New instantiates a new tracer instance. code specifies a Javascript snippet, which must evaluate to an expression returning an object with 'step', 'fault' and 'result' functions.

func (*Tracer) CaptureEnd Uses

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

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

func (*Tracer) CaptureFault Uses

func (jst *Tracer) 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 (*Tracer) CaptureStart Uses

func (jst *Tracer) 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 (*Tracer) CaptureState Uses

func (jst *Tracer) 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 implements the Tracer interface to trace a single step of VM execution.

func (*Tracer) GetResult Uses

func (jst *Tracer) GetResult() (json.RawMessage, error)

GetResult calls the Javascript 'result' function and returns its value, or any accumulated error

func (*Tracer) Stop Uses

func (jst *Tracer) Stop(err error)

Stop terminates execution of the tracer at the first opportune moment.

Package tracers imports 16 packages (graph). Updated 2019-07-06. Refresh now. Tools for package owners.