Documentation
¶
Index ¶
- func BridgeL1NoClaim(ctx context.Context, env *envs.Env, l1Opts, l2Opts *bind.TransactOpts, ...) (*bridgeResult, error)
- func BridgeL1ToL2(ctx context.Context, env *envs.Env, l1Opts, l2Opts *bind.TransactOpts) error
- func BridgeL1ToL2WithResult(ctx context.Context, env *envs.Env, l1Opts, l2Opts *bind.TransactOpts, ...) (*bridgeResult, error)
- func BridgeL2ToL1(ctx context.Context, env *envs.Env, l1Opts, l2Opts *bind.TransactOpts, ...) error
- func BridgeL2ToL1NoClaim(ctx context.Context, env *envs.Env, l2Opts *bind.TransactOpts, ...) (*bridgeResult, error)
- func BridgeL2ToL2(ctx context.Context, env *envs.Env, originOpts, destOpts *bind.TransactOpts, ...) error
- func BridgeL2ToL2NoClaim(ctx context.Context, env *envs.Env, originOpts, destOpts *bind.TransactOpts, ...) (*bridgeResult, error)
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 ¶
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.