mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
feat: Added mock for kovan / mainnet
This commit is contained in:
parent
5e5962372e
commit
ef35dee035
|
@ -130,37 +130,7 @@ contract UiPoolDataProvider is IUiPoolDataProvider {
|
||||||
DefaultReserveInterestRateStrategy(reserveData.interestRateStrategyAddress)
|
DefaultReserveInterestRateStrategy(reserveData.interestRateStrategyAddress)
|
||||||
);
|
);
|
||||||
|
|
||||||
// incentives
|
|
||||||
IAaveIncentivesController.AssetData memory tokenIncentivesInfo =
|
|
||||||
incentivesController.assets(reserveData.aTokenAddress);
|
|
||||||
reserveData.aEmissionPerSecond = tokenIncentivesInfo.emissionPerSecond;
|
|
||||||
reserveData.aIncentivesLastUpdateTimestamp = tokenIncentivesInfo.lastUpdateTimestamp;
|
|
||||||
reserveData.aTokenIncentivesIndex = tokenIncentivesInfo.index;
|
|
||||||
|
|
||||||
tokenIncentivesInfo = incentivesController.assets(reserveData.stableDebtTokenAddress);
|
|
||||||
reserveData.sEmissionPerSecond = tokenIncentivesInfo.emissionPerSecond;
|
|
||||||
reserveData.sIncentivesLastUpdateTimestamp = tokenIncentivesInfo.lastUpdateTimestamp;
|
|
||||||
reserveData.sTokenIncentivesIndex = tokenIncentivesInfo.index;
|
|
||||||
|
|
||||||
tokenIncentivesInfo = incentivesController.assets(reserveData.variableDebtTokenAddress);
|
|
||||||
reserveData.vEmissionPerSecond = tokenIncentivesInfo.emissionPerSecond;
|
|
||||||
reserveData.vIncentivesLastUpdateTimestamp = tokenIncentivesInfo.lastUpdateTimestamp;
|
|
||||||
reserveData.vTokenIncentivesIndex = tokenIncentivesInfo.index;
|
|
||||||
|
|
||||||
if (user != address(0)) {
|
if (user != address(0)) {
|
||||||
// incentives
|
|
||||||
userReservesData[i].aTokenincentivesUserIndex = incentivesController.getUserAssetData(
|
|
||||||
user,
|
|
||||||
reserveData.aTokenAddress
|
|
||||||
);
|
|
||||||
userReservesData[i].sTokenincentivesUserIndex = incentivesController.getUserAssetData(
|
|
||||||
user,
|
|
||||||
reserveData.stableDebtTokenAddress
|
|
||||||
);
|
|
||||||
userReservesData[i].vTokenincentivesUserIndex = incentivesController.getUserAssetData(
|
|
||||||
user,
|
|
||||||
reserveData.variableDebtTokenAddress
|
|
||||||
);
|
|
||||||
// user reserve data
|
// user reserve data
|
||||||
userReservesData[i].underlyingAsset = reserveData.underlyingAsset;
|
userReservesData[i].underlyingAsset = reserveData.underlyingAsset;
|
||||||
userReservesData[i].scaledATokenBalance = IAToken(reserveData.aTokenAddress)
|
userReservesData[i].scaledATokenBalance = IAToken(reserveData.aTokenAddress)
|
||||||
|
@ -194,20 +164,11 @@ contract UiPoolDataProvider is IUiPoolDataProvider {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IncentivesControllerData memory incentivesControllerData;
|
|
||||||
incentivesControllerData.userUnclaimedRewards = incentivesController.getUserUnclaimedRewards(user);
|
|
||||||
// incentivesControllerData.rewardToken = incentivesController.REWARD_TOKEN();
|
|
||||||
// incentivesControllerData.rewardTokenDecimals = IERC20Detailed(incentivesControllerData.rewardToken).decimals();
|
|
||||||
// incentivesControllerData.rewardTokenSymbol = IERC20Detailed(incentivesControllerData.rewardToken).symbol();
|
|
||||||
// incentivesControllerData.precision = incentivesController.PRECISION();
|
|
||||||
incentivesControllerData.emissionEndTimestamp = incentivesController.DISTRIBUTION_END();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
reservesData,
|
reservesData,
|
||||||
userReservesData,
|
userReservesData,
|
||||||
oracle.getAssetPrice(MOCK_USD_ADDRESS),
|
oracle.getAssetPrice(MOCK_USD_ADDRESS),
|
||||||
incentivesControllerData
|
IncentivesControllerData(0,0)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,10 +11,10 @@ task(`deploy-${eContractid.UiPoolDataProvider}`, `Deploys the UiPoolDataProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
const addressesByNetwork = {
|
const addressesByNetwork = {
|
||||||
// [eEthereumNetwork.kovan]: {
|
[eEthereumNetwork.kovan]: {
|
||||||
// incentivesController: '',
|
incentivesController: '0x0000000000000000000000000000000000000000',
|
||||||
// aaveOracle: '',
|
aaveOracle: '0x8fb777d67e9945e2c01936e319057f9d41d559e6',
|
||||||
// },
|
},
|
||||||
// [eEthereumNetwork.main]: {
|
// [eEthereumNetwork.main]: {
|
||||||
// incentivesController: '',
|
// incentivesController: '',
|
||||||
// aaveOracle: '0xa50ba011c48153de246e5192c8f9258a2ba79ca9',
|
// aaveOracle: '0xa50ba011c48153de246e5192c8f9258a2ba79ca9',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user