Skip to content

Commit

Permalink
Return binding errors in getPubkeyRegistrationParams
Browse files Browse the repository at this point in the history
  • Loading branch information
maximopalopoli committed Jan 29, 2025
1 parent ce270f8 commit af0d3c6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions chainio/clients/elcontracts/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -952,15 +952,17 @@ func getPubkeyRegistrationParams(
) (*regcoord.IBLSApkRegistryPubkeyRegistrationParams, error) {
registryCoordinator, err := regcoord.NewContractRegistryCoordinator(registryCoordinatorAddr, ethClient)
if err != nil {
return nil, utils.WrapError("failed to create registry coordinator", err)
wrappedError := CreateForBindingError("regcoord.NewContractRegistryCoordinator", err)
return nil, wrappedError
}
// params to register bls pubkey with bls apk registry
g1HashedMsgToSign, err := registryCoordinator.PubkeyRegistrationMessageHash(
&bind.CallOpts{},
operatorAddress,
)
if err != nil {
return nil, err
wrappedError := CreateForBindingError("registryCoordinator.PubkeyRegistrationMessageHash", err)
return nil, wrappedError
}
signedMsg := chainioutils.ConvertToBN254G1Point(
blsKeyPair.SignHashedToCurveMessage(chainioutils.ConvertBn254GethToGnark(g1HashedMsgToSign)).G1Point,
Expand Down

0 comments on commit af0d3c6

Please sign in to comment.