indexer

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockTracker added in v0.1.1

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

* BlockTracker keeps a database record of the latest block that has been indexed for a contract address and allows the user to increase the value. *

func NewBlockTracker added in v0.1.1

func NewBlockTracker(
	ctx context.Context,
	contractAddress string,
	queries *queries.Queries,
) (*BlockTracker, error)

Return a new BlockTracker initialized to the latest block from the DB

func (*BlockTracker) GetLatestBlock added in v0.1.1

func (bt *BlockTracker) GetLatestBlock() uint64

func (*BlockTracker) UpdateLatestBlock added in v0.1.1

func (bt *BlockTracker) UpdateLatestBlock(ctx context.Context, block uint64) error

type IBlockTracker added in v0.1.1

type IBlockTracker interface {
	GetLatestBlock() uint64
	UpdateLatestBlock(ctx context.Context, block uint64) error
}

type Indexer added in v0.1.1

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

func NewIndexer added in v0.1.1

func NewIndexer(
	ctx context.Context,
	log *zap.Logger,

) *Indexer

func (*Indexer) Close added in v0.1.1

func (s *Indexer) Close()

func (*Indexer) StartIndexer added in v0.1.1

func (i *Indexer) StartIndexer(
	db *sql.DB,
	cfg config.ContractsOptions,
	validationService mlsvalidate.MLSValidationService) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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