tracers

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package tracers is a manager for transaction tracing engines.

Index

Constants

This section is empty.

Variables

View Source
var DefaultDirectory = directory{/* contains filtered or unexported fields */}

DefaultDirectory is the collection of tracers bundled by default.

Functions

func GetMemoryCopyPadded

func GetMemoryCopyPadded(m *vm.Memory, offset, size int64) ([]byte, error)

GetMemoryCopyPadded returns offset + size as a new slice. It zero-pads the slice if it extends beyond memory bounds.

Types

type Context

type Context struct {
	BlockHash   common.Hash // Hash of the block the tx is contained within (zero if dangling tx or call)
	BlockNumber *big.Int    // Number of the block the tx is contained within (zero if dangling tx or call)
	TxIndex     int         // Index of the transaction within a block (zero if dangling tx or call)
	TxHash      common.Hash // Hash of the transaction being traced (zero if dangling call)
}

Context contains some contextual infos for a transaction execution that is not available from within the EVM object.

type StateReleaseFunc

type StateReleaseFunc func()

type TraceConfig

type TraceConfig struct {
	*logger.Config
	Tracer  *string
	Timeout *string
	Reexec  *uint64

	// Config specific to given tracer. Note struct logger
	// config are historically embedded in main object.
	TracerConfig json.RawMessage
}

type Tracer

type Tracer interface {
	vm.EVMLogger
	GetResult() (json.RawMessage, error)

	// Stop terminates execution of the tracer at the first opportune moment.
	Stop(err error)
}

Tracer interface extends vm.EVMLogger and additionally allows collecting the tracing result.

type TracerAPI

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

func NewTracerAPI

func NewTracerAPI(rep *repo.Repo, api api.CoreAPI, logger logrus.FieldLogger) *TracerAPI

todo

func (*TracerAPI) TraceTransaction

func (api *TracerAPI) TraceTransaction(hash common.Hash, config *TraceConfig) (any, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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