mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Merge branch 'master' into feat/153-improve-docs
This commit is contained in:
commit
0bca8c6519
|
|
@ -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
|
FROM node:14
|
||||||
COPY --from=build-deps /usr/bin/solc /usr/bin/solc
|
COPY --from=build-deps /usr/bin/solc /usr/bin/solc
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ const getCommonNetworkConfig = (networkName: eEthereumNetwork, networkId: number
|
||||||
|
|
||||||
const buidlerConfig: any = {
|
const buidlerConfig: any = {
|
||||||
solc: {
|
solc: {
|
||||||
version: '0.6.8',
|
version: '0.6.12',
|
||||||
optimizer: {enabled: true, runs: 200},
|
optimizer: {enabled: true, runs: 200},
|
||||||
evmVersion: 'istanbul',
|
evmVersion: 'istanbul',
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// 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';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// 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 {
|
import {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// 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
|
* @dev Collection of functions related to the address type
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
pragma solidity 0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @dev Provides information about the current execution context, including the
|
* @dev Provides information about the current execution context, including the
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// 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.
|
* @dev Interface of the ERC20 standard as defined in the EIP.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import {IERC20} from './IERC20.sol';
|
import {IERC20} from './IERC20.sol';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
pragma solidity 0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import {IERC20} from './IERC20.sol';
|
import {IERC20} from './IERC20.sol';
|
||||||
import {SafeMath} from './SafeMath.sol';
|
import {SafeMath} from './SafeMath.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// 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
|
* @dev Wrappers over Solidity's arithmetic operations with added overflow
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import './BaseAdminUpgradeabilityProxy.sol';
|
import './BaseAdminUpgradeabilityProxy.sol';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import './UpgradeabilityProxy.sol';
|
import './UpgradeabilityProxy.sol';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import './Proxy.sol';
|
import './Proxy.sol';
|
||||||
import '../contracts/Address.sol';
|
import '../contracts/Address.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import './BaseAdminUpgradeabilityProxy.sol';
|
import './BaseAdminUpgradeabilityProxy.sol';
|
||||||
import './InitializableUpgradeabilityProxy.sol';
|
import './InitializableUpgradeabilityProxy.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import './BaseUpgradeabilityProxy.sol';
|
import './BaseUpgradeabilityProxy.sol';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import './BaseUpgradeabilityProxy.sol';
|
import './BaseUpgradeabilityProxy.sol';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import {LendingPool} from '../lendingpool/LendingPool.sol';
|
import {LendingPool} from '../lendingpool/LendingPool.sol';
|
||||||
|
|
@ -31,9 +31,10 @@ contract ATokensAndRatesHelper is Ownable {
|
||||||
function initDeployment(
|
function initDeployment(
|
||||||
address[] calldata tokens,
|
address[] calldata tokens,
|
||||||
string[] calldata symbols,
|
string[] calldata symbols,
|
||||||
uint256[5][] calldata rates,
|
uint256[6][] calldata rates,
|
||||||
address incentivesController
|
address incentivesController
|
||||||
) external onlyOwner {
|
) external onlyOwner {
|
||||||
|
|
||||||
require(tokens.length == symbols.length, 't Arrays not same length');
|
require(tokens.length == symbols.length, 't Arrays not same length');
|
||||||
require(rates.length == symbols.length, 'r Arrays not same length');
|
require(rates.length == symbols.length, 'r Arrays not same length');
|
||||||
for (uint256 i = 0; i < tokens.length; i++) {
|
for (uint256 i = 0; i < tokens.length; i++) {
|
||||||
|
|
@ -55,7 +56,8 @@ contract ATokensAndRatesHelper is Ownable {
|
||||||
rates[i][1],
|
rates[i][1],
|
||||||
rates[i][2],
|
rates[i][2],
|
||||||
rates[i][3],
|
rates[i][3],
|
||||||
rates[i][4]
|
rates[i][4],
|
||||||
|
rates[i][5]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import {StableDebtToken} from '../tokenization/StableDebtToken.sol';
|
import {StableDebtToken} from '../tokenization/StableDebtToken.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
library StringLib {
|
library StringLib {
|
||||||
function concat(string memory a, string memory b) internal pure returns (string memory) {
|
function concat(string memory a, string memory b) internal pure returns (string memory) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// 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 {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';
|
import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title IFlashLoanReceiver interface
|
* @title IFlashLoanReceiver interface
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity 0.6.8;
|
pragma solidity 0.6.12;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
interface IAaveIncentivesController {
|
interface IAaveIncentivesController {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
interface IChainlinkAggregator {
|
interface IChainlinkAggregator {
|
||||||
function latestAnswer() external view returns (int256);
|
function latestAnswer() external view returns (int256);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// 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';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import {ReserveConfiguration} from '../libraries/configuration/ReserveConfiguration.sol';
|
import {ReserveConfiguration} from '../libraries/configuration/ReserveConfiguration.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title LendingPoolAddressesProvider contract
|
* @title LendingPoolAddressesProvider contract
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title LendingPoolAddressesProviderRegistry contract
|
* @title LendingPoolAddressesProviderRegistry contract
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title ILendingRateOracle interface
|
* @title ILendingRateOracle interface
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
/************
|
/************
|
||||||
@title IPriceOracle interface
|
@title IPriceOracle interface
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title IPriceOracleGetter interface
|
* @title IPriceOracleGetter interface
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title IReserveInterestRateStrategyInterface interface
|
* @title IReserveInterestRateStrategyInterface interface
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
interface IUniswapExchange {
|
interface IUniswapExchange {
|
||||||
event TokenPurchase(
|
event TokenPurchase(
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// 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 {IReserveInterestRateStrategy} from '../interfaces/IReserveInterestRateStrategy.sol';
|
import {IReserveInterestRateStrategy} from '../interfaces/IReserveInterestRateStrategy.sol';
|
||||||
|
|
@ -26,14 +26,15 @@ contract DefaultReserveInterestRateStrategy is IReserveInterestRateStrategy {
|
||||||
* @dev this constant represents the utilization rate at which the pool aims to obtain most competitive borrow rates.
|
* @dev this constant represents the utilization rate at which the pool aims to obtain most competitive borrow rates.
|
||||||
* Expressed in ray
|
* Expressed in ray
|
||||||
**/
|
**/
|
||||||
uint256 public constant OPTIMAL_UTILIZATION_RATE = 0.8 * 1e27;
|
uint256 public immutable OPTIMAL_UTILIZATION_RATE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dev This constant represents the excess utilization rate above the optimal. It's always equal to
|
* @dev This constant represents the excess utilization rate above the optimal. It's always equal to
|
||||||
* 1-optimal utilization rate. Added as a constant here for gas optimizations.
|
* 1-optimal utilization rate. Added as a constant here for gas optimizations.
|
||||||
* Expressed in ray
|
* Expressed in ray
|
||||||
**/
|
**/
|
||||||
uint256 public constant EXCESS_UTILIZATION_RATE = 0.2 * 1e27;
|
|
||||||
|
uint256 public immutable EXCESS_UTILIZATION_RATE;
|
||||||
|
|
||||||
ILendingPoolAddressesProvider public immutable addressesProvider;
|
ILendingPoolAddressesProvider public immutable addressesProvider;
|
||||||
|
|
||||||
|
|
@ -54,12 +55,16 @@ contract DefaultReserveInterestRateStrategy is IReserveInterestRateStrategy {
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
ILendingPoolAddressesProvider provider,
|
ILendingPoolAddressesProvider provider,
|
||||||
|
uint256 optimalUtilizationRate,
|
||||||
uint256 baseVariableBorrowRate,
|
uint256 baseVariableBorrowRate,
|
||||||
uint256 variableRateSlope1,
|
uint256 variableRateSlope1,
|
||||||
uint256 variableRateSlope2,
|
uint256 variableRateSlope2,
|
||||||
uint256 stableRateSlope1,
|
uint256 stableRateSlope1,
|
||||||
uint256 stableRateSlope2
|
uint256 stableRateSlope2
|
||||||
) public {
|
) public {
|
||||||
|
|
||||||
|
OPTIMAL_UTILIZATION_RATE = optimalUtilizationRate;
|
||||||
|
EXCESS_UTILIZATION_RATE = WadRayMath.ray().sub(optimalUtilizationRate);
|
||||||
addressesProvider = provider;
|
addressesProvider = provider;
|
||||||
_baseVariableBorrowRate = baseVariableBorrowRate;
|
_baseVariableBorrowRate = baseVariableBorrowRate;
|
||||||
_variableRateSlope1 = variableRateSlope1;
|
_variableRateSlope1 = variableRateSlope1;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import {SafeMath} from '../dependencies/openzeppelin/contracts/SafeMath.sol';
|
import {SafeMath} from '../dependencies/openzeppelin/contracts/SafeMath.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// 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 {IERC20} from '../dependencies/openzeppelin/contracts//IERC20.sol';
|
import {IERC20} from '../dependencies/openzeppelin/contracts//IERC20.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import {SafeMath} from '../dependencies/openzeppelin/contracts/SafeMath.sol';
|
import {SafeMath} from '../dependencies/openzeppelin/contracts/SafeMath.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import {UserConfiguration} from '../libraries/configuration/UserConfiguration.sol';
|
import {UserConfiguration} from '../libraries/configuration/UserConfiguration.sol';
|
||||||
import {ReserveConfiguration} from '../libraries/configuration/ReserveConfiguration.sol';
|
import {ReserveConfiguration} from '../libraries/configuration/ReserveConfiguration.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// 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';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import './BaseImmutableAdminUpgradeabilityProxy.sol';
|
import './BaseImmutableAdminUpgradeabilityProxy.sol';
|
||||||
import '../../dependencies/openzeppelin/upgradeability/InitializableUpgradeabilityProxy.sol';
|
import '../../dependencies/openzeppelin/upgradeability/InitializableUpgradeabilityProxy.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity 0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title VersionedInitializable
|
* @title VersionedInitializable
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import {Errors} from '../helpers/Errors.sol';
|
import {Errors} from '../helpers/Errors.sol';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import {Errors} from '../helpers/Errors.sol';
|
import {Errors} from '../helpers/Errors.sol';
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title Errors library
|
* @title Errors library
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import {DebtTokenBase} from '../../tokenization/base/DebtTokenBase.sol';
|
import {DebtTokenBase} from '../../tokenization/base/DebtTokenBase.sol';
|
||||||
import {ReserveLogic} from '../logic/ReserveLogic.sol';
|
import {ReserveLogic} from '../logic/ReserveLogic.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import {SafeMath} from '../../dependencies/openzeppelin/contracts/SafeMath.sol';
|
import {SafeMath} from '../../dependencies/openzeppelin/contracts/SafeMath.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// 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 {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';
|
import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import {SafeMath} from '../../dependencies/openzeppelin/contracts/SafeMath.sol';
|
import {SafeMath} from '../../dependencies/openzeppelin/contracts/SafeMath.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// 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';
|
import {WadRayMath} from './WadRayMath.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import {Errors} from '../helpers/Errors.sol';
|
import {Errors} from '../helpers/Errors.sol';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import {Errors} from '../helpers/Errors.sol';
|
import {Errors} from '../helpers/Errors.sol';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// 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 {IERC20} from '../dependencies/openzeppelin/contracts/IERC20.sol';
|
import {IERC20} from '../dependencies/openzeppelin/contracts/IERC20.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import {ILendingPoolAddressesProvider} from '../interfaces/ILendingPoolAddressesProvider.sol';
|
import {ILendingPoolAddressesProvider} from '../interfaces/ILendingPoolAddressesProvider.sol';
|
||||||
|
|
@ -10,7 +10,6 @@ import {ReserveConfiguration} from '../libraries/configuration/ReserveConfigurat
|
||||||
import {UserConfiguration} from '../libraries/configuration/UserConfiguration.sol';
|
import {UserConfiguration} from '../libraries/configuration/UserConfiguration.sol';
|
||||||
import {IStableDebtToken} from '../tokenization/interfaces/IStableDebtToken.sol';
|
import {IStableDebtToken} from '../tokenization/interfaces/IStableDebtToken.sol';
|
||||||
import {IVariableDebtToken} from '../tokenization/interfaces/IVariableDebtToken.sol';
|
import {IVariableDebtToken} from '../tokenization/interfaces/IVariableDebtToken.sol';
|
||||||
import 'hardhat/console.sol';
|
|
||||||
|
|
||||||
contract AaveProtocolDataProvider {
|
contract AaveProtocolDataProvider {
|
||||||
using ReserveConfiguration for ReserveConfiguration.Map;
|
using ReserveConfiguration for ReserveConfiguration.Map;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import {ILendingPoolAddressesProvider} from '../interfaces/ILendingPoolAddressesProvider.sol';
|
import {ILendingPoolAddressesProvider} from '../interfaces/ILendingPoolAddressesProvider.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import {IWETH} from './interfaces/IWETH.sol';
|
import {IWETH} from './interfaces/IWETH.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
contract IERC20DetailedBytes {
|
contract IERC20DetailedBytes {
|
||||||
bytes32 public name;
|
bytes32 public name;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import {ILendingPoolAddressesProvider} from '../../interfaces/ILendingPoolAddressesProvider.sol';
|
import {ILendingPoolAddressesProvider} from '../../interfaces/ILendingPoolAddressesProvider.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity >=0.6.2;
|
pragma solidity >=0.6.2;
|
||||||
|
|
||||||
interface IUniswapV2Router01 {
|
interface IUniswapV2Router01 {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity >=0.6.2;
|
pragma solidity >=0.6.2;
|
||||||
|
|
||||||
import './IUniswapV2Router01.sol';
|
import './IUniswapV2Router01.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
interface IWETH {
|
interface IWETH {
|
||||||
function deposit() external payable;
|
function deposit() external payable;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
interface IWETHGateway {
|
interface IWETHGateway {
|
||||||
function depositETH(address onBehalfOf, uint16 referralCode) external payable;
|
function depositETH(address onBehalfOf, uint16 referralCode) external payable;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
contract SelfdestructTransfer {
|
contract SelfdestructTransfer {
|
||||||
function destroyAndTransfer(address payable to) external payable {
|
function destroyAndTransfer(address payable to) external payable {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// 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 {
|
contract WETH9 {
|
||||||
string public name = 'Wrapped Ether';
|
string public name = 'Wrapped Ether';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// 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 {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';
|
import {IERC20} from '../../dependencies/openzeppelin/contracts/IERC20.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
contract MockAggregator {
|
contract MockAggregator {
|
||||||
int256 private _latestAnswer;
|
int256 private _latestAnswer;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
interface ChainlinkUSDETHOracleI {
|
interface ChainlinkUSDETHOracleI {
|
||||||
event AnswerUpdated(int256 indexed current, uint256 indexed answerId);
|
event AnswerUpdated(int256 indexed current, uint256 indexed answerId);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
interface GenericOracleI {
|
interface GenericOracleI {
|
||||||
// ganache
|
// ganache
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
interface IExtendedPriceAggregator {
|
interface IExtendedPriceAggregator {
|
||||||
event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 timestamp);
|
event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 timestamp);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import {ILendingRateOracle} from '../../interfaces/ILendingRateOracle.sol';
|
import {ILendingRateOracle} from '../../interfaces/ILendingRateOracle.sol';
|
||||||
import {Ownable} from '../../dependencies/openzeppelin/contracts/Ownable.sol';
|
import {Ownable} from '../../dependencies/openzeppelin/contracts/Ownable.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import {IPriceOracle} from '../../interfaces/IPriceOracle.sol';
|
import {IPriceOracle} from '../../interfaces/IPriceOracle.sol';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import {ERC20} from '../../dependencies/openzeppelin/contracts/ERC20.sol';
|
import {ERC20} from '../../dependencies/openzeppelin/contracts/ERC20.sol';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import {ERC20} from '../../dependencies/openzeppelin/contracts/ERC20.sol';
|
import {ERC20} from '../../dependencies/openzeppelin/contracts/ERC20.sol';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
pragma solidity >=0.4.22 <=0.6.8;
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
|
pragma solidity >=0.4.22 <=0.6.12;
|
||||||
|
|
||||||
import {WETH9} from '../dependencies/weth/WETH9.sol';
|
import {WETH9} from '../dependencies/weth/WETH9.sol';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import {AToken} from '../../tokenization/AToken.sol';
|
import {AToken} from '../../tokenization/AToken.sol';
|
||||||
import {LendingPool} from '../../lendingpool/LendingPool.sol';
|
import {LendingPool} from '../../lendingpool/LendingPool.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// 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 '../../tokenization/StableDebtToken.sol';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// 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 '../../tokenization/VariableDebtToken.sol';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import {IncentivizedERC20} from './IncentivizedERC20.sol';
|
import {IncentivizedERC20} from './IncentivizedERC20.sol';
|
||||||
import {ILendingPool} from '../interfaces/ILendingPool.sol';
|
import {ILendingPool} from '../interfaces/ILendingPool.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import {AToken} from './AToken.sol';
|
import {AToken} from './AToken.sol';
|
||||||
import {ILendingPool} from '../interfaces/ILendingPool.sol';
|
import {ILendingPool} from '../interfaces/ILendingPool.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// 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 {Context} from '../dependencies/openzeppelin/contracts/Context.sol';
|
||||||
import {IERC20} from '../dependencies/openzeppelin/contracts/IERC20.sol';
|
import {IERC20} from '../dependencies/openzeppelin/contracts/IERC20.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import {DebtTokenBase} from './base/DebtTokenBase.sol';
|
import {DebtTokenBase} from './base/DebtTokenBase.sol';
|
||||||
import {MathUtils} from '../libraries/math/MathUtils.sol';
|
import {MathUtils} from '../libraries/math/MathUtils.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import {DebtTokenBase} from './base/DebtTokenBase.sol';
|
import {DebtTokenBase} from './base/DebtTokenBase.sol';
|
||||||
import {WadRayMath} from '../libraries/math/WadRayMath.sol';
|
import {WadRayMath} from '../libraries/math/WadRayMath.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// 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 {
|
import {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// 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';
|
import {IScaledBalanceToken} from './IScaledBalanceToken.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
interface IScaledBalanceToken {
|
interface IScaledBalanceToken {
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title interface IStableDebtToken
|
* @title interface IStableDebtToken
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6;
|
pragma solidity ^0.6;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
// SPDX-License-Identifier: agpl-3.0
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import {IScaledBalanceToken} from './IScaledBalanceToken.sol';
|
import {IScaledBalanceToken} from './IScaledBalanceToken.sol';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ const mainnetFork = MAINNET_FORK
|
||||||
|
|
||||||
const buidlerConfig: HardhatUserConfig = {
|
const buidlerConfig: HardhatUserConfig = {
|
||||||
solidity: {
|
solidity: {
|
||||||
version: '0.6.8',
|
version: '0.6.12',
|
||||||
settings: {
|
settings: {
|
||||||
optimizer: {enabled: true, runs: 200},
|
optimizer: {enabled: true, runs: 200},
|
||||||
evmVersion: 'istanbul',
|
evmVersion: 'istanbul',
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ export const MAX_UINT_AMOUNT =
|
||||||
export const ONE_YEAR = '31536000';
|
export const ONE_YEAR = '31536000';
|
||||||
export const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
|
export const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
|
||||||
export const ONE_ADDRESS = '0x0000000000000000000000000000000000000001';
|
export const ONE_ADDRESS = '0x0000000000000000000000000000000000000001';
|
||||||
|
|
||||||
// ----------------
|
// ----------------
|
||||||
// PROTOCOL GLOBAL PARAMS
|
// PROTOCOL GLOBAL PARAMS
|
||||||
// ----------------
|
// ----------------
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ export const initReservesByHelper = async (
|
||||||
BigNumberish,
|
BigNumberish,
|
||||||
BigNumberish,
|
BigNumberish,
|
||||||
BigNumberish,
|
BigNumberish,
|
||||||
|
BigNumberish,
|
||||||
BigNumberish
|
BigNumberish
|
||||||
][] = [];
|
][] = [];
|
||||||
const reservesDecimals: string[] = [];
|
const reservesDecimals: string[] = [];
|
||||||
|
|
@ -72,6 +73,7 @@ export const initReservesByHelper = async (
|
||||||
const [
|
const [
|
||||||
,
|
,
|
||||||
{
|
{
|
||||||
|
optimalUtilizationRate,
|
||||||
baseVariableBorrowRate,
|
baseVariableBorrowRate,
|
||||||
variableRateSlope1,
|
variableRateSlope1,
|
||||||
variableRateSlope2,
|
variableRateSlope2,
|
||||||
|
|
@ -83,6 +85,7 @@ export const initReservesByHelper = async (
|
||||||
tokens.push(tokenAddress);
|
tokens.push(tokenAddress);
|
||||||
symbols.push(assetSymbol);
|
symbols.push(assetSymbol);
|
||||||
strategyRates.push([
|
strategyRates.push([
|
||||||
|
optimalUtilizationRate,
|
||||||
baseVariableBorrowRate,
|
baseVariableBorrowRate,
|
||||||
variableRateSlope1,
|
variableRateSlope1,
|
||||||
variableRateSlope2,
|
variableRateSlope2,
|
||||||
|
|
|
||||||
|
|
@ -263,6 +263,7 @@ export enum TokenContractId {
|
||||||
export interface IReserveParams extends IReserveBorrowParams, IReserveCollateralParams {}
|
export interface IReserveParams extends IReserveBorrowParams, IReserveCollateralParams {}
|
||||||
|
|
||||||
export interface IReserveBorrowParams {
|
export interface IReserveBorrowParams {
|
||||||
|
optimalUtilizationRate: string;
|
||||||
baseVariableBorrowRate: string;
|
baseVariableBorrowRate: string;
|
||||||
variableRateSlope1: string;
|
variableRateSlope1: string;
|
||||||
variableRateSlope2: string;
|
variableRateSlope2: string;
|
||||||
|
|
@ -321,12 +322,8 @@ export enum EthereumNetwork {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IProtocolGlobalConfig {
|
export interface IProtocolGlobalConfig {
|
||||||
OptimalUtilizationRate: BigNumber;
|
|
||||||
ExcessUtilizationRate: BigNumber;
|
|
||||||
ApprovalAmountLendingPoolCore: string;
|
|
||||||
TokenDistributorPercentageBase: string;
|
TokenDistributorPercentageBase: string;
|
||||||
MockUsdPriceInWei: string;
|
MockUsdPriceInWei: string;
|
||||||
EthereumAddress: tEthereumAddress;
|
|
||||||
UsdAddress: tEthereumAddress;
|
UsdAddress: tEthereumAddress;
|
||||||
NilAddress: tEthereumAddress;
|
NilAddress: tEthereumAddress;
|
||||||
OneAddress: tEthereumAddress;
|
OneAddress: tEthereumAddress;
|
||||||
|
|
|
||||||
|
|
@ -33,12 +33,8 @@ export const CommonsConfig: ICommonConfiguration = {
|
||||||
ConfigName: 'Commons',
|
ConfigName: 'Commons',
|
||||||
ProviderId: 0,
|
ProviderId: 0,
|
||||||
ProtocolGlobalParams: {
|
ProtocolGlobalParams: {
|
||||||
OptimalUtilizationRate: new BigNumber(0.8).times(RAY),
|
|
||||||
ExcessUtilizationRate: new BigNumber(0.2).times(RAY),
|
|
||||||
ApprovalAmountLendingPoolCore: '1000000000000000000000000000',
|
|
||||||
TokenDistributorPercentageBase: '10000',
|
TokenDistributorPercentageBase: '10000',
|
||||||
MockUsdPriceInWei: '5848466240000000',
|
MockUsdPriceInWei: '5848466240000000',
|
||||||
EthereumAddress: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
|
|
||||||
UsdAddress: '0x10F7Fc1F91Ba351f9C629c5947AD69bD03C05b96',
|
UsdAddress: '0x10F7Fc1F91Ba351f9C629c5947AD69bD03C05b96',
|
||||||
NilAddress: '0x0000000000000000000000000000000000000000',
|
NilAddress: '0x0000000000000000000000000000000000000000',
|
||||||
OneAddress: '0x0000000000000000000000000000000000000001',
|
OneAddress: '0x0000000000000000000000000000000000000001',
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import {oneRay} from '../../helpers/constants';
|
||||||
import {IReserveParams} from '../../helpers/types';
|
import {IReserveParams} from '../../helpers/types';
|
||||||
|
|
||||||
export const strategyBase: IReserveParams = {
|
export const strategyBase: IReserveParams = {
|
||||||
|
optimalUtilizationRate: new BigNumber(0.8).multipliedBy(oneRay).toFixed(),
|
||||||
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
|
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
|
||||||
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
|
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
|
||||||
variableRateSlope2: new BigNumber(3).multipliedBy(oneRay).toFixed(),
|
variableRateSlope2: new BigNumber(3).multipliedBy(oneRay).toFixed(),
|
||||||
|
|
@ -17,6 +18,7 @@ export const strategyBase: IReserveParams = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const stablecoinStrategyBase: IReserveParams = {
|
export const stablecoinStrategyBase: IReserveParams = {
|
||||||
|
optimalUtilizationRate: new BigNumber(0.8).multipliedBy(oneRay).toFixed(),
|
||||||
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
|
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
|
||||||
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
|
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
|
||||||
variableRateSlope2: new BigNumber(1.5).multipliedBy(oneRay).toFixed(),
|
variableRateSlope2: new BigNumber(1.5).multipliedBy(oneRay).toFixed(),
|
||||||
|
|
@ -31,6 +33,7 @@ export const stablecoinStrategyBase: IReserveParams = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const stablecoinStrategyCentralized: IReserveParams = {
|
export const stablecoinStrategyCentralized: IReserveParams = {
|
||||||
|
optimalUtilizationRate: new BigNumber(0.8).multipliedBy(oneRay).toFixed(),
|
||||||
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
|
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
|
||||||
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
|
variableRateSlope1: new BigNumber(0.07).multipliedBy(oneRay).toFixed(),
|
||||||
variableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
|
variableRateSlope2: new BigNumber(0.6).multipliedBy(oneRay).toFixed(),
|
||||||
|
|
@ -117,6 +120,7 @@ export const strategyREN: IReserveParams = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const stablecoinStrategySUSD: IReserveParams = {
|
export const stablecoinStrategySUSD: IReserveParams = {
|
||||||
|
optimalUtilizationRate: new BigNumber(0.8).multipliedBy(oneRay).toFixed(),
|
||||||
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
|
baseVariableBorrowRate: new BigNumber(0.01).multipliedBy(oneRay).toFixed(),
|
||||||
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
|
variableRateSlope1: new BigNumber(0.04).multipliedBy(oneRay).toFixed(),
|
||||||
variableRateSlope2: new BigNumber(1).multipliedBy(oneRay).toFixed(),
|
variableRateSlope2: new BigNumber(1).multipliedBy(oneRay).toFixed(),
|
||||||
|
|
@ -174,6 +178,7 @@ export const stablecoinStrategyUSDT: IReserveParams = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const strategyWBTC: IReserveParams = {
|
export const strategyWBTC: IReserveParams = {
|
||||||
|
optimalUtilizationRate: new BigNumber(0.8).multipliedBy(oneRay).toFixed(),
|
||||||
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
|
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
|
||||||
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
|
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
|
||||||
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
|
variableRateSlope2: new BigNumber(0.5).multipliedBy(oneRay).toFixed(),
|
||||||
|
|
@ -188,6 +193,7 @@ export const strategyWBTC: IReserveParams = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const strategyWETH: IReserveParams = {
|
export const strategyWETH: IReserveParams = {
|
||||||
|
optimalUtilizationRate: new BigNumber(0.8).multipliedBy(oneRay).toFixed(),
|
||||||
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
|
baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),
|
||||||
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
|
variableRateSlope1: new BigNumber(0.08).multipliedBy(oneRay).toFixed(),
|
||||||
variableRateSlope2: new BigNumber(1).multipliedBy(oneRay).toFixed(),
|
variableRateSlope2: new BigNumber(1).multipliedBy(oneRay).toFixed(),
|
||||||
|
|
|
||||||
4902
package-lock.json
generated
4902
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
|
@ -1,4 +1,4 @@
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
|
|
||||||
import {StableDebtToken} from '../../contracts/tokenization/StableDebtToken.sol';
|
import {StableDebtToken} from '../../contracts/tokenization/StableDebtToken.sol';
|
||||||
import {IncentivizedERC20} from '../../contracts/tokenization/IncentivizedERC20.sol';
|
import {IncentivizedERC20} from '../../contracts/tokenization/IncentivizedERC20.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity 0.6.12;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import {UserConfiguration} from '../../contracts/libraries/configuration/UserConfiguration.sol';
|
import {UserConfiguration} from '../../contracts/libraries/configuration/UserConfiguration.sol';
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import {MAX_UINT_AMOUNT, ZERO_ADDRESS} from '../helpers/constants';
|
import {APPROVAL_AMOUNT_LENDING_POOL, MAX_UINT_AMOUNT, ZERO_ADDRESS} from '../helpers/constants';
|
||||||
import {convertToCurrencyDecimals} from '../helpers/contracts-helpers';
|
import {convertToCurrencyDecimals} from '../helpers/contracts-helpers';
|
||||||
import {expect} from 'chai';
|
import {expect} from 'chai';
|
||||||
import {ethers} from 'ethers';
|
import {ethers} from 'ethers';
|
||||||
|
|
@ -6,8 +6,6 @@ import {RateMode, ProtocolErrors} from '../helpers/types';
|
||||||
import {makeSuite, TestEnv} from './helpers/make-suite';
|
import {makeSuite, TestEnv} from './helpers/make-suite';
|
||||||
import {CommonsConfig} from '../markets/aave/commons';
|
import {CommonsConfig} from '../markets/aave/commons';
|
||||||
|
|
||||||
const APPROVAL_AMOUNT_LENDING_POOL =
|
|
||||||
CommonsConfig.ProtocolGlobalParams.ApprovalAmountLendingPoolCore;
|
|
||||||
const AAVE_REFERRAL = CommonsConfig.ProtocolGlobalParams.AaveReferral;
|
const AAVE_REFERRAL = CommonsConfig.ProtocolGlobalParams.AaveReferral;
|
||||||
|
|
||||||
makeSuite('AToken: Transfer', (testEnv: TestEnv) => {
|
makeSuite('AToken: Transfer', (testEnv: TestEnv) => {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,7 @@
|
||||||
import {TestEnv, makeSuite} from './helpers/make-suite';
|
import {TestEnv, makeSuite} from './helpers/make-suite';
|
||||||
import {RAY} from '../helpers/constants';
|
import {APPROVAL_AMOUNT_LENDING_POOL, RAY} from '../helpers/constants';
|
||||||
import {convertToCurrencyDecimals} from '../helpers/contracts-helpers';
|
import {convertToCurrencyDecimals} from '../helpers/contracts-helpers';
|
||||||
import {ProtocolErrors} from '../helpers/types';
|
import {ProtocolErrors} from '../helpers/types';
|
||||||
import {CommonsConfig} from '../markets/aave/commons';
|
|
||||||
|
|
||||||
const APPROVAL_AMOUNT_LENDING_POOL =
|
|
||||||
CommonsConfig.ProtocolGlobalParams.ApprovalAmountLendingPoolCore;
|
|
||||||
|
|
||||||
const {expect} = require('chai');
|
const {expect} = require('chai');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,12 @@
|
||||||
import BigNumber from 'bignumber.js';
|
import BigNumber from 'bignumber.js';
|
||||||
|
|
||||||
import {DRE} from '../helpers/misc-utils';
|
import {DRE} from '../helpers/misc-utils';
|
||||||
import {oneEther} from '../helpers/constants';
|
import {APPROVAL_AMOUNT_LENDING_POOL, oneEther} from '../helpers/constants';
|
||||||
import {convertToCurrencyDecimals} from '../helpers/contracts-helpers';
|
import {convertToCurrencyDecimals} from '../helpers/contracts-helpers';
|
||||||
import {makeSuite} from './helpers/make-suite';
|
import {makeSuite} from './helpers/make-suite';
|
||||||
import {ProtocolErrors, RateMode} from '../helpers/types';
|
import {ProtocolErrors, RateMode} from '../helpers/types';
|
||||||
import {calcExpectedVariableDebtTokenBalance} from './helpers/utils/calculations';
|
import {calcExpectedVariableDebtTokenBalance} from './helpers/utils/calculations';
|
||||||
import {getUserData, getReserveData} from './helpers/utils/helpers';
|
import {getUserData, getReserveData} from './helpers/utils/helpers';
|
||||||
import {CommonsConfig} from '../markets/aave/commons';
|
|
||||||
|
|
||||||
const APPROVAL_AMOUNT_LENDING_POOL =
|
|
||||||
CommonsConfig.ProtocolGlobalParams.ApprovalAmountLendingPoolCore;
|
|
||||||
|
|
||||||
const chai = require('chai');
|
const chai = require('chai');
|
||||||
const {expect} = chai;
|
const {expect} = chai;
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user