Merge branch 'master' of gitlab.com:aave-tech/protocol-v2 into 154-updates-for-walletbalalanceprovider-contract

This commit is contained in:
David Racero 2020-11-23 12:04:59 +01:00
commit 98ac879181
91 changed files with 567 additions and 573 deletions

View File

@ -1,4 +1,4 @@
FROM ethereum/solc:0.6.8 as build-deps
FROM ethereum/solc:0.6.12 as build-deps
FROM node:14
COPY --from=build-deps /usr/bin/solc /usr/bin/solc

View File

@ -49,7 +49,7 @@ const getCommonNetworkConfig = (networkName: eEthereumNetwork, networkId: number
const buidlerConfig: any = {
solc: {
version: '0.6.8',
version: '0.6.12',
optimizer: {enabled: true, runs: 200},
evmVersion: 'istanbul',
},

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;
/**
* @dev Collection of functions related to the address type

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.6.8;
pragma solidity 0.6.12;
/*
* @dev Provides information about the current execution context, including the

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {IERC20} from './IERC20.sol';

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.6.8;
pragma solidity 0.6.12;
import {IERC20} from './IERC20.sol';
import {SafeMath} from './SafeMath.sol';

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import './BaseAdminUpgradeabilityProxy.sol';

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import './UpgradeabilityProxy.sol';

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import './Proxy.sol';
import '../contracts/Address.sol';

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import './BaseAdminUpgradeabilityProxy.sol';
import './InitializableUpgradeabilityProxy.sol';

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import './BaseUpgradeabilityProxy.sol';

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import './BaseUpgradeabilityProxy.sol';

View File

@ -1,16 +1,18 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
import {LendingPool} from '../lendingpool/LendingPool.sol';
import {LendingPoolAddressesProvider} from '../configuration/LendingPoolAddressesProvider.sol';
import {LendingPoolConfigurator} from '../lendingpool/LendingPoolConfigurator.sol';
import {AToken} from '../tokenization/AToken.sol';
import {LendingPool} from '../protocol/lendingpool/LendingPool.sol';
import {
LendingPoolAddressesProvider
} from '../protocol/configuration/LendingPoolAddressesProvider.sol';
import {LendingPoolConfigurator} from '../protocol/lendingpool/LendingPoolConfigurator.sol';
import {AToken} from '../protocol/tokenization/AToken.sol';
import {
DefaultReserveInterestRateStrategy
} from '../lendingpool/DefaultReserveInterestRateStrategy.sol';
} from '../protocol/lendingpool/DefaultReserveInterestRateStrategy.sol';
import {Ownable} from '../dependencies/openzeppelin/contracts/Ownable.sol';
import {StringLib} from '../libraries/helpers/StringLib.sol';
import {StringLib} from '../protocol/libraries/helpers/StringLib.sol';
contract ATokensAndRatesHelper is Ownable {
address payable private pool;
@ -34,7 +36,6 @@ contract ATokensAndRatesHelper is Ownable {
uint256[6][] calldata rates,
address incentivesController
) external onlyOwner {
require(tokens.length == symbols.length, 't Arrays not same length');
require(rates.length == symbols.length, 'r Arrays not same length');
for (uint256 i = 0; i < tokens.length; i++) {

View File

@ -1,12 +1,12 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
import {StableDebtToken} from '../tokenization/StableDebtToken.sol';
import {VariableDebtToken} from '../tokenization/VariableDebtToken.sol';
import {StableDebtToken} from '../protocol/tokenization/StableDebtToken.sol';
import {VariableDebtToken} from '../protocol/tokenization/VariableDebtToken.sol';
import {LendingRateOracle} from '../mocks/oracle/LendingRateOracle.sol';
import {Ownable} from '../dependencies/openzeppelin/contracts/Ownable.sol';
import {StringLib} from '../libraries/helpers/StringLib.sol';
import {StringLib} from '../protocol/libraries/helpers/StringLib.sol';
contract StableAndVariableTokensHelper is Ownable {
address payable private pool;

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {SafeMath} from '../../dependencies/openzeppelin/contracts/SafeMath.sol';
import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
/**
* @title IFlashLoanReceiver interface

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
interface IAaveIncentivesController {

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
interface IChainlinkAggregator {
function latestAnswer() external view returns (int256);

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {IERC20} from '../dependencies/openzeppelin/contracts/IERC20.sol';

View File

@ -1,9 +1,9 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {ReserveConfiguration} from '../libraries/configuration/ReserveConfiguration.sol';
import {UserConfiguration} from '../libraries/configuration/UserConfiguration.sol';
import {ReserveLogic} from '../libraries/logic/ReserveLogic.sol';
import {ReserveConfiguration} from '../protocol/libraries/configuration/ReserveConfiguration.sol';
import {UserConfiguration} from '../protocol/libraries/configuration/UserConfiguration.sol';
import {ReserveLogic} from '../protocol/libraries/logic/ReserveLogic.sol';
import {ILendingPoolAddressesProvider} from './ILendingPoolAddressesProvider.sol';
pragma experimental ABIEncoderV2;

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
/**
@title ILendingPoolAddressesProvider interface

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
/**
* @title ILendingPoolAddressesProvider interface

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
/**
* @title ILendingRateOracle interface

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
/************
@title IPriceOracle interface

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
/**
* @title IPriceOracleGetter interface

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
/**
@title IReserveInterestRateStrategyInterface interface

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
interface IUniswapExchange {
event TokenPurchase(

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {Ownable} from '../dependencies/openzeppelin/contracts/Ownable.sol';
import {IERC20} from '../dependencies/openzeppelin/contracts/IERC20.sol';

View File

@ -1,15 +1,15 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
import {ILendingPoolAddressesProvider} from '../interfaces/ILendingPoolAddressesProvider.sol';
import {IERC20Detailed} from '../dependencies/openzeppelin/contracts/IERC20Detailed.sol';
import {ILendingPool} from '../interfaces/ILendingPool.sol';
import {ReserveLogic} from '../libraries/logic/ReserveLogic.sol';
import {ReserveConfiguration} from '../libraries/configuration/ReserveConfiguration.sol';
import {UserConfiguration} from '../libraries/configuration/UserConfiguration.sol';
import {IStableDebtToken} from '../tokenization/interfaces/IStableDebtToken.sol';
import {IVariableDebtToken} from '../tokenization/interfaces/IVariableDebtToken.sol';
import {ReserveLogic} from '../protocol/libraries/logic/ReserveLogic.sol';
import {ReserveConfiguration} from '../protocol/libraries/configuration/ReserveConfiguration.sol';
import {UserConfiguration} from '../protocol/libraries/configuration/UserConfiguration.sol';
import {IStableDebtToken} from '../protocol/tokenization/interfaces/IStableDebtToken.sol';
import {IVariableDebtToken} from '../protocol/tokenization/interfaces/IVariableDebtToken.sol';
contract AaveProtocolDataProvider {
using ReserveConfiguration for ReserveConfiguration.Map;
@ -80,10 +80,8 @@ contract AaveProtocolDataProvider {
bool isFrozen
)
{
ReserveConfiguration.Map memory configuration = ILendingPool(
ADDRESSES_PROVIDER.getLendingPool()
)
.getConfiguration(asset);
ReserveConfiguration.Map memory configuration =
ILendingPool(ADDRESSES_PROVIDER.getLendingPool()).getConfiguration(asset);
(ltv, liquidationThreshold, liquidationBonus, decimals, reserveFactor) = configuration
.getParamsMemory();
@ -110,8 +108,8 @@ contract AaveProtocolDataProvider {
uint40 lastUpdateTimestamp
)
{
ReserveLogic.ReserveData memory reserve = ILendingPool(ADDRESSES_PROVIDER.getLendingPool())
.getReserveData(asset);
ReserveLogic.ReserveData memory reserve =
ILendingPool(ADDRESSES_PROVIDER.getLendingPool()).getReserveData(asset);
return (
IERC20Detailed(asset).balanceOf(reserve.aTokenAddress),
@ -142,11 +140,11 @@ contract AaveProtocolDataProvider {
bool usageAsCollateralEnabled
)
{
ReserveLogic.ReserveData memory reserve = ILendingPool(ADDRESSES_PROVIDER.getLendingPool())
.getReserveData(asset);
ReserveLogic.ReserveData memory reserve =
ILendingPool(ADDRESSES_PROVIDER.getLendingPool()).getReserveData(asset);
UserConfiguration.Map memory userConfig = ILendingPool(ADDRESSES_PROVIDER.getLendingPool())
.getUserConfiguration(user);
UserConfiguration.Map memory userConfig =
ILendingPool(ADDRESSES_PROVIDER.getLendingPool()).getUserConfiguration(user);
currentATokenBalance = IERC20Detailed(reserve.aTokenAddress).balanceOf(user);
currentVariableDebt = IERC20Detailed(reserve.variableDebtTokenAddress).balanceOf(user);
@ -170,8 +168,8 @@ contract AaveProtocolDataProvider {
address variableDebtTokenAddress
)
{
ReserveLogic.ReserveData memory reserve = ILendingPool(ADDRESSES_PROVIDER.getLendingPool())
.getReserveData(asset);
ReserveLogic.ReserveData memory reserve =
ILendingPool(ADDRESSES_PROVIDER.getLendingPool()).getReserveData(asset);
return (
reserve.aTokenAddress,

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
import {ILendingPoolAddressesProvider} from '../interfaces/ILendingPoolAddressesProvider.sol';
@ -7,17 +7,17 @@ import {IUiPoolDataProvider} from './interfaces/IUiPoolDataProvider.sol';
import {ILendingPool} from '../interfaces/ILendingPool.sol';
import {IERC20Detailed} from '../dependencies/openzeppelin/contracts/IERC20Detailed.sol';
import {IPriceOracleGetter} from '../interfaces/IPriceOracleGetter.sol';
import {IAToken} from '../tokenization/interfaces/IAToken.sol';
import {IVariableDebtToken} from '../tokenization/interfaces/IVariableDebtToken.sol';
import {IStableDebtToken} from '../tokenization/interfaces/IStableDebtToken.sol';
import {IAToken} from '../protocol/tokenization/interfaces/IAToken.sol';
import {IVariableDebtToken} from '../protocol/tokenization/interfaces/IVariableDebtToken.sol';
import {IStableDebtToken} from '../protocol/tokenization/interfaces/IStableDebtToken.sol';
import {WadRayMath} from '../libraries/math/WadRayMath.sol';
import {ReserveLogic} from '../libraries/logic/ReserveLogic.sol';
import {ReserveConfiguration} from '../libraries/configuration/ReserveConfiguration.sol';
import {UserConfiguration} from '../libraries/configuration/UserConfiguration.sol';
import {WadRayMath} from '../protocol/libraries/math/WadRayMath.sol';
import {ReserveLogic} from '../protocol/libraries/logic/ReserveLogic.sol';
import {ReserveConfiguration} from '../protocol/libraries/configuration/ReserveConfiguration.sol';
import {UserConfiguration} from '../protocol/libraries/configuration/UserConfiguration.sol';
import {
DefaultReserveInterestRateStrategy
} from '../lendingpool/DefaultReserveInterestRateStrategy.sol';
} from '../protocol/lendingpool/DefaultReserveInterestRateStrategy.sol';
contract UiPoolDataProvider is IUiPoolDataProvider {
using WadRayMath for uint256;
@ -46,8 +46,8 @@ contract UiPoolDataProvider is IUiPoolDataProvider {
function getReservesData(ILendingPoolAddressesProvider provider, address user)
external
override
view
override
returns (
AggregatedReserveData[] memory,
UserReserveData[] memory,
@ -60,18 +60,16 @@ contract UiPoolDataProvider is IUiPoolDataProvider {
UserConfiguration.Map memory userConfig = lendingPool.getUserConfiguration(user);
AggregatedReserveData[] memory reservesData = new AggregatedReserveData[](reserves.length);
UserReserveData[] memory userReservesData = new UserReserveData[](
user != address(0) ? reserves.length : 0
);
UserReserveData[] memory userReservesData =
new UserReserveData[](user != address(0) ? reserves.length : 0);
for (uint256 i = 0; i < reserves.length; i++) {
AggregatedReserveData memory reserveData = reservesData[i];
reserveData.underlyingAsset = reserves[i];
// reserve current state
ReserveLogic.ReserveData memory baseData = lendingPool.getReserveData(
reserveData.underlyingAsset
);
ReserveLogic.ReserveData memory baseData =
lendingPool.getReserveData(reserveData.underlyingAsset);
reserveData.liquidityIndex = baseData.liquidityIndex;
reserveData.variableBorrowIndex = baseData.variableBorrowIndex;
reserveData.liquidityRate = baseData.currentLiquidityRate;

View File

@ -1,15 +1,15 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
import {IWETH} from './interfaces/IWETH.sol';
import {IWETHGateway} from './interfaces/IWETHGateway.sol';
import {ILendingPool} from '../interfaces/ILendingPool.sol';
import {IAToken} from '../tokenization/interfaces/IAToken.sol';
import {ReserveLogic} from '../libraries/logic/ReserveLogic.sol';
import {ReserveConfiguration} from '../libraries/configuration/ReserveConfiguration.sol';
import {UserConfiguration} from '../libraries/configuration/UserConfiguration.sol';
import {Helpers} from '../libraries/helpers/Helpers.sol';
import {IAToken} from '../protocol/tokenization/interfaces/IAToken.sol';
import {ReserveLogic} from '../protocol/libraries/logic/ReserveLogic.sol';
import {ReserveConfiguration} from '../protocol/libraries/configuration/ReserveConfiguration.sol';
import {UserConfiguration} from '../protocol/libraries/configuration/UserConfiguration.sol';
import {Helpers} from '../protocol/libraries/helpers/Helpers.sol';
import {Ownable} from '../dependencies/openzeppelin/contracts/Ownable.sol';
import {IERC20} from '../dependencies/openzeppelin/contracts/IERC20.sol';
@ -40,7 +40,7 @@ contract WETHGateway is IWETHGateway, Ownable {
* @param onBehalfOf address of the user who will receive the aTokens representing the deposit
* @param referralCode integrators are assigned a referral code and can potentially receive rewards.
**/
function depositETH(address onBehalfOf, uint16 referralCode) external override payable {
function depositETH(address onBehalfOf, uint16 referralCode) external payable override {
WETH.deposit{value: msg.value}();
POOL.deposit(address(WETH), msg.value, onBehalfOf, referralCode);
}
@ -74,16 +74,14 @@ contract WETHGateway is IWETHGateway, Ownable {
uint256 amount,
uint256 rateMode,
address onBehalfOf
) external override payable {
(uint256 stableDebt, uint256 variableDebt) = Helpers.getUserCurrentDebtMemory(
onBehalfOf,
POOL.getReserveData(address(WETH))
);
) external payable override {
(uint256 stableDebt, uint256 variableDebt) =
Helpers.getUserCurrentDebtMemory(onBehalfOf, POOL.getReserveData(address(WETH)));
uint256 paybackAmount = ReserveLogic.InterestRateMode(rateMode) ==
ReserveLogic.InterestRateMode.STABLE
? stableDebt
: variableDebt;
uint256 paybackAmount =
ReserveLogic.InterestRateMode(rateMode) == ReserveLogic.InterestRateMode.STABLE
? stableDebt
: variableDebt;
if (amount < paybackAmount) {
paybackAmount = amount;

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
@ -9,7 +9,7 @@ import {IERC20} from '../dependencies/openzeppelin/contracts/IERC20.sol';
import {ILendingPoolAddressesProvider} from '../interfaces/ILendingPoolAddressesProvider.sol';
import {ILendingPool} from '../interfaces/ILendingPool.sol';
import {SafeERC20} from '../dependencies/openzeppelin/contracts/SafeERC20.sol';
import {ReserveConfiguration} from '../libraries/configuration/ReserveConfiguration.sol';
import {ReserveConfiguration} from '../protocol/libraries/configuration/ReserveConfiguration.sol';
/**
* @title WalletBalanceProvider contract

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
contract IERC20DetailedBytes {
bytes32 public name;

View File

@ -1,9 +1,9 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
import {ILendingPoolAddressesProvider} from '../../interfaces/ILendingPoolAddressesProvider.sol';
import {ReserveLogic} from '../../libraries/logic/ReserveLogic.sol';
import {ReserveLogic} from '../../protocol/libraries/logic/ReserveLogic.sol';
interface IUiPoolDataProvider {
struct AggregatedReserveData {

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
interface IWETH {
function deposit() external payable;

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
interface IWETHGateway {
function depositETH(address onBehalfOf, uint16 referralCode) external payable;

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
contract SelfdestructTransfer {
function destroyAndTransfer(address payable to) external payable {

View File

@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity >=0.4.22 <=0.6.8;
pragma solidity >=0.4.22 <=0.6.12;
contract WETH9 {
string public name = 'Wrapped Ether';

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {SafeMath} from '../../dependencies/openzeppelin/contracts/SafeMath.sol';
import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
contract MockAggregator {
int256 private _latestAnswer;

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
interface ChainlinkUSDETHOracleI {
event AnswerUpdated(int256 indexed current, uint256 indexed answerId);

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
interface GenericOracleI {
// ganache

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
interface IExtendedPriceAggregator {
event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 timestamp);

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {ILendingRateOracle} from '../../interfaces/ILendingRateOracle.sol';
import {Ownable} from '../../dependencies/openzeppelin/contracts/Ownable.sol';

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {IPriceOracle} from '../../interfaces/IPriceOracle.sol';

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {ERC20} from '../../dependencies/openzeppelin/contracts/ERC20.sol';

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {ERC20} from '../../dependencies/openzeppelin/contracts/ERC20.sol';

View File

@ -1,4 +1,4 @@
pragma solidity >=0.4.22 <=0.6.8;
pragma solidity >=0.4.22 <=0.6.12;
import {WETH9} from '../dependencies/weth/WETH9.sol';

View File

@ -1,8 +1,8 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {AToken} from '../../tokenization/AToken.sol';
import {LendingPool} from '../../lendingpool/LendingPool.sol';
import {AToken} from '../../protocol/tokenization/AToken.sol';
import {LendingPool} from '../../protocol/lendingpool/LendingPool.sol';
contract MockAToken is AToken {
constructor(
@ -24,7 +24,7 @@ contract MockAToken is AToken {
)
{}
function getRevision() internal override pure returns (uint256) {
function getRevision() internal pure override returns (uint256) {
return 0x2;
}

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {StableDebtToken} from '../../tokenization/StableDebtToken.sol';
import {StableDebtToken} from '../../protocol/tokenization/StableDebtToken.sol';
contract MockStableDebtToken is StableDebtToken {
constructor(
@ -15,7 +15,7 @@ contract MockStableDebtToken is StableDebtToken {
StableDebtToken(_pool, _underlyingAssetAddress, _tokenName, _tokenSymbol, incentivesController)
{}
function getRevision() internal override pure returns (uint256) {
function getRevision() internal pure override returns (uint256) {
return 0x2;
}
}

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {VariableDebtToken} from '../../tokenization/VariableDebtToken.sol';
import {VariableDebtToken} from '../../protocol/tokenization/VariableDebtToken.sol';
contract MockVariableDebtToken is VariableDebtToken {
constructor(
@ -21,7 +21,7 @@ contract MockVariableDebtToken is VariableDebtToken {
)
{}
function getRevision() internal override pure returns (uint256) {
function getRevision() internal pure override returns (uint256) {
return 0x2;
}
}

View File

@ -1,13 +1,13 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {Ownable} from '../dependencies/openzeppelin/contracts/Ownable.sol';
import {Ownable} from '../../dependencies/openzeppelin/contracts/Ownable.sol';
// Prettier ignore to prevent buidler flatter bug
// prettier-ignore
import {InitializableImmutableAdminUpgradeabilityProxy} from '../libraries/aave-upgradeability/InitializableImmutableAdminUpgradeabilityProxy.sol';
import {ILendingPoolAddressesProvider} from '../interfaces/ILendingPoolAddressesProvider.sol';
import {ILendingPoolAddressesProvider} from '../../interfaces/ILendingPoolAddressesProvider.sol';
/**
* @title LendingPoolAddressesProvider contract
@ -33,10 +33,11 @@ contract LendingPoolAddressesProvider is Ownable, ILendingPoolAddressesProvider
* @param implementationAddress The address of the implementation if we want it covered by a proxy
* address(0) if we don't want a proxy covering
*/
function setAddressAsProxy(
bytes32 id,
address implementationAddress
) external override onlyOwner {
function setAddressAsProxy(bytes32 id, address implementationAddress)
external
override
onlyOwner
{
_updateImpl(id, implementationAddress);
emit AddressSet(id, implementationAddress, true);
}
@ -46,10 +47,7 @@ contract LendingPoolAddressesProvider is Ownable, ILendingPoolAddressesProvider
* @param id The id
* @param newAddress The address to set, pass address(0) if a proxy is needed
*/
function setAddress(
bytes32 id,
address newAddress
) external override onlyOwner {
function setAddress(bytes32 id, address newAddress) external override onlyOwner {
_addresses[id] = newAddress;
emit AddressSet(id, newAddress, false);
}
@ -58,7 +56,7 @@ contract LendingPoolAddressesProvider is Ownable, ILendingPoolAddressesProvider
* @dev Returns an address by id
* @return The address
*/
function getAddress(bytes32 id) public override view returns (address) {
function getAddress(bytes32 id) public view override returns (address) {
return _addresses[id];
}
@ -66,7 +64,7 @@ contract LendingPoolAddressesProvider is Ownable, ILendingPoolAddressesProvider
* @dev returns the address of the LendingPool proxy
* @return the lending pool proxy address
**/
function getLendingPool() external override view returns (address) {
function getLendingPool() external view override returns (address) {
return getAddress(LENDING_POOL);
}
@ -83,7 +81,7 @@ contract LendingPoolAddressesProvider is Ownable, ILendingPoolAddressesProvider
* @dev returns the address of the LendingPoolConfigurator proxy
* @return the lending pool configurator proxy address
**/
function getLendingPoolConfigurator() external override view returns (address) {
function getLendingPoolConfigurator() external view override returns (address) {
return getAddress(LENDING_POOL_CONFIGURATOR);
}
@ -103,7 +101,7 @@ contract LendingPoolAddressesProvider is Ownable, ILendingPoolAddressesProvider
* @return the address of the Lending pool collateral manager
**/
function getLendingPoolCollateralManager() external override view returns (address) {
function getLendingPoolCollateralManager() external view override returns (address) {
return getAddress(LENDING_POOL_COLLATERAL_MANAGER);
}
@ -121,7 +119,7 @@ contract LendingPoolAddressesProvider is Ownable, ILendingPoolAddressesProvider
* hence the upgradable proxy pattern is not used
**/
function getPoolAdmin() external override view returns (address) {
function getPoolAdmin() external view override returns (address) {
return getAddress(POOL_ADMIN);
}
@ -130,7 +128,7 @@ contract LendingPoolAddressesProvider is Ownable, ILendingPoolAddressesProvider
emit ConfigurationAdminUpdated(admin);
}
function getEmergencyAdmin() external override view returns (address) {
function getEmergencyAdmin() external view override returns (address) {
return getAddress(EMERGENCY_ADMIN);
}
@ -139,7 +137,7 @@ contract LendingPoolAddressesProvider is Ownable, ILendingPoolAddressesProvider
emit EmergencyAdminUpdated(emergencyAdmin);
}
function getPriceOracle() external override view returns (address) {
function getPriceOracle() external view override returns (address) {
return getAddress(PRICE_ORACLE);
}
@ -148,7 +146,7 @@ contract LendingPoolAddressesProvider is Ownable, ILendingPoolAddressesProvider
emit PriceOracleUpdated(priceOracle);
}
function getLendingRateOracle() external override view returns (address) {
function getLendingRateOracle() external view override returns (address) {
return getAddress(LENDING_RATE_ORACLE);
}
@ -165,9 +163,8 @@ contract LendingPoolAddressesProvider is Ownable, ILendingPoolAddressesProvider
function _updateImpl(bytes32 id, address newAddress) internal {
address payable proxyAddress = payable(_addresses[id]);
InitializableImmutableAdminUpgradeabilityProxy proxy
= InitializableImmutableAdminUpgradeabilityProxy(proxyAddress);
InitializableImmutableAdminUpgradeabilityProxy proxy =
InitializableImmutableAdminUpgradeabilityProxy(proxyAddress);
bytes memory params = abi.encodeWithSignature('initialize(address)', address(this));
if (proxyAddress == address(0)) {

View File

@ -1,10 +1,10 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {Ownable} from '../dependencies/openzeppelin/contracts/Ownable.sol';
import {Ownable} from '../../dependencies/openzeppelin/contracts/Ownable.sol';
import {
ILendingPoolAddressesProviderRegistry
} from '../interfaces/ILendingPoolAddressesProviderRegistry.sol';
} from '../../interfaces/ILendingPoolAddressesProviderRegistry.sol';
import {Errors} from '../libraries/helpers/Errors.sol';
/**
@ -24,8 +24,8 @@ contract LendingPoolAddressesProviderRegistry is Ownable, ILendingPoolAddressesP
**/
function isAddressesProviderRegistered(address provider)
external
override
view
override
returns (uint256)
{
return _addressesProviders[provider];
@ -35,7 +35,7 @@ contract LendingPoolAddressesProviderRegistry is Ownable, ILendingPoolAddressesP
* @dev returns the list of active addressesProviders
* @return the list of addressesProviders, potentially containing address(0) elements
**/
function getAddressesProvidersList() external override view returns (address[] memory) {
function getAddressesProvidersList() external view override returns (address[] memory) {
address[] memory addressesProvidersList = _addressesProvidersList;
uint256 maxLength = addressesProvidersList.length;
@ -95,8 +95,8 @@ contract LendingPoolAddressesProviderRegistry is Ownable, ILendingPoolAddressesP
*/
function getAddressesProviderIdByAddress(address addressesProvider)
external
override
view
override
returns (uint256)
{
return _addressesProviders[addressesProvider];

View File

@ -1,12 +1,12 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {SafeMath} from '../dependencies/openzeppelin/contracts/SafeMath.sol';
import {IReserveInterestRateStrategy} from '../interfaces/IReserveInterestRateStrategy.sol';
import {SafeMath} from '../../dependencies/openzeppelin/contracts/SafeMath.sol';
import {IReserveInterestRateStrategy} from '../../interfaces/IReserveInterestRateStrategy.sol';
import {WadRayMath} from '../libraries/math/WadRayMath.sol';
import {PercentageMath} from '../libraries/math/PercentageMath.sol';
import {LendingPoolAddressesProvider} from '../configuration/LendingPoolAddressesProvider.sol';
import {ILendingRateOracle} from '../interfaces/ILendingRateOracle.sol';
import {ILendingRateOracle} from '../../interfaces/ILendingRateOracle.sol';
/**
* @title DefaultReserveInterestRateStrategy contract
@ -59,7 +59,6 @@ contract DefaultReserveInterestRateStrategy is IReserveInterestRateStrategy {
uint256 stableRateSlope1,
uint256 stableRateSlope2
) public {
OPTIMAL_UTILIZATION_RATE = optimalUtilizationRate;
EXCESS_UTILIZATION_RATE = WadRayMath.ray().sub(optimalUtilizationRate);
addressesProvider = provider;
@ -90,11 +89,11 @@ contract DefaultReserveInterestRateStrategy is IReserveInterestRateStrategy {
return _stableRateSlope2;
}
function baseVariableBorrowRate() external override view returns (uint256) {
function baseVariableBorrowRate() external view override returns (uint256) {
return _baseVariableBorrowRate;
}
function getMaxVariableBorrowRate() external override view returns (uint256) {
function getMaxVariableBorrowRate() external view override returns (uint256) {
return _baseVariableBorrowRate.add(_variableRateSlope1).add(_variableRateSlope2);
}
@ -127,8 +126,8 @@ contract DefaultReserveInterestRateStrategy is IReserveInterestRateStrategy {
uint256 reserveFactor
)
external
override
view
override
returns (
uint256,
uint256,
@ -142,17 +141,17 @@ contract DefaultReserveInterestRateStrategy is IReserveInterestRateStrategy {
vars.currentStableBorrowRate = 0;
vars.currentLiquidityRate = 0;
uint256 utilizationRate = vars.totalBorrows == 0
? 0
: vars.totalBorrows.rayDiv(availableLiquidity.add(vars.totalBorrows));
uint256 utilizationRate =
vars.totalBorrows == 0
? 0
: vars.totalBorrows.rayDiv(availableLiquidity.add(vars.totalBorrows));
vars.currentStableBorrowRate = ILendingRateOracle(addressesProvider.getLendingRateOracle())
.getMarketBorrowRate(reserve);
if (utilizationRate > OPTIMAL_UTILIZATION_RATE) {
uint256 excessUtilizationRateRatio = utilizationRate.sub(OPTIMAL_UTILIZATION_RATE).rayDiv(
EXCESS_UTILIZATION_RATE
);
uint256 excessUtilizationRateRatio =
utilizationRate.sub(OPTIMAL_UTILIZATION_RATE).rayDiv(EXCESS_UTILIZATION_RATE);
vars.currentStableBorrowRate = vars.currentStableBorrowRate.add(_stableRateSlope1).add(
_stableRateSlope2.rayMul(excessUtilizationRateRatio)
@ -209,9 +208,8 @@ contract DefaultReserveInterestRateStrategy is IReserveInterestRateStrategy {
uint256 weightedStableRate = totalStableDebt.wadToRay().rayMul(currentAverageStableBorrowRate);
uint256 overallBorrowRate = weightedVariableRate.add(weightedStableRate).rayDiv(
totalBorrows.wadToRay()
);
uint256 overallBorrowRate =
weightedVariableRate.add(weightedStableRate).rayDiv(totalBorrows.wadToRay());
return overallBorrowRate;
}

View File

@ -1,11 +1,11 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
import {SafeMath} from '../dependencies/openzeppelin/contracts/SafeMath.sol';
import {IERC20} from '../dependencies/openzeppelin/contracts/IERC20.sol';
import {SafeMath} from '../../dependencies/openzeppelin/contracts/SafeMath.sol';
import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';
import {VersionedInitializable} from '../libraries/aave-upgradeability/VersionedInitializable.sol';
import {ILendingPoolAddressesProvider} from '../interfaces/ILendingPoolAddressesProvider.sol';
import {ILendingPoolAddressesProvider} from '../../interfaces/ILendingPoolAddressesProvider.sol';
import {IAToken} from '../tokenization/interfaces/IAToken.sol';
import {Helpers} from '../libraries/helpers/Helpers.sol';
import {Errors} from '../libraries/helpers/Errors.sol';
@ -19,13 +19,13 @@ import {UserConfiguration} from '../libraries/configuration/UserConfiguration.so
import {IStableDebtToken} from '../tokenization/interfaces/IStableDebtToken.sol';
import {IVariableDebtToken} from '../tokenization/interfaces/IVariableDebtToken.sol';
import {DebtTokenBase} from '../tokenization/base/DebtTokenBase.sol';
import {IFlashLoanReceiver} from '../flashloan/interfaces/IFlashLoanReceiver.sol';
import {IFlashLoanReceiver} from '../../flashloan/interfaces/IFlashLoanReceiver.sol';
import {LendingPoolCollateralManager} from './LendingPoolCollateralManager.sol';
import {IPriceOracleGetter} from '../interfaces/IPriceOracleGetter.sol';
import {SafeERC20} from '../dependencies/openzeppelin/contracts/SafeERC20.sol';
import {ILendingPool} from '../interfaces/ILendingPool.sol';
import {IPriceOracleGetter} from '../../interfaces/IPriceOracleGetter.sol';
import {SafeERC20} from '../../dependencies/openzeppelin/contracts/SafeERC20.sol';
import {ILendingPool} from '../../interfaces/ILendingPool.sol';
import {LendingPoolStorage} from './LendingPoolStorage.sol';
import {Address} from '../dependencies/openzeppelin/contracts/Address.sol';
import {Address} from '../../dependencies/openzeppelin/contracts/Address.sol';
/**
* @title LendingPool contract
@ -81,7 +81,7 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
require(!_paused, Errors.LP_IS_PAUSED);
}
function getRevision() internal override pure returns (uint256) {
function getRevision() internal pure override returns (uint256) {
return LENDINGPOOL_REVISION;
}
@ -188,7 +188,7 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
* @param referralCode a referral code for integrators
* @param onBehalfOf address of the user who will receive the debt. Should be the address of the borrower itself
* calling the function if he wants to borrow against his own collateral, or the address of the credit delegator
* if he has been given credit delegation allowance
* if he has been given credit delegation allowance
**/
function borrow(
address asset,
@ -243,9 +243,8 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
);
//default to max amount
uint256 paybackAmount = interestRateMode == ReserveLogic.InterestRateMode.STABLE
? stableDebt
: variableDebt;
uint256 paybackAmount =
interestRateMode == ReserveLogic.InterestRateMode.STABLE ? stableDebt : variableDebt;
if (amount < paybackAmount) {
paybackAmount = amount;
@ -418,16 +417,17 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
address collateralManager = _addressesProvider.getLendingPoolCollateralManager();
//solium-disable-next-line
(bool success, bytes memory result) = collateralManager.delegatecall(
abi.encodeWithSignature(
'liquidationCall(address,address,address,uint256,bool)',
collateral,
asset,
user,
purchaseAmount,
receiveAToken
)
);
(bool success, bytes memory result) =
collateralManager.delegatecall(
abi.encodeWithSignature(
'liquidationCall(address,address,address,uint256,bool)',
collateral,
asset,
user,
purchaseAmount,
receiveAToken
)
);
require(success, Errors.LP_LIQUIDATION_CALL_FAILED);
(uint256 returnCode, string memory returnMessage) = abi.decode(result, (uint256, string));
@ -551,8 +551,8 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
**/
function getReserveData(address asset)
external
override
view
override
returns (ReserveLogic.ReserveData memory)
{
return _reserves[asset];
@ -570,8 +570,8 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
**/
function getUserAccountData(address user)
external
override
view
override
returns (
uint256 totalCollateralETH,
uint256 totalDebtETH,
@ -610,8 +610,8 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
**/
function getConfiguration(address asset)
external
override
view
override
returns (ReserveConfiguration.Map memory)
{
return _reserves[asset].configuration;
@ -624,8 +624,8 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
**/
function getUserConfiguration(address user)
external
override
view
override
returns (UserConfiguration.Map memory)
{
return _usersConfig[user];
@ -638,9 +638,9 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
*/
function getReserveNormalizedIncome(address asset)
external
view
virtual
override
view
returns (uint256)
{
return _reserves[asset].getNormalizedIncome();
@ -653,8 +653,8 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
*/
function getReserveNormalizedVariableDebt(address asset)
external
override
view
override
returns (uint256)
{
return _reserves[asset].getNormalizedDebt();
@ -663,14 +663,14 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
/**
* @dev Returns if the LendingPool is paused
*/
function paused() external override view returns (bool) {
function paused() external view override returns (bool) {
return _paused;
}
/**
* @dev returns the list of the initialized reserves
**/
function getReservesList() external override view returns (address[] memory) {
function getReservesList() external view override returns (address[] memory) {
address[] memory _activeReserves = new address[](_reservesCount);
for (uint256 i = 0; i < _reservesCount; i++) {
@ -682,7 +682,7 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
/**
* @dev returns the addresses provider
**/
function getAddressesProvider() external override view returns (ILendingPoolAddressesProvider) {
function getAddressesProvider() external view override returns (ILendingPoolAddressesProvider) {
return _addressesProvider;
}
@ -815,9 +815,10 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
address oracle = _addressesProvider.getPriceOracle();
uint256 amountInETH = IPriceOracleGetter(oracle).getAssetPrice(vars.asset).mul(vars.amount).div(
10**reserve.configuration.getDecimals()
);
uint256 amountInETH =
IPriceOracleGetter(oracle).getAssetPrice(vars.asset).mul(vars.amount).div(
10**reserve.configuration.getDecimals()
);
ValidationLogic.validateBorrow(
vars.asset,

View File

@ -1,20 +1,20 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {SafeMath} from '../dependencies/openzeppelin/contracts//SafeMath.sol';
import {IERC20} from '../dependencies/openzeppelin/contracts//IERC20.sol';
import {SafeMath} from '../../dependencies/openzeppelin/contracts//SafeMath.sol';
import {IERC20} from '../../dependencies/openzeppelin/contracts//IERC20.sol';
import {VersionedInitializable} from '../libraries/aave-upgradeability/VersionedInitializable.sol';
import {IAToken} from '../tokenization/interfaces/IAToken.sol';
import {IStableDebtToken} from '../tokenization/interfaces/IStableDebtToken.sol';
import {IVariableDebtToken} from '../tokenization/interfaces/IVariableDebtToken.sol';
import {IPriceOracleGetter} from '../interfaces/IPriceOracleGetter.sol';
import {IPriceOracleGetter} from '../../interfaces/IPriceOracleGetter.sol';
import {GenericLogic} from '../libraries/logic/GenericLogic.sol';
import {ReserveLogic} from '../libraries/logic/ReserveLogic.sol';
import {UserConfiguration} from '../libraries/configuration/UserConfiguration.sol';
import {Helpers} from '../libraries/helpers/Helpers.sol';
import {WadRayMath} from '../libraries/math/WadRayMath.sol';
import {PercentageMath} from '../libraries/math/PercentageMath.sol';
import {SafeERC20} from '../dependencies/openzeppelin/contracts/SafeERC20.sol';
import {SafeERC20} from '../../dependencies/openzeppelin/contracts/SafeERC20.sol';
import {Errors} from '../libraries/helpers/Errors.sol';
import {ValidationLogic} from '../libraries/logic/ValidationLogic.sol';
import {LendingPoolStorage} from './LendingPoolStorage.sol';
@ -98,7 +98,7 @@ contract LendingPoolCollateralManager is VersionedInitializable, LendingPoolStor
* @dev as the contract extends the VersionedInitializable contract to match the state
* of the LendingPool contract, the getRevision() function is needed.
*/
function getRevision() internal override pure returns (uint256) {
function getRevision() internal pure override returns (uint256) {
return 0;
}
@ -186,9 +186,8 @@ contract LendingPoolCollateralManager is VersionedInitializable, LendingPoolStor
//if liquidator reclaims the underlying asset, we make sure there is enough available collateral in the reserve
if (!receiveAToken) {
uint256 currentAvailableCollateral = IERC20(collateral).balanceOf(
address(vars.collateralAtoken)
);
uint256 currentAvailableCollateral =
IERC20(collateral).balanceOf(address(vars.collateralAtoken));
if (currentAvailableCollateral < vars.maxCollateralToLiquidate) {
return (
uint256(Errors.CollateralManagerErrors.NOT_ENOUGH_LIQUIDITY),

View File

@ -1,17 +1,17 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
import {SafeMath} from '../dependencies/openzeppelin/contracts/SafeMath.sol';
import {SafeMath} from '../../dependencies/openzeppelin/contracts/SafeMath.sol';
import {VersionedInitializable} from '../libraries/aave-upgradeability/VersionedInitializable.sol';
import {
InitializableImmutableAdminUpgradeabilityProxy
} from '../libraries/aave-upgradeability/InitializableImmutableAdminUpgradeabilityProxy.sol';
import {ReserveConfiguration} from '../libraries/configuration/ReserveConfiguration.sol';
import {ILendingPoolAddressesProvider} from '../interfaces/ILendingPoolAddressesProvider.sol';
import {ILendingPool} from '../interfaces/ILendingPool.sol';
import {ILendingPoolAddressesProvider} from '../../interfaces/ILendingPoolAddressesProvider.sol';
import {ILendingPool} from '../../interfaces/ILendingPool.sol';
import {ITokenConfiguration} from '../tokenization/interfaces/ITokenConfiguration.sol';
import {IERC20Detailed} from '../dependencies/openzeppelin/contracts/IERC20Detailed.sol';
import {IERC20Detailed} from '../../dependencies/openzeppelin/contracts/IERC20Detailed.sol';
import {Errors} from '../libraries/helpers/Errors.sol';
import {PercentageMath} from '../libraries/math/PercentageMath.sol';
import {ReserveLogic} from '../libraries/logic/ReserveLogic.sol';
@ -105,14 +105,14 @@ contract LendingPoolConfigurator is VersionedInitializable {
* @param asset the address of the reserve
**/
event ReserveUnfrozen(address indexed asset);
/**
* @dev emitted when a reserve factor is updated
* @param asset the address of the reserve
* @param factor the new reserve factor
**/
event ReserveFactorChanged(address indexed asset, uint256 factor);
/**
* @dev emitted when the reserve decimals are updated
* @param asset the address of the reserve
@ -187,7 +187,7 @@ contract LendingPoolConfigurator is VersionedInitializable {
uint256 internal constant CONFIGURATOR_REVISION = 0x3;
function getRevision() internal override pure returns (uint256) {
function getRevision() internal pure override returns (uint256) {
return CONFIGURATOR_REVISION;
}
@ -236,15 +236,11 @@ contract LendingPoolConfigurator is VersionedInitializable {
address aTokenProxyAddress = _initTokenWithProxy(aTokenImpl, underlyingAssetDecimals);
address stableDebtTokenProxyAddress = _initTokenWithProxy(
stableDebtTokenImpl,
underlyingAssetDecimals
);
address stableDebtTokenProxyAddress =
_initTokenWithProxy(stableDebtTokenImpl, underlyingAssetDecimals);
address variableDebtTokenProxyAddress = _initTokenWithProxy(
variableDebtTokenImpl,
underlyingAssetDecimals
);
address variableDebtTokenProxyAddress =
_initTokenWithProxy(variableDebtTokenImpl, underlyingAssetDecimals);
pool.initReserve(
asset,
@ -368,13 +364,16 @@ contract LendingPoolConfigurator is VersionedInitializable {
if (liquidationThreshold != 0) {
//liquidation bonus must be bigger than 100.00%, otherwise the liquidator would receive less
//collateral than needed to cover the debt.
uint256 absoluteBonus = liquidationBonus.sub(PercentageMath.PERCENTAGE_FACTOR, Errors.LPC_INVALID_CONFIGURATION);
uint256 absoluteBonus =
liquidationBonus.sub(PercentageMath.PERCENTAGE_FACTOR, Errors.LPC_INVALID_CONFIGURATION);
require(absoluteBonus > 0, Errors.LPC_INVALID_CONFIGURATION);
//we also need to require that the liq threshold is lower or equal than the liquidation bonus, to ensure that
//there is always enough margin for liquidators to receive the bonus.
require(liquidationThreshold.add(absoluteBonus) <= PercentageMath.PERCENTAGE_FACTOR, Errors.LPC_INVALID_CONFIGURATION);
require(
liquidationThreshold.add(absoluteBonus) <= PercentageMath.PERCENTAGE_FACTOR,
Errors.LPC_INVALID_CONFIGURATION
);
} else {
require(liquidationBonus == 0, Errors.LPC_INVALID_CONFIGURATION);
//if the liquidation threshold is being set to 0,
@ -512,16 +511,16 @@ contract LendingPoolConfigurator is VersionedInitializable {
* @param decimals the decimals of the token
**/
function _initTokenWithProxy(address implementation, uint8 decimals) internal returns (address) {
InitializableImmutableAdminUpgradeabilityProxy proxy =
new InitializableImmutableAdminUpgradeabilityProxy(address(this));
InitializableImmutableAdminUpgradeabilityProxy proxy
= new InitializableImmutableAdminUpgradeabilityProxy(address(this));
bytes memory params = abi.encodeWithSignature(
'initialize(uint8,string,string)',
decimals,
IERC20Detailed(implementation).name(),
IERC20Detailed(implementation).symbol()
);
bytes memory params =
abi.encodeWithSignature(
'initialize(uint8,string,string)',
decimals,
IERC20Detailed(implementation).name(),
IERC20Detailed(implementation).symbol()
);
proxy.initialize(implementation, params);
@ -533,20 +532,20 @@ contract LendingPoolConfigurator is VersionedInitializable {
address proxyAddress,
address implementation
) internal {
InitializableImmutableAdminUpgradeabilityProxy proxy
= InitializableImmutableAdminUpgradeabilityProxy(payable(proxyAddress));
InitializableImmutableAdminUpgradeabilityProxy proxy =
InitializableImmutableAdminUpgradeabilityProxy(payable(proxyAddress));
ReserveConfiguration.Map memory configuration = pool.getConfiguration(asset);
(, , , uint256 decimals, ) = configuration.getParamsMemory();
bytes memory params = abi.encodeWithSignature(
'initialize(uint8,string,string)',
uint8(decimals),
IERC20Detailed(implementation).name(),
IERC20Detailed(implementation).symbol()
);
bytes memory params =
abi.encodeWithSignature(
'initialize(uint8,string,string)',
uint8(decimals),
IERC20Detailed(implementation).name(),
IERC20Detailed(implementation).symbol()
);
proxy.upgradeToAndCall(implementation, params);
}

View File

@ -1,10 +1,10 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {UserConfiguration} from '../libraries/configuration/UserConfiguration.sol';
import {ReserveConfiguration} from '../libraries/configuration/ReserveConfiguration.sol';
import {ReserveLogic} from '../libraries/logic/ReserveLogic.sol';
import {ILendingPoolAddressesProvider} from '../interfaces/ILendingPoolAddressesProvider.sol';
import {ILendingPoolAddressesProvider} from '../../interfaces/ILendingPoolAddressesProvider.sol';
contract LendingPoolStorage {
using ReserveLogic for ReserveLogic.ReserveData;

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import '../../dependencies/openzeppelin/upgradeability/BaseUpgradeabilityProxy.sol';
import '../../../dependencies/openzeppelin/upgradeability/BaseUpgradeabilityProxy.sol';
/**
* @title BaseImmutableAdminUpgradeabilityProxy

View File

@ -1,8 +1,8 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import './BaseImmutableAdminUpgradeabilityProxy.sol';
import '../../dependencies/openzeppelin/upgradeability/InitializableUpgradeabilityProxy.sol';
import '../../../dependencies/openzeppelin/upgradeability/InitializableUpgradeabilityProxy.sol';
/**
* @title InitializableAdminUpgradeabilityProxy

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;
/**
* @title VersionedInitializable
@ -51,7 +51,7 @@ abstract contract VersionedInitializable {
/// @dev returns the revision number of the contract.
/// Needs to be defined in the inherited class as a constant.
function getRevision() internal virtual pure returns (uint256);
function getRevision() internal pure virtual returns (uint256);
/// @dev Returns true if and only if the function is running in the constructor
function isConstructor() private view returns (bool) {

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {Errors} from '../helpers/Errors.sol';

View File

@ -1,14 +1,16 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {Errors} from '../helpers/Errors.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;

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
/**
* @title Errors library

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {DebtTokenBase} from '../../tokenization/base/DebtTokenBase.sol';
import {ReserveLogic} from '../logic/ReserveLogic.sol';

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
library StringLib {
function concat(string memory a, string memory b) internal pure returns (string memory) {

View File

@ -1,15 +1,15 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
import {SafeMath} from '../../dependencies/openzeppelin/contracts/SafeMath.sol';
import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';
import {SafeMath} from '../../../dependencies/openzeppelin/contracts/SafeMath.sol';
import {IERC20} from '../../../dependencies/openzeppelin/contracts/IERC20.sol';
import {ReserveLogic} from './ReserveLogic.sol';
import {ReserveConfiguration} from '../configuration/ReserveConfiguration.sol';
import {UserConfiguration} from '../configuration/UserConfiguration.sol';
import {WadRayMath} from '../math/WadRayMath.sol';
import {PercentageMath} from '../math/PercentageMath.sol';
import {IPriceOracleGetter} from '../../interfaces/IPriceOracleGetter.sol';
import {IPriceOracleGetter} from '../../../interfaces/IPriceOracleGetter.sol';
/**
* @title GenericLogic library
@ -104,11 +104,12 @@ library GenericLogic {
.sub(vars.amountToDecreaseETH.mul(vars.liquidationThreshold))
.div(vars.collateralBalanceAfterDecrease);
uint256 healthFactorAfterDecrease = calculateHealthFactorFromBalances(
vars.collateralBalanceAfterDecrease,
vars.borrowBalanceETH,
vars.liquidationThresholdAfterDecrease
);
uint256 healthFactorAfterDecrease =
calculateHealthFactorFromBalances(
vars.collateralBalanceAfterDecrease,
vars.borrowBalanceETH,
vars.liquidationThresholdAfterDecrease
);
return healthFactorAfterDecrease >= GenericLogic.HEALTH_FACTOR_LIQUIDATION_THRESHOLD;
}
@ -188,10 +189,8 @@ library GenericLogic {
if (vars.liquidationThreshold != 0 && userConfig.isUsingAsCollateral(vars.i)) {
vars.compoundedLiquidityBalance = IERC20(currentReserve.aTokenAddress).balanceOf(user);
uint256 liquidityBalanceETH = vars
.reserveUnitPrice
.mul(vars.compoundedLiquidityBalance)
.div(vars.tokenUnit);
uint256 liquidityBalanceETH =
vars.reserveUnitPrice.mul(vars.compoundedLiquidityBalance).div(vars.tokenUnit);
vars.totalCollateralBalanceETH = vars.totalCollateralBalanceETH.add(liquidityBalanceETH);

View File

@ -1,15 +1,15 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {SafeMath} from '../../dependencies/openzeppelin/contracts/SafeMath.sol';
import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';
import {SafeMath} from '../../../dependencies/openzeppelin/contracts/SafeMath.sol';
import {IERC20} from '../../../dependencies/openzeppelin/contracts/IERC20.sol';
import {MathUtils} from '../math/MathUtils.sol';
import {SafeERC20} from '../../dependencies/openzeppelin/contracts/SafeERC20.sol';
import {SafeERC20} from '../../../dependencies/openzeppelin/contracts/SafeERC20.sol';
import {IAToken} from '../../tokenization/interfaces/IAToken.sol';
import {IStableDebtToken} from '../../tokenization/interfaces/IStableDebtToken.sol';
import {IVariableDebtToken} from '../../tokenization/interfaces/IVariableDebtToken.sol';
import {ReserveConfiguration} from '../configuration/ReserveConfiguration.sol';
import {IReserveInterestRateStrategy} from '../../interfaces/IReserveInterestRateStrategy.sol';
import {IReserveInterestRateStrategy} from '../../../interfaces/IReserveInterestRateStrategy.sol';
import {WadRayMath} from '../math/WadRayMath.sol';
import {PercentageMath} from '../math/PercentageMath.sol';
import {Errors} from '../helpers/Errors.sol';
@ -89,9 +89,10 @@ library ReserveLogic {
return reserve.liquidityIndex;
}
uint256 cumulated = MathUtils
.calculateLinearInterest(reserve.currentLiquidityRate, timestamp)
.rayMul(reserve.liquidityIndex);
uint256 cumulated =
MathUtils.calculateLinearInterest(reserve.currentLiquidityRate, timestamp).rayMul(
reserve.liquidityIndex
);
return cumulated;
}
@ -112,9 +113,10 @@ library ReserveLogic {
return reserve.variableBorrowIndex;
}
uint256 cumulated = MathUtils
.calculateCompoundedInterest(reserve.currentVariableBorrowRate, timestamp)
.rayMul(reserve.variableBorrowIndex);
uint256 cumulated =
MathUtils.calculateCompoundedInterest(reserve.currentVariableBorrowRate, timestamp).rayMul(
reserve.variableBorrowIndex
);
return cumulated;
}
@ -125,19 +127,20 @@ library ReserveLogic {
* @param reserve the reserve object
**/
function updateState(ReserveData storage reserve) internal {
uint256 scaledVariableDebt = IVariableDebtToken(reserve.variableDebtTokenAddress)
.scaledTotalSupply();
uint256 scaledVariableDebt =
IVariableDebtToken(reserve.variableDebtTokenAddress).scaledTotalSupply();
uint256 previousVariableBorrowIndex = reserve.variableBorrowIndex;
uint256 previousLiquidityIndex = reserve.liquidityIndex;
uint40 lastUpdatedTimestamp = reserve.lastUpdateTimestamp;
(uint256 newLiquidityIndex, uint256 newVariableBorrowIndex) = _updateIndexes(
reserve,
scaledVariableDebt,
previousLiquidityIndex,
previousVariableBorrowIndex,
lastUpdatedTimestamp
);
(uint256 newLiquidityIndex, uint256 newVariableBorrowIndex) =
_updateIndexes(
reserve,
scaledVariableDebt,
previousLiquidityIndex,
previousVariableBorrowIndex,
lastUpdatedTimestamp
);
_mintToTreasury(
reserve,
@ -185,7 +188,7 @@ library ReserveLogic {
address interestRateStrategyAddress
) external {
require(reserve.aTokenAddress == address(0), Errors.RL_RESERVE_ALREADY_INITIALIZED);
reserve.liquidityIndex = uint128(WadRayMath.ray());
reserve.variableBorrowIndex = uint128(WadRayMath.ray());
reserve.aTokenAddress = aTokenAddress;
@ -362,10 +365,8 @@ library ReserveLogic {
//only cumulating if there is any income being produced
if (currentLiquidityRate > 0) {
uint256 cumulatedLiquidityInterest = MathUtils.calculateLinearInterest(
currentLiquidityRate,
timestamp
);
uint256 cumulatedLiquidityInterest =
MathUtils.calculateLinearInterest(currentLiquidityRate, timestamp);
newLiquidityIndex = cumulatedLiquidityInterest.rayMul(liquidityIndex);
require(newLiquidityIndex < type(uint128).max, Errors.RL_LIQUIDITY_INDEX_OVERFLOW);
@ -374,12 +375,13 @@ library ReserveLogic {
//as the liquidity rate might come only from stable rate loans, we need to ensure
//that there is actual variable debt before accumulating
if (scaledVariableDebt != 0) {
uint256 cumulatedVariableBorrowInterest = MathUtils.calculateCompoundedInterest(
reserve.currentVariableBorrowRate,
timestamp
);
uint256 cumulatedVariableBorrowInterest =
MathUtils.calculateCompoundedInterest(reserve.currentVariableBorrowRate, timestamp);
newVariableBorrowIndex = cumulatedVariableBorrowInterest.rayMul(variableBorrowIndex);
require(newVariableBorrowIndex < type(uint128).max, Errors.RL_VARIABLE_BORROW_INDEX_OVERFLOW);
require(
newVariableBorrowIndex < type(uint128).max,
Errors.RL_VARIABLE_BORROW_INDEX_OVERFLOW
);
reserve.variableBorrowIndex = uint128(newVariableBorrowIndex);
}
}

View File

@ -1,19 +1,19 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
import {SafeMath} from '../../dependencies/openzeppelin/contracts/SafeMath.sol';
import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';
import {SafeMath} from '../../../dependencies/openzeppelin/contracts/SafeMath.sol';
import {IERC20} from '../../../dependencies/openzeppelin/contracts/IERC20.sol';
import {ReserveLogic} from './ReserveLogic.sol';
import {GenericLogic} from './GenericLogic.sol';
import {WadRayMath} from '../math/WadRayMath.sol';
import {PercentageMath} from '../math/PercentageMath.sol';
import {SafeERC20} from '../../dependencies/openzeppelin/contracts/SafeERC20.sol';
import {SafeERC20} from '../../../dependencies/openzeppelin/contracts/SafeERC20.sol';
import {ReserveConfiguration} from '../configuration/ReserveConfiguration.sol';
import {UserConfiguration} from '../configuration/UserConfiguration.sol';
import {Errors} from '../helpers/Errors.sol';
import {Helpers} from '../helpers/Helpers.sol';
import {IReserveInterestRateStrategy} from '../../interfaces/IReserveInterestRateStrategy.sol';
import {IReserveInterestRateStrategy} from '../../../interfaces/IReserveInterestRateStrategy.sol';
/**
* @title ReserveLogic library
@ -66,11 +66,10 @@ library ValidationLogic {
uint256 reservesCount,
address oracle
) external view {
require(amount != 0, Errors.VL_INVALID_AMOUNT);
require(amount <= userBalance, Errors.VL_NOT_ENOUGH_AVAILABLE_USER_BALANCE);
(bool isActive,, , ) = reservesData[reserveAddress].configuration.getFlags();
(bool isActive, , , ) = reservesData[reserveAddress].configuration.getFlags();
require(isActive, Errors.VL_NO_ACTIVE_RESERVE);
require(
@ -313,31 +312,24 @@ library ValidationLogic {
address reserveAddress,
IERC20 stableDebtToken,
IERC20 variableDebtToken,
address aTokenAddress) external view {
(bool isActive,,, ) = reserve.configuration.getFlags();
address aTokenAddress
) external view {
(bool isActive, , , ) = reserve.configuration.getFlags();
require(isActive, Errors.VL_NO_ACTIVE_RESERVE);
//if the usage ratio is below 95%, no rebalances are needed
uint256 totalDebt = stableDebtToken
.totalSupply()
.add(variableDebtToken.totalSupply())
.wadToRay();
uint256 totalDebt =
stableDebtToken.totalSupply().add(variableDebtToken.totalSupply()).wadToRay();
uint256 availableLiquidity = IERC20(reserveAddress).balanceOf(aTokenAddress).wadToRay();
uint256 usageRatio = totalDebt == 0
? 0
: totalDebt.rayDiv(availableLiquidity.add(totalDebt));
uint256 usageRatio = totalDebt == 0 ? 0 : totalDebt.rayDiv(availableLiquidity.add(totalDebt));
//if the liquidity rate is below REBALANCE_UP_THRESHOLD of the max variable APR at 95% usage,
//then we allow rebalancing of the stable rate positions.
uint256 currentLiquidityRate = reserve.currentLiquidityRate;
uint256 maxVariableBorrowRate = IReserveInterestRateStrategy(
reserve
.interestRateStrategyAddress
)
.getMaxVariableBorrowRate();
uint256 maxVariableBorrowRate =
IReserveInterestRateStrategy(reserve.interestRateStrategyAddress).getMaxVariableBorrowRate();
require(
usageRatio >= REBALANCE_UP_USAGE_RATIO_THRESHOLD &&
@ -345,7 +337,6 @@ library ValidationLogic {
maxVariableBorrowRate.percentMul(REBALANCE_UP_LIQUIDITY_RATE_THRESHOLD),
Errors.LP_INTEREST_RATE_REBALANCE_CONDITIONS_NOT_MET
);
}
/**
@ -373,16 +364,16 @@ library ValidationLogic {
require(
useAsCollateral ||
GenericLogic.balanceDecreaseAllowed(
reserveAddress,
msg.sender,
underlyingBalance,
reservesData,
userConfig,
reserves,
reservesCount,
oracle
),
GenericLogic.balanceDecreaseAllowed(
reserveAddress,
msg.sender,
underlyingBalance,
reservesData,
userConfig,
reserves,
reservesCount,
oracle
),
Errors.VL_DEPOSIT_ALREADY_IN_USE
);
}
@ -429,8 +420,9 @@ library ValidationLogic {
);
}
bool isCollateralEnabled = collateralReserve.configuration.getLiquidationThreshold() > 0 &&
userConfig.isUsingAsCollateral(collateralReserve.id);
bool isCollateralEnabled =
collateralReserve.configuration.getLiquidationThreshold() > 0 &&
userConfig.isUsingAsCollateral(collateralReserve.id);
//if collateral isn't enabled as collateral by user, it cannot be liquidated
if (!isCollateralEnabled) {
@ -466,14 +458,15 @@ library ValidationLogic {
uint256 reservesCount,
address oracle
) internal view {
(, , , , uint256 healthFactor) = GenericLogic.calculateUserAccountData(
from,
reservesData,
userConfig,
reserves,
reservesCount,
oracle
);
(, , , , uint256 healthFactor) =
GenericLogic.calculateUserAccountData(
from,
reservesData,
userConfig,
reserves,
reservesCount,
oracle
);
require(
healthFactor >= GenericLogic.HEALTH_FACTOR_LIQUIDATION_THRESHOLD,

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {SafeMath} from '../../dependencies/openzeppelin/contracts/SafeMath.sol';
import {SafeMath} from '../../../dependencies/openzeppelin/contracts/SafeMath.sol';
import {WadRayMath} from './WadRayMath.sol';
library MathUtils {

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {Errors} from '../helpers/Errors.sol';

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {Errors} from '../helpers/Errors.sol';

View File

@ -1,14 +1,14 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {IncentivizedERC20} from './IncentivizedERC20.sol';
import {ILendingPool} from '../interfaces/ILendingPool.sol';
import {ILendingPool} from '../../interfaces/ILendingPool.sol';
import {WadRayMath} from '../libraries/math/WadRayMath.sol';
import {Errors} from '../libraries/helpers/Errors.sol';
import {VersionedInitializable} from '../libraries/aave-upgradeability/VersionedInitializable.sol';
import {IAToken} from './interfaces/IAToken.sol';
import {IERC20} from '../dependencies/openzeppelin/contracts/IERC20.sol';
import {SafeERC20} from '../dependencies/openzeppelin/contracts/SafeERC20.sol';
import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';
import {SafeERC20} from '../../dependencies/openzeppelin/contracts/SafeERC20.sol';
/**
* @title Aave ERC20 AToken
@ -21,12 +21,10 @@ contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
using SafeERC20 for IERC20;
bytes public constant EIP712_REVISION = bytes('1');
bytes32 internal constant EIP712_DOMAIN = keccak256(
'EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'
);
bytes32 public constant PERMIT_TYPEHASH = keccak256(
'Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)'
);
bytes32 internal constant EIP712_DOMAIN =
keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)');
bytes32 public constant PERMIT_TYPEHASH =
keccak256('Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)');
uint256 public constant UINT_MAX_VALUE = uint256(-1);
uint256 public constant ATOKEN_REVISION = 0x1;
@ -57,7 +55,7 @@ contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
RESERVE_TREASURY_ADDRESS = reserveTreasuryAddress;
}
function getRevision() internal virtual override pure returns (uint256) {
function getRevision() internal pure virtual override returns (uint256) {
return ATOKEN_REVISION;
}
@ -187,8 +185,8 @@ contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
**/
function balanceOf(address user)
public
override(IncentivizedERC20, IERC20)
view
override(IncentivizedERC20, IERC20)
returns (uint256)
{
return super.balanceOf(user).rayMul(POOL.getReserveNormalizedIncome(UNDERLYING_ASSET_ADDRESS));
@ -200,7 +198,7 @@ contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
* @param user the address of the user
* @return the scaled balance of the user
**/
function scaledBalanceOf(address user) external override view returns (uint256) {
function scaledBalanceOf(address user) external view override returns (uint256) {
return super.balanceOf(user);
}
@ -212,8 +210,8 @@ contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
**/
function getScaledUserBalanceAndSupply(address user)
external
override
view
override
returns (uint256, uint256)
{
return (super.balanceOf(user), super.totalSupply());
@ -225,7 +223,7 @@ contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
* does that too.
* @return the current total supply
**/
function totalSupply() public override(IncentivizedERC20, IERC20) view returns (uint256) {
function totalSupply() public view override(IncentivizedERC20, IERC20) returns (uint256) {
uint256 currentSupplyScaled = super.totalSupply();
if (currentSupplyScaled == 0) {
@ -239,7 +237,7 @@ contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
* @dev Returns the scaled total supply of the variable debt token. Represents sum(borrows/index)
* @return the scaled total supply
**/
function scaledTotalSupply() public virtual override view returns (uint256) {
function scaledTotalSupply() public view virtual override returns (uint256) {
return super.totalSupply();
}
@ -283,13 +281,14 @@ contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
//solium-disable-next-line
require(block.timestamp <= deadline, 'INVALID_EXPIRATION');
uint256 currentValidNonce = _nonces[owner];
bytes32 digest = keccak256(
abi.encodePacked(
'\x19\x01',
DOMAIN_SEPARATOR,
keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, currentValidNonce, deadline))
)
);
bytes32 digest =
keccak256(
abi.encodePacked(
'\x19\x01',
DOMAIN_SEPARATOR,
keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, currentValidNonce, deadline))
)
);
require(owner == ecrecover(digest, v, r, s), 'INVALID_SIGNATURE');
_nonces[owner] = currentValidNonce.add(1);
_approve(owner, spender, value);

View File

@ -1,8 +1,8 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {AToken} from './AToken.sol';
import {ILendingPool} from '../interfaces/ILendingPool.sol';
import {ILendingPool} from '../../interfaces/ILendingPool.sol';
import {Errors} from '../libraries/helpers/Errors.sol';
/**

View File

@ -1,11 +1,11 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;
import {Context} from '../dependencies/openzeppelin/contracts/Context.sol';
import {IERC20} from '../dependencies/openzeppelin/contracts/IERC20.sol';
import {IERC20Detailed} from '../dependencies/openzeppelin/contracts/IERC20Detailed.sol';
import {SafeMath} from '../dependencies/openzeppelin/contracts/SafeMath.sol';
import {IAaveIncentivesController} from '../interfaces/IAaveIncentivesController.sol';
import {Context} from '../../dependencies/openzeppelin/contracts/Context.sol';
import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';
import {IERC20Detailed} from '../../dependencies/openzeppelin/contracts/IERC20Detailed.sol';
import {SafeMath} from '../../dependencies/openzeppelin/contracts/SafeMath.sol';
import {IAaveIncentivesController} from '../../interfaces/IAaveIncentivesController.sol';
/**
* @title ERC20
@ -40,35 +40,35 @@ contract IncentivizedERC20 is Context, IERC20, IERC20Detailed {
/**
* @return the name of the token
**/
function name() public override view returns (string memory) {
function name() public view override returns (string memory) {
return _name;
}
/**
* @return the symbol of the token
**/
function symbol() public override view returns (string memory) {
function symbol() public view override returns (string memory) {
return _symbol;
}
/**
* @return the decimals of the token
**/
function decimals() public override view returns (uint8) {
function decimals() public view override returns (uint8) {
return _decimals;
}
/**
* @return the total supply of the token
**/
function totalSupply() public virtual override view returns (uint256) {
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @return the balance of the token
**/
function balanceOf(address account) public virtual override view returns (uint256) {
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
@ -92,9 +92,9 @@ contract IncentivizedERC20 is Context, IERC20, IERC20Detailed {
**/
function allowance(address owner, address spender)
public
view
virtual
override
view
returns (uint256)
{
return _allowances[owner][spender];

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {DebtTokenBase} from './base/DebtTokenBase.sol';
import {MathUtils} from '../libraries/math/MathUtils.sol';
@ -34,7 +34,7 @@ contract StableDebtToken is IStableDebtToken, DebtTokenBase {
* @dev gets the revision of the stable debt token implementation
* @return the debt token implementation revision
**/
function getRevision() internal virtual override pure returns (uint256) {
function getRevision() internal pure virtual override returns (uint256) {
return DEBT_TOKEN_REVISION;
}
@ -42,7 +42,7 @@ contract StableDebtToken is IStableDebtToken, DebtTokenBase {
* @dev returns the average stable rate across all the stable rate debt
* @return the average stable rate
**/
function getAverageStableRate() external virtual override view returns (uint256) {
function getAverageStableRate() external view virtual override returns (uint256) {
return _avgStableRate;
}
@ -50,7 +50,7 @@ contract StableDebtToken is IStableDebtToken, DebtTokenBase {
* @dev returns the timestamp of the last user action
* @return the last update timestamp
**/
function getUserLastUpdated(address user) external virtual override view returns (uint40) {
function getUserLastUpdated(address user) external view virtual override returns (uint40) {
return _timestamps[user];
}
@ -59,7 +59,7 @@ contract StableDebtToken is IStableDebtToken, DebtTokenBase {
* @param user the address of the user
* @return the stable rate of user
**/
function getUserStableRate(address user) external virtual override view returns (uint256) {
function getUserStableRate(address user) external view virtual override returns (uint256) {
return _usersStableRate[user];
}
@ -67,16 +67,14 @@ contract StableDebtToken is IStableDebtToken, DebtTokenBase {
* @dev calculates the current user debt balance
* @return the accumulated debt of the user
**/
function balanceOf(address account) public virtual override view returns (uint256) {
function balanceOf(address account) public view virtual override returns (uint256) {
uint256 accountBalance = super.balanceOf(account);
uint256 stableRate = _usersStableRate[account];
if (accountBalance == 0) {
return 0;
}
uint256 cumulatedInterest = MathUtils.calculateCompoundedInterest(
stableRate,
_timestamps[account]
);
uint256 cumulatedInterest =
MathUtils.calculateCompoundedInterest(stableRate, _timestamps[account]);
return accountBalance.rayMul(cumulatedInterest);
}
@ -248,8 +246,8 @@ contract StableDebtToken is IStableDebtToken, DebtTokenBase {
**/
function getSupplyData()
public
override
view
override
returns (
uint256,
uint256,
@ -264,7 +262,7 @@ contract StableDebtToken is IStableDebtToken, DebtTokenBase {
/**
* @dev returns the the total supply and the average stable rate
**/
function getTotalSupplyAndAvgRate() public override view returns (uint256, uint256) {
function getTotalSupplyAndAvgRate() public view override returns (uint256, uint256) {
uint256 avgRate = _avgStableRate;
return (_calcTotalSupply(avgRate), avgRate);
}
@ -272,14 +270,14 @@ contract StableDebtToken is IStableDebtToken, DebtTokenBase {
/**
* @dev returns the total supply
**/
function totalSupply() public override view returns (uint256) {
function totalSupply() public view override returns (uint256) {
return _calcTotalSupply(_avgStableRate);
}
/**
* @dev returns the timestamp at which the total supply was updated
**/
function getTotalSupplyLastUpdated() public override view returns (uint40) {
function getTotalSupplyLastUpdated() public view override returns (uint40) {
return _totalSupplyTimestamp;
}
@ -288,7 +286,7 @@ contract StableDebtToken is IStableDebtToken, DebtTokenBase {
* @param user the user
* @return The debt balance of the user since the last burn/mint action
**/
function principalBalanceOf(address user) external virtual override view returns (uint256) {
function principalBalanceOf(address user) external view virtual override returns (uint256) {
return super.balanceOf(user);
}
@ -297,17 +295,15 @@ contract StableDebtToken is IStableDebtToken, DebtTokenBase {
* @param avgRate the average rate at which calculate the total supply
* @return The debt balance of the user since the last burn/mint action
**/
function _calcTotalSupply(uint256 avgRate) internal virtual view returns (uint256) {
function _calcTotalSupply(uint256 avgRate) internal view virtual returns (uint256) {
uint256 principalSupply = super.totalSupply();
if (principalSupply == 0) {
return 0;
}
uint256 cumulatedInterest = MathUtils.calculateCompoundedInterest(
avgRate,
_totalSupplyTimestamp
);
uint256 cumulatedInterest =
MathUtils.calculateCompoundedInterest(avgRate, _totalSupplyTimestamp);
return principalSupply.rayMul(cumulatedInterest);
}

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {DebtTokenBase} from './base/DebtTokenBase.sol';
import {WadRayMath} from '../libraries/math/WadRayMath.sol';
@ -28,7 +28,7 @@ contract VariableDebtToken is DebtTokenBase, IVariableDebtToken {
* @dev gets the revision of the stable debt token implementation
* @return the debt token implementation revision
**/
function getRevision() internal virtual override pure returns (uint256) {
function getRevision() internal pure virtual override returns (uint256) {
return DEBT_TOKEN_REVISION;
}
@ -36,7 +36,7 @@ contract VariableDebtToken is DebtTokenBase, IVariableDebtToken {
* @dev calculates the accumulated debt balance of the user
* @return the debt balance of the user
**/
function balanceOf(address user) public virtual override view returns (uint256) {
function balanceOf(address user) public view virtual override returns (uint256) {
uint256 scaledBalance = super.balanceOf(user);
if (scaledBalance == 0) {
@ -98,7 +98,7 @@ contract VariableDebtToken is DebtTokenBase, IVariableDebtToken {
* @dev Returns the principal debt balance of the user from
* @return The debt balance of the user since the last burn/mint action
**/
function scaledBalanceOf(address user) public virtual override view returns (uint256) {
function scaledBalanceOf(address user) public view virtual override returns (uint256) {
return super.balanceOf(user);
}
@ -106,7 +106,7 @@ contract VariableDebtToken is DebtTokenBase, IVariableDebtToken {
* @dev Returns the total supply of the variable debt token. Represents the total debt accrued by the users
* @return the total supply
**/
function totalSupply() public virtual override view returns (uint256) {
function totalSupply() public view virtual override returns (uint256) {
return
super.totalSupply().rayMul(POOL.getReserveNormalizedVariableDebt(UNDERLYING_ASSET_ADDRESS));
}
@ -115,7 +115,7 @@ contract VariableDebtToken is DebtTokenBase, IVariableDebtToken {
* @dev Returns the scaled total supply of the variable debt token. Represents sum(borrows/index)
* @return the scaled total supply
**/
function scaledTotalSupply() public virtual override view returns (uint256) {
function scaledTotalSupply() public view virtual override returns (uint256) {
return super.totalSupply();
}
@ -127,8 +127,8 @@ contract VariableDebtToken is DebtTokenBase, IVariableDebtToken {
**/
function getScaledUserBalanceAndSupply(address user)
external
override
view
override
returns (uint256, uint256)
{
return (super.balanceOf(user), super.totalSupply());

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {ILendingPool} from '../../interfaces/ILendingPool.sol';
import {ILendingPool} from '../../../interfaces/ILendingPool.sol';
import {
VersionedInitializable
} from '../../libraries/aave-upgradeability/VersionedInitializable.sol';
@ -100,9 +100,9 @@ abstract contract DebtTokenBase is IncentivizedERC20, VersionedInitializable {
function allowance(address owner, address spender)
public
view
virtual
override
view
returns (uint256)
{
owner;
@ -154,10 +154,8 @@ abstract contract DebtTokenBase is IncentivizedERC20, VersionedInitializable {
address delegatee,
uint256 amount
) internal {
uint256 newAllowance = _borrowAllowances[delegator][delegatee].sub(
amount,
Errors.BORROW_ALLOWANCE_NOT_ENOUGH
);
uint256 newAllowance =
_borrowAllowances[delegator][delegatee].sub(amount, Errors.BORROW_ALLOWANCE_NOT_ENOUGH);
_borrowAllowances[delegator][delegatee] = newAllowance;

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';
import {IERC20} from '../../../dependencies/openzeppelin/contracts/IERC20.sol';
import {IScaledBalanceToken} from './IScaledBalanceToken.sol';
interface IAToken is IERC20, IScaledBalanceToken {

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
interface IScaledBalanceToken {
/**

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
/**
* @title interface IStableDebtToken

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {IScaledBalanceToken} from './IScaledBalanceToken.sol';

View File

@ -71,7 +71,7 @@ const mainnetFork = MAINNET_FORK
const buidlerConfig: HardhatUserConfig = {
solidity: {
version: '0.6.8',
version: '0.6.12',
settings: {
optimizer: {enabled: true, runs: 200},
evmVersion: 'istanbul',

View File

@ -162,8 +162,8 @@ export const deployAaveLibraries = async (
// libPath example: contracts/libraries/logic/GenericLogic.sol
// libName example: GenericLogic
return {
['__$5201a97c05ba6aa659e2f36a933dd51801$__']: validationLogic.address,
['__$d3b4366daeb9cadc7528af6145b50b2183$__']: reserveLogic.address,
['__$de8c0cf1a7d7c36c802af9a64fb9d86036$__']: validationLogic.address,
['__$22cd43a9dda9ce44e9b92ba393b88fb9ac$__']: reserveLogic.address,
};
};

292
package-lock.json generated
View File

@ -6422,14 +6422,12 @@
"scryptsy": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-2.1.0.tgz",
"integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w==",
"optional": true
"integrity": "sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w=="
},
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"optional": true
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
}
}
},
@ -6449,7 +6447,6 @@
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"optional": true,
"requires": {
"ms": "2.0.0"
}
@ -6457,8 +6454,7 @@
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"optional": true
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
@ -7634,8 +7630,7 @@
"bignumber.js": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz",
"integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==",
"optional": true
"integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA=="
},
"binary-extensions": {
"version": "1.13.1",
@ -7675,7 +7670,6 @@
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz",
"integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==",
"optional": true,
"requires": {
"readable-stream": "^2.3.5",
"safe-buffer": "^5.1.1"
@ -7684,14 +7678,12 @@
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
"optional": true
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"optional": true,
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
@ -7705,8 +7697,7 @@
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"optional": true
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
},
@ -7714,7 +7705,6 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"optional": true,
"requires": {
"safe-buffer": "~5.1.0"
},
@ -7722,8 +7712,7 @@
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"optional": true
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
}
@ -7959,7 +7948,6 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
"integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==",
"optional": true,
"requires": {
"buffer-alloc-unsafe": "^1.1.0",
"buffer-fill": "^1.0.0"
@ -7968,14 +7956,12 @@
"buffer-alloc-unsafe": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz",
"integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==",
"optional": true
"integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg=="
},
"buffer-crc32": {
"version": "0.2.13",
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
"integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=",
"optional": true
"integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI="
},
"buffer-equal": {
"version": "1.0.0",
@ -7985,8 +7971,7 @@
"buffer-fill": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz",
"integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=",
"optional": true
"integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw="
},
"buffer-from": {
"version": "1.1.1",
@ -8320,8 +8305,7 @@
"commander": {
"version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"optional": true
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
},
"component-emitter": {
"version": "1.3.0",
@ -8603,8 +8587,7 @@
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
"optional": true
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
}
}
},
@ -8622,7 +8605,6 @@
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz",
"integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==",
"optional": true,
"requires": {
"file-type": "^5.2.0",
"is-stream": "^1.1.0",
@ -8633,7 +8615,6 @@
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz",
"integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==",
"optional": true,
"requires": {
"decompress-tar": "^4.1.0",
"file-type": "^6.1.0",
@ -8645,8 +8626,7 @@
"file-type": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz",
"integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==",
"optional": true
"integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg=="
}
}
},
@ -8654,7 +8634,6 @@
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz",
"integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==",
"optional": true,
"requires": {
"decompress-tar": "^4.1.1",
"file-type": "^5.2.0",
@ -8665,7 +8644,6 @@
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz",
"integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=",
"optional": true,
"requires": {
"file-type": "^3.8.0",
"get-stream": "^2.2.0",
@ -8676,14 +8654,12 @@
"file-type": {
"version": "3.9.0",
"resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz",
"integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=",
"optional": true
"integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek="
},
"get-stream": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz",
"integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=",
"optional": true,
"requires": {
"object-assign": "^4.0.1",
"pinkie-promise": "^2.0.0"
@ -8692,8 +8668,7 @@
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
"optional": true
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
}
}
},
@ -9529,6 +9504,14 @@
"prr": "~1.0.1",
"semver": "~5.4.1",
"xtend": "~4.0.0"
},
"dependencies": {
"semver": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
"integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==",
"dev": true
}
}
},
"merkle-patricia-tree": {
@ -9918,6 +9901,14 @@
"prr": "~1.0.1",
"semver": "~5.4.1",
"xtend": "~4.0.0"
},
"dependencies": {
"semver": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
"integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==",
"dev": true
}
}
},
"merkle-patricia-tree": {
@ -10209,6 +10200,14 @@
"prr": "~1.0.1",
"semver": "~5.4.1",
"xtend": "~4.0.0"
},
"dependencies": {
"semver": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
"integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==",
"dev": true
}
}
},
"merkle-patricia-tree": {
@ -10460,6 +10459,14 @@
"prr": "~1.0.1",
"semver": "~5.4.1",
"xtend": "~4.0.0"
},
"dependencies": {
"semver": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
"integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==",
"dev": true
}
}
},
"merkle-patricia-tree": {
@ -10841,7 +10848,6 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
"integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=",
"optional": true,
"requires": {
"pend": "~1.2.0"
}
@ -10870,8 +10876,7 @@
"file-type": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz",
"integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=",
"optional": true
"integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY="
},
"file-uri-to-path": {
"version": "1.0.0",
@ -11081,8 +11086,7 @@
"fs-constants": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
"optional": true
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
},
"fs-extra": {
"version": "7.0.1",
@ -11510,7 +11514,6 @@
"version": "3.8.0",
"resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.8.0.tgz",
"integrity": "sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw==",
"optional": true,
"requires": {
"bindings": "^1.5.0",
"bip66": "^1.1.5",
@ -11708,9 +11711,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
"integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
"requires": {
"kind-of": "^6.0.0"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
@ -11755,9 +11755,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
"integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
"requires": {
"kind-of": "^6.0.0"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
@ -11780,8 +11777,7 @@
"integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
"requires": {
"is-accessor-descriptor": "^1.0.0",
"is-data-descriptor": "^1.0.0",
"kind-of": "^6.0.2"
"is-data-descriptor": "^1.0.0"
},
"dependencies": {
"kind-of": {
@ -11847,8 +11843,7 @@
"is-natural-number": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz",
"integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=",
"optional": true
"integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg="
},
"is-negated-glob": {
"version": "1.0.0",
@ -12236,7 +12231,6 @@
"integrity": "sha512-I6Heg70nfF+e5Y3/qfthJFexhRw/Gi3bIymCoXAlijZdAcLaPuWSJs3KXyTYf23ID6g0o2QF62Yh+grOXY3Rig==",
"requires": {
"inherits": "^2.0.1",
"readable-stream": "^2.0.5",
"xtend": "^4.0.0"
},
"dependencies": {
@ -12421,44 +12415,32 @@
"xtend": "^4.0.1"
},
"dependencies": {
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
"dev": true
},
"object-keys": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz",
"integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=",
"dev": true
},
"readable-stream": {
"version": "1.0.34",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
"integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"dev": true,
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
"isarray": "0.0.1",
"string_decoder": "~0.10.x"
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"string_decoder": {
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"dev": true
},
"xtend": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",
"integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=",
"dev": true,
"requires": {
"object-keys": "~0.4.0"
}
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
"dev": true
}
}
},
@ -12623,7 +12605,6 @@
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
"integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==",
"optional": true,
"requires": {
"pify": "^3.0.0"
},
@ -12631,8 +12612,7 @@
"pify": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
"optional": true
"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY="
}
}
},
@ -12737,10 +12717,13 @@
}
},
"async": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=",
"dev": true
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz",
"integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==",
"dev": true,
"requires": {
"lodash": "^4.17.14"
}
},
"ethereumjs-util": {
"version": "5.2.1",
@ -13197,12 +13180,35 @@
"requires": {
"define-properties": "^1.1.3",
"es-abstract": "^1.18.0-next.1"
},
"dependencies": {
"es-abstract": {
"version": "1.18.0-next.1",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
"integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
"dev": true,
"requires": {
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
"has": "^1.0.3",
"has-symbols": "^1.0.1",
"is-callable": "^1.2.2",
"is-negative-zero": "^2.0.0",
"is-regex": "^1.1.1",
"object-inspect": "^1.8.0",
"object-keys": "^1.1.1",
"object.assign": "^4.1.1",
"string.prototype.trimend": "^1.0.1",
"string.prototype.trimstart": "^1.0.1"
}
}
}
},
"object-keys": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
"dev": true
},
"object-visit": {
"version": "1.0.1",
@ -13545,8 +13551,7 @@
"pend": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
"integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=",
"optional": true
"integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA="
},
"performance-now": {
"version": "2.1.0",
@ -14210,7 +14215,6 @@
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-1.2.1.tgz",
"integrity": "sha1-oyJfpLJST4AnAHYeKFW987LZIWM=",
"optional": true,
"requires": {
"pbkdf2": "^3.0.3"
}
@ -14236,7 +14240,6 @@
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz",
"integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==",
"optional": true,
"requires": {
"commander": "^2.8.1"
}
@ -14247,12 +14250,6 @@
"integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==",
"dev": true
},
"semver": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
"integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==",
"dev": true
},
"semver-greatest-satisfied-range": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz",
@ -14709,6 +14706,28 @@
"requires": {
"define-properties": "^1.1.3",
"es-abstract": "^1.18.0-next.0"
},
"dependencies": {
"es-abstract": {
"version": "1.18.0-next.1",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
"integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
"dev": true,
"requires": {
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
"has": "^1.0.3",
"has-symbols": "^1.0.1",
"is-callable": "^1.2.2",
"is-negative-zero": "^2.0.0",
"is-regex": "^1.1.1",
"object-inspect": "^1.8.0",
"object-keys": "^1.1.1",
"object.assign": "^4.1.1",
"string.prototype.trimend": "^1.0.1",
"string.prototype.trimstart": "^1.0.1"
}
}
}
},
"string.prototype.trimend": {
@ -14735,6 +14754,13 @@
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
},
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
},
"strip-ansi": {
@ -14757,7 +14783,6 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz",
"integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==",
"optional": true,
"requires": {
"is-natural-number": "^4.0.1"
}
@ -14962,7 +14987,6 @@
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz",
"integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==",
"optional": true,
"requires": {
"bl": "^1.0.0",
"buffer-alloc": "^1.2.0",
@ -14976,14 +15000,12 @@
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
"optional": true
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"optional": true,
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
@ -14997,14 +15019,12 @@
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"optional": true
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"optional": true,
"requires": {
"safe-buffer": "~5.1.0"
}
@ -15101,8 +15121,7 @@
"to-buffer": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz",
"integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==",
"optional": true
"integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg=="
},
"to-fast-properties": {
"version": "1.0.3",
@ -15268,7 +15287,6 @@
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz",
"integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==",
"optional": true,
"requires": {
"buffer": "^5.2.1",
"through": "^2.3.8"
@ -15775,20 +15793,17 @@
"@types/node": {
"version": "10.17.28",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.28.tgz",
"integrity": "sha512-dzjES1Egb4c1a89C7lKwQh8pwjYmlOAG9dW1pBgxEk57tMrLnssOfEthz8kdkNaBd7lIqQx7APm5+mZ619IiCQ==",
"optional": true
"integrity": "sha512-dzjES1Egb4c1a89C7lKwQh8pwjYmlOAG9dW1pBgxEk57tMrLnssOfEthz8kdkNaBd7lIqQx7APm5+mZ619IiCQ=="
},
"aes-js": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz",
"integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=",
"optional": true
"integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0="
},
"elliptic": {
"version": "6.3.3",
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz",
"integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=",
"optional": true,
"requires": {
"bn.js": "^4.4.0",
"brorand": "^1.0.1",
@ -15817,7 +15832,6 @@
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz",
"integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==",
"optional": true,
"requires": {
"inherits": "^2.0.3",
"minimalistic-assert": "^1.0.0"
@ -15826,26 +15840,22 @@
"js-sha3": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz",
"integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=",
"optional": true
"integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc="
},
"scrypt-js": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz",
"integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=",
"optional": true
"integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q="
},
"setimmediate": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz",
"integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=",
"optional": true
"integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48="
},
"uuid": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz",
"integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=",
"optional": true
"integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w="
}
}
},
@ -15938,9 +15948,9 @@
},
"dependencies": {
"bn.js": {
"version": "4.11.8",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
"integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==",
"version": "4.11.9",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
"integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
"dev": true,
"optional": true
}
@ -16296,6 +16306,14 @@
"prr": "~1.0.1",
"semver": "~5.4.1",
"xtend": "~4.0.0"
},
"dependencies": {
"semver": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
"integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==",
"dev": true
}
}
},
"merkle-patricia-tree": {
@ -16457,9 +16475,9 @@
},
"dependencies": {
"bn.js": {
"version": "4.11.8",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
"integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==",
"version": "4.11.9",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
"integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
"dev": true,
"optional": true
},
@ -16613,8 +16631,7 @@
"xmlhttprequest": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz",
"integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=",
"optional": true
"integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw="
},
"xtend": {
"version": "4.0.2",
@ -16670,7 +16687,6 @@
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
"integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=",
"optional": true,
"requires": {
"buffer-crc32": "~0.2.3",
"fd-slicer": "~1.1.0"

View File

@ -1,4 +1,4 @@
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
import {

View File

@ -1,4 +1,4 @@
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
import {StableDebtToken} from '../../contracts/tokenization/StableDebtToken.sol';
import {IncentivizedERC20} from '../../contracts/tokenization/IncentivizedERC20.sol';

View File

@ -1,4 +1,4 @@
pragma solidity ^0.6.8;
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
import {UserConfiguration} from '../../contracts/libraries/configuration/UserConfiguration.sol';