mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Added isContract to check asset at LendingPool.initResetve function
This commit is contained in:
parent
74ab2fd126
commit
743eb6ec29
|
@ -25,6 +25,7 @@ import {IPriceOracleGetter} from '../interfaces/IPriceOracleGetter.sol';
|
||||||
import {SafeERC20} from '../dependencies/openzeppelin/contracts/SafeERC20.sol';
|
import {SafeERC20} from '../dependencies/openzeppelin/contracts/SafeERC20.sol';
|
||||||
import {ILendingPool} from '../interfaces/ILendingPool.sol';
|
import {ILendingPool} from '../interfaces/ILendingPool.sol';
|
||||||
import {LendingPoolStorage} from './LendingPoolStorage.sol';
|
import {LendingPoolStorage} from './LendingPoolStorage.sol';
|
||||||
|
import {Address} from '../dependencies/openzeppelin/contracts/Address.sol';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title LendingPool contract
|
* @title LendingPool contract
|
||||||
|
@ -744,6 +745,7 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
|
||||||
address variableDebtAddress,
|
address variableDebtAddress,
|
||||||
address interestRateStrategyAddress
|
address interestRateStrategyAddress
|
||||||
) external override {
|
) external override {
|
||||||
|
require(Address.isContract(asset), Errors.LP_NOT_CONTRACT);
|
||||||
_onlyLendingPoolConfigurator();
|
_onlyLendingPoolConfigurator();
|
||||||
_reserves[asset].init(
|
_reserves[asset].init(
|
||||||
aTokenAddress,
|
aTokenAddress,
|
||||||
|
|
|
@ -97,6 +97,7 @@ library Errors {
|
||||||
string public constant VL_INCONSISTENT_FLASHLOAN_PARAMS = '73';
|
string public constant VL_INCONSISTENT_FLASHLOAN_PARAMS = '73';
|
||||||
string public constant LP_INCONSISTENT_PARAMS_LENGTH = '74';
|
string public constant LP_INCONSISTENT_PARAMS_LENGTH = '74';
|
||||||
string public constant UL_INVALID_INDEX = '77';
|
string public constant UL_INVALID_INDEX = '77';
|
||||||
|
string public constant LP_NOT_CONTRACT = '78';
|
||||||
|
|
||||||
enum CollateralManagerErrors {
|
enum CollateralManagerErrors {
|
||||||
NO_ERROR,
|
NO_ERROR,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user