Skip to main content

ValidatorsChecker

Git Source ↗

Inherits: Multicall →, IValidatorsChecker

Defines the functionality for:

  • checking validators manager signature
  • checking deposit data root

Structs

DepositDataRootCheckParams

Struct for checking deposit data root

struct DepositDataRootCheckParams {
address vault;
bytes32 validatorsRegistryRoot;
bytes validators;
bytes32[] proof;
bool[] proofFlags;
uint256[] proofIndexes;
}

Properties

NameTypeDescription
vaultaddressThe address of the vault
validatorsRegistryRootbytes32The validators registry root
validatorsbytesThe concatenation of the validators' public key, deposit signature, deposit root
proofbytes32[]The proof of the deposit data root
proofFlagsbool[]The flags of the proof
proofIndexesuint256[]The indexes of the proof

Enums

Status

enum Status {
SUCCEEDED,
INVALID_VALIDATORS_REGISTRY_ROOT,
INVALID_VAULT,
INSUFFICIENT_ASSETS,
INVALID_SIGNATURE,
INVALID_VALIDATORS_MANAGER,
INVALID_VALIDATORS_COUNT,
INVALID_VALIDATORS_LENGTH,
INVALID_PROOF
}

Functions

updateVaultState

Function for updating vault state

function updateVaultState(address vault, IKeeperRewards.HarvestParams calldata harvestParams) external override;

Parameters

NameTypeDescription
vaultaddressThe address of the vault
harvestParamsIKeeperRewards.HarvestParamsThe parameters for harvesting

getExitQueueCumulativeTickets

Function for getting the exit queue cumulative tickets

function getExitQueueCumulativeTickets(address vault) external view override returns (uint256);

Parameters

NameTypeDescription
vaultaddressThe address of the vault

Returns

NameTypeDescription
<none>uint256The exit queue cumulative tickets

getExitQueueMissingAssets

Function for getting the exit queue missing assets

function getExitQueueMissingAssets(address vault, uint256 withdrawingAssets, uint256 targetCumulativeTickets)
external
view
override
returns (uint256 missingAssets);

Parameters

NameTypeDescription
vaultaddressThe address of the vault
withdrawingAssetsuint256The amount of assets currently being withdrawn from validators
targetCumulativeTicketsuint256The target cumulative tickets

Returns

NameTypeDescription
missingAssetsuint256The exit queue missing assets

checkValidatorsManagerSignature

Function for checking validators manager signature

function checkValidatorsManagerSignature(
address vault,
bytes32 validatorsRegistryRoot,
bytes calldata validators,
bytes calldata signature
) external view override returns (uint256 blockNumber, Status status);

Parameters

NameTypeDescription
vaultaddressThe address of the vault
validatorsRegistryRootbytes32The validators registry root
validatorsbytesThe concatenation of the validators' public key, deposit signature, deposit root
signaturebytesThe validators manager signature

Returns

NameTypeDescription
blockNumberuint256Current block number
statusStatusThe status of the verification

checkDepositDataRoot

Function for checking deposit data root

function checkDepositDataRoot(DepositDataRootCheckParams calldata params)
external
view
override
returns (uint256 blockNumber, Status status);

Parameters

NameTypeDescription
paramsDepositDataRootCheckParamsThe parameters for checking deposit data root

Returns

NameTypeDescription
blockNumberuint256Current block number
statusStatusThe status of the verification