Fix merge conflicts. Fix ETH to WETH symbol change

This commit is contained in:
David Racero 2020-10-28 15:49:50 +01:00
commit 0d87292867
21 changed files with 226 additions and 685 deletions

3
.gitignore vendored
View File

@ -9,7 +9,10 @@ build/
.idea
types
deployed-contracts.json
coverage
.coverage_artifacts
.coverage_cache
.coverage_contracts

View File

@ -90,6 +90,16 @@ const buidlerConfig: any = {
balance,
})),
},
buidlerevm_docker: {
hardfork: 'istanbul',
blockGasLimit: 9500000,
gas: 9500000,
gasPrice: 8000000000,
chainId: BUIDLEREVM_CHAINID,
throwOnTransactionFailures: true,
throwOnCallFailures: true,
url: 'http://localhost:8545',
},
ganache: {
url: 'http://ganache:8545',
accounts: {

View File

@ -20,7 +20,7 @@ contract LendingPoolAddressesProviderRegistry is Ownable, ILendingPoolAddressesP
/**
* @dev returns if an addressesProvider is registered or not
* @param provider the addresses provider
* @return true if the addressesProvider is registered, false otherwise
* @return The id of the addresses provider or 0 if the addresses provider not registered
**/
function isAddressesProviderRegistered(address provider)
external
@ -33,7 +33,7 @@ contract LendingPoolAddressesProviderRegistry is Ownable, ILendingPoolAddressesP
/**
* @dev returns the list of active addressesProviders
* @return the list of addressesProviders
* @return the list of addressesProviders, potentially containing address(0) elements
**/
function getAddressesProvidersList() external override view returns (address[] memory) {
address[] memory addressesProvidersList = _addressesProvidersList;
@ -91,7 +91,7 @@ contract LendingPoolAddressesProviderRegistry is Ownable, ILendingPoolAddressesP
/**
* @dev Returns the id on an `addressesProvider` or address(0) if not registered
* @return The id or address(0)
* @return The id or 0 if the addresses provider is not registered
*/
function getAddressesProviderIdByAddress(address addressesProvider)
external

View File

@ -162,7 +162,6 @@ interface ILendingPool {
address indexed reserve,
uint256 liquidityRate,
uint256 stableBorrowRate,
uint256 averageStableBorrowRate,
uint256 variableBorrowRate,
uint256 liquidityIndex,
uint256 variableBorrowIndex

View File

@ -913,13 +913,15 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
* @dev adds a reserve to the array of the _reserves address
**/
function _addReserveToList(address asset) internal {
require(_reservesCount < MAX_NUMBER_RESERVES, Errors.NO_MORE_RESERVES_ALLOWED);
uint256 reservesCount = _reservesCount;
require(reservesCount < MAX_NUMBER_RESERVES, Errors.NO_MORE_RESERVES_ALLOWED);
bool reserveAlreadyAdded = _reserves[asset].id != 0 || _reservesList[0] == asset;
if (!reserveAlreadyAdded) {
_reserves[asset].id = uint8(_reservesCount);
_reservesList[_reservesCount] = asset;
_reserves[asset].id = uint8(reservesCount);
_reservesList[reservesCount] = asset;
_reservesCount++;
}

View File

@ -33,7 +33,7 @@ library GenericLogic {
uint256 borrowBalanceETH;
uint256 avgLiquidationThreshold;
uint256 amountToDecreaseETH;
uint256 collateralBalancefterDecrease;
uint256 collateralBalanceAfterDecrease;
uint256 liquidationThresholdAfterDecrease;
uint256 healthFactorAfterDecrease;
bool reserveUsageAsCollateralEnabled;
@ -91,10 +91,10 @@ library GenericLogic {
10**vars.decimals
);
vars.collateralBalancefterDecrease = vars.collateralBalanceETH.sub(vars.amountToDecreaseETH);
vars.collateralBalanceAfterDecrease = vars.collateralBalanceETH.sub(vars.amountToDecreaseETH);
//if there is a borrow, there can't be 0 collateral
if (vars.collateralBalancefterDecrease == 0) {
if (vars.collateralBalanceAfterDecrease == 0) {
return false;
}
@ -102,15 +102,15 @@ library GenericLogic {
.collateralBalanceETH
.mul(vars.avgLiquidationThreshold)
.sub(vars.amountToDecreaseETH.mul(vars.liquidationThreshold))
.div(vars.collateralBalancefterDecrease);
.div(vars.collateralBalanceAfterDecrease);
uint256 healthFactorAfterDecrease = calculateHealthFactorFromBalances(
vars.collateralBalancefterDecrease,
vars.collateralBalanceAfterDecrease,
vars.borrowBalanceETH,
vars.liquidationThresholdAfterDecrease
);
return healthFactorAfterDecrease > GenericLogic.HEALTH_FACTOR_LIQUIDATION_THRESHOLD;
return healthFactorAfterDecrease >= GenericLogic.HEALTH_FACTOR_LIQUIDATION_THRESHOLD;
}
struct CalculateUserAccountDataVars {

View File

@ -151,12 +151,14 @@ library ReserveLogic {
.scaledTotalSupply();
uint256 previousVariableBorrowIndex = reserve.variableBorrowIndex;
uint256 previousLiquidityIndex = reserve.liquidityIndex;
uint40 lastUpdatedTimestamp = reserve.lastUpdateTimestamp;
(uint256 newLiquidityIndex, uint256 newVariableBorrowIndex) = _updateIndexes(
reserve,
scaledVariableDebt,
previousLiquidityIndex,
previousVariableBorrowIndex
previousVariableBorrowIndex,
lastUpdatedTimestamp
);
_mintToTreasury(
@ -164,7 +166,8 @@ library ReserveLogic {
scaledVariableDebt,
previousVariableBorrowIndex,
newLiquidityIndex,
newVariableBorrowIndex
newVariableBorrowIndex,
lastUpdatedTimestamp
);
}
@ -318,7 +321,8 @@ library ReserveLogic {
uint256 scaledVariableDebt,
uint256 previousVariableBorrowIndex,
uint256 newLiquidityIndex,
uint256 newVariableBorrowIndex
uint256 newVariableBorrowIndex,
uint40 timestamp
) internal {
MintToTreasuryLocalVars memory vars;
@ -345,7 +349,8 @@ library ReserveLogic {
//calculate the stable debt until the last timestamp update
vars.cumulatedStableInterest = MathUtils.calculateCompoundedInterest(
vars.avgStableRate,
vars.stableSupplyUpdatedTimestamp
vars.stableSupplyUpdatedTimestamp,
timestamp
);
vars.previousStableDebt = vars.principalStableDebt.rayMul(vars.cumulatedStableInterest);
@ -375,10 +380,9 @@ library ReserveLogic {
ReserveData storage reserve,
uint256 scaledVariableDebt,
uint256 liquidityIndex,
uint256 variableBorrowIndex
uint256 variableBorrowIndex,
uint40 timestamp
) internal returns (uint256, uint256) {
uint40 timestamp = reserve.lastUpdateTimestamp;
uint256 currentLiquidityRate = reserve.currentLiquidityRate;
uint256 newLiquidityIndex = liquidityIndex;

View File

@ -8,6 +8,7 @@ library MathUtils {
using SafeMath for uint256;
using WadRayMath for uint256;
/// @dev Ignoring leap years
uint256 internal constant SECONDS_PER_YEAR = 365 days;
/**
@ -25,9 +26,7 @@ library MathUtils {
//solium-disable-next-line
uint256 timeDifference = block.timestamp.sub(uint256(lastUpdateTimestamp));
uint256 timeDelta = timeDifference.wadToRay().rayDiv(SECONDS_PER_YEAR.wadToRay());
return rate.rayMul(timeDelta).add(WadRayMath.ray());
return (rate.mul(timeDifference) / SECONDS_PER_YEAR).add(WadRayMath.ray());
}
/**
@ -43,13 +42,13 @@ library MathUtils {
* @param lastUpdateTimestamp the timestamp of the last update of the interest
* @return the interest rate compounded during the timeDelta, in ray
**/
function calculateCompoundedInterest(uint256 rate, uint40 lastUpdateTimestamp)
internal
view
returns (uint256)
{
function calculateCompoundedInterest(
uint256 rate,
uint40 lastUpdateTimestamp,
uint256 currentTimestamp
) internal pure returns (uint256) {
//solium-disable-next-line
uint256 exp = block.timestamp.sub(uint256(lastUpdateTimestamp));
uint256 exp = currentTimestamp.sub(uint256(lastUpdateTimestamp));
if (exp == 0) {
return WadRayMath.ray();
@ -69,4 +68,17 @@ library MathUtils {
return WadRayMath.ray().add(ratePerSecond.mul(exp)).add(secondTerm).add(thirdTerm);
}
/**
* @dev calculates the compounded interest between the timestamp of the last update and the current block timestamp
* @param rate the interest rate (in ray)
* @param lastUpdateTimestamp the timestamp from which the interest accumulation needs to be calculated
**/
function calculateCompoundedInterest(uint256 rate, uint40 lastUpdateTimestamp)
internal
view
returns (uint256)
{
return calculateCompoundedInterest(rate, lastUpdateTimestamp, block.timestamp);
}
}

View File

@ -22,19 +22,16 @@ library PercentageMath {
* @return the percentage of value
**/
function percentMul(uint256 value, uint256 percentage) internal pure returns (uint256) {
if (value == 0) {
if (value == 0 || percentage == 0) {
return 0;
}
uint256 result = value * percentage;
require(
value <= (type(uint256).max - HALF_PERCENT) / percentage,
Errors.MULTIPLICATION_OVERFLOW
);
require(result / value == percentage, Errors.MULTIPLICATION_OVERFLOW);
result += HALF_PERCENT;
require(result >= HALF_PERCENT, Errors.ADDITION_OVERFLOW);
return result / PERCENTAGE_FACTOR;
return (value * percentage + HALF_PERCENT) / PERCENTAGE_FACTOR;
}
/**
@ -47,14 +44,11 @@ library PercentageMath {
require(percentage != 0, Errors.DIVISION_BY_ZERO);
uint256 halfPercentage = percentage / 2;
uint256 result = value * PERCENTAGE_FACTOR;
require(
value <= (type(uint256).max - halfPercentage) / PERCENTAGE_FACTOR,
Errors.MULTIPLICATION_OVERFLOW
);
require(result / PERCENTAGE_FACTOR == value, Errors.MULTIPLICATION_OVERFLOW);
result += halfPercentage;
require(result >= halfPercentage, Errors.ADDITION_OVERFLOW);
return result / percentage;
return (value * PERCENTAGE_FACTOR + halfPercentage) / percentage;
}
}

View File

@ -54,15 +54,13 @@ library WadRayMath {
* @return the result of a*b, in wad
**/
function wadMul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
if (a == 0 || b == 0) {
return 0;
}
uint256 result = a * b + halfWAD;
require(a <= (type(uint256).max - halfWAD) / b, Errors.MULTIPLICATION_OVERFLOW);
require(result >= halfWAD && (result - halfWAD) / a == b, Errors.MULTIPLICATION_OVERFLOW);
return result / WAD;
return (a * b + halfWAD) / WAD;
}
/**
@ -73,14 +71,11 @@ library WadRayMath {
**/
function wadDiv(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0, Errors.DIVISION_BY_ZERO);
uint256 halfB = b / 2;
uint256 result = a * WAD + halfB;
require(a <= (type(uint256).max - halfB) / WAD, Errors.MULTIPLICATION_OVERFLOW);
require(result >= halfB && (result - halfB) / WAD == a, Errors.MULTIPLICATION_OVERFLOW);
return result / b;
return (a * WAD + halfB) / b;
}
/**
@ -90,15 +85,13 @@ library WadRayMath {
* @return the result of a*b, in ray
**/
function rayMul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
if (a == 0 || b == 0) {
return 0;
}
uint256 result = a * b + halfRAY;
require(a <= (type(uint256).max - halfRAY) / b, Errors.MULTIPLICATION_OVERFLOW);
require(result >= halfRAY && (result - halfRAY) / a == b, Errors.MULTIPLICATION_OVERFLOW);
return result / RAY;
return (a * b + halfRAY) / RAY;
}
/**
@ -109,14 +102,11 @@ library WadRayMath {
**/
function rayDiv(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0, Errors.DIVISION_BY_ZERO);
uint256 halfB = b / 2;
uint256 result = a * RAY + halfB;
require(a <= (type(uint256).max - halfB) / RAY, Errors.MULTIPLICATION_OVERFLOW);
require(result >= halfB && (result - halfB) / RAY == a, Errors.MULTIPLICATION_OVERFLOW);
return result / b;
return (a * RAY + halfB) / b;
}
/**

View File

@ -14,4 +14,13 @@ contract MockAggregator {
function latestAnswer() external view returns (int256) {
return _latestAnswer;
}
function getTokenType() external view returns (uint256) {
return 1;
}
// function getSubTokens() external view returns (address[] memory) {
// TODO: implement mock for when multiple subtokens. Maybe we need to create diff mock contract
// to call it from the migration for this case??
// }
}

View File

@ -22,7 +22,7 @@ contract MintableERC20 is ERC20 {
* @return A boolean that indicates if the operation was successful.
*/
function mint(uint256 value) public returns (bool) {
_mint(msg.sender, value);
_mint(_msgSender(), value);
return true;
}
}

View File

@ -40,7 +40,7 @@ contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
bytes32 public DOMAIN_SEPARATOR;
modifier onlyLendingPool {
require(msg.sender == address(POOL), Errors.CALLER_MUST_BE_LENDING_POOL);
require(_msgSender() == address(POOL), Errors.CALLER_MUST_BE_LENDING_POOL);
_;
}
@ -108,7 +108,7 @@ contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
//transfer event to track balances
emit Transfer(user, address(0), amount);
emit Burn(msg.sender, receiverOfUnderlying, amount, index);
emit Burn(_msgSender(), receiverOfUnderlying, amount, index);
}
/**

View File

@ -73,14 +73,14 @@ contract IncentivizedERC20 is Context, IERC20, IERC20Detailed {
}
/**
* @dev executes a transfer of tokens from msg.sender to recipient
* @dev executes a transfer of tokens from _msgSender() to recipient
* @param recipient the recipient of the tokens
* @param amount the amount of tokens being transferred
* @return true if the transfer succeeds, false otherwise
**/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
emit Transfer(msg.sender, recipient, amount);
emit Transfer(_msgSender(), recipient, amount);
return true;
}
@ -101,8 +101,8 @@ contract IncentivizedERC20 is Context, IERC20, IERC20Detailed {
}
/**
* @dev allows spender to spend the tokens owned by msg.sender
* @param spender the user allowed to spend msg.sender tokens
* @dev allows spender to spend the tokens owned by _msgSender()
* @param spender the user allowed to spend _msgSender() tokens
* @return true
**/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
@ -111,7 +111,7 @@ contract IncentivizedERC20 is Context, IERC20, IERC20Detailed {
}
/**
* @dev executes a transfer of token from sender to recipient, if msg.sender is allowed to do so
* @dev executes a transfer of token from sender to recipient, if _msgSender() is allowed to do so
* @param sender the owner of the tokens
* @param recipient the recipient of the tokens
* @param amount the amount of tokens being transferred
@ -133,8 +133,8 @@ contract IncentivizedERC20 is Context, IERC20, IERC20Detailed {
}
/**
* @dev increases the allowance of spender to spend msg.sender tokens
* @param spender the user allowed to spend on behalf of msg.sender
* @dev increases the allowance of spender to spend _msgSender() tokens
* @param spender the user allowed to spend on behalf of _msgSender()
* @param addedValue the amount being added to the allowance
* @return true
**/
@ -144,8 +144,8 @@ contract IncentivizedERC20 is Context, IERC20, IERC20Detailed {
}
/**
* @dev decreases the allowance of spender to spend msg.sender tokens
* @param spender the user allowed to spend on behalf of msg.sender
* @dev decreases the allowance of spender to spend _msgSender() tokens
* @param spender the user allowed to spend on behalf of _msgSender()
* @param subtractedValue the amount being subtracted to the allowance
* @return true
**/
@ -181,10 +181,10 @@ contract IncentivizedERC20 is Context, IERC20, IERC20Detailed {
_balances[recipient] = _balances[recipient].add(amount);
if (address(_incentivesController) != address(0)) {
uint256 totalSupply = _totalSupply;
_incentivesController.handleAction(sender, totalSupply, oldSenderBalance);
uint256 currentTotalSupply = _totalSupply;
_incentivesController.handleAction(sender, currentTotalSupply, oldSenderBalance);
if (sender != recipient) {
_incentivesController.handleAction(recipient, totalSupply, oldRecipientBalance);
_incentivesController.handleAction(recipient, currentTotalSupply, oldRecipientBalance);
}
}
}

View File

@ -23,7 +23,7 @@ abstract contract DebtTokenBase is IncentivizedERC20, VersionedInitializable {
* @dev Only lending pool can call functions marked by this modifier
**/
modifier onlyLendingPool {
require(msg.sender == address(POOL), Errors.CALLER_MUST_BE_LENDING_POOL);
require(_msgSender() == address(POOL), Errors.CALLER_MUST_BE_LENDING_POOL);
_;
}

View File

@ -3,307 +3,35 @@
"buidlerevm": {
"address": "0x58F132FBB86E21545A4Bace3C19f1C05d86d7A22",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xDFbeeed692AA81E7f86E72F7ACbEA2A1C4d63544",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x58F132FBB86E21545A4Bace3C19f1C05d86d7A22",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"LendingPoolAddressesProvider": {
"buidlerevm": {
"address": "0xa4bcDF64Cdd5451b6ac3743B414124A6299B65FF",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x5191aA68c7dB195181Dd2441dBE23A48EA24b040",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0xa4bcDF64Cdd5451b6ac3743B414124A6299B65FF",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
"address": "0x4Fa53B048dbf5F87324C81639984619aB1D98ff7",
"deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F"
}
},
"LendingPoolAddressesProviderRegistry": {
"buidlerevm": {
"address": "0x5A0773Ff307Bf7C71a832dBB5312237fD3437f9F",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xa89E20284Bd638F31b0011D0fC754Fc9d2fa73e3",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x5A0773Ff307Bf7C71a832dBB5312237fD3437f9F",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
"address": "0x87223624f91EaA7B0627Bf81F541D4F6A1083072",
"deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F"
}
},
"FeeProvider": {
"buidlerevm": {
"address": "0xFAe0fd738dAbc8a0426F47437322b6d026A9FD95",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xD9273d497eDBC967F39d419461CfcF382a0A822e"
}
},
"LendingPoolParametersProvider": {
"buidlerevm": {
"address": "0x2C4603396dE2F08642354A3A102760827FfFe113"
}
},
"LendingPoolCore": {
"buidlerevm": {
"address": "0xA10958a24032283FbE2D23cedf264d6eC9411CBA"
}
},
"LendingPoolConfigurator": {
"buidlerevm": {
"address": "0x6642B57e4265BAD868C17Fc1d1F4F88DBBA04Aa8"
},
"localhost": {
"address": "0x9Ec55627757348b322c8dD0865D704649bFa0c7b"
},
"kovan": {
"address": "0x633CD212D4f7aa6d221353Fb9c6edB746498cC8C"
}
},
"LendingPoolDataProvider": {
"buidlerevm": {
"address": "0x612719Ace03A8281188d61612A9f40D1da3ca420"
}
},
"LendingPool": {
"buidlerevm": {
"address": "0xD9273d497eDBC967F39d419461CfcF382a0A822e"
},
"localhost": {
"address": "0x3EE716e38f21e5FC16BFDB773db24D63C637A5d8"
},
"kovan": {
"address": "0xAD7abA67B6A32de493f684f3c418E324312da0f7"
}
},
"PriceOracle": {
"buidlerevm": {
"address": "0xb682dEEf4f8e298d86bFc3e21f50c675151FB974",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x5889354f21A1C8D8D2f82669d778f6Dab778B519",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x1750499D05Ed1674d822430FB960d5F6731fDf64",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"MockAggregator": {
"buidlerevm": {
"address": "0x3D8FFB457fedDFBc760F3F243283F52692b579B1",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xC452C5244F701108B4e8E8BCe693160046b30332",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0xEC1C93A9f6a9e18E97784c76aC52053587FcDB89",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"ChainlinkProxyPriceProvider": {
"buidlerevm": {
"address": "0xEC1C93A9f6a9e18E97784c76aC52053587FcDB89",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x0B63c002cb44B2e5e580C3B3560a27F4101D95c0",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x7B6C3e5486D9e6959441ab554A889099eed76290",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
"address": "0x18a107d4fa249Efefd4DAf9A76EEE3b6366701AA",
"deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F"
}
},
"LendingRateOracle": {
"buidlerevm": {
"address": "0xAF6BA11790D1942625C0c2dA07da19AB63845cfF",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xCeB290A2C6614BF23B2faa0f0B8067F29C48DB0F",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0xD83D2773a7873ae2b5f8Fb92097e20a8C64F691E",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
"address": "0xac6Eb7B1083D39eC695a3898C2f782E7c7C64973",
"deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F"
}
},
"DefaultReserveInterestRateStrategy": {
"buidlerevm": {
"address": "0x7d40dD74d3aE1a7e4A7dd08eaE899e85940563cd",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x7C95b1ad025F0C9aB14192f87bF2aD53889bE4F7",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x626FdE749F9d499d3777320CAf29484B624ab84a",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
"address": "0x47341CE48FfE1cbD91991578B880a18c45cdB5CA",
"deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F"
}
},
"LendingPoolLiquidationManager": {
"buidlerevm": {
"address": "0xFe230c227D3724015d0dE3dBEc831825f1ed1f59",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"MockOneSplit": {
"buidlerevm": {
"address": "0x4b2c297ba5be42610994974b9543D56B864CA011",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x4b2c297ba5be42610994974b9543D56B864CA011",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"OneSplitAdapter": {
"buidlerevm": {
"address": "0x24E420B42971372F060a93129846761F354Bc50B",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x24E420B42971372F060a93129846761F354Bc50B",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"TokenDistributor": {
"buidlerevm": {
"address": "0x2cfcA5785261fbC88EFFDd46fCFc04c22525F9e4",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x2cfcA5785261fbC88EFFDd46fCFc04c22525F9e4"
}
},
"InitializableAdminUpgradeabilityProxy": {
"buidlerevm": {
"address": "0xC6bA6049F86d528698B5924B8fC2FE7289D38578",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x2cfcA5785261fbC88EFFDd46fCFc04c22525F9e4",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"MockFlashLoanReceiver": {
"buidlerevm": {
"address": "0xfC88832bac6AbdF216BC5A67be68E9DE94aD5ba2"
},
"localhost": {
"address": "0x9c91aEaD98b1354C7B0EAfb8ff539d0796c79894"
},
"coverage": {
"address": "0x2B681757d757fbB80cc51c6094cEF5eE75bF55aA"
}
},
"WalletBalanceProvider": {
"buidlerevm": {
"address": "0x1256eBA4d0a7A38D10BaF4F61775ba491Ce7EE25",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x145b7B6368Df63e7F3497b0A948B30fC1A4d5E55",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0xDf73fC454FA018051D4a1509e63D11530A59DE10",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
"address": "0x067400A1e5DfaD5B7537acfd1c981F62c22Ea53E",
"deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F"
}
},
"DAI": {
"buidlerevm": {
"address": "0x7c2C195CD6D34B8F845992d380aADB2730bB9C6F",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x010e948B9B7D30771E23346C0B17a4D5Ff04e300",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x7c2C195CD6D34B8F845992d380aADB2730bB9C6F",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"LEND": {
"buidlerevm": {
"address": "0x8858eeB3DfffA017D4BCE9801D340D36Cf895CCf",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x79094eDB848047e87a4B8a64ab5Ee2f527791bC0",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x8858eeB3DfffA017D4BCE9801D340D36Cf895CCf",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"TUSD": {
"buidlerevm": {
"address": "0x0078371BDeDE8aAc7DeBfFf451B74c5EDB385Af7",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xEE0A69d0Bb1312685870Dd7E20AcAD66b6f6264F",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x0078371BDeDE8aAc7DeBfFf451B74c5EDB385Af7",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"BAT": {
"buidlerevm": {
"address": "0xf4e77E5Da47AC3125140c470c71cBca77B5c638c",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x631B367fBE1dbB934bC039aAA0C9eC2EE5943fd5",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0xf4e77E5Da47AC3125140c470c71cBca77B5c638c",
}
},
"WETH": {
"buidlerevm": {
"address": "0xf784709d2317D872237C4bC22f867d1BAe2913AB",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
@ -311,461 +39,213 @@
"buidlerevm": {
"address": "0x3619DbE27d7c1e7E91aA738697Ae7Bc5FC3eACA5",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xf55Af78B3f3059fACF166Aa338FFe059A14e75F6",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x3619DbE27d7c1e7E91aA738697Ae7Bc5FC3eACA5",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"USDT": {
"buidlerevm": {
"address": "0x038B86d9d8FAFdd0a02ebd1A476432877b0107C8",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xD5A0587aAEB195028909E98930B391dFB3f9F589",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x038B86d9d8FAFdd0a02ebd1A476432877b0107C8",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"SUSD": {
"buidlerevm": {
"address": "0x1A1FEe7EeD918BD762173e4dc5EfDB8a78C924A8",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xaD3AdbC18E4AD090034A6C74Eda61f4310dce313",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x1A1FEe7EeD918BD762173e4dc5EfDB8a78C924A8",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"ZRX": {
"buidlerevm": {
"address": "0x500D1d6A4c7D8Ae28240b47c8FCde034D827fD5e",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x25a88BbA9c8D2a46e3Ff4bFe98712DF7A1044fB6",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x500D1d6A4c7D8Ae28240b47c8FCde034D827fD5e",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"MKR": {
"buidlerevm": {
"address": "0xc4905364b78a742ccce7B890A89514061E47068D",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x16d1802cd7cfcb67955BBBa26bAae1cE559B5F5B",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0xc4905364b78a742ccce7B890A89514061E47068D",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"WBTC": {
"buidlerevm": {
"address": "0xD6C850aeBFDC46D7F4c207e445cC0d6B0919BDBe",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xE58d8c88f5A670f16BE8F7864707170F43e943A6",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0xD6C850aeBFDC46D7F4c207e445cC0d6B0919BDBe",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"LINK": {
"buidlerevm": {
"address": "0x8B5B7a6055E54a36fF574bbE40cf2eA68d5554b3",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xfdAF4f6e47e854c05bE158993d32872e784F0502",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x8B5B7a6055E54a36fF574bbE40cf2eA68d5554b3",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"KNC": {
"buidlerevm": {
"address": "0xEcc0a6dbC0bb4D51E4F84A315a9e5B0438cAD4f0",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x92edC13A10036A3C50396f2B63148a3e9a8D589e",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0xEcc0a6dbC0bb4D51E4F84A315a9e5B0438cAD4f0",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"MANA": {
"buidlerevm": {
"address": "0x20Ce94F404343aD2752A2D01b43fa407db9E0D00",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xE5C277cDb7E10372918Ac54Ce54022910A24FE88",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x20Ce94F404343aD2752A2D01b43fa407db9E0D00",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"REP": {
"buidlerevm": {
"address": "0x1d80315fac6aBd3EfeEbE97dEc44461ba7556160",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xF5742a599a0F4520089cbf2EBBa66Bb4F471B85F",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x1d80315fac6aBd3EfeEbE97dEc44461ba7556160",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"SNX": {
"buidlerevm": {
"address": "0x2D8553F9ddA85A9B3259F6Bf26911364B85556F5",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x380EF388e13D8cAdeACef6eF682C7B7D85865076",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x2D8553F9ddA85A9B3259F6Bf26911364B85556F5",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"BUSD": {
"buidlerevm": {
"address": "0x52d3b94181f8654db2530b0fEe1B19173f519C52",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xC89577DED8441e52C17C13D527b85b225C5c8311",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x52d3b94181f8654db2530b0fEe1B19173f519C52",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"USD": {
"buidlerevm": {
"address": "0xd15468525c35BDBC1eD8F2e09A00F8a173437f2f",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xD4b06774A717Ff5A7c20c8712e31c6BbfFcb1F01",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0xd15468525c35BDBC1eD8F2e09A00F8a173437f2f",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"UNI_DAI_ETH": {
"buidlerevm": {
"address": "0x7e35Eaf7e8FBd7887ad538D4A38Df5BbD073814a",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xbe66dC9DFEe580ED968403e35dF7b5159f873df8",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x7e35Eaf7e8FBd7887ad538D4A38Df5BbD073814a",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"UNI_USDC_ETH": {
"buidlerevm": {
"address": "0x5bcb88A0d20426e451332eE6C4324b0e663c50E0",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x93AfC6Df4bB8F62F2493B19e577f8382c0BA9EBC",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x5bcb88A0d20426e451332eE6C4324b0e663c50E0",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"UNI_SETH_ETH": {
"buidlerevm": {
"address": "0x3521eF8AaB0323004A6dD8b03CE890F4Ea3A13f5",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x75Ded61646B5945BdDd0CD9a9Db7c8288DA6F810",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x3521eF8AaB0323004A6dD8b03CE890F4Ea3A13f5",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"UNI_LINK_ETH": {
"buidlerevm": {
"address": "0x53369fd4680FfE3DfF39Fc6DDa9CfbfD43daeA2E",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xdE7c40e675bF1aA45c18cCbaEb9662B16b0Ddf7E",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x53369fd4680FfE3DfF39Fc6DDa9CfbfD43daeA2E",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"UNI_MKR_ETH": {
"buidlerevm": {
"address": "0xB00cC45B4a7d3e1FEE684cFc4417998A1c183e6d",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xEcb928A3c079a1696Aa5244779eEc3dE1717fACd",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0xB00cC45B4a7d3e1FEE684cFc4417998A1c183e6d",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"UNI_LEND_ETH": {
"buidlerevm": {
"address": "0x58F132FBB86E21545A4Bace3C19f1C05d86d7A22",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xDFbeeed692AA81E7f86E72F7ACbEA2A1C4d63544",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x58F132FBB86E21545A4Bace3C19f1C05d86d7A22",
}
},
"LendingPoolAddressesProvider": {
"buidlerevm": {
"address": "0xa4bcDF64Cdd5451b6ac3743B414124A6299B65FF",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"AaveProtocolTestHelpers": {
"LendingPoolAddressesProviderRegistry": {
"buidlerevm": {
"address": "0xf4830d6b1D70C8595d3BD8A63f9ed9F636DB9ef2"
},
"localhost": {
"address": "0x987223924D2DD6c6efB601756850f3886ECbceF6"
},
"coverage": {
"address": "0x2cfcA5785261fbC88EFFDd46fCFc04c22525F9e4"
},
"kovan": {
"address": "0x9A82710F3fFEF29e5940F3D5f15E8d8d9CaF8C44",
"deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F"
}
},
"StableDebtToken": {
"buidlerevm": {
"address": "0x5f687ea375c359E0CF6aa8A1004BE0c3BaBee7Fd",
"address": "0x5A0773Ff307Bf7C71a832dBB5312237fD3437f9F",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xaca5aCeB6f44845d07Fd339a51F0bd52Bb3D8D1A",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0xB660Fdd109a95718cB9d20E3A89EE6cE342aDcB6",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
"address": "0x0EDc241FdA0dF39EB1B9eB1236217BBe72Ab911D",
"deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F"
}
},
"VariableDebtToken": {
"buidlerevm": {
"address": "0x626FdE749F9d499d3777320CAf29484B624ab84a",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x9bD0Bec44106D8Ea8fFb6296d7A84742a290E064",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x830bceA96E56DBC1F8578f75fBaC0AF16B32A07d",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
"address": "0x293f5BcC66762c28a5d3Bd8512a799D457F5296D",
"deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F"
}
},
"AToken": {
"localhost": {
"address": "0x00f126cCA2266bFb634Ed6DB17c4C74fb8cA5177",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"buidlerevm": {
"address": "0xB660Fdd109a95718cB9d20E3A89EE6cE342aDcB6",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0xA0AB1cB92A4AF81f84dCd258155B5c25D247b54E",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
"address": "0xf303Ae6F24C29D94E367fdb5C7aE04D32BEbF13E",
"deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F"
}
},
"MockAToken": {
"buidlerevm": {
"address": "0x77B0b5636fEA30eA79BB65AeCCdb599997A849A8",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xbF538F34cb100bAeEE55aa1F036D33F03b03d900",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x392E5355a0e88Bd394F717227c752670fb3a8020",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"WETH": {
"buidlerevm": {
"address": "0xf784709d2317D872237C4bC22f867d1BAe2913AB",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0xff1B1B810F5DCe853a9b1819DE220D532D1CFeF2",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0xf784709d2317D872237C4bC22f867d1BAe2913AB",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"MockStableDebtToken": {
"buidlerevm": {
"address": "0x78Ee8Fb9fE5abD5e347Fc94c2fb85596d1f60e3c",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x7436d6adaA697413F00cb63E1A2A854bF2Aec5A1",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0x3b050AFb4ac4ACE646b31fF3639C1CD43aC31460",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"MockVariableDebtToken": {
"buidlerevm": {
"address": "0x920d847fE49E54C19047ba8bc236C45A8068Bca7",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"localhost": {
"address": "0x2A7BE996B8801ED21f2f45148791D402811A2106",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"coverage": {
"address": "0xEBAB67ee3ef604D5c250A53b4b8fcbBC6ec3007C",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"MockFlashRepayAdapter": {
"buidlerevm": {
"address": "0xDf73fC454FA018051D4a1509e63D11530A59DE10"
}
},
"MockFlashLiquiditySwapAdapter": {
"buidlerevm": {
"address": "0x2cfcA5785261fbC88EFFDd46fCFc04c22525F9e4"
}
},
"ReserveLogic": {
"buidlerevm": {
"address": "0xFAe0fd738dAbc8a0426F47437322b6d026A9FD95",
"address": "0x78Ee8Fb9fE5abD5e347Fc94c2fb85596d1f60e3c",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
"address": "0xd9A66F000e278710a44525AC43EAE38c63984a23",
"deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F"
}
},
"GenericLogic": {
"buidlerevm": {
"address": "0x6082731fdAba4761277Fb31299ebC782AD3bCf24",
"address": "0x920d847fE49E54C19047ba8bc236C45A8068Bca7",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
"address": "0xF412a3A5Ae0CBDc0809d27DE317F531e7477C03f",
"deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F"
}
},
"ValidationLogic": {
"buidlerevm": {
"address": "0x8456161947DFc1fC159A0B26c025cD2b4bba0c3e",
"address": "0xA4765Ff72A9F3CfE73089bb2c3a41B838DF71574",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
"address": "0x3F6d595c3b83E4F35601B51B05B7862381d459f6",
"deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F"
}
},
"LendingPoolCollateralManager": {
"LendingPool": {
"buidlerevm": {
"address": "0x8D0206fEBEB380486729b64bB4cfEDC5b354a6D6",
"address": "0x35c1419Da7cf0Ff885B8Ef8EA9242FEF6800c99b",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
"address": "0x1A9333aA3e524463680FAcE1F734c47D681b32ed",
"deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F"
}
},
"LendingPoolConfigurator": {
"buidlerevm": {
"address": "0x6642B57e4265BAD868C17Fc1d1F4F88DBBA04Aa8"
}
},
"StableAndVariableTokensHelper": {
"buidlerevm": {
"address": "0x0C6c3C47A1f650809B0D1048FDf9603e09473D7E",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
"address": "0x1d8496a2C0e78008dDDF56c84b1d0f14707D3323",
"deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F"
}
},
"ATokensAndRatesHelper": {
"buidlerevm": {
"address": "0x06bA8d8af0dF898D0712DffFb0f862cC51AF45c2",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
},
"kovan": {
"address": "0xbaAa0c348ed045eF7c57136578339b20d6c375AE",
"deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F"
}
},
"PriceOracle": {
"buidlerevm": {
"address": "0xb682dEEf4f8e298d86bFc3e21f50c675151FB974",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"MockAggregator": {
"buidlerevm": {
"address": "0x3D8FFB457fedDFBc760F3F243283F52692b579B1",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"ChainlinkProxyPriceProvider": {
"buidlerevm": {
"address": "0xEC1C93A9f6a9e18E97784c76aC52053587FcDB89",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"LendingRateOracle": {
"buidlerevm": {
"address": "0xAF6BA11790D1942625C0c2dA07da19AB63845cfF",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"AaveProtocolTestHelpers": {
"buidlerevm": {
"address": "0xf4830d6b1D70C8595d3BD8A63f9ed9F636DB9ef2"
}
},
"LendingPoolCollateralManager": {
"buidlerevm": {
"address": "0x8D0206fEBEB380486729b64bB4cfEDC5b354a6D6",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
},
"MockFlashLoanReceiver": {
"buidlerevm": {
"address": "0xfC88832bac6AbdF216BC5A67be68E9DE94aD5ba2"
}
},
"WalletBalanceProvider": {
"buidlerevm": {
"address": "0x1256eBA4d0a7A38D10BaF4F61775ba491Ce7EE25",
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
}
}
}

View File

@ -8,6 +8,7 @@
"buidler:kovan": "buidler --network kovan",
"buidler:ropsten": "buidler--network ropsten",
"buidler:main": "buidler --network main",
"buidler:docker": "buidler --network buidlerevm_docker",
"buidler help": "buidler help",
"compile": "SKIP_LOAD=true buidler compile",
"types-gen": "npm run compile -- --force && typechain --target ethers-v5 --outDir ./types './artifacts/*.json'",
@ -15,6 +16,8 @@
"test-scenarios": "buidler test test/__setup.spec.ts test/scenario.spec.ts",
"aave:evm:dev:migration": "buidler aave:dev",
"aave:evm:full:migration": "buidler aave:full",
"aave:docker:dev:migration": "npm run buidler:docker -- aave:dev",
"aave:docker:full:migration": "npm run buidler:docker -- aave:full",
"aave:kovan:dev:migration": "npm run buidler:kovan -- aave:dev --verify",
"aave:kovan:full:migration": "npm run buidler:kovan -- aave:full --verify",
"aave:ropsten:dev:migration": "npm run buidler:ropsten -- aave:dev --verify",
@ -37,6 +40,7 @@
"test-deploy": "buidler test test/__setup.spec.ts test/test-init.spec.ts",
"test-pausable": "buidler test test/__setup.spec.ts test/pausable-functions.spec.ts",
"test-permit": "buidler test test/__setup.spec.ts test/atoken-permit.spec.ts",
"test-subgraph:scenarios": "buidler --network buidlerevm_docker test test/__setup.spec.ts test/subgraph-scenarios.spec.ts",
"dev:coverage": "buidler coverage --network coverage",
"dev:deployment": "buidler dev-deployment",
"dev:deployExample": "buidler deploy-Example",

View File

@ -40,7 +40,7 @@ export interface TestEnv {
oracle: PriceOracle;
helpersContract: AaveProtocolTestHelpers;
weth: MintableERC20;
aEth: AToken;
aWETH: AToken;
dai: MintableERC20;
aDai: AToken;
usdc: MintableERC20;
@ -64,7 +64,7 @@ const testEnv: TestEnv = {
helpersContract: {} as AaveProtocolTestHelpers,
oracle: {} as PriceOracle,
weth: {} as MintableERC20,
aEth: {} as AToken,
aWETH: {} as AToken,
dai: {} as MintableERC20,
aDai: {} as AToken,
usdc: {} as MintableERC20,
@ -98,9 +98,10 @@ export async function initializeMakeSuite() {
testEnv.helpersContract = await getAaveProtocolTestHelpers();
const allTokens = await testEnv.helpersContract.getAllATokens();
const aDaiAddress = allTokens.find((aToken) => aToken.symbol === 'aDAI')?.tokenAddress;
const aEthAddress = allTokens.find((aToken) => aToken.symbol === 'aETH')?.tokenAddress;
const aWEthAddress = allTokens.find((aToken) => aToken.symbol === 'aWETH')?.tokenAddress;
const reservesTokens = await testEnv.helpersContract.getAllReservesTokens();
@ -109,7 +110,7 @@ export async function initializeMakeSuite() {
const lendAddress = reservesTokens.find((token) => token.symbol === 'LEND')?.tokenAddress;
const wethAddress = reservesTokens.find((token) => token.symbol === 'WETH')?.tokenAddress;
if (!aDaiAddress || !aEthAddress) {
if (!aDaiAddress || !aWEthAddress) {
console.log(`atoken-modifiers.spec: aTokens not correctly initialized`);
process.exit(1);
}
@ -119,7 +120,7 @@ export async function initializeMakeSuite() {
}
testEnv.aDai = await getAToken(aDaiAddress);
testEnv.aEth = await getAToken(aEthAddress);
testEnv.aWETH = await getAToken(aWEthAddress);
testEnv.dai = await getMintableErc20(daiAddress);
testEnv.usdc = await getMintableErc20(usdcAddress);

View File

@ -1152,11 +1152,12 @@ const calcLinearInterest = (
currentTimestamp: BigNumber,
lastUpdateTimestamp: BigNumber
) => {
const timeDifference = currentTimestamp.minus(lastUpdateTimestamp).wadToRay();
const timeDifference = currentTimestamp.minus(lastUpdateTimestamp);
const timeDelta = timeDifference.rayDiv(new BigNumber(ONE_YEAR).wadToRay());
const cumulatedInterest = rate.rayMul(timeDelta).plus(RAY);
const cumulatedInterest = rate
.multipliedBy(timeDifference)
.dividedBy(new BigNumber(ONE_YEAR))
.plus(RAY);
return cumulatedInterest;
};

View File

@ -152,7 +152,7 @@
// });
// it('unfreezes the reserve, user deposits 1 ETH, freezes the reserve, check that the user can redeem', async () => {
// const {aETH} = _aTokenInstances;
// const {aWETH} = _aTokenInstances;
// //unfreezes the reserve
// await _lendingPoolConfiguratorInstance.unfreezeReserve(ETHEREUM_ADDRESS);
@ -165,13 +165,13 @@
// //freezes the reserve
// await _lendingPoolConfiguratorInstance.freezeReserve(ETHEREUM_ADDRESS);
// const balance = await aETH.balanceOf(deployer);
// const balance = await aWETH.balanceOf(deployer);
// await aETH.redeem(balance);
// await aWETH.redeem(balance);
// });
// it('unfreezes the reserve, user 0 deposits 100 DAI, user 1 deposits 1 ETH and borrows 50 DAI, freezes the reserve, checks that the user 1 can repay', async () => {
// const {aETH, aDAI} = _aTokenInstances;
// const {aWETH, aDAI} = _aTokenInstances;
// const {DAI} = _tokenInstances;
// //unfreezes the reserve
@ -209,7 +209,7 @@
// });
// it('Check that liquidationCall can be executed on a freezed reserve', async () => {
// const {aETH, aDAI} = _aTokenInstances;
// const {aWETH, aDAI} = _aTokenInstances;
// const {DAI} = _tokenInstances;
// //user 2 tries to liquidate
@ -228,7 +228,7 @@
// });
// it('Check that rebalanceStableBorrowRate can be executed on a freezed reserve', async () => {
// const {aETH, aDAI} = _aTokenInstances;
// const {aWETH, aDAI} = _aTokenInstances;
// const {DAI} = _tokenInstances;
// //user 2 tries to liquidate

View File

@ -0,0 +1,32 @@
import {configuration as actionsConfiguration} from './helpers/actions';
import {configuration as calculationsConfiguration} from './helpers/utils/calculations';
import BigNumber from 'bignumber.js';
import {makeSuite} from './helpers/make-suite';
import {getReservesConfigByPool} from '../helpers/configuration';
import {AavePools, iAavePoolAssets, IReserveParams} from '../helpers/types';
import {executeStory} from './helpers/scenario-engine';
makeSuite('Subgraph scenario tests', async (testEnv) => {
let story: any;
let scenario;
before('Initializing configuration', async () => {
const scenario = require(`./helpers/scenarios/borrow-repay-stable`);
story = scenario.stories[0];
// Sets BigNumber for this suite, instead of globally
BigNumber.config({DECIMAL_PLACES: 0, ROUNDING_MODE: BigNumber.ROUND_DOWN});
actionsConfiguration.skipIntegrityCheck = false; //set this to true to execute solidity-coverage
calculationsConfiguration.reservesParams = <iAavePoolAssets<IReserveParams>>(
getReservesConfigByPool(AavePools.proto)
);
});
after('Reset', () => {
// Reset BigNumber
BigNumber.config({DECIMAL_PLACES: 20, ROUNDING_MODE: BigNumber.ROUND_HALF_UP});
});
it('deposit-borrow', async () => {
await executeStory(story, testEnv);
});
});