Documentation ¶
Index ¶
- Variables
- type AlphabetGameHelper
- type CannonGameHelper
- type ContractClaim
- type FactoryHelper
- func (h *FactoryHelper) StartAlphabetGame(ctx context.Context, claimedAlphabet string) *AlphabetGameHelper
- func (h *FactoryHelper) StartCannonGame(ctx context.Context, rootClaim common.Hash) *CannonGameHelper
- func (h *FactoryHelper) StartChallenger(ctx context.Context, l1Endpoint string, name string, ...) *challenger.Helper
- type FaultGameHelper
- func (g *FaultGameHelper) Attack(ctx context.Context, claimIdx int64, claim common.Hash)
- func (g *FaultGameHelper) Defend(ctx context.Context, claimIdx int64, claim common.Hash)
- func (g *FaultGameHelper) GameDuration(ctx context.Context) time.Duration
- func (g *FaultGameHelper) LogGameData(ctx context.Context)
- func (g *FaultGameHelper) MaxDepth(ctx context.Context) int64
- func (g *FaultGameHelper) Resolve(ctx context.Context)
- func (g *FaultGameHelper) WaitForClaim(ctx context.Context, predicate func(claim ContractClaim) bool)
- func (g *FaultGameHelper) WaitForClaimAtMaxDepth(ctx context.Context, countered bool)
- func (g *FaultGameHelper) WaitForClaimCount(ctx context.Context, count int64)
- func (g *FaultGameHelper) WaitForGameStatus(ctx context.Context, expected Status)
- type HonestHelper
- type Status
Constants ¶
This section is empty.
Variables ¶
View Source
var CorrectAlphabet = "abcdefghijklmnop"
Functions ¶
This section is empty.
Types ¶
type AlphabetGameHelper ¶ added in v1.1.4
type AlphabetGameHelper struct { FaultGameHelper // contains filtered or unexported fields }
func (*AlphabetGameHelper) StartChallenger ¶ added in v1.1.4
func (g *AlphabetGameHelper) StartChallenger(ctx context.Context, l1Endpoint string, name string, options ...challenger.Option) *challenger.Helper
type CannonGameHelper ¶ added in v1.1.4
type CannonGameHelper struct {
FaultGameHelper
}
func (*CannonGameHelper) CreateHonestActor ¶ added in v1.1.4
func (g *CannonGameHelper) CreateHonestActor(ctx context.Context, rollupCfg *rollup.Config, l2Genesis *core.Genesis, l1Client bind.ContractCaller, l1Endpoint string, l2Endpoint string, options ...challenger.Option) *HonestHelper
func (*CannonGameHelper) StartChallenger ¶ added in v1.1.4
func (g *CannonGameHelper) StartChallenger(ctx context.Context, rollupCfg *rollup.Config, l2Genesis *core.Genesis, l1Endpoint string, l2Endpoint string, name string, options ...challenger.Option) *challenger.Helper
type ContractClaim ¶
type FactoryHelper ¶
type FactoryHelper struct {
// contains filtered or unexported fields
}
func NewFactoryHelper ¶
func NewFactoryHelper(t *testing.T, ctx context.Context, deployments *genesis.L1Deployments, client *ethclient.Client) *FactoryHelper
func (*FactoryHelper) StartAlphabetGame ¶
func (h *FactoryHelper) StartAlphabetGame(ctx context.Context, claimedAlphabet string) *AlphabetGameHelper
func (*FactoryHelper) StartCannonGame ¶ added in v1.1.4
func (h *FactoryHelper) StartCannonGame(ctx context.Context, rootClaim common.Hash) *CannonGameHelper
func (*FactoryHelper) StartChallenger ¶ added in v1.1.4
func (h *FactoryHelper) StartChallenger(ctx context.Context, l1Endpoint string, name string, options ...challenger.Option) *challenger.Helper
type FaultGameHelper ¶
type FaultGameHelper struct {
// contains filtered or unexported fields
}
func (*FaultGameHelper) GameDuration ¶ added in v1.1.4
func (g *FaultGameHelper) GameDuration(ctx context.Context) time.Duration
func (*FaultGameHelper) LogGameData ¶ added in v1.1.4
func (g *FaultGameHelper) LogGameData(ctx context.Context)
func (*FaultGameHelper) MaxDepth ¶ added in v1.1.4
func (g *FaultGameHelper) MaxDepth(ctx context.Context) int64
func (*FaultGameHelper) Resolve ¶
func (g *FaultGameHelper) Resolve(ctx context.Context)
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 HonestHelper ¶ added in v1.1.4
type HonestHelper struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.