mirror of
https://github.com/Instadapp/dsa-resolvers-deprecated.git
synced 2024-07-29 22:38:16 +00:00
Update Aave v2 resolver to include liquidity params
This commit is contained in:
parent
e0ba523772
commit
7a6a0bfd9c
|
@ -176,6 +176,9 @@ contract AaveHelpers is DSMath {
|
|||
bool stableBorrowEnabled;
|
||||
bool isActive;
|
||||
bool isFrozen;
|
||||
uint availableLiquidity;
|
||||
uint totalStableDebt;
|
||||
uint totalVariableDebt;
|
||||
}
|
||||
|
||||
struct TokenPrice {
|
||||
|
@ -221,6 +224,8 @@ contract AaveHelpers is DSMath {
|
|||
uint tokenPriceInEth,
|
||||
uint tokenPriceInUsd
|
||||
) internal view returns(AaveUserTokenData memory tokenData) {
|
||||
AaveTokenData memory aaveTokenData = collateralData(aaveData, token);
|
||||
|
||||
(
|
||||
tokenData.supplyBalance,
|
||||
tokenData.stableBorrowBalance,
|
||||
|
@ -230,15 +235,15 @@ contract AaveHelpers is DSMath {
|
|||
) = aaveData.getUserReserveData(token, user);
|
||||
|
||||
(
|
||||
,,,
|
||||
aaveTokenData.availableLiquidity,
|
||||
aaveTokenData.totalStableDebt,
|
||||
aaveTokenData.totalVariableDebt,
|
||||
tokenData.supplyRate,
|
||||
tokenData.variableBorrowRate,
|
||||
tokenData.stableBorrowRate,
|
||||
,,,
|
||||
) = aaveData.getReserveData(token);
|
||||
|
||||
AaveTokenData memory aaveTokenData = collateralData(aaveData, token);
|
||||
|
||||
tokenData.tokenPriceInEth = tokenPriceInEth;
|
||||
tokenData.tokenPriceInUsd = tokenPriceInUsd;
|
||||
tokenData.aaveTokenData = aaveTokenData;
|
||||
|
|
Loading…
Reference in New Issue
Block a user