Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove unused methods #387

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}