ConsensusLayerDepositManagerV1
Alluvial Finance Inc.
Consensus Layer Deposit Manager (v1)
This contract handles the interactions with the official deposit contract, funding all validatorsWhenever a deposit to the consensus layer is requested, this contract computed the amount of keys that could be deposited depending on the amount available in the contract. It then tries to retrieve validator keys by calling its internal virtual method _getNextValidators. This method should be overridden by the implementing contract to provide [0; _keyCount] keys when invoked.
Methods
DEPOSIT_SIZE
function DEPOSIT_SIZE() external view returns (uint256)
Size of a deposit in ETH
Returns
_0
uint256
undefined
PUBLIC_KEY_LENGTH
function PUBLIC_KEY_LENGTH() external view returns (uint256)
Size of a BLS Public key in bytes
Returns
_0
uint256
undefined
SIGNATURE_LENGTH
function SIGNATURE_LENGTH() external view returns (uint256)
Size of a BLS Signature in bytes
Returns
_0
uint256
undefined
depositToConsensusLayerWithDepositRoot
function depositToConsensusLayerWithDepositRoot(uint256 _maxCount, bytes32 _depositRoot) external nonpayable
Deposits current balance to the Consensus Layer by batches of 32 ETH
Parameters
_maxCount
uint256
The maximum amount of validator keys to fund
_depositRoot
bytes32
The root of the deposit tree
getBalanceToDeposit
function getBalanceToDeposit() external view returns (uint256)
Returns the amount of ETH not yet committed for deposit
Returns
_0
uint256
The amount of ETH not yet committed for deposit
getCommittedBalance
function getCommittedBalance() external view returns (uint256)
Returns the amount of ETH committed for deposit
Returns
_0
uint256
The amount of ETH committed for deposit
getDepositedValidatorCount
function getDepositedValidatorCount() external view returns (uint256)
Get the deposited validator count (the count of deposits made by the contract)
Returns
_0
uint256
The deposited validator count
getKeeper
function getKeeper() external view returns (address)
Get the keeper address
Returns
_0
address
The keeper address
getWithdrawalCredentials
function getWithdrawalCredentials() external view returns (bytes32)
Retrieve the withdrawal credentials
Returns
_0
bytes32
The withdrawal credentials
Events
SetDepositContractAddress
event SetDepositContractAddress(address indexed depositContract)
The stored deposit contract address changed
Parameters
depositContract indexed
address
Address of the deposit contract
SetDepositedValidatorCount
event SetDepositedValidatorCount(uint256 oldDepositedValidatorCount, uint256 newDepositedValidatorCount)
Emitted when the deposited validator count is updated
Parameters
oldDepositedValidatorCount
uint256
The old deposited validator count value
newDepositedValidatorCount
uint256
The new deposited validator count value
SetWithdrawalCredentials
event SetWithdrawalCredentials(bytes32 withdrawalCredentials)
The stored withdrawal credentials changed
Parameters
withdrawalCredentials
bytes32
The withdrawal credentials to use for deposits
Errors
ErrorOnDeposit
error ErrorOnDeposit()
An error occurred during the deposit
InconsistentPublicKeys
error InconsistentPublicKeys()
The length of the BLS Public key is invalid during deposit
InconsistentSignatures
error InconsistentSignatures()
The length of the BLS Signature is invalid during deposit
InvalidDepositRoot
error InvalidDepositRoot()
Invalid deposit root
InvalidPublicKeyCount
error InvalidPublicKeyCount()
The received count of public keys to deposit is invalid
InvalidSignatureCount
error InvalidSignatureCount()
The received count of signatures to deposit is invalid
InvalidWithdrawalCredentials
error InvalidWithdrawalCredentials()
The withdrawal credentials value is null
NoAvailableValidatorKeys
error NoAvailableValidatorKeys()
The internal key retrieval returned no keys
NotEnoughFunds
error NotEnoughFunds()
Not enough funds to deposit one validator
OnlyKeeper
error OnlyKeeper()
SliceOutOfBounds
error SliceOutOfBounds()
The slice is outside of the initial bytes bounds
SliceOverflow
error SliceOverflow()
The length overflows an uint
Last updated