execution

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STATUS_ERROR   = "error"
	STATUS_SUCCESS = "success"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// The address of the Execution node to connect to
	NodeAddress string `yaml:"nodeAddress"`
	// NodeHeaders is a map of headers to send to the execution node.
	NodeHeaders map[string]string `yaml:"nodeHeaders"`
	// Name is the name of the execution node
	Name string `yaml:"name"`
}

func (*Config) Validate

func (c *Config) Validate() error

type ErigonResult

type ErigonResult struct {
	Gas         uint64  `json:"gas"`
	Failed      bool    `json:"failed"`
	ReturnValue *string `json:"returnValue"`
	// empty array on transfer
	StructLogs []ErigonStructLog `json:"structLogs"`
}

type ErigonStructLog

type ErigonStructLog struct {
	PC         uint32    `json:"pc"`
	Op         string    `json:"op"`
	Gas        uint64    `json:"gas"`
	GasCost    uint64    `json:"gasCost"`
	Depth      uint64    `json:"depth"`
	ReturnData []byte    `json:"returnData"`
	Refund     *uint64   `json:"refund,omitempty"`
	Error      *string   `json:"error,omitempty"`
	Stack      *[]string `json:"stack,omitempty"`
}

type Node

type Node struct {
	// contains filtered or unexported fields
}

func NewNode

func NewNode(log logrus.FieldLogger, conf *Config) *Node

func (*Node) BlockByNumber

func (n *Node) BlockByNumber(ctx context.Context, blockNumber *big.Int) (*types.Block, error)

func (*Node) BlockNumber

func (n *Node) BlockNumber(ctx context.Context) (*uint64, error)

func (*Node) BlockReceipts added in v0.1.0

func (n *Node) BlockReceipts(ctx context.Context, blockNumber *big.Int) ([]*types.Receipt, error)

BlockReceipts fetches all receipts for a block by number (much faster than per-tx).

func (*Node) DebugTraceTransaction

func (n *Node) DebugTraceTransaction(ctx context.Context, hash string, blockNumber *big.Int, options TraceOptions) (*TraceTransaction, error)

DebugTraceTransaction traces a transaction execution using the client's debug API.

func (*Node) Metadata

func (n *Node) Metadata() *services.MetadataService

func (*Node) Name

func (n *Node) Name() string

func (*Node) OnReady

func (n *Node) OnReady(_ context.Context, callback func(ctx context.Context) error)

func (*Node) Start

func (n *Node) Start(ctx context.Context) error

func (*Node) Stop

func (n *Node) Stop(ctx context.Context) error

func (*Node) TransactionReceipt added in v0.1.0

func (n *Node) TransactionReceipt(ctx context.Context, hash string) (*types.Receipt, error)

TransactionReceipt fetches the receipt for a transaction by hash.

type StructLog

type StructLog struct {
	PC         uint32    `json:"pc"`
	Op         string    `json:"op"`
	Gas        uint64    `json:"gas"`
	GasCost    uint64    `json:"gasCost"`
	Depth      uint64    `json:"depth"`
	ReturnData *string   `json:"returnData"`
	Refund     *uint64   `json:"refund,omitempty"`
	Error      *string   `json:"error,omitempty"`
	Stack      *[]string `json:"stack,omitempty"`
}

type TraceOptions added in v0.0.11

type TraceOptions struct {
	DisableStorage   bool
	DisableStack     bool
	DisableMemory    bool
	EnableReturnData bool
}

TraceOptions configures debug_traceTransaction parameters.

func DefaultTraceOptions added in v0.0.11

func DefaultTraceOptions() TraceOptions

DefaultTraceOptions returns standard options.

func StackTraceOptions added in v0.0.11

func StackTraceOptions() TraceOptions

StackTraceOptions returns options with stack enabled.

type TraceTransaction

type TraceTransaction struct {
	Gas         uint64  `json:"gas"`
	Failed      bool    `json:"failed"`
	ReturnValue *string `json:"returnValue"`

	Structlogs []StructLog
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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