Skip to main content

KeeperValidators

Git Source

Inherits: KeeperOracles, KeeperRewards, IKeeperValidators

Author: StakeWise

Defines the functionality for approving validators' registrations and updating exit signatures

State Variables

_registerValidatorsTypeHash

bytes32 private constant _registerValidatorsTypeHash = keccak256(
"KeeperValidators(bytes32 validatorsRegistryRoot,address vault,bytes validators,string exitSignaturesIpfsHash,uint256 deadline)"
);

_updateExitSigTypeHash

bytes32 private constant _updateExitSigTypeHash =
keccak256("KeeperValidators(address vault,string exitSignaturesIpfsHash,uint256 nonce,uint256 deadline)");

_validatorsRegistry

IValidatorsRegistry private immutable _validatorsRegistry;

exitSignaturesNonces

Get nonce for the next vault exit signatures update

mapping(address => uint256) public override exitSignaturesNonces;

validatorsMinOracles

The minimum number of oracles required to update validators

uint256 public override validatorsMinOracles;

Functions

constructor

Constructor

constructor(IValidatorsRegistry validatorsRegistry);

Parameters

NameTypeDescription
validatorsRegistryIValidatorsRegistryThe address of the beacon chain validators registry contract

setValidatorsMinOracles

Function for updating validators min oracles number

function setValidatorsMinOracles(uint256 _validatorsMinOracles) external override onlyOwner;

Parameters

NameTypeDescription
_validatorsMinOraclesuint256The new minimum number of oracles required to approve validators

approveValidators

Function for approving validators registration

function approveValidators(ApprovalParams calldata params) external override;

Parameters

NameTypeDescription
paramsApprovalParamsThe parameters for approving validators registration

updateExitSignatures

Function for updating exit signatures for every hard fork

function updateExitSignatures(
address vault,
uint256 deadline,
string calldata exitSignaturesIpfsHash,
bytes calldata oraclesSignatures
) external override;

Parameters

NameTypeDescription
vaultaddressThe address of the Vault to update signatures for
deadlineuint256The deadline for submitting signatures update
exitSignaturesIpfsHashstringThe IPFS hash with the validators' exit signatures
oraclesSignaturesbytesThe concatenation of Oracles' signatures

_setValidatorsMinOracles

Internal function to set the minimum number of oracles required to approve validators

function _setValidatorsMinOracles(uint256 _validatorsMinOracles) private;

Parameters

NameTypeDescription
_validatorsMinOraclesuint256The new minimum number of oracles required to approve validators