evm

package
v1.13.0-healthchecks-2... Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoChains = errors.New("no EVM chains loaded")

ErrNoChains indicates that no EVM chains have been started

Functions

func NewORM

func NewORM(db *sqlx.DB, lggr logger.Logger, cfg pg.QConfig) types.ORM

NewORM returns a new EVM ORM

Types

type Chain added in v1.1.0

type Chain interface {
	services.ServiceCtx
	ID() *big.Int
	Client() evmclient.Client
	Config() evmconfig.ChainScopedConfig
	LogBroadcaster() log.Broadcaster
	HeadBroadcaster() httypes.HeadBroadcaster
	TxManager() txmgr.TxManager
	HeadTracker() httypes.HeadTracker
	Logger() logger.Logger
	BalanceMonitor() monitor.BalanceMonitor
	LogPoller() logpoller.LogPoller
}

type ChainSet added in v1.1.0

type ChainSet interface {
	services.ServiceCtx
	chains.Chains[utils.Big, *types.ChainCfg]
	chains.Nodes[utils.Big, types.Node]

	Get(id *big.Int) (Chain, error)

	Default() (Chain, error)
	Chains() []Chain
	ChainCount() int

	ORM() types.ORM

	GetNodesByChainIDs(ctx context.Context, chainIDs []utils.Big) (nodes []types.Node, err error)
}

func NewTOMLChainSet added in v1.10.0

func NewTOMLChainSet(ctx context.Context, opts ChainSetOpts) (ChainSet, error)

NewTOMLChainSet returns a new ChainSet from TOML configuration.

type ChainSetOpts added in v1.1.0

type ChainSetOpts struct {
	Config           GeneralConfig
	Logger           logger.Logger
	DB               *sqlx.DB
	KeyStore         keystore.Eth
	EventBroadcaster pg.EventBroadcaster
	ORM              types.ORM
	MailMon          *utils.MailboxMonitor

	// Gen-functions are useful for dependency injection by tests
	GenEthClient      func(*big.Int) client.Client
	GenLogBroadcaster func(*big.Int) log.Broadcaster
	GenLogPoller      func(*big.Int) logpoller.LogPoller
	GenHeadTracker    func(*big.Int, httypes.HeadBroadcaster) httypes.HeadTracker
	GenTxManager      func(*big.Int) txmgr.TxManager
}

type GeneralConfig

type GeneralConfig interface {
	config.GeneralConfig
	v2.HasEVMConfigs
}

Directories

Path Synopsis
v2
gas
cmd/arbgas
arbgas takes a single URL argument and prints the result of three GetLegacyGas calls to the Arbitrum gas estimator.
arbgas takes a single URL argument and prints the result of three GetLegacyGas calls to the Arbitrum gas estimator.
log
Package logpoller is a service for querying EVM log data.
Package logpoller is a service for querying EVM log data.

Jump to

Keyboard shortcuts

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