INative20
Author: 0xvv @ Kiln
This contract allows users to stake any amount of ETH in the vPool(s). Users are given non transferable ERC-20 type shares to track their stake.
Functions
initialize
Initializes the contract with the given parameters.
function initialize(Native20Configuration calldata args) external;
Parameters
| Name | Type | Description |
|---|---|---|
args | Native20Configuration | The initialization arguments. |
name
Returns the name of the token.
function name() external view returns (string memory);
symbol
Returns the symbol of the token, usually a shorter version of the name.
function symbol() external view returns (string memory);
decimals
Returns the number of decimals used to get its user representation.
function decimals() external view returns (uint8);
totalSupply
Returns the total amount of staking shares.
function totalSupply() external view returns (uint256);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | Total amount of shares. |
totalUnderlyingSupply
Returns the amount of ETH owned by the users in the pool(s).
function totalUnderlyingSupply() external view returns (uint256);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | Total amount of shares. |
balanceOf
Returns the amount of staking shares for an account.
function balanceOf(address account) external view returns (uint256);
Parameters
| Name | Type | Description |
|---|---|---|
account | address | The address of the account. |
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | amount of staking shares. |
balanceOfUnderlying
Returns the ETH value of the account balance.
function balanceOfUnderlying(address account) external view returns (uint256);
Parameters
| Name | Type | Description |
|---|---|---|
account | address | The address of the account. |
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | amount of ETH. |
stake
Function to stake ETH.
function stake() external payable;