evm

package
v1.10.17 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoChains = errors.New("no chains loaded, are you running with EVM_DISABLED=true ?")
View Source
var ErrNoPrimaryNode = errors.New("no primary node found")
View Source
var ErrNoRowsAffected = errors.New("no rows affected")

Functions

func ClobberDBFromEnv

func ClobberDBFromEnv(db *gorm.DB, config LegacyEthNodeConfig) error

func NewORM

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

Types

type Chain

type Chain interface {
	service.Service
	ID() *big.Int
	Client() eth.Client
	Config() evmconfig.ChainScopedConfig
	LogBroadcaster() log.Broadcaster
	HeadBroadcaster() httypes.HeadBroadcaster
	TxManager() bulletprooftxmanager.TxManager
	HeadTracker() httypes.Tracker
	Logger() logger.Logger
}

type ChainSet

type ChainSet interface {
	service.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)
	Chains() []Chain
	ChainCount() int
	ORM() types.ORM
}

func LoadChainSet

func LoadChainSet(opts ChainSetOpts) (ChainSet, error)

func NewChainSet

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

type ChainSetOpts

type ChainSetOpts struct {
	Config           config.GeneralConfig
	Logger           logger.Logger
	GormDB           *gorm.DB
	SQLxDB           *sqlx.DB
	KeyStore         keystore.Eth
	EventBroadcaster postgres.EventBroadcaster
	ORM              types.ORM

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

type LegacyEthNodeConfig

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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