From b919886916236ae9169d829c9f24eb030fbc7b86 Mon Sep 17 00:00:00 2001 From: David Racero Date: Wed, 14 Oct 2020 09:53:48 +0200 Subject: [PATCH] Remove unused imports --- contracts/flashloan/base/FlashLoanReceiverBase.sol | 1 - contracts/interfaces/ILendingPool.sol | 1 - contracts/lendingpool/LendingPoolCollateralManager.sol | 1 - .../libraries/configuration/ReserveConfiguration.sol | 6 ------ contracts/libraries/configuration/UserConfiguration.sol | 8 +------- contracts/libraries/logic/ReserveLogic.sol | 1 - contracts/libraries/logic/ValidationLogic.sol | 1 - contracts/mocks/upgradeability/MockStableDebtToken.sol | 1 - contracts/mocks/upgradeability/MockVariableDebtToken.sol | 1 - contracts/tokenization/StableDebtToken.sol | 3 --- contracts/tokenization/VariableDebtToken.sol | 3 --- contracts/tokenization/base/DebtTokenBase.sol | 3 --- 12 files changed, 1 insertion(+), 29 deletions(-) diff --git a/contracts/flashloan/base/FlashLoanReceiverBase.sol b/contracts/flashloan/base/FlashLoanReceiverBase.sol index a648508c..a9b3e2a9 100644 --- a/contracts/flashloan/base/FlashLoanReceiverBase.sol +++ b/contracts/flashloan/base/FlashLoanReceiverBase.sol @@ -6,7 +6,6 @@ import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import {IFlashLoanReceiver} from '../interfaces/IFlashLoanReceiver.sol'; import {ILendingPoolAddressesProvider} from '../../interfaces/ILendingPoolAddressesProvider.sol'; import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol'; -import '@nomiclabs/buidler/console.sol'; abstract contract FlashLoanReceiverBase is IFlashLoanReceiver { using SafeERC20 for IERC20; diff --git a/contracts/interfaces/ILendingPool.sol b/contracts/interfaces/ILendingPool.sol index 3fc461b6..f1eed634 100644 --- a/contracts/interfaces/ILendingPool.sol +++ b/contracts/interfaces/ILendingPool.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: agpl-3.0 pragma solidity ^0.6.8; -import {LendingPoolAddressesProvider} from '../configuration/LendingPoolAddressesProvider.sol'; import {ReserveConfiguration} from '../libraries/configuration/ReserveConfiguration.sol'; pragma experimental ABIEncoderV2; diff --git a/contracts/lendingpool/LendingPoolCollateralManager.sol b/contracts/lendingpool/LendingPoolCollateralManager.sol index 356ce1a4..3e957f28 100644 --- a/contracts/lendingpool/LendingPoolCollateralManager.sol +++ b/contracts/lendingpool/LendingPoolCollateralManager.sol @@ -9,7 +9,6 @@ import { import {IAToken} from '../tokenization/interfaces/IAToken.sol'; import {IStableDebtToken} from '../tokenization/interfaces/IStableDebtToken.sol'; import {IVariableDebtToken} from '../tokenization/interfaces/IVariableDebtToken.sol'; -import {DebtTokenBase} from '../tokenization/base/DebtTokenBase.sol'; import {IPriceOracleGetter} from '../interfaces/IPriceOracleGetter.sol'; import {GenericLogic} from '../libraries/logic/GenericLogic.sol'; import {ReserveLogic} from '../libraries/logic/ReserveLogic.sol'; diff --git a/contracts/libraries/configuration/ReserveConfiguration.sol b/contracts/libraries/configuration/ReserveConfiguration.sol index 5053c0fd..c0b89eb3 100644 --- a/contracts/libraries/configuration/ReserveConfiguration.sol +++ b/contracts/libraries/configuration/ReserveConfiguration.sol @@ -1,12 +1,6 @@ // SPDX-License-Identifier: agpl-3.0 pragma solidity ^0.6.8; -import {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol'; -import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; -import {ReserveLogic} from '../logic/ReserveLogic.sol'; -import {WadRayMath} from '../math/WadRayMath.sol'; -import {IPriceOracleGetter} from '../../interfaces/IPriceOracleGetter.sol'; - /** * @title ReserveConfiguration library * @author Aave diff --git a/contracts/libraries/configuration/UserConfiguration.sol b/contracts/libraries/configuration/UserConfiguration.sol index 3d346fbc..71c28f0e 100644 --- a/contracts/libraries/configuration/UserConfiguration.sol +++ b/contracts/libraries/configuration/UserConfiguration.sol @@ -1,19 +1,13 @@ // SPDX-License-Identifier: agpl-3.0 pragma solidity ^0.6.8; -import {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol'; -import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; -import {WadRayMath} from '../math/WadRayMath.sol'; -import {IPriceOracleGetter} from '../../interfaces/IPriceOracleGetter.sol'; - /** * @title UserConfiguration library * @author Aave * @notice Implements the bitmap logic to handle the user configuration */ library UserConfiguration { - uint256 - internal constant BORROWING_MASK = 0x5555555555555555555555555555555555555555555555555555555555555555; + uint256 internal constant BORROWING_MASK = 0x5555555555555555555555555555555555555555555555555555555555555555; struct Map { uint256 data; diff --git a/contracts/libraries/logic/ReserveLogic.sol b/contracts/libraries/logic/ReserveLogic.sol index 8a3604f7..43f902be 100644 --- a/contracts/libraries/logic/ReserveLogic.sol +++ b/contracts/libraries/logic/ReserveLogic.sol @@ -4,7 +4,6 @@ pragma solidity ^0.6.8; import {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import {MathUtils} from '../math/MathUtils.sol'; -import {IPriceOracleGetter} from '../../interfaces/IPriceOracleGetter.sol'; import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol'; import {IAToken} from '../../tokenization/interfaces/IAToken.sol'; import {IStableDebtToken} from '../../tokenization/interfaces/IStableDebtToken.sol'; diff --git a/contracts/libraries/logic/ValidationLogic.sol b/contracts/libraries/logic/ValidationLogic.sol index ee13232b..d7cb6546 100644 --- a/contracts/libraries/logic/ValidationLogic.sol +++ b/contracts/libraries/logic/ValidationLogic.sol @@ -11,7 +11,6 @@ import {PercentageMath} from '../math/PercentageMath.sol'; import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol'; import {ReserveConfiguration} from '../configuration/ReserveConfiguration.sol'; import {UserConfiguration} from '../configuration/UserConfiguration.sol'; -import {IPriceOracleGetter} from '../../interfaces/IPriceOracleGetter.sol'; import {Errors} from '../helpers/Errors.sol'; import {Helpers} from '../helpers/Helpers.sol'; diff --git a/contracts/mocks/upgradeability/MockStableDebtToken.sol b/contracts/mocks/upgradeability/MockStableDebtToken.sol index 6f44cf07..13a42bde 100644 --- a/contracts/mocks/upgradeability/MockStableDebtToken.sol +++ b/contracts/mocks/upgradeability/MockStableDebtToken.sol @@ -2,7 +2,6 @@ pragma solidity ^0.6.8; import {StableDebtToken} from '../../tokenization/StableDebtToken.sol'; -import {LendingPool} from '../../lendingpool/LendingPool.sol'; contract MockStableDebtToken is StableDebtToken { constructor( diff --git a/contracts/mocks/upgradeability/MockVariableDebtToken.sol b/contracts/mocks/upgradeability/MockVariableDebtToken.sol index 4e4a7ffa..2bae798f 100644 --- a/contracts/mocks/upgradeability/MockVariableDebtToken.sol +++ b/contracts/mocks/upgradeability/MockVariableDebtToken.sol @@ -2,7 +2,6 @@ pragma solidity ^0.6.8; import {VariableDebtToken} from '../../tokenization/VariableDebtToken.sol'; -import {LendingPool} from '../../lendingpool/LendingPool.sol'; contract MockVariableDebtToken is VariableDebtToken { constructor( diff --git a/contracts/tokenization/StableDebtToken.sol b/contracts/tokenization/StableDebtToken.sol index c1e981e6..d24228ea 100644 --- a/contracts/tokenization/StableDebtToken.sol +++ b/contracts/tokenization/StableDebtToken.sol @@ -1,9 +1,6 @@ // SPDX-License-Identifier: agpl-3.0 pragma solidity ^0.6.8; -import {Context} from '@openzeppelin/contracts/GSN/Context.sol'; -import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; -import {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol'; import {DebtTokenBase} from './base/DebtTokenBase.sol'; import {MathUtils} from '../libraries/math/MathUtils.sol'; import {WadRayMath} from '../libraries/math/WadRayMath.sol'; diff --git a/contracts/tokenization/VariableDebtToken.sol b/contracts/tokenization/VariableDebtToken.sol index f8e48af9..3da59f9e 100644 --- a/contracts/tokenization/VariableDebtToken.sol +++ b/contracts/tokenization/VariableDebtToken.sol @@ -1,9 +1,6 @@ // SPDX-License-Identifier: agpl-3.0 pragma solidity ^0.6.8; -import {Context} from '@openzeppelin/contracts/GSN/Context.sol'; -import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; -import {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol'; import {DebtTokenBase} from './base/DebtTokenBase.sol'; import {WadRayMath} from '../libraries/math/WadRayMath.sol'; import {IVariableDebtToken} from './interfaces/IVariableDebtToken.sol'; diff --git a/contracts/tokenization/base/DebtTokenBase.sol b/contracts/tokenization/base/DebtTokenBase.sol index 36d99d8e..31183d13 100644 --- a/contracts/tokenization/base/DebtTokenBase.sol +++ b/contracts/tokenization/base/DebtTokenBase.sol @@ -1,9 +1,6 @@ // SPDX-License-Identifier: agpl-3.0 pragma solidity ^0.6.8; -import {Context} from '@openzeppelin/contracts/GSN/Context.sol'; -import {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol'; -import {ILendingPoolAddressesProvider} from '../../interfaces/ILendingPoolAddressesProvider.sol'; import {ILendingPool} from '../../interfaces/ILendingPool.sol'; import { VersionedInitializable