execution

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: GPL-3.0 Imports: 14 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"`
}

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) DebugTraceTransaction

func (n *Node) DebugTraceTransaction(ctx context.Context, hash string, blockNumber *big.Int) (*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

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

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