mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
feat: passed some internal validation functions to external for LendingPool codesize
This commit is contained in:
parent
85c477f422
commit
39301ebee1
|
@ -40,7 +40,7 @@ library ValidationLogic {
|
||||||
* @param reserve The reserve object on which the user is depositing
|
* @param reserve The reserve object on which the user is depositing
|
||||||
* @param amount The amount to be deposited
|
* @param amount The amount to be deposited
|
||||||
*/
|
*/
|
||||||
function validateDeposit(DataTypes.ReserveData storage reserve, uint256 amount) internal view {
|
function validateDeposit(DataTypes.ReserveData storage reserve, uint256 amount) external view {
|
||||||
DataTypes.ReserveConfigurationMap memory reserveConfiguration = reserve.configuration;
|
DataTypes.ReserveConfigurationMap memory reserveConfiguration = reserve.configuration;
|
||||||
(bool isActive, bool isFrozen, , , bool isPaused) = reserveConfiguration.getFlagsMemory();
|
(bool isActive, bool isFrozen, , , bool isPaused) = reserveConfiguration.getFlagsMemory();
|
||||||
(, , , uint256 reserveDecimals, ) = reserveConfiguration.getParamsMemory();
|
(, , , uint256 reserveDecimals, ) = reserveConfiguration.getParamsMemory();
|
||||||
|
@ -453,7 +453,7 @@ library ValidationLogic {
|
||||||
mapping(uint256 => address) storage reserves,
|
mapping(uint256 => address) storage reserves,
|
||||||
uint256 reservesCount,
|
uint256 reservesCount,
|
||||||
address oracle
|
address oracle
|
||||||
) internal view {
|
) external view {
|
||||||
(, , , , uint256 healthFactor) =
|
(, , , , uint256 healthFactor) =
|
||||||
GenericLogic.calculateUserAccountData(
|
GenericLogic.calculateUserAccountData(
|
||||||
from,
|
from,
|
||||||
|
@ -474,7 +474,7 @@ library ValidationLogic {
|
||||||
* @dev Validates a transfer action
|
* @dev Validates a transfer action
|
||||||
* @param reserve The reserve object
|
* @param reserve The reserve object
|
||||||
*/
|
*/
|
||||||
function validateTransfer(DataTypes.ReserveData storage reserve) internal view {
|
function validateTransfer(DataTypes.ReserveData storage reserve) external view {
|
||||||
require(!reserve.configuration.getPaused(), Errors.VL_RESERVE_PAUSED);
|
require(!reserve.configuration.getPaused(), Errors.VL_RESERVE_PAUSED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user