evm

package
v0.0.0-...-bce7607 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: LGPL-3.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EVMChain

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

EVMChain is struct that aggregates all data required for

func NewEVMChain

func NewEVMChain(listener EventListener, messageHandler MessageHandler, executor ProposalExecutor, domainID uint8, startBlock *big.Int) *EVMChain

func (*EVMChain) DomainID

func (c *EVMChain) DomainID() uint8

func (*EVMChain) PollEvents

func (c *EVMChain) PollEvents(ctx context.Context)

PollEvents is the goroutine that polls blocks and searches Deposit events in them. Events are then sent to eventsChan.

func (*EVMChain) ReceiveMessage

func (c *EVMChain) ReceiveMessage(m *message.Message) (*proposal.Proposal, error)

func (*EVMChain) Write

func (c *EVMChain) Write(props []*proposal.Proposal) error

type EventListener

type EventListener interface {
	ListenToEvents(ctx context.Context, startBlock *big.Int)
}

type MessageHandler

type MessageHandler interface {
	HandleMessage(m *message.Message) (*proposal.Proposal, error)
}

type ProposalExecutor

type ProposalExecutor interface {
	Execute(props []*proposal.Proposal) error
}

Directories

Path Synopsis
gas

Jump to

Keyboard shortcuts

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