disputegame

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CorrectAlphabet = "abcdefghijklmnop"

Functions

This section is empty.

Types

type ContractClaim

type ContractClaim struct {
	ParentIndex uint32
	Countered   bool
	Claim       [32]byte
	Position    *big.Int
	Clock       *big.Int
}

type FactoryHelper

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

func NewFactoryHelper

func NewFactoryHelper(t *testing.T, ctx context.Context, client *ethclient.Client, gameDuration uint64) *FactoryHelper

func (*FactoryHelper) StartAlphabetGame

func (h *FactoryHelper) StartAlphabetGame(ctx context.Context, claimedAlphabet string) *FaultGameHelper

type FaultGameHelper

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

func (*FaultGameHelper) Resolve

func (g *FaultGameHelper) Resolve(ctx context.Context)

func (*FaultGameHelper) StartChallenger

func (g *FaultGameHelper) StartChallenger(ctx context.Context, l1Endpoint string, name string, options ...challenger.Option) *challenger.Helper

func (*FaultGameHelper) WaitForClaim

func (g *FaultGameHelper) WaitForClaim(ctx context.Context, predicate func(claim ContractClaim) bool)

func (*FaultGameHelper) WaitForClaimAtMaxDepth

func (g *FaultGameHelper) WaitForClaimAtMaxDepth(ctx context.Context, countered bool)

func (*FaultGameHelper) WaitForClaimCount

func (g *FaultGameHelper) WaitForClaimCount(ctx context.Context, count int64)

func (*FaultGameHelper) WaitForGameStatus

func (g *FaultGameHelper) WaitForGameStatus(ctx context.Context, expected Status)

type Status

type Status uint8
const (
	StatusInProgress Status = iota
	StatusChallengerWins
	StatusDefenderWins
)

Jump to

Keyboard shortcuts

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