evm

package
v1.1.0-solana-test Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: MIT Imports: 29 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 ClobberDBFromEnv added in v1.1.0

func ClobberDBFromEnv(db *sqlx.DB, config LegacyEthNodeConfig, lggr logger.Logger) error

func NewORM

func NewORM(db *sqlx.DB) types.ORM

Types

type Chain added in v1.1.0

type Chain interface {
	services.Service
	ID() *big.Int
	Client() evmclient.Client
	Config() evmconfig.ChainScopedConfig
	LogBroadcaster() log.Broadcaster
	HeadBroadcaster() httypes.HeadBroadcaster
	TxManager() bulletprooftxmanager.TxManager
	HeadTracker() httypes.HeadTracker
	Logger() logger.Logger
	BalanceMonitor() balancemonitor.BalanceMonitor
}

type ChainConfigUpdater added in v1.1.0

type ChainConfigUpdater func(*types.ChainCfg) error

func UpdateKeySpecificMaxGasPrice added in v1.1.0

func UpdateKeySpecificMaxGasPrice(addr common.Address, maxGasPriceWei *big.Int) ChainConfigUpdater

type ChainSet added in v1.1.0

type ChainSet interface {
	services.Service
	Get(id *big.Int) (Chain, error)
	Add(id *big.Int, config types.ChainCfg) (types.Chain, error)
	Remove(id *big.Int) error
	Default() (Chain, error)
	Configure(id *big.Int, enabled bool, config types.ChainCfg) (types.Chain, error)
	UpdateConfig(id *big.Int, updaters ...ChainConfigUpdater) error
	Chains() []Chain
	ChainCount() int
	ORM() types.ORM
}

func LoadChainSet added in v1.1.0

func LoadChainSet(opts ChainSetOpts) (ChainSet, error)

func NewChainSet added in v1.1.0

func NewChainSet(opts ChainSetOpts, dbchains []types.Chain) (ChainSet, error)

type ChainSetOpts added in v1.1.0

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

	// Gen-functions are useful for dependency injection by tests
	GenEthClient      func(types.Chain) evmclient.Client
	GenLogBroadcaster func(types.Chain) log.Broadcaster
	GenHeadTracker    func(types.Chain, httypes.HeadBroadcaster) httypes.HeadTracker
	GenTxManager      func(types.Chain) bulletprooftxmanager.TxManager
}

type LegacyEthNodeConfig added in v1.1.0

type LegacyEthNodeConfig interface {
	DefaultChainID() *big.Int
	EthereumURL() string
	EthereumHTTPURL() *url.URL
	EthereumSecondaryURLs() []url.URL
}

Jump to

Keyboard shortcuts

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