Skip to content

Commit

Permalink
added tx.Send
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidu28 committed Feb 6, 2025
1 parent 7691a09 commit 4994869
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions chainio/clients/avsregistry/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,12 +455,6 @@ func (w *ChainWriter) RegisterOperatorWithChurn(
Expiry: signatureExpiry,
}

/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////

var operatorKickParams []regcoord.ISlashingRegistryCoordinatorTypesOperatorKickParam
for i, operatorToKick := range operatorsToKick {
operatorKickParams = append(operatorKickParams, regcoord.ISlashingRegistryCoordinatorTypesOperatorKickParam{
Expand Down Expand Up @@ -508,7 +502,7 @@ func (w *ChainWriter) RegisterOperatorWithChurn(
return nil, err
}

w.registryCoordinator.RegisterOperatorWithChurn(
tx, err := w.registryCoordinator.RegisterOperatorWithChurn(
noSendTxOpts,
quorumNumbers.UnderlyingType(),
socket,
Expand All @@ -517,8 +511,25 @@ func (w *ChainWriter) RegisterOperatorWithChurn(
operatorSignatureWithSaltAndExpiry,
churnApproverSignatureWithSaltAndExpiry,
)

return nil, nil
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 registered operator with AVS registry coordinator",
"txHash",
receipt.TxHash.String(),
"avs-service-manager",
w.serviceManagerAddr,
"operator",
operatorAddr,
"quorumNumbers",
quorumNumbers,
)
return receipt, nil
}

// Updates the stakes of a the given `operators` for all the quorums.
Expand Down

0 comments on commit 4994869

Please sign in to comment.