testutil

package
v1.20.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const AnvilDefaultPrivateKey = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"

AnvilDefaultPrivateKey is the default private key for tests that need a funded account.

Variables

This section is empty.

Functions

func DeployMockSP1Verifier added in v1.20.2

func DeployMockSP1Verifier(t *testing.T, client *ethclient.Client, key *ecdsa.PrivateKey, artifactsFS foundry.StatDirFs) common.Address

DeployMockSP1Verifier deploys the accept-all MockSP1Verifier test artifact to a live L1 and returns its address, for test deployments to pass as the raw SP1 verifier.

func LocalArtifacts

func LocalArtifacts(t *testing.T) (*artifacts.Locator, foundry.StatDirFs)

func NeedsSuperchainConfigUpgrade

func NeedsSuperchainConfigUpgrade(
	ctx context.Context,
	client *ethclient.Client,
	currentProxy, targetImpl common.Address,
) (bool, error)

func NewForgeClient added in v1.19.5

func NewForgeClient(t *testing.T, workdir string) *forge.Client

NewForgeClient returns a forge client hardened for devnet tests: each invocation is bounded so a stuck forge fails the test instead of hanging until the CI job timeout. Its scripts read the artifacts, as in op-deployer.

The timeout only needs to be an order of magnitude below the 90-minute job watchdog, not tight: the worst healthy forge-using test on develop finishes in under 10 seconds, but the bound also has to absorb episodic CI host contention (documented multi-second-to-minute stalls), --slow broadcasts waiting on a receipt per tx, and a cold forge binary download, all of which a too-tight value would convert into new flakes.

func SharedCacheDir added in v1.20.2

func SharedCacheDir(t *testing.T) string

SharedCacheDir returns a cache directory that the tests of this user share, in the temporary directory, so that tests that use the local contracts build copy it once, not once per test. op-deployer keeps the copies of the last few builds there.

Types

This section is empty.

Jump to

Keyboard shortcuts

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