indexer

package module
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: MIT Imports: 9 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

func Main

func Main(gitVersion string) func(ctx *cli.Context) error

Main is the entrypoint into the indexer service. This method returns a closure that executes the service and blocks until the service exits. The use of a closure allows the parameters bound to the top-level main package, e.g. GitVersion, to be captured and used once the function is executed.

func ParseAddress

func ParseAddress(address string) (common.Address, error)

ParseAddress parses a ETH address from a hex string. This method will fail if the address is not a valid hexadecimal address.

Types

type Indexer

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

Indexer is a service that configures the necessary resources for running the Sync and BlockHandler sub-services.

func NewIndexer

func NewIndexer() (*Indexer, error)

NewIndexer initializes the Indexer, gathering any resources that will be needed by the TxIndexer and StateIndexer sub-services.

func (*Indexer) Serve

func (b *Indexer) Serve() error

Serve spins up a REST API server at the given hostname and port.

func (*Indexer) Start

func (b *Indexer) Start() error

Start starts the starts the indexing service on L1 and L2 chains and also starts the REST server.

func (*Indexer) Stop

func (b *Indexer) Stop()

Stop stops the indexing service on L1 and L2 chains.

Directories

Path Synopsis
bindings
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.
l1
l2

Jump to

Keyboard shortcuts

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