EthBlocklistErc20Vault
Inherits: Initializable ↗, EthErc20Vault →, VaultBlocklist →, IEthBlocklistErc20Vault
Defines the Ethereum staking Vault with blocking and ERC20 ↗ functionality.
Functions
deposit
Deposit ETH to the Vault
function deposit(address receiver, address referrer)
public
payable
virtual
override(IVaultEthStaking, VaultEthStaking)
returns (uint256 shares);
Parameters
| Name | Type | Description |
|---|---|---|
receiver | address | The address that will receive Vault's shares |
referrer | address | The address of the referrer. Set to zero address if not used. |
Returns
| Name | Type | Description |
|---|---|---|
shares | uint256 | The number of shares minted |
receive
Function for depositing using fallback function
receive() external payable virtual override;
mintOsToken
Mints OsToken shares
function mintOsToken(address receiver, uint256 osTokenShares, address referrer)
public
virtual
override(IVaultOsToken, VaultOsToken)
returns (uint256 assets);
Parameters
| Name | Type | Description |
|---|---|---|
receiver | address | The address that will receive the minted OsToken shares |
osTokenShares | uint256 | The number of OsToken shares to mint to the receiver. To mint the maximum amount of shares, use 2^256 - 1. |
referrer | address | The address of the referrer |
Returns
| Name | Type | Description |
|---|---|---|
assets | uint256 | The number of assets minted to the receiver |
transfer
Moves amount tokens from the caller's account to to.
function transfer(address to, uint256 amount) public virtual override(IERC20, ERC20Upgradeable) returns (bool);
transferFrom
Moves amount tokens from from to to using the allowance mechanism.
amount is then deducted from the caller's allowance.
function transferFrom(address from, address to, uint256 amount)
public
virtual
override(IERC20, ERC20Upgradeable)
returns (bool);
vaultId
Vault Unique Identifier
function vaultId() public pure virtual override(IVaultVersion, EthErc20Vault) returns (bytes32);
Returns
| Name | Type | Description |
|---|---|---|
<none> | bytes32 | The unique identifier of the Vault |
version
Version
function version() public pure virtual override(IVaultVersion, EthErc20Vault) returns (uint8);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint8 | The version of the Vault implementation contract |