tracer

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: GPL-3.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package tracer provides custom tracing capabilities to comply with EIP-4337 specifications for forbidden opcodes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load() (string, error)

Load reads the BundlerCollectorTracer.js file and returns a string that can be passed to a debug RPC method as a custom tracer.

Types

type AccessInfo

type AccessInfo struct {
	Reads  Counts `json:"reads"`
	Writes Counts `json:"writes"`
}

AccessInfo provides context on read and write counts by storage slots.

type AccessMap added in v0.2.0

type AccessMap = map[common.Address]AccessInfo

type BundlerCollectorReturn

type BundlerCollectorReturn struct {
	NumberLevels []NumberLevelInfo `json:"numberLevels"`
	Keccak       []string          `json:"keccak"`
	Calls        []CallInfo        `json:"calls"`
	Logs         []LogInfo         `json:"logs"`
	Debug        []any             `json:"debug"`
}

BundlerCollectorReturn is the return value from performing an EVM trace with BundlerCollectorTracer.js.

type CallInfo

type CallInfo struct {
	// Common
	Type string `json:"type"`

	// Method info
	From   common.Address `json:"from"`
	To     common.Address `json:"to"`
	Method string         `json:"method"`
	Value  any            `json:"value"`
	Gas    float64        `json:"gas"`

	// Exit info
	GasUsed float64 `json:"gasUsed"`
	Data    any     `json:"data"`
}

CallInfo provides context on internal calls made during tracing.

type Counts

type Counts = map[string]float64

type LogInfo

type LogInfo struct {
	Topics []string `json:"topics"`
	Data   string   `json:"data"`
}

LogInfo provides context from LOG opcodes during each step in the EVM trace.

type NumberLevelInfo

type NumberLevelInfo struct {
	Opcodes      Counts    `json:"opcodes"`
	Access       AccessMap `json:"access"`
	ContractSize Counts    `json:"contractSize"`
}

NumberLevelInfo provides context on opcodes and storage access delimited by the use of NUMBER at the EntryPoint.

Jump to

Keyboard shortcuts

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