indexer

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 8 Imported by: 0

README

@eth-optimism/indexer

Getting started

Run indexer vs goerli
  • install docker
  • cp example.env .env
  • fill in .env
  • run docker-compose up to start the indexer vs optimism goerli network
Run indexer with go

See the flags in flags.go for reference of what command line flags to pass to go run

Run indexer vs devnet

TODO add indexer to the optimism devnet compose file (previously removed for breaking CI)

Run indexer vs a custom configuration

docker-compose.dev.yml is git ignored. Fill in your own docker-compose file here.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Indexer

type Indexer struct {
	L1Processor *processor.L1Processor
	L2Processor *processor.L2Processor
	// contains filtered or unexported fields
}

Indexer contains the necessary resources for indexing the configured L1 and L2 chains

func NewIndexer

func NewIndexer(chainConfig config.ChainConfig, rpcsConfig config.RPCsConfig, db *database.DB, logger log.Logger) (*Indexer, error)

NewIndexer initializes an instance of the Indexer

func (*Indexer) Cleanup

func (i *Indexer) Cleanup()

Cleanup releases any resources that might be currently held by the indexer

func (*Indexer) Run

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

Start starts the indexing service on L1 and L2 chains

Directories

Path Synopsis
api
cmd
Database module defines the data DB struct which wraps specific DB interfaces for L1/L2 block headers, contract events, bridging schemas.
Database module defines the data DB struct which wraps specific DB interfaces for L1/L2 block headers, contract events, bridging schemas.

Jump to

Keyboard shortcuts

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