game

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingBlockNumber = errors.New("game loader missing block number")
)

Functions

func NewGameLoader

func NewGameLoader(caller MinimalDisputeGameFactoryCaller) *gameLoader

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

Types

type FaultDisputeGame

type FaultDisputeGame struct {
	GameType  uint8
	Timestamp uint64
	Proxy     common.Address
}

type MinimalDisputeGameFactoryCaller

type MinimalDisputeGameFactoryCaller interface {
	GameCount(opts *bind.CallOpts) (*big.Int, error)
	GameAtIndex(opts *bind.CallOpts, _index *big.Int) (struct {
		GameType  uint8
		Timestamp uint64
		Proxy     common.Address
	}, error)
}

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

type MinimalSubscriber

type MinimalSubscriber interface {
	EthSubscribe(ctx context.Context, channel interface{}, args ...interface{}) (ethereum.Subscription, error)
}

type Service

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

func NewService

func NewService(ctx context.Context, logger log.Logger, cfg *config.Config) (*Service, error)

NewService creates a new Service.

func (*Service) MonitorGame

func (s *Service) MonitorGame(ctx context.Context) error

MonitorGame monitors the fault dispute game and attempts to progress it.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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