extract

package
v1.7.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrIncorrectCreditCount = errors.New("incorrect credit count")

Functions

This section is empty.

Types

type BalanceCaller added in v1.7.2

type BalanceCaller interface {
	GetBalance(context.Context, rpcblock.Block) (*big.Int, common.Address, error)
}

type BalanceEnricher added in v1.7.2

type BalanceEnricher struct{}

func NewBalanceEnricher added in v1.7.2

func NewBalanceEnricher() *BalanceEnricher

func (*BalanceEnricher) Enrich added in v1.7.2

func (b *BalanceEnricher) Enrich(ctx context.Context, block rpcblock.Block, caller GameCaller, game *monTypes.EnrichedGameData) error

type BlockFetcher added in v1.7.2

type BlockFetcher interface {
	HeaderByHash(ctx context.Context, block common.Hash) (*types.Header, error)
}

type BondCaller added in v1.7.2

type BondCaller interface {
	GetCredits(context.Context, rpcblock.Block, ...common.Address) ([]*big.Int, error)
}

type BondEnricher added in v1.7.2

type BondEnricher struct{}

func NewBondEnricher added in v1.7.2

func NewBondEnricher() *BondEnricher

func (*BondEnricher) Enrich added in v1.7.2

func (b *BondEnricher) Enrich(ctx context.Context, block rpcblock.Block, caller GameCaller, game *monTypes.EnrichedGameData) error

type CreateGameCaller

type CreateGameCaller func(game gameTypes.GameMetadata) (GameCaller, error)

type Enricher added in v1.7.2

type Enricher interface {
	Enrich(ctx context.Context, block rpcblock.Block, caller GameCaller, game *monTypes.EnrichedGameData) error
}

type Extractor

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

func NewExtractor

func NewExtractor(logger log.Logger, creator CreateGameCaller, fetchGames FactoryGameFetcher, enrichers ...Enricher) *Extractor

func (*Extractor) Extract

func (e *Extractor) Extract(ctx context.Context, blockHash common.Hash, minTimestamp uint64) ([]*monTypes.EnrichedGameData, error)

type FactoryGameFetcher

type FactoryGameFetcher func(ctx context.Context, blockHash common.Hash, earliestTimestamp uint64) ([]gameTypes.GameMetadata, error)

type GameCallerCreator

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

func NewGameCallerCreator

func NewGameCallerCreator(m caching.Metrics, caller *batching.MultiCaller) *GameCallerCreator

func (*GameCallerCreator) CreateContract

func (g *GameCallerCreator) CreateContract(game types.GameMetadata) (GameCaller, error)

type L1HeadBlockNumEnricher added in v1.7.2

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

func NewL1HeadBlockNumEnricher added in v1.7.2

func NewL1HeadBlockNumEnricher(client BlockFetcher) *L1HeadBlockNumEnricher

func (*L1HeadBlockNumEnricher) Enrich added in v1.7.2

Jump to

Keyboard shortcuts

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