substrate

package
v0.0.0-...-77e7770 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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
}

type SubstrateChain

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

func NewSubstrateChain

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

func (*SubstrateChain) DomainID

func (c *SubstrateChain) DomainID() uint8

func (*SubstrateChain) PollEvents

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

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

func (*SubstrateChain) ReceiveMessage

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

func (*SubstrateChain) Write

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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