debug

package
v0.0.0-...-014d79c Latest Latest
Warning

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

Go to latest
Published: Sep 4, 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
	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 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 {
	Tracer           string        `json:"tracer,omitempty"`
	TracerConfig     interface{}   `json:"tracerConfig,omitempty"`
	Overrides        w3types.State `json:"stateOverrides,omitempty"`
	EnableStack      bool          `json:"enableStack,omitempty"`
	EnableMemory     bool          `json:"enableMemory,omitempty"`
	EnableStorage    bool          `json:"enableStorage,omitempty"`
	EnableReturnData bool          `json:"enableReturnData,omitempty"`
	Limit            uint64        `json:"limit,omitempty"`
}

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