evm

package
v2.5.1-celo-20230921 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig added in v2.5.0

type AppConfig interface {
	config.AppConfig
	toml.HasEVMConfigs
}

TODO BCF-2509 what is this and does it need the entire app config?

type Chain

type Chain interface {
	types.ChainService

	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
	GasEstimator() gas.EvmFeeEstimator
}

func NewTOMLChain added in v2.5.0

func NewTOMLChain(ctx context.Context, chain *toml.EVMConfig, opts ChainRelayExtenderConfig) (Chain, error)

type ChainRelayExtenderConfig added in v2.5.0

type ChainRelayExtenderConfig struct {
	Logger   logger.Logger
	DB       *sqlx.DB
	KeyStore keystore.Eth
	RelayerConfig
}

func (*ChainRelayExtenderConfig) Check added in v2.5.0

func (opts *ChainRelayExtenderConfig) Check() error

type LegacyChainContainer added in v2.5.0

type LegacyChainContainer interface {
	SetDefault(Chain)
	Default() (Chain, error)
	Get(id string) (Chain, error)
	Len() int
	List(ids ...string) ([]Chain, error)
	Slice() []Chain

	ChainNodeConfigs() evmtypes.Configs
}

LegacyChainContainer is container for EVM chains.

type LegacyChains added in v2.5.0

type LegacyChains struct {
	*chains.ChainsKV[Chain]
	// contains filtered or unexported fields
}

LegacyChains implements LegacyChainContainer

func NewLegacyChains added in v2.5.0

func NewLegacyChains(cfg AppConfig, m map[string]Chain) (*LegacyChains, error)

func (*LegacyChains) ChainNodeConfigs added in v2.5.0

func (c *LegacyChains) ChainNodeConfigs() evmtypes.Configs

func (*LegacyChains) Default added in v2.5.0

func (c *LegacyChains) Default() (Chain, error)

func (*LegacyChains) Get added in v2.5.0

func (c *LegacyChains) Get(id string) (Chain, error)

backward compatibility. eth keys are represented as multiple types in the code base; *big.Int, string, and int64. this lead to special 'default' handling of nil big.Int and empty string.

TODO BCF-2507 unify the type system

func (*LegacyChains) SetDefault added in v2.5.0

func (c *LegacyChains) SetDefault(dflt Chain)

TODO BCR-2510 this may not be needed if EVM is not enabled by default

type RelayerConfig added in v2.5.0

type RelayerConfig struct {
	AppConfig AppConfig

	EventBroadcaster pg.EventBroadcaster
	MailMon          *utils.MailboxMonitor
	GasEstimator     gas.EvmFeeEstimator

	// TODO BCF-2513 remove test code from the API
	// 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
	GenGasEstimator   func(*big.Int) gas.EvmFeeEstimator
	// contains filtered or unexported fields
}

options for the relayer factory. TODO BCF-2508 clean up configuration of chain and relayer after BCF-2440 the factory wants to own the logger and db the factory creates extenders, which need the same and more opts

func (*RelayerConfig) EVMConfigs added in v2.5.0

func (r *RelayerConfig) EVMConfigs() evmtypes.Configs

Directories

Path Synopsis
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