extract

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrIncorrectCreditCount = errors.New("incorrect credit count")
View Source
var ErrIncorrectWithdrawalsCount = errors.New("incorrect withdrawals 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 ClaimCaller added in v1.7.4

type ClaimCaller interface {
	IsResolved(ctx context.Context, block rpcblock.Block, claim ...faultTypes.Claim) ([]bool, error)
}

type ClaimEnricher added in v1.7.3

type ClaimEnricher struct{}

func NewClaimEnricher added in v1.7.3

func NewClaimEnricher() *ClaimEnricher

func (*ClaimEnricher) Enrich added in v1.7.3

func (e *ClaimEnricher) Enrich(ctx context.Context, block rpcblock.Block, caller GameCaller, game *types.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 GameCallerMetrics, caller *batching.MultiCaller) *GameCallerCreator

func (*GameCallerCreator) CreateContract

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

type GameCallerMetrics added in v1.7.3

type GameCallerMetrics interface {
	caching.Metrics
	contractMetrics.ContractMetricer
}

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

type RecipientEnricher added in v1.7.3

type RecipientEnricher struct{}

func NewRecipientEnricher added in v1.7.3

func NewRecipientEnricher() *RecipientEnricher

func (*RecipientEnricher) Enrich added in v1.7.3

type WithdrawalsEnricher added in v1.7.3

type WithdrawalsEnricher struct{}

func NewWithdrawalsEnricher added in v1.7.3

func NewWithdrawalsEnricher() *WithdrawalsEnricher

func (*WithdrawalsEnricher) Enrich added in v1.7.3

Jump to

Keyboard shortcuts

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