tracers

package
v2.1.1-rc.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: LGPL-3.0 Imports: 6 Imported by: 0

README

based on github.com/ethereum/go-ethereum/eth/tracers v1.8.14 tag

2020-10-16(rebase to v1.9.23)

2022-05-07

introduce native tracers, forked from https://github.com/ethereum/go-ethereum/tree/v1.10.18 (de23cf910b814867d5c5d1ad6164835d79069638)

  • updated vm implementation, added CaptureEnter and CaptureExit
  • remove CaptureTxStart CaptureTxEnd from Logger interface
  • update contract create function in prestate
  • remove js tracers

2023-07-12

forked from https://github.com/ethereum/go-ethereum/tree/bed84606583893fdb698cc1b5058cc47b4dbd837 (v1.12.2)

  • add OnlyTopCall option to call tracers
  • add WithLogs option to call tracers
  • add DiffMode option to prestate tracers
  • remove nonce from prestate
  • add energy to prestate
  • use gencodec for native tracers, omit serval empty fields
  • removed "time" from all tracer outputs

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 {
	BlockID     thor.Bytes32 // Hash of the block the tx is contained within (zero if dangling tx or call)
	BlockTime   uint64       // Timestamp of the block the tx is contained within
	TxIndex     uint64       // Index of the transaction within a block (zero if dangling tx or call)
	TxID        thor.Bytes32 // ID of the transaction being traced (zero if dangling call)
	ClauseIndex uint32       // Index of the clause within a transaction (zero if dangling call)
	State       *state.State
}

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

type Tracer

type Tracer interface {
	vm.Logger
	SetContext(*Context)
	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.

Directories

Path Synopsis
js
internal/tracers
Package tracers contains the actual JavaScript tracer assets.
Package tracers contains the actual JavaScript tracer assets.

Jump to

Keyboard shortcuts

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