add setBaseBorrowMin function
This commit is contained in:
@@ -15,6 +15,7 @@ interface ILending {
|
||||
event BuyCollateral(address indexed buyer, address indexed asset, uint256 baseAmount, uint256 collateralAmount);
|
||||
event WithdrawReserves(address indexed to, uint256 amount);
|
||||
event TargetReservesUpdated(uint104 targetReserves);
|
||||
event BaseBorrowMinUpdated(uint104 baseBorrowMin);
|
||||
|
||||
error Unauthorized();
|
||||
error InsufficientBalance();
|
||||
@@ -47,5 +48,5 @@ interface ILending {
|
||||
function getCollateralReserves(address asset) external view returns (uint256);
|
||||
function getUtilization() external view returns (uint256);
|
||||
function withdrawReserves(address to, uint256 amount) external;
|
||||
}
|
||||
|
||||
function setBaseBorrowMin(uint104 newBaseBorrowMin) external;
|
||||
}
|
||||
@@ -100,6 +100,11 @@ contract Lending is
|
||||
emit TargetReservesUpdated(targetReserves);
|
||||
}
|
||||
|
||||
function setBaseBorrowMin(uint104 newBaseBorrowMin) external onlyOwner {
|
||||
baseBorrowMin = newBaseBorrowMin;
|
||||
emit BaseBorrowMinUpdated(baseBorrowMin);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notice 计算累计利息后的索引(不修改状态)
|
||||
* @param timeElapsed 经过的时间
|
||||
@@ -682,5 +687,4 @@ contract Lending is
|
||||
* 50个slot = 50 * 32 bytes = 1600 bytes
|
||||
*/
|
||||
uint256[50] private __gap;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user