misc: do not change LendingPoolConfigurator old style

This commit is contained in:
David Racero 2021-05-11 11:02:45 +02:00
parent bb729b540f
commit 50766285b7

View File

@ -151,8 +151,7 @@ contract LendingPoolConfigurator is VersionedInitializable, ILendingPoolConfigur
(, , , uint256 decimals, ) = cachedPool.getConfiguration(input.asset).getParamsMemory();
bytes memory encodedCall =
abi.encodeWithSelector(
bytes memory encodedCall = abi.encodeWithSelector(
IInitializableAToken.initialize.selector,
cachedPool,
input.treasury,
@ -164,7 +163,11 @@ contract LendingPoolConfigurator is VersionedInitializable, ILendingPoolConfigur
input.params
);
_upgradeTokenImplementation(reserveData.aTokenAddress, input.implementation, encodedCall);
_upgradeTokenImplementation(
reserveData.aTokenAddress,
input.implementation,
encodedCall
);
emit ATokenUpgraded(input.asset, reserveData.aTokenAddress, input.implementation);
}
@ -176,11 +179,10 @@ contract LendingPoolConfigurator is VersionedInitializable, ILendingPoolConfigur
ILendingPool cachedPool = pool;
DataTypes.ReserveData memory reserveData = cachedPool.getReserveData(input.asset);
(, , , uint256 decimals, ) = cachedPool.getConfiguration(input.asset).getParamsMemory();
bytes memory encodedCall =
abi.encodeWithSelector(
bytes memory encodedCall = abi.encodeWithSelector(
IInitializableDebtToken.initialize.selector,
cachedPool,
input.asset,
@ -207,15 +209,17 @@ contract LendingPoolConfigurator is VersionedInitializable, ILendingPoolConfigur
/**
* @dev Updates the variable debt token implementation for the asset
**/
function updateVariableDebtToken(UpdateDebtTokenInput calldata input) external onlyPoolAdmin {
function updateVariableDebtToken(UpdateDebtTokenInput calldata input)
external
onlyPoolAdmin
{
ILendingPool cachedPool = pool;
DataTypes.ReserveData memory reserveData = cachedPool.getReserveData(input.asset);
(, , , uint256 decimals, ) = cachedPool.getConfiguration(input.asset).getParamsMemory();
bytes memory encodedCall =
abi.encodeWithSelector(
bytes memory encodedCall = abi.encodeWithSelector(
IInitializableDebtToken.initialize.selector,
cachedPool,
input.asset,