mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
fixed tests
This commit is contained in:
parent
b888fc12ab
commit
6f5bcddab1
|
@ -11,7 +11,7 @@ usePlugin('buidler-typechain');
|
|||
usePlugin('solidity-coverage');
|
||||
usePlugin('@nomiclabs/buidler-waffle');
|
||||
usePlugin('@nomiclabs/buidler-etherscan');
|
||||
usePlugin('buidler-gas-reporter');
|
||||
//usePlugin('buidler-gas-reporter');
|
||||
|
||||
const SKIP_LOAD = process.env.SKIP_LOAD === 'true';
|
||||
const DEFAULT_BLOCK_GAS_LIMIT = 12000000;
|
||||
|
|
|
@ -26,6 +26,8 @@ import {SafeERC20} from '../dependencies/openzeppelin/contracts/SafeERC20.sol';
|
|||
import {ILendingPool} from '../interfaces/ILendingPool.sol';
|
||||
import {LendingPoolStorage} from './LendingPoolStorage.sol';
|
||||
import {IReserveInterestRateStrategy} from '../interfaces/IReserveInterestRateStrategy.sol';
|
||||
import "@nomiclabs/buidler/console.sol";
|
||||
|
||||
|
||||
/**
|
||||
* @title LendingPool contract
|
||||
|
@ -93,6 +95,7 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
|
|||
address onBehalfOf,
|
||||
uint16 referralCode
|
||||
) external override {
|
||||
console.log("Deposit");
|
||||
_whenNotPaused();
|
||||
ReserveLogic.ReserveData storage reserve = _reserves[asset];
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ import {IERC20Detailed} from '../dependencies/openzeppelin/contracts/IERC20Detai
|
|||
import {Errors} from '../libraries/helpers/Errors.sol';
|
||||
import {PercentageMath} from '../libraries/math/PercentageMath.sol';
|
||||
import {ReserveLogic} from '../libraries/logic/ReserveLogic.sol';
|
||||
import "@nomiclabs/buidler/console.sol";
|
||||
|
||||
/**
|
||||
* @title LendingPoolConfigurator contract
|
||||
|
@ -371,6 +372,7 @@ contract LendingPoolConfigurator is VersionedInitializable {
|
|||
// the reserve is being disabled as collateral. To do so,
|
||||
//we need to ensure no liquidity is deposited
|
||||
if(liquidationThreshold == 0) {
|
||||
console.log("Checking no liquidity for the asset");
|
||||
_checkNoLiquidity(asset);
|
||||
}
|
||||
|
||||
|
@ -432,7 +434,7 @@ contract LendingPoolConfigurator is VersionedInitializable {
|
|||
function deactivateReserve(address asset) external onlyAaveAdmin {
|
||||
|
||||
_checkNoLiquidity(asset);
|
||||
|
||||
|
||||
ReserveConfiguration.Map memory currentConfig = pool.getConfiguration(asset);
|
||||
|
||||
currentConfig.setActive(false);
|
||||
|
@ -617,6 +619,9 @@ contract LendingPoolConfigurator is VersionedInitializable {
|
|||
|
||||
uint256 availableLiquidity = IERC20Detailed(asset).balanceOf(reserveData.aTokenAddress);
|
||||
|
||||
console.log("Available liquidity %s", availableLiquidity);
|
||||
console.log("liq rate %s", reserveData.currentLiquidityRate);
|
||||
|
||||
require(
|
||||
availableLiquidity == 0 && reserveData.currentLiquidityRate == 0,
|
||||
Errors.RESERVE_LIQUIDITY_NOT_0
|
||||
|
|
|
@ -163,25 +163,26 @@
|
|||
},
|
||||
"ReserveLogic": {
|
||||
"buidlerevm": {
|
||||
"address": "0xFAe0fd738dAbc8a0426F47437322b6d026A9FD95",
|
||||
"address": "0x78Ee8Fb9fE5abD5e347Fc94c2fb85596d1f60e3c",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
}
|
||||
},
|
||||
"GenericLogic": {
|
||||
"buidlerevm": {
|
||||
"address": "0x6082731fdAba4761277Fb31299ebC782AD3bCf24",
|
||||
"address": "0x920d847fE49E54C19047ba8bc236C45A8068Bca7",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
}
|
||||
},
|
||||
"ValidationLogic": {
|
||||
"buidlerevm": {
|
||||
"address": "0x8456161947DFc1fC159A0B26c025cD2b4bba0c3e",
|
||||
"address": "0xA4765Ff72A9F3CfE73089bb2c3a41B838DF71574",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
}
|
||||
},
|
||||
"LendingPool": {
|
||||
"buidlerevm": {
|
||||
"address": "0xD9273d497eDBC967F39d419461CfcF382a0A822e"
|
||||
"address": "0x35c1419Da7cf0Ff885B8Ef8EA9242FEF6800c99b",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
}
|
||||
},
|
||||
"LendingPoolConfigurator": {
|
||||
|
|
Loading…
Reference in New Issue
Block a user