Documentation ¶
Overview ¶
Package tracers is a collection of JavaScript transaction tracers.
Index ¶
- type TraceConfig
- type Tracer
- func (jst *Tracer) CaptureAccountRead(account common.Address) error
- func (jst *Tracer) CaptureAccountWrite(account common.Address) error
- func (jst *Tracer) CaptureEnd(depth int, output []byte, gasUsed uint64, t time.Duration, err error) error
- func (jst *Tracer) CaptureFault(env *vm.EVM, pc uint64, op vm.OpCode, gas, cost uint64, memory *vm.Memory, ...) error
- func (jst *Tracer) CaptureSelfDestruct(from, to common.Address, value *big.Int)
- func (jst *Tracer) CaptureStart(depth int, from common.Address, to common.Address, precompile bool, ...) error
- func (jst *Tracer) CaptureState(env *vm.EVM, pc uint64, op vm.OpCode, gas, cost uint64, memory *vm.Memory, ...) error
- func (jst *Tracer) GetResult() (json.RawMessage, error)
- func (jst *Tracer) Stop(err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TraceConfig ¶
type TraceConfig struct { *vm.LogConfig Tracer *string Timeout *string Reexec *uint64 NoRefunds *bool // Turns off gas refunds when tracing }
TraceConfig holds extra parameters to trace functions.
type Tracer ¶
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 ¶
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) CaptureAccountRead ¶
func (*Tracer) CaptureAccountWrite ¶
func (*Tracer) CaptureEnd ¶
func (jst *Tracer) CaptureEnd(depth int, output []byte, gasUsed uint64, t time.Duration, err error) error
CaptureEnd is called after the call finishes to finalize the tracing.
func (*Tracer) CaptureFault ¶
func (jst *Tracer) CaptureFault(env *vm.EVM, pc uint64, op vm.OpCode, gas, cost uint64, memory *vm.Memory, stack *stack.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) CaptureSelfDestruct ¶
func (*Tracer) CaptureStart ¶
func (jst *Tracer) CaptureStart(depth int, from common.Address, to common.Address, precompile bool, create bool, calltype vm.CallType, input []byte, gas uint64, value *big.Int) error
CaptureStart implements the Tracer interface to initialize the tracing operation.
func (*Tracer) CaptureState ¶
func (jst *Tracer) CaptureState(env *vm.EVM, pc uint64, op vm.OpCode, gas, cost uint64, memory *vm.Memory, stack *stack.Stack, rdata []byte, contract *vm.Contract, depth int, err error) error
CaptureState implements the Tracer interface to trace a single step of VM execution.