Skip to content

Commit

Permalink
fix: Update and fix contracts docs
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelmtzinf committed Sep 25, 2021
1 parent 268dac1 commit 171acdf
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
7 changes: 5 additions & 2 deletions contracts/interfaces/IStableDebtToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ interface IStableDebtToken is IInitializableDebtToken {
* @param onBehalfOf The address receiving the debt tokens
* @param amount The amount of debt tokens to mint
* @param rate The rate of the debt being minted
* @return returns isFirstBorrow, totalStableDebt and avgStableBorrowRate
* @return True if it is the first borrow, false otherwise
* @return The total stable debt
* @return The average stale borrow rate
**/
function mint(
address user,
Expand All @@ -81,7 +83,8 @@ interface IStableDebtToken is IInitializableDebtToken {
* and the rate of the previous debt
* @param user The address of the user getting his debt burned
* @param amount The amount of debt tokens getting burned
* @return totalStableDebt and avgStableBorrowRate
* @return The total stable debt
* @return The average stable borrow rate
**/
function burn(address user, uint256 amount) external returns (uint256, uint256);

Expand Down
3 changes: 2 additions & 1 deletion contracts/interfaces/IVariableDebtToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ interface IVariableDebtToken is IScaledBalanceToken, IInitializableDebtToken {
* @param onBehalfOf The address receiving the debt tokens
* @param amount The amount of debt being minted
* @param index The variable debt index of the reserve
* @return if the the previous balance of the user is 0 and the scaled total debt of the reserve
* @return True if the previous balance of the user is 0, false otherwise
* @return The scaled total debt of the reserve
**/
function mint(
address user,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ library ReserveConfiguration {
* @return The state param representing liquidation bonus
* @return The state param representing reserve decimals
* @return The state param representing reserve factor
* @return The state param representing eMode category
**/
function getParams(DataTypes.ReserveConfigurationMap memory self)
internal
Expand Down
2 changes: 0 additions & 2 deletions contracts/protocol/libraries/logic/BorrowLogic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,6 @@ library BorrowLogic {
(, reserveCache.nextTotalStableDebt, reserveCache.nextAvgStableBorrowRate) = IStableDebtToken(
address(stableDebtToken)
).mint(user, user, stableDebt, reserve.currentStableBorrowRate);
//reserveCache.nextTotalStableDebt = nextTotalStableDebt;
//reserveCache.nextAvgStableBorrowRate = nextAvgStableBorrowRate;

reserve.updateInterestRates(reserveCache, asset, 0, 0);

Expand Down
8 changes: 5 additions & 3 deletions contracts/protocol/libraries/types/DataTypes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,17 @@ library DataTypes {
//bit 16-31: Liq. threshold
//bit 32-47: Liq. bonus
//bit 48-55: Decimals
//bit 56: Reserve is active
//bit 56: reserve is active
//bit 57: reserve is frozen
//bit 58: borrowing is enabled
//bit 59: stable rate borrowing enabled
//bit 60: asset is paused
//bit 61-63: reserved
//bit 64-79: reserve factor
//bit 80-115 borrow cap, borrowCap == 0 => disabled
//bit 116-151 supply cap, supplyCap == 0 => disabled
//bit 80-115: borrow cap, borrowCap == 0 => disabled
//bit 116-151: supply cap, supplyCap == 0 => disabled
//bit 152-167: liquidation protocol fee
//bit 168-176: eMode category
uint256 data;
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/protocol/pool/PoolConfigurator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ contract PoolConfigurator is VersionedInitializable, IPoolConfigurator {
emit EModeAssetCategoryChanged(asset, categoryId);
}

///@inheritdoc IPoolConfigurator
/// @inheritdoc IPoolConfigurator
function setReserveInterestRateStrategyAddress(address asset, address rateStrategyAddress)
external
override
Expand Down

0 comments on commit 171acdf

Please sign in to comment.