From 22696fed13ed52eb8a1604b66c7b3c4e0a35835c Mon Sep 17 00:00:00 2001 From: Rick Date: Tue, 19 Aug 2025 14:28:10 +0800 Subject: [PATCH 1/2] Remove unused withdrawal action methods --- op-e2e/actions/helpers/user.go | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/op-e2e/actions/helpers/user.go b/op-e2e/actions/helpers/user.go index 4c1bf04713212..edc8cd6b6a773 100644 --- a/op-e2e/actions/helpers/user.go +++ b/op-e2e/actions/helpers/user.go @@ -429,24 +429,7 @@ func (s *CrossLayerUser) CheckDepositTx(t Testing, l1TxHash common.Hash, index i } } -func (s *CrossLayerUser) ActStartWithdrawal(t Testing) { - targetAddr := common.Address{} - if s.L1.txToAddr != nil { - targetAddr = *s.L2.txToAddr - } - tx, err := s.L2.env.Bindings.L2ToL1MessagePasser.InitiateWithdrawal(&s.L2.txOpts, targetAddr, new(big.Int).SetUint64(s.L1.txOpts.GasLimit), s.L1.txCallData) - require.NoError(t, err, "create initiate withdraw tx") - err = s.L2.env.EthCl.SendTransaction(t.Ctx(), tx) - require.NoError(t, err, "must send tx") - s.lastL2WithdrawalTxHash = tx.Hash() -} -// ActCheckStartWithdrawal checks that a previous witdrawal tx was either successful or failed. -func (s *CrossLayerUser) ActCheckStartWithdrawal(success bool) Action { - return func(t Testing) { - s.L2.CheckReceipt(t, success, s.lastL2WithdrawalTxHash) - } -} func (s *CrossLayerUser) Address() common.Address { return s.L1.address @@ -529,11 +512,7 @@ func (s *CrossLayerUser) getDisputeGame(t Testing, params withdrawals.ProvenWith return proxy, game.DisputeGameProxy, nil } -// ActCompleteWithdrawal creates a L1 proveWithdrawal tx for latest withdrawal. -// The tx hash is remembered as the last L1 tx, to check as L1 actor. -func (s *CrossLayerUser) ActProveWithdrawal(t Testing) { - s.L1.lastTxHash = s.ProveWithdrawal(t, s.lastL2WithdrawalTxHash) -} + // ProveWithdrawal creates a L1 proveWithdrawal tx for the given L2 withdrawal tx, returning the tx hash. func (s *CrossLayerUser) ProveWithdrawal(t Testing, l2TxHash common.Hash) common.Hash { @@ -566,12 +545,7 @@ func (s *CrossLayerUser) ProveWithdrawal(t Testing, l2TxHash common.Hash) common return tx.Hash() } -// ActCompleteWithdrawal creates a L1 withdrawal finalization tx for latest withdrawal. -// The tx hash is remembered as the last L1 tx, to check as L1 actor. -// The withdrawal functions like CompleteWithdrawal -func (s *CrossLayerUser) ActCompleteWithdrawal(t Testing) { - s.L1.lastTxHash = s.CompleteWithdrawal(t, s.lastL2WithdrawalTxHash) -} + // CompleteWithdrawal creates a L1 withdrawal finalization tx for the given L2 withdrawal tx, returning the tx hash. // It's an invalid action to attempt to complete a withdrawal that has not passed the L1 finalization period yet From 45330b5eb735b44752796652f7e22685495c4b13 Mon Sep 17 00:00:00 2001 From: Rick Date: Thu, 21 Aug 2025 04:36:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix=20lint=20from=20=E2=80=98go=20fmt?= =?UTF-8?q?=E2=80=99=20to=20make=20ci=20happy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- op-e2e/actions/helpers/user.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/op-e2e/actions/helpers/user.go b/op-e2e/actions/helpers/user.go index edc8cd6b6a773..f064ff6170a22 100644 --- a/op-e2e/actions/helpers/user.go +++ b/op-e2e/actions/helpers/user.go @@ -429,8 +429,6 @@ func (s *CrossLayerUser) CheckDepositTx(t Testing, l1TxHash common.Hash, index i } } - - func (s *CrossLayerUser) Address() common.Address { return s.L1.address } @@ -512,8 +510,6 @@ func (s *CrossLayerUser) getDisputeGame(t Testing, params withdrawals.ProvenWith return proxy, game.DisputeGameProxy, nil } - - // ProveWithdrawal creates a L1 proveWithdrawal tx for the given L2 withdrawal tx, returning the tx hash. func (s *CrossLayerUser) ProveWithdrawal(t Testing, l2TxHash common.Hash) common.Hash { params, err := s.getLastWithdrawalParams(t) @@ -545,8 +541,6 @@ func (s *CrossLayerUser) ProveWithdrawal(t Testing, l2TxHash common.Hash) common return tx.Hash() } - - // CompleteWithdrawal creates a L1 withdrawal finalization tx for the given L2 withdrawal tx, returning the tx hash. // It's an invalid action to attempt to complete a withdrawal that has not passed the L1 finalization period yet func (s *CrossLayerUser) CompleteWithdrawal(t Testing, l2TxHash common.Hash) common.Hash {