indexer

package
v0.3.1-0...-ee1233d Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFromConfig

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

InitFromConfig inits a new Indexer from a provided Config struct

Types

type Config

type Config struct {
	StartingBlockID         *uint64
	RPCURL                  string
	BeaconURL               string
	ContractAddress         common.Address
	DatabaseUsername        string
	DatabasePassword        string
	DatabaseName            string
	DatabaseHost            string
	DatabaseMaxIdleConns    uint64
	DatabaseMaxOpenConns    uint64
	DatabaseMaxConnLifetime uint64
	BackOffMaxRetries       uint64
	BackOffRetryInterval    time.Duration
	OpenDBFunc              func() (DB, error)
}

func NewConfigFromCliContext

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

NewConfigFromCliContext creates a new config instance from command line flags.

type DB

type DB interface {
	DB() (*sql.DB, error)
	GormDB() *gorm.DB
}

DB is a local interface that lets us narrow down a database type for testing.

type Indexer

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

Indexer struct holds the configuration and state for the Ethereum chain listener.

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 Response

type Response struct {
	Data []struct {
		Index            string `json:"index"`
		Blob             string `json:"blob"`
		KzgCommitment    string `json:"kzg_commitment"`
		KzgCommitmentHex []byte `json:"-"`
	} `json:"data"`
}

Jump to

Keyboard shortcuts

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