evm

package
v0.0.0-...-3674750 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ConfigSet Common to all OCR2 evm based contracts: https://github.com/smartcontractkit/libocr/blob/master/contract2/dev/OCR2Abstract.sol
	ConfigSet common.Hash
)
View Source
var ErrCorruptEVMChain = errors.New("corrupt evm chain")
View Source
var ErrNoChains = errors.New("no EVM chains loaded")

ErrNoChains indicates that no EVM chains have been started

Functions

func AccountToAddress

func AccountToAddress(accounts []types.Account) (addresses []common.Address, err error)

func FilterNamesFromRelayArgs

func FilterNamesFromRelayArgs(args commontypes.RelayArgs) (filterNames []string, err error)

func NewChainReaderService

func NewChainReaderService(lggr logger.Logger, lp logpoller.LogPoller, contractID common.Address, config types.ChainReaderConfig) (*chainReader, error)

NewChainReaderService constructor for ChainReader

func NewConfigPoller

func NewConfigPoller(lggr logger.Logger, client client.Client, destChainPoller logpoller.LogPoller, aggregatorContractAddr common.Address, configStoreAddr *common.Address) (evmRelayTypes.ConfigPoller, error)

func NewLegacyChainsFromRelayerExtenders

func NewLegacyChainsFromRelayerExtenders(exts EVMChainRelayerExtenderSlicer) *legacyevm.LegacyChains

func NewOCRContractTransmitter

func NewOCRContractTransmitter(
	address gethcommon.Address,
	caller contractReader,
	contractABI abi.ABI,
	transmitter Transmitter,
	lp logpoller.LogPoller,
	lggr logger.Logger,
	reportToEvmTxMeta ReportToEthMetadata,
) (*contractTransmitter, error)

func OnchainPublicKeyToAddress

func OnchainPublicKeyToAddress(publicKeys []types.OnchainPublicKey) (addresses []common.Address, err error)

Types

type CSAETHKeystore

type CSAETHKeystore interface {
	CSA() keystore.CSA
	Eth() keystore.Eth
}

type ChainReaderService

type ChainReaderService interface {
	services.ServiceCtx
	commontypes.ChainReader
}

type ChainRelayerExt

type ChainRelayerExt struct {
	// contains filtered or unexported fields
}

implements OneChain

func (*ChainRelayerExt) Chain

func (s *ChainRelayerExt) Chain() legacyevm.Chain

func (*ChainRelayerExt) Close

func (s *ChainRelayerExt) Close() (err error)

func (*ChainRelayerExt) GetChainStatus

func (s *ChainRelayerExt) GetChainStatus(ctx context.Context) (commontypes.ChainStatus, error)

func (*ChainRelayerExt) HealthReport

func (s *ChainRelayerExt) HealthReport() map[string]error

func (*ChainRelayerExt) ID

func (s *ChainRelayerExt) ID() string

func (*ChainRelayerExt) ListNodeStatuses

func (s *ChainRelayerExt) ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) (stats []commontypes.NodeStatus, nextPageToken string, total int, err error)

func (*ChainRelayerExt) Name

func (s *ChainRelayerExt) Name() string

func (*ChainRelayerExt) Ready

func (s *ChainRelayerExt) Ready() (err error)

func (*ChainRelayerExt) Start

func (s *ChainRelayerExt) Start(ctx context.Context) error

func (*ChainRelayerExt) Transact

func (s *ChainRelayerExt) Transact(ctx context.Context, from, to string, amount *big.Int, balanceCheck bool) error

type ChainRelayerExtenders

type ChainRelayerExtenders struct {
	// contains filtered or unexported fields
}

func (*ChainRelayerExtenders) AppConfig

func (c *ChainRelayerExtenders) AppConfig() legacyevm.AppConfig

func (*ChainRelayerExtenders) Len

func (c *ChainRelayerExtenders) Len() int

func (*ChainRelayerExtenders) Slice

type ContractTransmitter

type ContractTransmitter interface {
	services.ServiceCtx
	ocrtypes.ContractTransmitter
}

type EVMChainRelayerExtender

type EVMChainRelayerExtender interface {
	loop.RelayerExt
	Chain() legacyevm.Chain
}

type EVMChainRelayerExtenderSlicer

type EVMChainRelayerExtenderSlicer interface {
	Slice() []EVMChainRelayerExtender
	Len() int
	AppConfig() legacyevm.AppConfig
}

type LoopRelayAdapter

type LoopRelayAdapter interface {
	loop.Relayer
	Chain() legacyevm.Chain
}

type LoopRelayer

type LoopRelayer struct {
	loop.Relayer
	// contains filtered or unexported fields
}

func NewLoopRelayServerAdapter

func NewLoopRelayServerAdapter(r *Relayer, cs EVMChainRelayerExtender) *LoopRelayer

func (*LoopRelayer) Chain

func (la *LoopRelayer) Chain() legacyevm.Chain

type Relayer

type Relayer struct {
	// contains filtered or unexported fields
}

func NewRelayer

func NewRelayer(lggr logger.Logger, chain legacyevm.Chain, opts RelayerOpts) (*Relayer, error)

func (*Relayer) Close

func (r *Relayer) Close() error

func (*Relayer) HealthReport

func (r *Relayer) HealthReport() (report map[string]error)

func (*Relayer) Name

func (r *Relayer) Name() string

func (*Relayer) Ready

func (r *Relayer) Ready() error

Ready does noop: always ready

func (*Relayer) Start

func (r *Relayer) Start(context.Context) error

Start does noop: no subservices started on relay start, but when the first job is started

type RelayerOpts

type RelayerOpts struct {
	*sqlx.DB
	pg.QConfig
	CSAETHKeystore
	pg.EventBroadcaster
}

func (RelayerOpts) Validate

func (c RelayerOpts) Validate() error

type ReportToEthMetadata

type ReportToEthMetadata func([]byte) (*txmgr.TxMeta, error)

type Transmitter

type Transmitter interface {
	CreateEthTransaction(ctx context.Context, toAddress gethcommon.Address, payload []byte, txMeta *txmgr.TxMeta) error
	FromAddress() gethcommon.Address
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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