From 648c11822bf76aaa688b5f0845b81d28169245e5 Mon Sep 17 00:00:00 2001 From: gpabst Date: Tue, 19 Nov 2024 11:04:22 -0500 Subject: [PATCH] chore: remove unused methods (#387) --- chainio/clients/elcontracts/writer.go | 66 --------------------------- 1 file changed, 66 deletions(-) diff --git a/chainio/clients/elcontracts/writer.go b/chainio/clients/elcontracts/writer.go index c08a7d0a..882c7482 100644 --- a/chainio/clients/elcontracts/writer.go +++ b/chainio/clients/elcontracts/writer.go @@ -356,69 +356,3 @@ func (w *ChainWriter) ProcessClaim( return receipt, nil } - -func (w *ChainWriter) ForceDeregisterFromOperatorSets( - ctx context.Context, - operator gethcommon.Address, - avs gethcommon.Address, - operatorSetIds []uint32, - operatorSignature avsdirectory.ISignatureUtilsSignatureWithSaltAndExpiry, - waitForReceipt bool, -) (*gethtypes.Receipt, error) { - if w.avsDirectory == 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.avsDirectory.ForceDeregisterFromOperatorSets( - noSendTxOpts, - operator, - avs, - operatorSetIds, - operatorSignature, - ) - - 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) SetOperatorCommissionBips( - ctx context.Context, - operatorSet rewardscoordinator.IAVSDirectoryOperatorSet, - rewardType uint8, - commissionBips uint16, - waitForReceipt bool, -) (*gethtypes.Receipt, error) { - if w.rewardsCoordinator == nil { - return nil, errors.New("RewardsCoordinator 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.rewardsCoordinator.SetOperatorCommissionBips(noSendTxOpts, operatorSet, rewardType, commissionBips) - if err != nil { - return nil, utils.WrapError("failed to create SetOperatorCommissionBips 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 -}