loader

package
v1.4.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GameLoader

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

func NewGameLoader

func NewGameLoader(caller MinimalDisputeGameFactoryCaller) *GameLoader

NewGameLoader creates a new services that can be used to fetch on chain dispute games.

func (*GameLoader) FetchAllGamesAtBlock

func (l *GameLoader) FetchAllGamesAtBlock(ctx context.Context, earliestTimestamp uint64, blockHash common.Hash) ([]types.GameMetadata, error)

FetchAllGamesAtBlock fetches all dispute games from the factory at a given block number.

type MinimalDisputeGameFactoryCaller

type MinimalDisputeGameFactoryCaller interface {
	GetGameCount(ctx context.Context, blockHash common.Hash) (uint64, error)
	GetGame(ctx context.Context, idx uint64, blockHash common.Hash) (types.GameMetadata, error)
}

MinimalDisputeGameFactoryCaller is a minimal interface around [bindings.DisputeGameFactoryCaller]. This needs to be updated if the [bindings.DisputeGameFactoryCaller] interface changes.

Jump to

Keyboard shortcuts

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