indexer

package
v0.0.0-...-3966bb1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Layer1 = "l1"
	Layer2 = "l2"
)
View Source
var (
	ZeroAddress = common.HexToAddress("0x0000000000000000000000000000000000000000")
)

Functions

func InitFromConfig

func InitFromConfig(ctx context.Context, i *Indexer, cfg *Config) error

nolint: funlen

Types

type Config

type Config struct {
	// db configs
	DatabaseUsername        string
	DatabasePassword        string
	DatabaseName            string
	DatabaseHost            string
	DatabaseMaxIdleConns    uint64
	DatabaseMaxOpenConns    uint64
	DatabaseMaxConnLifetime uint64
	RPCUrl                  string
	MetricsHTTPPort         uint64
	ETHClientTimeout        uint64
	L1TaikoAddress          common.Address
	BridgeAddress           common.Address
	BlockBatchSize          uint64
	SubscriptionBackoff     uint64
	SyncMode                SyncMode
	IndexNFTs               bool
	IndexERC20s             bool
	Layer                   string
	OntakeForkHeight        uint64
	OpenDBFunc              func() (db.DB, error)
}

func NewConfigFromCliContext

func NewConfigFromCliContext(c *cli.Context) (*Config, error)

NewConfigFromCliContext creates a new config instance from command line flags.

type FilterFunc

type FilterFunc func(
	ctx context.Context,
	chainID *big.Int,
	i *Indexer,
	filterOpts *bind.FilterOpts,
) error

type Indexer

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

func (*Indexer) Close

func (i *Indexer) Close(ctx context.Context)

func (*Indexer) InitFromCli

func (i *Indexer) InitFromCli(ctx context.Context, c *cli.Context) error

func (*Indexer) Name

func (i *Indexer) Name() string

func (*Indexer) Start

func (i *Indexer) Start() error

type SyncMode

type SyncMode string
var (
	Sync   SyncMode = "sync"
	Resync SyncMode = "resync"
	Modes           = []SyncMode{Sync, Resync}
)

Jump to

Keyboard shortcuts

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