Skip to content

Commit 22696fe

Browse files
committed
Remove unused withdrawal action methods
1 parent 673e1a0 commit 22696fe

1 file changed

Lines changed: 2 additions & 28 deletions

File tree

op-e2e/actions/helpers/user.go

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -429,24 +429,7 @@ func (s *CrossLayerUser) CheckDepositTx(t Testing, l1TxHash common.Hash, index i
429429
}
430430
}
431431

432-
func (s *CrossLayerUser) ActStartWithdrawal(t Testing) {
433-
targetAddr := common.Address{}
434-
if s.L1.txToAddr != nil {
435-
targetAddr = *s.L2.txToAddr
436-
}
437-
tx, err := s.L2.env.Bindings.L2ToL1MessagePasser.InitiateWithdrawal(&s.L2.txOpts, targetAddr, new(big.Int).SetUint64(s.L1.txOpts.GasLimit), s.L1.txCallData)
438-
require.NoError(t, err, "create initiate withdraw tx")
439-
err = s.L2.env.EthCl.SendTransaction(t.Ctx(), tx)
440-
require.NoError(t, err, "must send tx")
441-
s.lastL2WithdrawalTxHash = tx.Hash()
442-
}
443432

444-
// ActCheckStartWithdrawal checks that a previous witdrawal tx was either successful or failed.
445-
func (s *CrossLayerUser) ActCheckStartWithdrawal(success bool) Action {
446-
return func(t Testing) {
447-
s.L2.CheckReceipt(t, success, s.lastL2WithdrawalTxHash)
448-
}
449-
}
450433

451434
func (s *CrossLayerUser) Address() common.Address {
452435
return s.L1.address
@@ -529,11 +512,7 @@ func (s *CrossLayerUser) getDisputeGame(t Testing, params withdrawals.ProvenWith
529512
return proxy, game.DisputeGameProxy, nil
530513
}
531514

532-
// ActCompleteWithdrawal creates a L1 proveWithdrawal tx for latest withdrawal.
533-
// The tx hash is remembered as the last L1 tx, to check as L1 actor.
534-
func (s *CrossLayerUser) ActProveWithdrawal(t Testing) {
535-
s.L1.lastTxHash = s.ProveWithdrawal(t, s.lastL2WithdrawalTxHash)
536-
}
515+
537516

538517
// ProveWithdrawal creates a L1 proveWithdrawal tx for the given L2 withdrawal tx, returning the tx hash.
539518
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
566545
return tx.Hash()
567546
}
568547

569-
// ActCompleteWithdrawal creates a L1 withdrawal finalization tx for latest withdrawal.
570-
// The tx hash is remembered as the last L1 tx, to check as L1 actor.
571-
// The withdrawal functions like CompleteWithdrawal
572-
func (s *CrossLayerUser) ActCompleteWithdrawal(t Testing) {
573-
s.L1.lastTxHash = s.CompleteWithdrawal(t, s.lastL2WithdrawalTxHash)
574-
}
548+
575549

576550
// CompleteWithdrawal creates a L1 withdrawal finalization tx for the given L2 withdrawal tx, returning the tx hash.
577551
// It's an invalid action to attempt to complete a withdrawal that has not passed the L1 finalization period yet

0 commit comments

Comments
 (0)