challenger

package
v0.0.0-...-011bec4 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindMonorepoRoot

func FindMonorepoRoot(t *testing.T) string

FindMonorepoRoot finds the relative path to the monorepo root Different tests might be nested in subdirectories of the op-e2e dir.

func NewChallengerConfig

func NewChallengerConfig(t *testing.T, sys EndpointProvider, l2NodeName string, options ...Option) *config.Config

Types

type CapturingMetrics

type CapturingMetrics struct {
	metrics.NoopMetricsImpl

	HighestActedL1Block atomic.Uint64
}

func NewCapturingMetrics

func NewCapturingMetrics() *CapturingMetrics

func (*CapturingMetrics) RecordActedL1Block

func (c *CapturingMetrics) RecordActedL1Block(block uint64)

type EndpointProvider

type EndpointProvider interface {
	NodeEndpoint(name string) string
	RollupEndpoint(name string) string
	L1BeaconEndpoint() string
}

type GameAddr

type GameAddr interface {
	Addr() common.Address
}

type Helper

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

func NewChallenger

func NewChallenger(t *testing.T, ctx context.Context, sys EndpointProvider, name string, options ...Option) *Helper

func NewHelper

func NewHelper(log log.Logger, t *testing.T, require *require.Assertions, dir string, chl cliapp.Lifecycle, m *CapturingMetrics) *Helper

func (*Helper) Close

func (h *Helper) Close() error

func (*Helper) VerifyGameDataExists

func (h *Helper) VerifyGameDataExists(games ...GameAddr)

func (*Helper) WaitForGameDataDeletion

func (h *Helper) WaitForGameDataDeletion(ctx context.Context, games ...GameAddr)

func (*Helper) WaitForHighestActedL1Block

func (h *Helper) WaitForHighestActedL1Block(ctx context.Context, head uint64)

func (*Helper) WaitL1HeadActedOn

func (h *Helper) WaitL1HeadActedOn(ctx context.Context, client *ethclient.Client)

type Option

type Option func(config2 *config.Config)

func WithAlphabet

func WithAlphabet() Option

func WithCannon

func WithCannon(t *testing.T, rollupCfg *rollup.Config, l2Genesis *core.Genesis) Option

func WithFactoryAddress

func WithFactoryAddress(addr common.Address) Option

func WithFastGames

func WithFastGames() Option

func WithGameAddress

func WithGameAddress(addr common.Address) Option

func WithPollInterval

func WithPollInterval(pollInterval time.Duration) Option

func WithPrivKey

func WithPrivKey(key *ecdsa.PrivateKey) Option

Jump to

Keyboard shortcuts

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