Documentation ¶
Index ¶
- type CallFrame
- type CallTracer
- func (t *CallTracer) CaptureEnd(output []byte, gasUsed uint64, _ time.Duration, err error)
- func (t *CallTracer) CaptureEnter(typ evm.OpCode, from common.Address, to common.Address, input []byte, ...)
- func (t *CallTracer) CaptureExit(output []byte, gasUsed uint64, err error)
- func (t *CallTracer) CaptureFault(env *evm.EVM, pc uint64, op evm.OpCode, gas, cost uint64, memory *evm.Memory, ...)
- func (t *CallTracer) CaptureStart(env *evm.EVM, from common.Address, to common.Address, create bool, ...)
- func (t *CallTracer) CaptureState(env *evm.EVM, pc uint64, op evm.OpCode, gas, cost uint64, memory *evm.Memory, ...)
- func (t *CallTracer) GetResult() (json.RawMessage, error)
- func (t *CallTracer) Stop(err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallFrame ¶
type CallFrame struct { Type string `json:"type"` From string `json:"from"` To string `json:"to,omitempty"` Value string `json:"value,omitempty"` Gas string `json:"gas"` GasUsed string `json:"gasUsed"` Input string `json:"input"` Output string `json:"output,omitempty"` Error string `json:"error,omitempty"` Calls []CallFrame `json:"calls,omitempty"` }
type CallTracer ¶
type CallTracer struct {
// contains filtered or unexported fields
}
func NewCallTracer ¶
func NewCallTracer() *CallTracer
func (*CallTracer) CaptureEnd ¶
CaptureEnd is called after the call finishes to finalize the tracing.
func (*CallTracer) CaptureEnter ¶
func (t *CallTracer) CaptureEnter(typ evm.OpCode, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int)
CaptureEnter is called when EVM enters a new scope (via call, create or selfdestruct).
func (*CallTracer) CaptureExit ¶
func (t *CallTracer) CaptureExit(output []byte, gasUsed uint64, err error)
CaptureExit is called when EVM exits a scope, even if the scope didn't execute any code.
func (*CallTracer) CaptureFault ¶
func (t *CallTracer) CaptureFault(env *evm.EVM, pc uint64, op evm.OpCode, gas, cost uint64, memory *evm.Memory, stack *evm.Stack, rStack *evm.ReturnStack, contract *evm.Contract, depth int, err error)
CaptureFault implements the EVMLogger interface to trace an execution fault.
func (*CallTracer) CaptureStart ¶
func (t *CallTracer) CaptureStart(env *evm.EVM, from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int)
CaptureStart implements the EVMLogger interface to initialize the tracing operation.
func (*CallTracer) CaptureState ¶
func (t *CallTracer) CaptureState(env *evm.EVM, pc uint64, op evm.OpCode, gas, cost uint64, memory *evm.Memory, stack *evm.Stack, rStack *evm.ReturnStack, rData []byte, contract *evm.Contract, depth int, err error)
CaptureState implements the EVMLogger interface to trace a single step of VM execution.
func (*CallTracer) GetResult ¶
func (t *CallTracer) GetResult() (json.RawMessage, error)
GetResult returns the json-encoded nested list of call traces, and any error arising from the encoding or forceful termination (via `Stop`).
func (*CallTracer) Stop ¶
func (t *CallTracer) Stop(err error)
Stop terminates execution of the tracer at the first opportune moment.