debug

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package debug implements RPC API bindings for methods in the "debug" namespace.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallTraceCall

func CallTraceCall(msg *w3types.Message, blockNumber *big.Int, overrides w3types.State) w3types.RPCCallerFactory[CallTrace]

CallTraceCall requests the call trace of the given message.

func CallTraceTx

func CallTraceTx(txHash common.Hash, overrides w3types.State) w3types.RPCCallerFactory[CallTrace]

CallTraceTx requests the call trace of the transaction with the given hash.

func TraceCall

func TraceCall(msg *w3types.Message, blockNumber *big.Int, config *TraceConfig) w3types.RPCCallerFactory[Trace]

TraceCall requests the trace of the given message.

func TraceTx

func TraceTx(txHash common.Hash, config *TraceConfig) w3types.RPCCallerFactory[Trace]

TraceTx requests the trace of the transaction with the given hash.

Types

type CallTrace

type CallTrace struct {
	From    common.Address
	To      common.Address
	Type    string
	Gas     uint64
	GasUsed uint64
	Value   *big.Int
	Input   []byte
	Output  []byte
	Error   string
	Calls   []*CallTrace
}

func (*CallTrace) UnmarshalJSON

func (c *CallTrace) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler.

type StructLog

type StructLog struct {
	Pc      uint64
	Depth   uint
	Gas     uint64
	GasCost uint
	Op      vm.OpCode
	Stack   []uint256.Int
	Memory  []byte
	Storage map[common.Hash]common.Hash
}

func (*StructLog) UnmarshalJSON

func (l *StructLog) UnmarshalJSON(data []byte) error

type Trace

type Trace struct {
	Gas        uint64       `json:"gas"`
	Failed     bool         `json:"failed"`
	Output     []byte       `json:"returnValue"`
	StructLogs []*StructLog `json:"structLogs"`
}

type TraceConfig

type TraceConfig struct {
	Overrides     w3types.State // Override account state
	EnableStack   bool          // Enable stack capture
	EnableMemory  bool          // Enable memory capture
	EnableStorage bool          // Enable storage capture
	Limit         uint64        // Maximum number of StructLog's to capture (all if zero)
}

func (*TraceConfig) MarshalJSON

func (c *TraceConfig) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler.

Jump to

Keyboard shortcuts

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