e2e

package
v0.11.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: Apache-2.0, MIT Imports: 16 Imported by: 0

README

E2E

This package contains tests run against a dockerized environment, loaded from test/e2e/envs/loader.go. The tests follow this flow:

  1. Test env is loaded by test/e2e/testmain_test.go
  2. Some sanity checks are performed to assert that the testing env is operating as expected
  3. Tests in this package are then run
  4. Finally, after the actual tests are run, if they pass, a L1 -> L2 and a L2 -> L1 bridge are going to be sent to validate that the network is still operational after the tests

Inventory

  • test/e2e/removeger_test.go: test the remove GER tool (tools/remove_ger)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BridgeL1NoClaim

func BridgeL1NoClaim(ctx context.Context, env *envs.Env, l1Opts, l2Opts *bind.TransactOpts, bridgeAmount *big.Int, label string) (*bridgeResult, error)

BridgeL1NoClaim performs a real L1->L2 bridge and waits for it to be fully indexed but does not claim. label is used in log messages to identify the caller context (e.g. "B1", "B2-1").

func BridgeL1ToL2

func BridgeL1ToL2(ctx context.Context, env *envs.Env, l1Opts, l2Opts *bind.TransactOpts) error

BridgeL1ToL2 runs the L1 -> L2 bridge flow using the given environment and transactors. Performs the full deposit and claim flows. Returns error for any non-successful operation.

func BridgeL1ToL2WithResult

func BridgeL1ToL2WithResult(ctx context.Context, env *envs.Env, l1Opts, l2Opts *bind.TransactOpts, bridgeAmount *big.Int) (*bridgeResult, error)

BridgeL1ToL2WithResult performs a full L1->L2 bridge and claim using the given transactors. Uses l2Opts.From as the destination address. Returns detailed bridge and claim information.

func BridgeL2ToL1

func BridgeL2ToL1(ctx context.Context, env *envs.Env, l1Opts, l2Opts *bind.TransactOpts, token common.Address) error

BridgeL2ToL1 runs the L2 -> L1 bridge flow using the given environment and transactors. Returns error for any failure.

func BridgeL2ToL1NoClaim

func BridgeL2ToL1NoClaim(
	ctx context.Context, env *envs.Env, l2Opts *bind.TransactOpts, bridgeAmount *big.Int, label string,
) (*bridgeResult, error)

BridgeL2ToL1NoClaim performs a real L2->L1 bridge using a MintableERC20 token minted on L2 (L2-native tokens bypass the Local Balance Tree underflow check in the L2 bridge, see testmain_test.go) and waits for it to be fully indexed (bridge service + L1 Info Tree inclusion), but does not claim on L1. label is used in log messages to identify the caller context (e.g. "B1", "B2-1").

func BridgeL2ToL2

func BridgeL2ToL2(
	ctx context.Context, env *envs.Env, originOpts, destOpts *bind.TransactOpts, token common.Address,
) error

BridgeL2ToL2 runs the L2A -> L2B bridge flow using the given environment and transactors. originOpts authorizes the bridge tx on L2A; destOpts authorizes the claim on L2B and its From address is used as the destination address. token is the L2A-native asset to bridge (the caller is responsible for funding/approving it on L2A). Returns error for any failure.

This helper requires a multi-chain env: env.L2B must be non-nil (EnvOpPP2Chains).

func BridgeL2ToL2NoClaim

func BridgeL2ToL2NoClaim(
	ctx context.Context, env *envs.Env, originOpts, destOpts *bind.TransactOpts, bridgeAmount *big.Int, label string,
) (*bridgeResult, error)

BridgeL2ToL2NoClaim performs a real L2A -> L2B bridge using a MintableERC20 token minted on L2A (L2-native tokens bypass the Local Balance Tree underflow check in the L2 bridge) and waits for it to be fully indexed on the origin (L2A) bridge service and included in the L1 Info Tree (i.e. the origin exit root has settled to L1), but does NOT claim on L2B. This is the no-claim counterpart to BridgeL2ToL2, used by the Auto Claim L2->L2 e2e test so Auto Claim (not the test) performs the claim. originOpts authorizes the bridge tx and funds the token on L2A; destOpts.From is the destination address on L2B. label identifies the caller context in logs.

Requires a multi-chain env: env.L2B must be non-nil (EnvOpPP2Chains).

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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