legacyevm

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: LGPL-3.0, MIT Imports: 32 Imported by: 31

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

type Chain interface {
	types.ChainService

	ID() *big.Int
	Client() client.Client
	Config() config.ChainScopedConfig
	LogBroadcaster() log.Broadcaster
	HeadBroadcaster() heads.Broadcaster
	TxManager() txmgr.TxManager
	HeadTracker() heads.Tracker
	Logger() logger.Logger
	BalanceMonitor() monitor.BalanceMonitor
	LogPoller() logpoller.LogPoller
	GasEstimator() gas.EvmFeeEstimator
}

func NewTOMLChain

func NewTOMLChain(chain *toml.EVMConfig, opts ChainRelayOpts, clientsByChainID map[string]rollups.DAClient) (Chain, error)

type ChainOpts

type ChainOpts struct {
	ChainConfigs   toml.EVMConfigs
	DatabaseConfig txmgr.DatabaseConfig
	FeatureConfig  FeatureConfig
	ListenerConfig txmgr.ListenerConfig

	MailMon *mailbox.Monitor

	DS sqlutil.DataSource

	// TODO BCF-2513 remove test code from the API
	// Gen-functions are useful for dependency injection by tests
	GenChainStore     func(ks core.Keystore, i *big.Int) keys.ChainStore
	GenEthClient      func(*big.Int) client.Client
	GenLogBroadcaster func(*big.Int) log.Broadcaster
	GenLogPoller      func(*big.Int) logpoller.LogPoller
	GenHeadTracker    func(*big.Int, heads.Broadcaster) heads.Tracker
	GenTxManager      func(*big.Int) txmgr.TxManager
	GenGasEstimator   func(*big.Int) gas.EvmFeeEstimator
}

func (ChainOpts) Validate

func (o ChainOpts) Validate() error

type ChainRelayOpts

type ChainRelayOpts struct {
	Logger   logger.Logger
	KeyStore keys.ChainStore
	ChainOpts
}

type ChainTronSupport

type ChainTronSupport interface {
	GetTronTXM() *trontxm.TronTxm
}

ChainTronSupport is an Chain interface extension for Tron support.

type FeatureConfig

type FeatureConfig interface {
	LogPoller() bool
}

type LegacyChainContainer

type LegacyChainContainer interface {
	Get(id string) (types.ChainService, error)
	Len() int
	List(ids ...string) ([]types.ChainService, error)
	Slice() []types.ChainService
}

LegacyChainContainer is container for EVM chains of type types.ChainService, which may be castable to Chain. The cast will fail if the chain is running in LOOPP mode, in which case the legacy API is limited to the overlapping set defined by types.ChainService.

type LegacyChains

type LegacyChains struct {
	*chains.ChainsKV[types.ChainService]
}

LegacyChains implements LegacyChainContainer

func NewLegacyChains

func NewLegacyChains(m map[string]types.ChainService) *LegacyChains

func (*LegacyChains) Get

func (c *LegacyChains) Get(id string) (types.ChainService, error)

backward compatibility. eth keys are represented as multiple types in the code base; *big.Int, string, and int64.

TODO BCF-2507 unify the type system

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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