l1

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(l1 Subscriber, chain *blockchain.Blockchain, log utils.SimpleLogger) *Client

func (*Client) Run

func (c *Client) Run(ctx context.Context) error

type EthSubscriber

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

func NewEthSubscriber

func NewEthSubscriber(ethClientAddress string, coreContractAddress common.Address) (*EthSubscriber, error)

func (*EthSubscriber) ChainID

func (s *EthSubscriber) ChainID(ctx context.Context) (*big.Int, error)

func (*EthSubscriber) Close

func (s *EthSubscriber) Close()

func (*EthSubscriber) FinalisedHeight

func (s *EthSubscriber) FinalisedHeight(ctx context.Context) (uint64, error)

func (*EthSubscriber) WatchHeader

func (s *EthSubscriber) WatchHeader(ctx context.Context, sink chan<- *types.Header) (event.Subscription, error)

func (*EthSubscriber) WatchLogStateUpdate

func (s *EthSubscriber) WatchLogStateUpdate(ctx context.Context, sink chan<- *contract.StarknetLogStateUpdate) (event.Subscription, error)

type Subscriber

type Subscriber interface {
	FinalisedHeight(ctx context.Context) (uint64, error)
	WatchHeader(ctx context.Context, sink chan<- *types.Header) (event.Subscription, error)
	WatchLogStateUpdate(ctx context.Context, sink chan<- *contract.StarknetLogStateUpdate) (event.Subscription, error)
	ChainID(ctx context.Context) (*big.Int, error)

	Close()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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