Skip to main content

EthNodesManager

Git Source ↗

Inherits: NodesManager, IEthNodesManager

Implements Ethereum specific functionality for the NodesManager contract

Functions

constructor

Constructor

Note: oz-upgrades-unsafe-allow: constructor

constructor(address _vault, address _keeper) NodesManager(_vault, _keeper);

Parameters

NameTypeDescription
_vaultaddress
_keeperaddressThe address of the Keeper contract

initialize

Initializes the EthNodesManager contract

function initialize(address owner, uint256 _minDepositAssets, uint16 _minBalancePercent, uint256 _stateUpdateDelay)
external
initializer;

Parameters

NameTypeDescription
owneraddressThe address of the contract owner
_minDepositAssetsuint256The minimum deposit assets
_minBalancePercentuint16The minimum balance percent in BPS
_stateUpdateDelayuint256The delay in seconds between state updates

deposit

Deposits ETH as bond assets

function deposit() external payable override returns (uint256 shares);

Returns

NameTypeDescription
sharesuint256The vault shares received for the deposit

_depositToVault

Deposits assets to the vault and returns the shares received. Must be implemented by network-specific contracts.

function _depositToVault(uint256 assets) internal override returns (uint256 shares);

Parameters

NameTypeDescription
assetsuint256The amount of assets to deposit

Returns

NameTypeDescription
sharesuint256The vault shares received

_transferAssets

Transfers assets to the receiver. Must be implemented by network-specific contracts.

function _transferAssets(address receiver, uint256 assets) internal override;

Parameters

NameTypeDescription
receiveraddressThe address to transfer assets to
assetsuint256The amount of assets to transfer

_donateAssets

Donates assets back to the vault. Must be implemented by network-specific contracts.

function _donateAssets(uint256 assets) internal override;

Parameters

NameTypeDescription
assetsuint256The amount of assets to donate

receive

receive() external payable;