indexer

package
v0.0.0-...-d2aac13 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

Run an indexer for each app regis, errCh chan errortered

Types

type ContractIndex

type ContractIndex struct {
	Blocks      []uint64
	LatestBlock uint64
}

func NewContractIndex

func NewContractIndex(startBlock uint64) *ContractIndex

func (*ContractIndex) AddBlock

func (c *ContractIndex) AddBlock(block uint64)

func (*ContractIndex) Decode

func (c *ContractIndex) Decode(buf []byte) error

func (*ContractIndex) Encode

func (c *ContractIndex) Encode() (bytes.Buffer, error)

func (*ContractIndex) SetLatestBlock

func (c *ContractIndex) SetLatestBlock(block uint64)

type Indexer

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

Single contract indexer

func NewIndexer

func NewIndexer(config config.Config, client *starknet.FeederGatewayClient, storage storage.Storage, bus dispatcher.EventDispatcher) *Indexer

func (*Indexer) Index

func (i *Indexer) Index(contract config.Contract, block starknet.GetBlockResponse) error

func (*Indexer) Start

func (i *Indexer) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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