Skip to content

Commit

Permalink
chore: remove unused methods (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
gpabst authored Nov 19, 2024
1 parent 6c859ec commit 648c118
Showing 1 changed file with 0 additions and 66 deletions.
66 changes: 0 additions & 66 deletions chainio/clients/elcontracts/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 648c118

Please sign in to comment.