debug

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2025 License: MIT Imports: 11 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
	RevertReason 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 w3types.Storage
}

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"`
}

func (*Trace) UnmarshalJSON added in v0.18.0

func (t *Trace) UnmarshalJSON(data []byte) error

type TraceConfig

type TraceConfig struct {
	Overrides      w3types.State           // Override account state
	BlockOverrides *w3types.BlockOverrides // Override block 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