execution

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetSyncStatus(ctx context.Context) (*SyncStatus, error)
	IsSyncing(ctx context.Context) (bool, error)
	GetBlockNumber(ctx context.Context) (uint64, error)
	GetPeerCount(ctx context.Context) (int, error)
	Name() string
}

Client defines the interface for execution layer operations

func NewClient

func NewClient(log logrus.FieldLogger, name string, rpcURL string) Client

NewClient creates a new execution client

type RPCError

type RPCError struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

RPCError represents a JSON-RPC error

func (*RPCError) Error

func (e *RPCError) Error() string

type RPCResponse

type RPCResponse struct {
	JSONRPC string          `json:"jsonrpc"`
	ID      int             `json:"id"`
	Result  json.RawMessage `json:"result,omitempty"`
	Error   *RPCError       `json:"error,omitempty"`
}

RPCResponse represents a JSON-RPC response

type SyncProgress

type SyncProgress struct {
	CurrentBlock  uint64 `json:"currentBlock"`
	HighestBlock  uint64 `json:"highestBlock"`
	StartingBlock uint64 `json:"startingBlock"`
}

SyncProgress represents the sync progress when syncing

type SyncStatus

type SyncStatus struct {
	BlockNumber  uint64
	IsSyncing    bool
	PeerCount    int
	SyncProgress *SyncProgress
}

SyncStatus represents the sync status of the execution client

Jump to

Keyboard shortcuts

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