mirror of
				https://github.com/Instadapp/aave-protocol-v2.git
				synced 2024-07-29 21:47:30 +00:00 
			
		
		
		
	add code to _mintToTreasury
This commit is contained in:
		
							parent
							
								
									13f77ec0d2
								
							
						
					
					
						commit
						6e92575ac2
					
				|  | @ -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(); | ||||
|      | ||||
|      | ||||
|      | ||||
| 
 | ||||
|   } | ||||
| 
 | ||||
|  |  | |||
|  | @ -89,6 +89,4 @@ interface IStableDebtToken { | |||
|    * @dev returns the principal total supply  | ||||
|    **/ | ||||
|   function principalTotalSupply() external view returns (uint40); | ||||
|    | ||||
| 
 | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 The3D
						The3D