From 6e92575ac2fff0284b6d70c60981c5659757e254 Mon Sep 17 00:00:00 2001 From: The3D Date: Mon, 14 Sep 2020 11:41:14 +0200 Subject: [PATCH] add code to _mintToTreasury --- contracts/libraries/logic/ReserveLogic.sol | 13 ++++++++++++- .../tokenization/interfaces/IStableDebtToken.sol | 2 -- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/contracts/libraries/logic/ReserveLogic.sol b/contracts/libraries/logic/ReserveLogic.sol index 0cb07416..0530e650 100644 --- a/contracts/libraries/logic/ReserveLogic.sol +++ b/contracts/libraries/logic/ReserveLogic.sol @@ -7,6 +7,7 @@ import {MathUtils} from '../math/MathUtils.sol'; import {IPriceOracleGetter} from '../../interfaces/IPriceOracleGetter.sol'; import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol'; import {IStableDebtToken} from '../../tokenization/interfaces/IStableDebtToken.sol'; +import {IVariableDebtToken} from '../../tokenization/interfaces/IVariableDebtToken.sol'; import {ReserveConfiguration} from '../configuration/ReserveConfiguration.sol'; import {IReserveInterestRateStrategy} from '../../interfaces/IReserveInterestRateStrategy.sol'; import {WadRayMath} from '../math/WadRayMath.sol'; @@ -244,7 +245,17 @@ library ReserveLogic { function _mintToTreasury(ReserveData storage reserve) internal { - + address stableDebtToken = reserve.stableDebtTokenAddress; + address variableDebtToken = reserve.variableDebtTokenAddress; + + uint256 currentVariableDebt = IERC20(variableDebtToken).totalSupply(); + uint256 currentStableDebt = IERC20(stableDebtToken).totalSupply(); + + uint256 principalStableDebt = IStableDebtToken(stableDebtToken).principalTotalSupply(); + uint256 scaledVariableDebt = IVariableDebtToken(variableDebtToken).scaledTotalSupply(); + + + } diff --git a/contracts/tokenization/interfaces/IStableDebtToken.sol b/contracts/tokenization/interfaces/IStableDebtToken.sol index fc15e00f..4c3800e0 100644 --- a/contracts/tokenization/interfaces/IStableDebtToken.sol +++ b/contracts/tokenization/interfaces/IStableDebtToken.sol @@ -89,6 +89,4 @@ interface IStableDebtToken { * @dev returns the principal total supply **/ function principalTotalSupply() external view returns (uint40); - - }