extract

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIgnored = errors.New("ignored")
)
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 AgreementEnricher added in v1.7.6

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

func NewAgreementEnricher added in v1.7.6

func NewAgreementEnricher(logger log.Logger, metrics OutputMetrics, client OutputRollupClient) *AgreementEnricher

func (*AgreementEnricher) Enrich added in v1.7.6

Enrich validates the specified root claim against the output at the given block number.

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(ctx context.Context, 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, ignoredGames []common.Address, maxConcurrency uint, enrichers ...Enricher) *Extractor

func (*Extractor) Extract

func (e *Extractor) Extract(ctx context.Context, blockHash common.Hash, minTimestamp uint64) ([]*monTypes.EnrichedGameData, int, int, 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(ctx context.Context, 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 OutputMetrics added in v1.7.6

type OutputMetrics interface {
	RecordOutputFetchTime(float64)
}

type OutputRollupClient added in v1.7.6

type OutputRollupClient interface {
	OutputAtBlock(ctx context.Context, blockNum uint64) (*eth.OutputResponse, error)
	SafeHeadAtL1Block(ctx context.Context, blockNum uint64) (*eth.SafeHeadResponse, error)
}

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