Skip to main content

EthCommunityVault

Git Source ↗

Inherits: Initializable ↗, EthErc20Vault, IEthCommunityVault

Defines the Ethereum staking Vault with ERC-20 token and NodesManager as fee recipient and validators manager.

State Variables

_version

uint8 private constant _version = 6

__gap

This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain. See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps

uint256[50] private __gap

Functions

constructor

Constructor

Since the immutable variable value is stored in the bytecode, its value would be shared among all proxies pointing to a given contract instead of each proxy's storage.

Note: oz-upgrades-unsafe-allow: constructor

constructor(EthErc20VaultConstructorArgs memory args) EthErc20Vault(args);

Parameters

NameTypeDescription
argsEthErc20VaultConstructorArgsThe arguments for initializing the EthErc20Vault contract

initialize

Initializes or upgrades the EthErc20Vault contract. Must transfer security deposit during the deployment.

function initialize(bytes calldata params)
external
payable
virtual
override(IEthErc20Vault, EthErc20Vault)
reinitializer(_version);

Parameters

NameTypeDescription
paramsbytesThe encoded parameters for initializing the EthErc20Vault contract

setFeeRecipient

Function for updating the fee recipient address. Can only be called by the admin.

function setFeeRecipient(address) external virtual override(IVaultFee, VaultFee);

Parameters

NameTypeDescription
<none>address

_setFeeRecipient

No-op: prevents __VaultFee_init from setting feeRecipient to admin. The fee recipient is set directly to nodesManager in initialize() and cannot be changed later.

function _setFeeRecipient(address) internal virtual override;

setValidatorsManager

Function for updating the validators manager. Can only be called by the admin. Default is the DepositDataRegistry contract.

function setValidatorsManager(address) external virtual override(IVaultValidators, VaultValidators);

Parameters

NameTypeDescription
<none>address

vaultId

Vault Unique Identifier

function vaultId() public pure virtual override(IVaultVersion, EthErc20Vault) returns (bytes32);

Returns

NameTypeDescription
<none>bytes32The unique identifier of the Vault

version

Version

function version() public pure virtual override(IVaultVersion, EthErc20Vault) returns (uint8);

Returns

NameTypeDescription
<none>uint8The version of the Vault implementation contract