Depositor

Git Source

Inherits: IDepositor

Author: mortimr @ Kiln

The Depositor contract adds deposit capabilities to easily fund validators and activate them on the Consensus Layer.

Unstructured Storage Friendly

State Variables

$depositContract

The address of the Deposit Contract in storage.

Slot: keccak256(bytes("depositor.depositContract"))) - 1

types.Address internal constant $depositContract =
    types.Address.wrap(0x51b708339b28db69fafc07d2fc5a46c3487f5c5cd1fcb575eb01044dd8dd4de5);

DEPOSIT_SIZE_AMOUNT_LITTLEENDIAN64

Precomputed deposit size amount in little endian.

uint256 internal constant DEPOSIT_SIZE_AMOUNT_LITTLEENDIAN64 =
    0x0040597307000000000000000000000000000000000000000000000000000000;

Functions

depositContract

Retrieve the deposit contract address.

function depositContract() external view returns (address);

Returns

NameTypeDescription
<none>addressdepositContractAddress The deposit contract address

_setDepositContract

Set the deposit contract address in storage.

function _setDepositContract(address _depositContract) internal;

Parameters

NameTypeDescription
_depositContractaddressThe new deposit contract address

_deposit

Utility to perform a deposit of the provided keys and the current balance.

The current balance is used for the deposit.

function _deposit(bytes memory _publicKey, bytes memory _signature, address _withdrawal) internal;

Parameters

NameTypeDescription
_publicKeybytesBLS Public Key
_signaturebytesBLS Signature
_withdrawaladdressThe withdrawal address