polished variable rate debt token comments

This commit is contained in:
emilio 2020-07-09 16:52:57 +02:00
parent e5bf908d1c
commit a84f26670c

View File

@ -58,6 +58,10 @@ contract VariableDebtToken is DebtTokenBase, IVariableDebtToken {
uint256 _index
);
/**
* @dev calculates the accumulated debt balance of the user
* @return the debt balance of the user
**/
function balanceOf(address _user) public virtual override view returns (uint256) {
if (balances[_user] == 0) {
return 0;
@ -71,6 +75,11 @@ contract VariableDebtToken is DebtTokenBase, IVariableDebtToken {
.rayToWad();
}
/**
* @dev returns the index of the last user action
* @return the user index
**/
function getUserIndex(address _user) public virtual override view returns (uint256) {
return userIndexes[_user];
}