Created
May 29, 2022 16:38
-
-
Save alonmuroch/fe1fc63c9469733cff3e601f8a1ce362 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function registerValidator( | |
uint256[] operatorIds, | |
bytes[] signatures, | |
bytes[] encryptedShares, | |
bytes[] sharesPublicKeys | |
uint8 setSize, | |
bytes withdrawalCredentials, | |
bytes publicKey, | |
) external { | |
// verify signature | |
for (uint8 index = 0; index < setSize; ++index) { | |
address = ssvRegistry.operatorAddressByID(operatorIds[index]); | |
require( | |
_verifySignature( | |
signatures[index], | |
address, | |
encryptedShares[index], | |
setSize, | |
withdrawalCredentials, | |
publicKey, | |
), | |
); | |
} | |
// register validator | |
ssvRegistry.registerValidator( | |
address(this), | |
publicKey, | |
operatorIds, | |
sharesPublicKeys, | |
encryptedShares, | |
false, | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment