Skip to content

Commit

Permalink
refactor: Remove DeregisterOperatorOperatorSets function (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximopalopoli authored Feb 7, 2025
1 parent bfced4a commit 31658f1
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions chainio/clients/avsregistry/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,38 +443,6 @@ func (w *ChainWriter) DeregisterOperator(
return receipt, nil
}

// Deregisters an operator from the given operator sets.
// On success, returns the receipt of the transaction.
func (w *ChainWriter) DeregisterOperatorOperatorSets(
ctx context.Context,
operatorSetIds types.OperatorSetIds,
operator types.Operator,
pubkey regcoord.BN254G1Point,
waitForReceipt bool,
) (*gethtypes.Receipt, error) {
w.logger.Info("deregistering operator with the AVS's registry coordinator")

operatorAddress := gethcommon.HexToAddress(operator.Address)
noSendTxOpts, err := w.txMgr.GetNoSendTxOpts()
if err != nil {
return nil, err
}
tx, err := w.registryCoordinator.DeregisterOperator(noSendTxOpts, operatorAddress, operatorSetIds.UnderlyingType())
if err != nil {
return nil, err
}
receipt, err := w.txMgr.Send(ctx, tx, waitForReceipt)
if err != nil {
return nil, utils.WrapError("failed to send tx with err", err.Error())
}
w.logger.Info(
"successfully deregistered operator with the AVS's registry coordinator",
"txHash",
receipt.TxHash.String(),
)
return receipt, nil
}

// Updates the socket of the sender (if it is a registered operator).
// On success, returns the receipt of the transaction.
func (w *ChainWriter) UpdateSocket(
Expand Down

0 comments on commit 31658f1

Please sign in to comment.