ethereum

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigGasEstimationFactor   = "gasEstimationFactor"
	ConfigDataFormat            = "dataFormat"
	BlockPollingInterval        = "blockPollingInterval"
	BlockCacheSize              = "blockCacheSize"
	ReceiptCacheEnabled         = "receiptCache.enabled"
	ReceiptCacheSize            = "receiptCache.size"
	ChainTrackingMode           = "chainTrackingMode"
	EventsCatchupPageSize       = "events.catchupPageSize"
	EventsCatchupThreshold      = "events.catchupThreshold"
	EventsCatchupDownscaleRegex = "events.catchupDownscaleRegex"
	EventsCheckpointBlockGap    = "events.checkpointBlockGap"
	EventsBlockTimestamps       = "events.blockTimestamps"
	EventsFilterPollingInterval = "events.filterPollingInterval"
	EventsFilterPollingMode     = "events.filterPollingMode"
	RetryInitDelay              = "queryLoopRetry.initialDelay"
	RetryMaxDelay               = "queryLoopRetry.maxDelay"
	RetryFactor                 = "queryLoopRetry.factor"

	DeprecatedRetryInitDelay = "retry.initialDelay"
	DeprecatedRetryMaxDelay  = "retry.maxDelay"
	DeprecatedRetryFactor    = "retry.factor"

	RetryEnabled = "retry.enabled"

	MaxConcurrentRequests         = "maxConcurrentRequests"
	TxCacheSize                   = "txCacheSize"
	HederaCompatibilityMode       = "hederaCompatibilityMode"
	TraceTXForRevertReason        = "traceTXForRevertReason"
	WebSocketsEnabled             = "ws.enabled"
	RPCRoutingMode                = "rpcRoutingMode"
	MaxAsyncBlockFetchConcurrency = "maxAsyncBlockFetchConcurrency"
	UseGetBlockReceipts           = "useGetBlockReceipts"
)
View Source
const (
	// FilterPollingModeServer uses node-side filters, established with eth_newBlockFilter / eth_newFilter
	// and polled with eth_getFilterChanges, so the node tracks what is new since the last poll
	FilterPollingModeServer = ethblocklistener.FilterPollingModeServer
	// FilterPollingModeClient polls the latest block, and uses stateless eth_getLogs range queries, with
	// the connector tracking its own in-memory poll positions - avoiding node-side filter state entirely
	FilterPollingModeClient = ethblocklistener.FilterPollingModeClient
)
View Source
const (
	DefaultListenerPort        = 5102
	DefaultGasEstimationFactor = 1.5

	DefaultCatchupPageSize             = 500
	DefaultEventsCatchupThreshold      = 500
	DefaultEventsCatchupDownscaleRegex = "Response size is larger than.*limit"
	DefaultEventsCheckpointBlockGap    = 50

	DefaultRetryInitDelay   = "100ms"
	DefaultRetryMaxDelay    = "30s"
	DefaultRetryDelayFactor = 2.0
)

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(conf config.Section)

func ProtocolIDForReceipt

func ProtocolIDForReceipt(blockNumber, transactionIndex *fftypes.FFBigInt) string

Types

type Connector

type Connector interface {
	ffcapi.API

	// RPC returns the JSON/RPC client used for everything the connector does. It owns both
	// the HTTP connection pool and the WebSocket (when enabled), and routes each call to one
	// of them based on the method name and the configured routing mode.
	RPC() ethrpc.Client

	// Get the high level block listener functionality, which provides a view of the head of the chain
	BlockListener() ethblocklistener.BlockListener
}

func NewEthereumConnector

func NewEthereumConnector(ctx context.Context, conf config.Section) (cc Connector, err error)

NewEthereumConnector builds the JSON/RPC client from configuration, and the connector over it.

func NewEthereumConnectorWithRPC added in v1.5.2

func NewEthereumConnectorWithRPC(ctx context.Context, conf config.Section, rpc ethrpc.Client) (cc Connector, err error)

NewEthereumConnectorWithRPC builds the connector over a pre-constructed JSON/RPC client. The caller owns closing the client - see ethConnector.WaitClosed.

type StructLog

type StructLog struct {
	PC      *fftypes.FFBigInt `json:"pc"`
	Op      *string           `json:"op"`
	Gas     *fftypes.FFBigInt `json:"gas"`
	GasCost *fftypes.FFBigInt `json:"gasCost"`
	Depth   *fftypes.FFBigInt `json:"depth"`
	Stack   []*string         `json:"stack"`
	Memory  []*string         `json:"memory"`
	Reason  *string           `json:"reason"`
}

Jump to

Keyboard shortcuts

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