From 6dbf073f5297cdf2da822be57f78bd389e8c8ab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Tue, 7 Jan 2025 17:31:20 -0300 Subject: [PATCH] chore: remove duplicated function `ForceDeregisterFromOperatorSets` does the same as `DeregisterFromOperatorSets`, so we can simply remove it. --- chainio/clients/elcontracts/writer.go | 37 --------------------------- 1 file changed, 37 deletions(-) diff --git a/chainio/clients/elcontracts/writer.go b/chainio/clients/elcontracts/writer.go index 4cd1d943..df8129ad 100644 --- a/chainio/clients/elcontracts/writer.go +++ b/chainio/clients/elcontracts/writer.go @@ -452,43 +452,6 @@ func (w *ChainWriter) ProcessClaims( return receipt, nil } -func (w *ChainWriter) ForceDeregisterFromOperatorSets( - ctx context.Context, - operator gethcommon.Address, - avs gethcommon.Address, - operatorSetIds []uint32, - waitForReceipt bool, -) (*gethtypes.Receipt, error) { - if w.allocationManager == nil { - return nil, errors.New("AVSDirectory contract not provided") - } - - noSendTxOpts, err := w.txMgr.GetNoSendTxOpts() - if err != nil { - return nil, utils.WrapError("failed to get no send tx opts", err) - } - - tx, err := w.allocationManager.DeregisterFromOperatorSets( - noSendTxOpts, - allocationmanager.IAllocationManagerTypesDeregisterParams{ - Operator: operator, - Avs: avs, - OperatorSetIds: operatorSetIds, - }, - ) - - if err != nil { - return nil, utils.WrapError("failed to create ForceDeregisterFromOperatorSets tx", err) - } - - receipt, err := w.txMgr.Send(ctx, tx, waitForReceipt) - if err != nil { - return nil, utils.WrapError("failed to send tx", err) - } - - return receipt, nil -} - func (w *ChainWriter) ModifyAllocations( ctx context.Context, operatorAddress gethcommon.Address,