mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
feat: Added borrowCap to enableBorrowing Configurato
This commit is contained in:
parent
9a8eb294a0
commit
6054fa0bd5
|
@ -31,6 +31,7 @@ contract ATokensAndRatesHelper is Ownable {
|
||||||
uint256 liquidationThreshold;
|
uint256 liquidationThreshold;
|
||||||
uint256 liquidationBonus;
|
uint256 liquidationBonus;
|
||||||
uint256 reserveFactor;
|
uint256 reserveFactor;
|
||||||
|
uint256 borrowCap;
|
||||||
bool stableBorrowingEnabled;
|
bool stableBorrowingEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,6 +76,7 @@ contract ATokensAndRatesHelper is Ownable {
|
||||||
|
|
||||||
configurator.enableBorrowingOnReserve(
|
configurator.enableBorrowingOnReserve(
|
||||||
inputParams[i].asset,
|
inputParams[i].asset,
|
||||||
|
inputParams[i].borrowCap,
|
||||||
inputParams[i].stableBorrowingEnabled
|
inputParams[i].stableBorrowingEnabled
|
||||||
);
|
);
|
||||||
configurator.setReserveFactor(inputParams[i].asset, inputParams[i].reserveFactor);
|
configurator.setReserveFactor(inputParams[i].asset, inputParams[i].reserveFactor);
|
||||||
|
|
|
@ -248,13 +248,14 @@ contract LendingPoolConfigurator is VersionedInitializable, ILendingPoolConfigur
|
||||||
* @param asset The address of the underlying asset of the reserve
|
* @param asset The address of the underlying asset of the reserve
|
||||||
* @param stableBorrowRateEnabled True if stable borrow rate needs to be enabled by default on this reserve
|
* @param stableBorrowRateEnabled True if stable borrow rate needs to be enabled by default on this reserve
|
||||||
**/
|
**/
|
||||||
function enableBorrowingOnReserve(address asset, bool stableBorrowRateEnabled)
|
function enableBorrowingOnReserve(address asset, uint256 borrowCap, bool stableBorrowRateEnabled)
|
||||||
external
|
external
|
||||||
onlyPoolAdmin
|
onlyPoolAdmin
|
||||||
{
|
{
|
||||||
DataTypes.ReserveConfigurationMap memory currentConfig = pool.getConfiguration(asset);
|
DataTypes.ReserveConfigurationMap memory currentConfig = pool.getConfiguration(asset);
|
||||||
|
|
||||||
currentConfig.setBorrowingEnabled(true);
|
currentConfig.setBorrowingEnabled(true);
|
||||||
|
currentConfig.setBorrowCap(borrowCap);
|
||||||
currentConfig.setStableRateBorrowingEnabled(stableBorrowRateEnabled);
|
currentConfig.setStableRateBorrowingEnabled(stableBorrowRateEnabled);
|
||||||
|
|
||||||
pool.setConfiguration(asset, currentConfig.data);
|
pool.setConfiguration(asset, currentConfig.data);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user