rpc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchBlock

func FetchBlock(ctx context.Context, starknetClients *firecoreRPC.Clients[*starknetRPC.Provider], requestBlockNum uint64) (*starknetRPC.BlockWithReceipts, error)

func FetchStateUpdate

func FetchStateUpdate(ctx context.Context, starknetClients *firecoreRPC.Clients[*starknetRPC.Provider], blockNum uint64) (*starknetRPC.StateUpdateOutput, error)

Types

type Fetcher

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

func NewFetcher

func NewFetcher(
	starknetClients *firecoreRPC.Clients[*starknetRPC.Provider],
	ethClient *firecoreRPC.Clients[*ethRPC.Client],
	fetchLIBContractAddress string,
	fetchInterval time.Duration,
	latestBlockRetryInterval time.Duration,
	logger *zap.Logger) *Fetcher

func (*Fetcher) Fetch

func (f *Fetcher) Fetch(ctx context.Context, requestBlockNum uint64) (b *pbbstream.Block, skipped bool, err error)

func (*Fetcher) IsBlockAvailable

func (f *Fetcher) IsBlockAvailable(blockNum uint64) bool

Jump to

Keyboard shortcuts

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