Skip to content

Instantly share code, notes, and snippets.

@alonmuroch
Created May 29, 2022 16:38
Show Gist options
  • Save alonmuroch/fe1fc63c9469733cff3e601f8a1ce362 to your computer and use it in GitHub Desktop.
Save alonmuroch/fe1fc63c9469733cff3e601f8a1ce362 to your computer and use it in GitHub Desktop.
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