systemcontractindex

package
v2.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IndexerCommon

type IndexerCommon struct {
	lifecycle.Readiness
	// contains filtered or unexported fields
}

IndexerCommon is the common struct for all contract indexers It provides the basic functions, including

  1. kvstore
  2. put/get index height
  3. contract address

func NewIndexerCommon

func NewIndexerCommon(kvstore db.KVStore, ns string, key []byte, contractAddress address.Address, startHeight uint64) *IndexerCommon

NewIndexerCommon creates a new IndexerCommon

func (*IndexerCommon) Commit

func (s *IndexerCommon) Commit(height uint64, delta batch.KVStoreBatch) error

Commit commits the height to the indexer

func (*IndexerCommon) ContractAddress

func (s *IndexerCommon) ContractAddress() address.Address

ContractAddress returns the contract address

func (*IndexerCommon) ExpectedHeight

func (s *IndexerCommon) ExpectedHeight() uint64

ExpectedHeight returns the expected height

func (*IndexerCommon) Height

func (s *IndexerCommon) Height() uint64

Height returns the tip block height

func (*IndexerCommon) KVStore

func (s *IndexerCommon) KVStore() db.KVStore

KVStore returns the kvstore

func (*IndexerCommon) Start

func (s *IndexerCommon) Start(ctx context.Context) error

Start starts the indexer

func (*IndexerCommon) StartHeight

func (s *IndexerCommon) StartHeight() uint64

StartHeight returns the start height of the indexer

func (*IndexerCommon) Started added in v2.2.0

func (s *IndexerCommon) Started() bool

Started returns true if the indexer is started

func (*IndexerCommon) Stop

func (s *IndexerCommon) Stop(ctx context.Context) error

Stop stops the indexer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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