diff --git a/contracts/configuration/LendingPoolAddressesProviderRegistry.sol b/contracts/configuration/LendingPoolAddressesProviderRegistry.sol index f8dfb629..53ef4d10 100644 --- a/contracts/configuration/LendingPoolAddressesProviderRegistry.sol +++ b/contracts/configuration/LendingPoolAddressesProviderRegistry.sol @@ -36,13 +36,15 @@ contract LendingPoolAddressesProviderRegistry is Ownable, ILendingPoolAddressesP * @return the list of addressesProviders **/ function getAddressesProvidersList() external override view returns (address[] memory) { - uint256 maxLength = _addressesProvidersList.length; + address[] memory addressesProvidersList = _addressesProvidersList; + + uint256 maxLength = addressesProvidersList.length; address[] memory activeProviders = new address[](maxLength); - for (uint256 i = 0; i < _addressesProvidersList.length; i++) { - if (_addressesProviders[_addressesProvidersList[i]] > 0) { - activeProviders[i] = _addressesProvidersList[i]; + for (uint256 i = 0; i < maxLength; i++) { + if (_addressesProviders[addressesProvidersList[i]] > 0) { + activeProviders[i] = addressesProvidersList[i]; } } @@ -54,6 +56,8 @@ contract LendingPoolAddressesProviderRegistry is Ownable, ILendingPoolAddressesP * @param provider the pool address to be registered **/ function registerAddressesProvider(address provider, uint256 id) external override onlyOwner { + require(id != 0, Errors.INVALID_ADDRESSES_PROVIDER_ID); + _addressesProviders[provider] = id; _addToAddressesProvidersList(provider); emit AddressesProviderRegistered(provider); @@ -74,7 +78,9 @@ contract LendingPoolAddressesProviderRegistry is Ownable, ILendingPoolAddressesP * @param provider the pool address to be added **/ function _addToAddressesProvidersList(address provider) internal { - for (uint256 i = 0; i < _addressesProvidersList.length; i++) { + uint256 providersCount = _addressesProvidersList.length; + + for (uint256 i = 0; i < providersCount; i++) { if (_addressesProvidersList[i] == provider) { return; } diff --git a/contracts/flashloan/interfaces/IFlashLoanReceiver.sol b/contracts/flashloan/interfaces/IFlashLoanReceiver.sol index 5c92236a..784d0fa3 100644 --- a/contracts/flashloan/interfaces/IFlashLoanReceiver.sol +++ b/contracts/flashloan/interfaces/IFlashLoanReceiver.sol @@ -9,9 +9,9 @@ pragma solidity ^0.6.8; **/ interface IFlashLoanReceiver { function executeOperation( - address reserve, - uint256 amount, - uint256 fee, + address[] calldata assets, + uint256[] calldata amounts, + uint256[] calldata premiums, bytes calldata params ) external returns (bool); } diff --git a/contracts/interfaces/ILendingPool.sol b/contracts/interfaces/ILendingPool.sol index 2b4ead37..891781dc 100644 --- a/contracts/interfaces/ILendingPool.sol +++ b/contracts/interfaces/ILendingPool.sol @@ -99,16 +99,17 @@ interface ILendingPool { /** * @dev emitted when a flashloan is executed * @param target the address of the flashLoanReceiver - * @param reserve the address of the reserve - * @param amount the amount requested - * @param totalPremium the total fee on the amount + * @param assets the address of the assets being flashborrowed + * @param amounts the amount requested + * @param premiums the total fee on the amount * @param referralCode the referral code of the caller **/ event FlashLoan( address indexed target, - address indexed reserve, - uint256 amount, - uint256 totalPremium, + uint256 mode, + address[] assets, + uint256[] amounts, + uint256[] premiums, uint16 referralCode ); /** @@ -264,16 +265,17 @@ interface ILendingPool { * as long as the amount taken plus a fee is returned. NOTE There are security concerns for developers of flashloan receiver contracts * that must be kept into consideration. For further details please visit https://developers.aave.com * @param receiver The address of the contract receiving the funds. The receiver should implement the IFlashLoanReceiver interface. - * @param reserve the address of the principal reserve - * @param amount the amount requested for this flashloan + * @param assets the address of the principal reserve + * @param amounts the amount requested for this flashloan + * @param mode the flashloan mode * @param params a bytes array to be sent to the flashloan executor * @param referralCode the referral code of the caller **/ function flashLoan( address receiver, - address reserve, - uint256 amount, - uint256 debtType, + address[] calldata assets, + uint256[] calldata amounts, + uint256 mode, bytes calldata params, uint16 referralCode ) external; diff --git a/contracts/lendingpool/DefaultReserveInterestRateStrategy.sol b/contracts/lendingpool/DefaultReserveInterestRateStrategy.sol index 4f17a7c9..7ed6aa42 100644 --- a/contracts/lendingpool/DefaultReserveInterestRateStrategy.sol +++ b/contracts/lendingpool/DefaultReserveInterestRateStrategy.sol @@ -162,7 +162,7 @@ contract DefaultReserveInterestRateStrategy is IReserveInterestRateStrategy { _stableRateSlope1.rayMul(utilizationRate.rayDiv(OPTIMAL_UTILIZATION_RATE)) ); vars.currentVariableBorrowRate = _baseVariableBorrowRate.add( - utilizationRate.rayDiv(OPTIMAL_UTILIZATION_RATE).rayMul(_variableRateSlope1) + utilizationRate.rayMul(_variableRateSlope1).rayDiv(OPTIMAL_UTILIZATION_RATE) ); } diff --git a/contracts/lendingpool/LendingPool.sol b/contracts/lendingpool/LendingPool.sol index c1ff20bb..be1333de 100644 --- a/contracts/lendingpool/LendingPool.sol +++ b/contracts/lendingpool/LendingPool.sol @@ -262,15 +262,6 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage ReserveLogic.InterestRateMode interestRateMode = ReserveLogic.InterestRateMode(rateMode); - //default to max amount - uint256 paybackAmount = interestRateMode == ReserveLogic.InterestRateMode.STABLE - ? stableDebt - : variableDebt; - - if (amount != type(uint256).max && amount < paybackAmount) { - paybackAmount = amount; - } - ValidationLogic.validateRepay( reserve, amount, @@ -280,6 +271,15 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage variableDebt ); + //default to max amount + uint256 paybackAmount = interestRateMode == ReserveLogic.InterestRateMode.STABLE + ? stableDebt + : variableDebt; + + if (amount < paybackAmount) { + paybackAmount = amount; + } + reserve.updateState(); //burns an equivalent amount of debt tokens @@ -356,9 +356,10 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage } /** - * @dev rebalances the stable interest rate of a user if current liquidity rate > user stable rate. - * this is regulated by Aave to ensure that the protocol is not abused, and the user is paying a fair - * rate. Anyone can call this function. + * @dev rebalances the stable interest rate of a user. Users can be rebalanced if the following conditions are satisfied: + * 1. Usage ratio is above 95% + * 2. the current deposit APY is below REBALANCE_UP_THRESHOLD * maxVariableBorrowRate, which means that too much has been + * borrowed at a stable rate and depositors are not earning enough. * @param asset the address of the reserve * @param user the address of the user to be rebalanced **/ @@ -373,7 +374,7 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage uint256 stableBorrowBalance = IERC20(stableDebtToken).balanceOf(user); - //if the utilization rate is below 95%, no rebalances are needed + //if the usage ratio is below 95%, no rebalances are needed uint256 totalBorrows = stableDebtToken .totalSupply() .add(variableDebtToken.totalSupply()) @@ -417,7 +418,7 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage /** * @dev allows depositors to enable or disable a specific deposit as collateral. * @param asset the address of the reserve - * @param useAsCollateral true if the user wants to user the deposit as collateral, false otherwise. + * @param useAsCollateral true if the user wants to use the deposit as collateral, false otherwise. **/ function setUserUseReserveAsCollateral(address asset, bool useAsCollateral) external override { _whenNotPaused(); @@ -483,11 +484,15 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage } struct FlashLoanLocalVars { - uint256 premium; - uint256 amountPlusPremium; IFlashLoanReceiver receiver; - address aTokenAddress; address oracle; + ReserveLogic.InterestRateMode debtMode; + uint256 i; + address currentAsset; + address currentATokenAddress; + uint256 currentAmount; + uint256 currentPremium; + uint256 currentAmountPlusPremium; } /** @@ -495,68 +500,90 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage * as long as the amount taken plus a fee is returned. NOTE There are security concerns for developers of flashloan receiver contracts * that must be kept into consideration. For further details please visit https://developers.aave.com * @param receiverAddress The address of the contract receiving the funds. The receiver should implement the IFlashLoanReceiver interface. - * @param asset The address of the principal reserve - * @param amount The amount requested for this flashloan + * @param assets The addresss of the assets being flashborrowed + * @param amounts The amounts requested for this flashloan for each asset * @param mode Type of the debt to open if the flash loan is not returned. 0 -> Don't open any debt, just revert, 1 -> stable, 2 -> variable * @param params Variadic packed params to pass to the receiver as extra information * @param referralCode Referral code of the flash loan **/ function flashLoan( address receiverAddress, - address asset, - uint256 amount, + address[] calldata assets, + uint256[] calldata amounts, uint256 mode, bytes calldata params, uint16 referralCode ) external override { _whenNotPaused(); - ReserveLogic.ReserveData storage reserve = _reserves[asset]; + FlashLoanLocalVars memory vars; - vars.aTokenAddress = reserve.aTokenAddress; + ValidationLogic.validateFlashloan(assets, amounts, mode); - vars.premium = amount.mul(FLASHLOAN_PREMIUM_TOTAL).div(10000); - - ValidationLogic.validateFlashloan(mode, vars.premium); - - ReserveLogic.InterestRateMode debtMode = ReserveLogic.InterestRateMode(mode); + address[] memory aTokenAddresses = new address[](assets.length); + uint256[] memory premiums = new uint256[](assets.length); vars.receiver = IFlashLoanReceiver(receiverAddress); + vars.debtMode = ReserveLogic.InterestRateMode(mode); - //transfer funds to the receiver - IAToken(vars.aTokenAddress).transferUnderlyingTo(receiverAddress, amount); + for (vars.i = 0; vars.i < assets.length; vars.i++) { + aTokenAddresses[vars.i] = _reserves[assets[vars.i]].aTokenAddress; + + premiums[vars.i] = amounts[vars.i].mul(FLASHLOAN_PREMIUM_TOTAL).div(10000); + + //transfer funds to the receiver + IAToken(aTokenAddresses[vars.i]).transferUnderlyingTo(receiverAddress, amounts[vars.i]); + } //execute action of the receiver require( - vars.receiver.executeOperation(asset, amount, vars.premium, params), + vars.receiver.executeOperation(assets, amounts, premiums, params), Errors.INVALID_FLASH_LOAN_EXECUTOR_RETURN ); - vars.amountPlusPremium = amount.add(vars.premium); + for (vars.i = 0; vars.i < assets.length; vars.i++) { + vars.currentAsset = assets[vars.i]; + vars.currentAmount = amounts[vars.i]; + vars.currentPremium = premiums[vars.i]; + vars.currentATokenAddress = aTokenAddresses[vars.i]; - if (debtMode == ReserveLogic.InterestRateMode.NONE) { - IERC20(asset).safeTransferFrom(receiverAddress, vars.aTokenAddress, vars.amountPlusPremium); + vars.currentAmountPlusPremium = vars.currentAmount.add(vars.currentPremium); - reserve.updateState(); - reserve.cumulateToLiquidityIndex(IERC20(vars.aTokenAddress).totalSupply(), vars.premium); - reserve.updateInterestRates(asset, vars.aTokenAddress, vars.premium, 0); + if (vars.debtMode == ReserveLogic.InterestRateMode.NONE) { + _reserves[vars.currentAsset].updateState(); + _reserves[vars.currentAsset].cumulateToLiquidityIndex( + IERC20(vars.currentATokenAddress).totalSupply(), + vars.currentPremium + ); + _reserves[vars.currentAsset].updateInterestRates( + vars.currentAsset, + vars.currentATokenAddress, + vars.currentPremium, + 0 + ); - emit FlashLoan(receiverAddress, asset, amount, vars.premium, referralCode); - } else { - //if the user didn't choose to return the funds, the system checks if there - //is enough collateral and eventually open a position - _executeBorrow( - ExecuteBorrowParams( - asset, - msg.sender, - msg.sender, - vars.amountPlusPremium, - mode, - vars.aTokenAddress, - referralCode, - false - ) - ); + IERC20(vars.currentAsset).safeTransferFrom( + receiverAddress, + vars.currentATokenAddress, + vars.currentAmountPlusPremium + ); + } else { + //if the user didn't choose to return the funds, the system checks if there + //is enough collateral and eventually open a position + _executeBorrow( + ExecuteBorrowParams( + vars.currentAsset, + msg.sender, + msg.sender, + vars.currentAmount, + mode, + vars.currentATokenAddress, + referralCode, + false + ) + ); + } + emit FlashLoan(receiverAddress, mode, assets, amounts, premiums, referralCode); } } diff --git a/contracts/lendingpool/LendingPoolCollateralManager.sol b/contracts/lendingpool/LendingPoolCollateralManager.sol index 0341748e..16abdd10 100644 --- a/contracts/lendingpool/LendingPoolCollateralManager.sol +++ b/contracts/lendingpool/LendingPoolCollateralManager.sol @@ -194,13 +194,6 @@ contract LendingPoolCollateralManager is VersionedInitializable, LendingPoolStor //update the principal reserve principalReserve.updateState(); - principalReserve.updateInterestRates( - principal, - principalReserve.aTokenAddress, - vars.actualAmountToLiquidate, - 0 - ); - if (vars.userVariableDebt >= vars.actualAmountToLiquidate) { IVariableDebtToken(principalReserve.variableDebtTokenAddress).burn( user, @@ -223,6 +216,13 @@ contract LendingPoolCollateralManager is VersionedInitializable, LendingPoolStor ); } + principalReserve.updateInterestRates( + principal, + principalReserve.aTokenAddress, + vars.actualAmountToLiquidate, + 0 + ); + //if liquidator reclaims the aToken, he receives the equivalent atoken amount if (receiveAToken) { vars.collateralAtoken.transferOnLiquidation(user, msg.sender, vars.maxCollateralToLiquidate); @@ -306,8 +306,8 @@ contract LendingPoolCollateralManager is VersionedInitializable, LendingPoolStor .principalCurrencyPrice .mul(purchaseAmount) .mul(10**vars.collateralDecimals) - .div(vars.collateralPrice.mul(10**vars.principalDecimals)) - .percentMul(vars.liquidationBonus); + .percentMul(vars.liquidationBonus) + .div(vars.collateralPrice.mul(10**vars.principalDecimals)); if (vars.maxAmountCollateralToLiquidate > userCollateralBalance) { collateralAmount = userCollateralBalance; diff --git a/contracts/lendingpool/LendingPoolConfigurator.sol b/contracts/lendingpool/LendingPoolConfigurator.sol index 8f154e23..c3da634c 100644 --- a/contracts/lendingpool/LendingPoolConfigurator.sol +++ b/contracts/lendingpool/LendingPoolConfigurator.sol @@ -10,6 +10,7 @@ import { import {ReserveConfiguration} from '../libraries/configuration/ReserveConfiguration.sol'; import {ILendingPoolAddressesProvider} from '../interfaces/ILendingPoolAddressesProvider.sol'; import {ILendingPool} from '../interfaces/ILendingPool.sol'; +import {ITokenConfiguration} from '../tokenization/interfaces/ITokenConfiguration.sol'; import {IERC20Detailed} from '../dependencies/openzeppelin/contracts/IERC20Detailed.sol'; import {Errors} from '../libraries/helpers/Errors.sol'; import {ReserveLogic} from '../libraries/logic/ReserveLogic.sol'; @@ -200,7 +201,6 @@ contract LendingPoolConfigurator is VersionedInitializable { /** * @dev initializes a reserve - * @param asset the address of the reserve to be initialized * @param aTokenImpl the address of the aToken contract implementation * @param stableDebtTokenImpl the address of the stable debt token contract * @param variableDebtTokenImpl the address of the variable debt token contract @@ -208,13 +208,35 @@ contract LendingPoolConfigurator is VersionedInitializable { * @param interestRateStrategyAddress the address of the interest rate strategy contract for this reserve **/ function initReserve( - address asset, address aTokenImpl, address stableDebtTokenImpl, address variableDebtTokenImpl, uint8 underlyingAssetDecimals, address interestRateStrategyAddress ) public onlyAaveAdmin { + address asset = ITokenConfiguration(aTokenImpl).UNDERLYING_ASSET_ADDRESS(); + + require( + address(pool) == ITokenConfiguration(aTokenImpl).POOL(), + Errors.INVALID_ATOKEN_POOL_ADDRESS + ); + require( + address(pool) == ITokenConfiguration(stableDebtTokenImpl).POOL(), + Errors.INVALID_STABLE_DEBT_TOKEN_POOL_ADDRESS + ); + require( + address(pool) == ITokenConfiguration(variableDebtTokenImpl).POOL(), + Errors.INVALID_VARIABLE_DEBT_TOKEN_POOL_ADDRESS + ); + require( + asset == ITokenConfiguration(stableDebtTokenImpl).UNDERLYING_ASSET_ADDRESS(), + Errors.INVALID_STABLE_DEBT_TOKEN_UNDERLYING_ADDRESS + ); + require( + asset == ITokenConfiguration(variableDebtTokenImpl).UNDERLYING_ASSET_ADDRESS(), + Errors.INVALID_VARIABLE_DEBT_TOKEN_UNDERLYING_ADDRESS + ); + address aTokenProxyAddress = _initTokenWithProxy(aTokenImpl, underlyingAssetDecimals); address stableDebtTokenProxyAddress = _initTokenWithProxy( diff --git a/contracts/libraries/helpers/Errors.sol b/contracts/libraries/helpers/Errors.sol index ee71efaa..91dd385f 100644 --- a/contracts/libraries/helpers/Errors.sol +++ b/contracts/libraries/helpers/Errors.sol @@ -45,13 +45,14 @@ library Errors { string public constant INVALID_EQUAL_ASSETS_TO_SWAP = '56'; string public constant NO_MORE_RESERVES_ALLOWED = '59'; string public constant INVALID_FLASH_LOAN_EXECUTOR_RETURN = '60'; + string public constant INCONSISTENT_FLASHLOAN_PARAMS = '69'; // require error messages - aToken - DebtTokens string public constant CALLER_MUST_BE_LENDING_POOL = '28'; // 'The caller of this function must be a lending pool' string public constant CANNOT_GIVE_ALLOWANCE_TO_HIMSELF = '30'; // 'User cannot give allowance to himself' string public constant TRANSFER_AMOUNT_NOT_GT_0 = '31'; // 'Transferred amount needs to be greater than zero' - string public constant INVALID_MINT_AMOUNT = '53'; //invalid amount to mint - string public constant INVALID_BURN_AMOUNT = '54'; //invalid amount to burn + string public constant INVALID_MINT_AMOUNT = '61'; //invalid amount to mint + string public constant INVALID_BURN_AMOUNT = '62'; //invalid amount to burn // require error messages - ReserveLogic string public constant RESERVE_ALREADY_INITIALIZED = '34'; // 'Reserve has already been initialized' @@ -64,9 +65,15 @@ library Errors { //require error messages - LendingPoolConfiguration string public constant CALLER_NOT_AAVE_ADMIN = '35'; // 'The caller must be the aave admin' string public constant RESERVE_LIQUIDITY_NOT_0 = '36'; // 'The liquidity of the reserve needs to be 0' + string public constant INVALID_ATOKEN_POOL_ADDRESS = '63'; // the lending pool in the aToken implementation is not configured correctly + string public constant INVALID_STABLE_DEBT_TOKEN_POOL_ADDRESS = '64'; // the lending pool in the stable debt token implementation is not configured correctly + string public constant INVALID_VARIABLE_DEBT_TOKEN_POOL_ADDRESS = '65'; // the lending pool in the variable debt token implementation is not configured correctly + string public constant INVALID_STABLE_DEBT_TOKEN_UNDERLYING_ADDRESS = '66'; // the underlying asset in the stable debt token implementation is not configured correctly + string public constant INVALID_VARIABLE_DEBT_TOKEN_UNDERLYING_ADDRESS = '67'; // the underlying asset in the variable debt token implementation is not configured correctly //require error messages - LendingPoolAddressesProviderRegistry string public constant PROVIDER_NOT_REGISTERED = '37'; // 'Provider is not registered' + string public constant INVALID_ADDRESSES_PROVIDER_ID = '68'; // the addresses provider id needs to be greater than 0 //return error messages - LendingPoolCollateralManager string public constant HEALTH_FACTOR_NOT_BELOW_THRESHOLD = '38'; // 'Health factor is not below the threshold' diff --git a/contracts/libraries/logic/GenericLogic.sol b/contracts/libraries/logic/GenericLogic.sol index ac379dc8..a5801b9d 100644 --- a/contracts/libraries/logic/GenericLogic.sol +++ b/contracts/libraries/logic/GenericLogic.sol @@ -25,7 +25,6 @@ library GenericLogic { using UserConfiguration for UserConfiguration.Map; uint256 public constant HEALTH_FACTOR_LIQUIDATION_THRESHOLD = 1 ether; - uint256 public constant HEALTH_FACTOR_CRITICAL_THRESHOLD = 0.98 ether; struct balanceDecreaseAllowedLocalVars { uint256 decimals; diff --git a/contracts/libraries/logic/ReserveLogic.sol b/contracts/libraries/logic/ReserveLogic.sol index c253d6a9..ee6749da 100644 --- a/contracts/libraries/logic/ReserveLogic.sol +++ b/contracts/libraries/logic/ReserveLogic.sol @@ -359,7 +359,9 @@ library ReserveLogic { vars.amountToMint = vars.totalDebtAccrued.percentMul(vars.reserveFactor); - IAToken(reserve.aTokenAddress).mintToTreasury(vars.amountToMint, newLiquidityIndex); + if (vars.amountToMint != 0) { + IAToken(reserve.aTokenAddress).mintToTreasury(vars.amountToMint, newLiquidityIndex); + } } /** diff --git a/contracts/libraries/logic/ValidationLogic.sol b/contracts/libraries/logic/ValidationLogic.sol index 93219ce8..947d84ea 100644 --- a/contracts/libraries/logic/ValidationLogic.sol +++ b/contracts/libraries/logic/ValidationLogic.sol @@ -327,11 +327,16 @@ library ValidationLogic { /** * @dev validates a flashloan action * @param mode the flashloan mode (0 = classic flashloan, 1 = open a stable rate loan, 2 = open a variable rate loan) - * @param premium the premium paid on the flashloan + * @param assets the assets being flashborrowed + * @param amounts the amounts for each asset being borrowed **/ - function validateFlashloan(uint256 mode, uint256 premium) internal pure { - require(premium > 0, Errors.REQUESTED_AMOUNT_TOO_SMALL); + function validateFlashloan( + address[] memory assets, + uint256[] memory amounts, + uint256 mode + ) internal pure { require(mode <= uint256(ReserveLogic.InterestRateMode.VARIABLE), Errors.INVALID_FLASHLOAN_MODE); + require(assets.length == amounts.length, Errors.INCONSISTENT_FLASHLOAN_PARAMS); } /** diff --git a/contracts/libraries/math/WadRayMath.sol b/contracts/libraries/math/WadRayMath.sol index 7da5fc81..a1a8d8f4 100644 --- a/contracts/libraries/math/WadRayMath.sol +++ b/contracts/libraries/math/WadRayMath.sol @@ -58,13 +58,9 @@ library WadRayMath { return 0; } - uint256 result = a * b; + uint256 result = a * b + halfWAD; - require(result / a == b, Errors.MULTIPLICATION_OVERFLOW); - - result += halfWAD; - - require(result >= halfWAD, Errors.ADDITION_OVERFLOW); + require(result >= halfWAD && (result - halfWAD) / a == b, Errors.MULTIPLICATION_OVERFLOW); return result / WAD; } @@ -80,13 +76,9 @@ library WadRayMath { uint256 halfB = b / 2; - uint256 result = a * WAD; + uint256 result = a * WAD + halfB; - require(result / WAD == a, Errors.MULTIPLICATION_OVERFLOW); - - result += halfB; - - require(result >= halfB, Errors.ADDITION_OVERFLOW); + require(result >= halfB && (result - halfB) / WAD == a, Errors.MULTIPLICATION_OVERFLOW); return result / b; } @@ -102,13 +94,9 @@ library WadRayMath { return 0; } - uint256 result = a * b; + uint256 result = a * b + halfRAY; - require(result / a == b, Errors.MULTIPLICATION_OVERFLOW); - - result += halfRAY; - - require(result >= halfRAY, Errors.ADDITION_OVERFLOW); + require(result >= halfRAY && (result - halfRAY) / a == b, Errors.MULTIPLICATION_OVERFLOW); return result / RAY; } @@ -124,13 +112,9 @@ library WadRayMath { uint256 halfB = b / 2; - uint256 result = a * RAY; + uint256 result = a * RAY + halfB; - require(result / RAY == a, Errors.MULTIPLICATION_OVERFLOW); - - result += halfB; - - require(result >= halfB, Errors.ADDITION_OVERFLOW); + require(result >= halfB && (result - halfB) / RAY == a, Errors.MULTIPLICATION_OVERFLOW); return result / b; } diff --git a/contracts/mocks/flashloan/MockFlashLoanReceiver.sol b/contracts/mocks/flashloan/MockFlashLoanReceiver.sol index 0a767712..7b72c2cb 100644 --- a/contracts/mocks/flashloan/MockFlashLoanReceiver.sol +++ b/contracts/mocks/flashloan/MockFlashLoanReceiver.sol @@ -14,8 +14,8 @@ contract MockFlashLoanReceiver is FlashLoanReceiverBase { ILendingPoolAddressesProvider internal _provider; - event ExecutedWithFail(address _reserve, uint256 _amount, uint256 _fee); - event ExecutedWithSuccess(address _reserve, uint256 _amount, uint256 _fee); + event ExecutedWithFail(address[] _assets, uint256[] _amounts, uint256[] _premiums); + event ExecutedWithSuccess(address[] _assets, uint256[] _amounts, uint256[] _premiums); bool _failExecution; uint256 _amountToApprove; @@ -44,33 +44,40 @@ contract MockFlashLoanReceiver is FlashLoanReceiverBase { } function executeOperation( - address reserve, - uint256 amount, - uint256 fee, + address[] memory assets, + uint256[] memory amounts, + uint256[] memory premiums, bytes memory params ) public override returns (bool) { params; - //mint to this contract the specific amount - MintableERC20 token = MintableERC20(reserve); - - //check the contract has the specified balance - require(amount <= IERC20(reserve).balanceOf(address(this)), 'Invalid balance for the contract'); - - uint256 amountToReturn = (_amountToApprove != 0) ? _amountToApprove : amount.add(fee); if (_failExecution) { - emit ExecutedWithFail(reserve, amount, fee); + emit ExecutedWithFail(assets, amounts, premiums); return !_simulateEOA; } - //execution does not fail - mint tokens and return them to the _destination - //note: if the reserve is eth, the mock contract must receive at least _fee ETH before calling executeOperation + for (uint256 i = 0; i < assets.length; i++) { + //mint to this contract the specific amount + MintableERC20 token = MintableERC20(assets[i]); - token.mint(fee); + //check the contract has the specified balance + require( + amounts[i] <= IERC20(assets[i]).balanceOf(address(this)), + 'Invalid balance for the contract' + ); - IERC20(reserve).approve(_addressesProvider.getLendingPool(), amountToReturn); + uint256 amountToReturn = (_amountToApprove != 0) + ? _amountToApprove + : amounts[i].add(premiums[i]); + //execution does not fail - mint tokens and return them to the _destination + //note: if the reserve is eth, the mock contract must receive at least _fee ETH before calling executeOperation - emit ExecutedWithSuccess(reserve, amount, fee); + token.mint(premiums[i]); + + IERC20(assets[i]).approve(_addressesProvider.getLendingPool(), amountToReturn); + } + + emit ExecutedWithSuccess(assets, amounts, premiums); return true; } diff --git a/contracts/tokenization/AToken.sol b/contracts/tokenization/AToken.sol index 13aa905c..bee1184d 100644 --- a/contracts/tokenization/AToken.sol +++ b/contracts/tokenization/AToken.sol @@ -2,7 +2,7 @@ pragma solidity ^0.6.8; import {IncentivizedERC20} from './IncentivizedERC20.sol'; -import {LendingPool} from '../lendingpool/LendingPool.sol'; +import {ILendingPool} from '../interfaces/ILendingPool.sol'; import {WadRayMath} from '../libraries/math/WadRayMath.sol'; import {Errors} from '../libraries/helpers/Errors.sol'; import {VersionedInitializable} from '../libraries/aave-upgradeability/VersionedInitializable.sol'; @@ -32,7 +32,7 @@ contract AToken is VersionedInitializable, IncentivizedERC20, IAToken { uint256 public constant ATOKEN_REVISION = 0x1; address public immutable UNDERLYING_ASSET_ADDRESS; address public immutable RESERVE_TREASURY_ADDRESS; - LendingPool public immutable POOL; + ILendingPool public immutable POOL; /// @dev owner => next valid nonce to submit with permit() mapping(address => uint256) public _nonces; @@ -45,7 +45,7 @@ contract AToken is VersionedInitializable, IncentivizedERC20, IAToken { } constructor( - LendingPool pool, + ILendingPool pool, address underlyingAssetAddress, address reserveTreasuryAddress, string memory tokenName, diff --git a/contracts/tokenization/StableDebtToken.sol b/contracts/tokenization/StableDebtToken.sol index d24228ea..5d38c464 100644 --- a/contracts/tokenization/StableDebtToken.sol +++ b/contracts/tokenization/StableDebtToken.sol @@ -196,8 +196,7 @@ contract StableDebtToken is IStableDebtToken, DebtTokenBase { /** * @dev Calculates the increase in balance since the last user interaction * @param user The address of the user for which the interest is being accumulated - * @return The previous principal balance, the new principal balance, the balance increase - * and the new user index + * @return The previous principal balance, the new principal balance and the balance increase **/ function _calculateBalanceIncrease(address user) internal diff --git a/contracts/tokenization/VariableDebtToken.sol b/contracts/tokenization/VariableDebtToken.sol index 814ad8e7..2a5d903c 100644 --- a/contracts/tokenization/VariableDebtToken.sol +++ b/contracts/tokenization/VariableDebtToken.sol @@ -43,7 +43,7 @@ contract VariableDebtToken is DebtTokenBase, IVariableDebtToken { return 0; } - return scaledBalance.rayMul(POOL.getReserveNormalizedVariableDebt(UNDERLYING_ASSET)); + return scaledBalance.rayMul(POOL.getReserveNormalizedVariableDebt(UNDERLYING_ASSET_ADDRESS)); } /** @@ -102,7 +102,8 @@ contract VariableDebtToken is DebtTokenBase, IVariableDebtToken { * @return the total supply **/ function totalSupply() public virtual override view returns (uint256) { - return super.totalSupply().rayMul(POOL.getReserveNormalizedVariableDebt(UNDERLYING_ASSET)); + return + super.totalSupply().rayMul(POOL.getReserveNormalizedVariableDebt(UNDERLYING_ASSET_ADDRESS)); } /** diff --git a/contracts/tokenization/base/DebtTokenBase.sol b/contracts/tokenization/base/DebtTokenBase.sol index a2744017..fc43e770 100644 --- a/contracts/tokenization/base/DebtTokenBase.sol +++ b/contracts/tokenization/base/DebtTokenBase.sol @@ -15,8 +15,8 @@ import {Errors} from '../../libraries/helpers/Errors.sol'; */ abstract contract DebtTokenBase is IncentivizedERC20, VersionedInitializable { - address internal immutable UNDERLYING_ASSET; - ILendingPool internal immutable POOL; + address public immutable UNDERLYING_ASSET_ADDRESS; + ILendingPool public immutable POOL; mapping(address => uint256) internal _usersData; /** @@ -39,7 +39,7 @@ abstract contract DebtTokenBase is IncentivizedERC20, VersionedInitializable { address incentivesController ) public IncentivizedERC20(name, symbol, 18, incentivesController) { POOL = ILendingPool(pool); - UNDERLYING_ASSET = underlyingAssetAddress; + UNDERLYING_ASSET_ADDRESS = underlyingAssetAddress; } /** @@ -58,10 +58,6 @@ abstract contract DebtTokenBase is IncentivizedERC20, VersionedInitializable { _setDecimals(decimals); } - function underlyingAssetAddress() public view returns (address) { - return UNDERLYING_ASSET; - } - /** * @dev Being non transferrable, the debt token does not implement any of the * standard ERC20 functions for transfer and allowance. diff --git a/contracts/tokenization/interfaces/ITokenConfiguration.sol b/contracts/tokenization/interfaces/ITokenConfiguration.sol new file mode 100644 index 00000000..50eb3b09 --- /dev/null +++ b/contracts/tokenization/interfaces/ITokenConfiguration.sol @@ -0,0 +1,13 @@ +pragma solidity ^0.6; + +/** + * @title ITokenConfiguration + * @author Aave + * @dev common interface between aTokens and debt tokens to fetch the + * token configuration + **/ +interface ITokenConfiguration { + function UNDERLYING_ASSET_ADDRESS() external view returns (address); + + function POOL() external view returns (address); +} diff --git a/deployed-contracts.json b/deployed-contracts.json index 7490aca0..bd606191 100644 --- a/deployed-contracts.json +++ b/deployed-contracts.json @@ -27,8 +27,8 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "kovan": { - "address": "0xd7e3C4b2CE495066dE1923c268D68A844bD7Ae13", - "deployer": "0x6b40a028d2Ab94e5f6d3793F32D326CDf724Bb1D" + "address": "0xF9a2E6D57c691f3aa5269858178a13Ef06378579", + "deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F" } }, "LendingPoolAddressesProviderRegistry": { @@ -45,8 +45,8 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "kovan": { - "address": "0x83c7A0E78e8eee2108a87d7a6770f22BAcb68b5A", - "deployer": "0x6b40a028d2Ab94e5f6d3793F32D326CDf724Bb1D" + "address": "0xf3266d89e6742fAE2C35D05eD549cd4e117300a7", + "deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F" } }, "FeeProvider": { @@ -76,7 +76,7 @@ "address": "0x9Ec55627757348b322c8dD0865D704649bFa0c7b" }, "kovan": { - "address": "0x1339f3c1FfF00D0FD8946187fdC61F0ef0fFe786" + "address": "0x1aae278bCcdb95817c7A546d752fC662F09b6DBa" } }, "LendingPoolDataProvider": { @@ -92,7 +92,7 @@ "address": "0x3EE716e38f21e5FC16BFDB773db24D63C637A5d8" }, "kovan": { - "address": "0xB43CCfF1148bb5ab2104E2ee68A7c30cDEBb9A9C" + "address": "0x8E05A3054cb736258FaF4638D07058cE6e294d2C" } }, "PriceOracle": { @@ -173,8 +173,8 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "kovan": { - "address": "0xc4e3d83AEd3D3c60Cf4b238F634014cE103F6fa1", - "deployer": "0x6b40a028d2Ab94e5f6d3793F32D326CDf724Bb1D" + "address": "0x47341CE48FfE1cbD91991578B880a18c45cdB5CA", + "deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F" } }, "LendingPoolLiquidationManager": { @@ -582,8 +582,8 @@ "address": "0x2cfcA5785261fbC88EFFDd46fCFc04c22525F9e4" }, "kovan": { - "address": "0xE4566ce19626826360f4faD941418e2849fC3685", - "deployer": "0x6b40a028d2Ab94e5f6d3793F32D326CDf724Bb1D" + "address": "0xfF28b837352d9531bAb6dFF3650D7831192117F7", + "deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F" } }, "LendingPoolConfigurator": { @@ -600,8 +600,8 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "kovan": { - "address": "0x0043967C1Cf13c4Ff3Bc38109054D5a97C147B4A", - "deployer": "0x6b40a028d2Ab94e5f6d3793F32D326CDf724Bb1D" + "address": "0x0EDc241FdA0dF39EB1B9eB1236217BBe72Ab911D", + "deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F" } }, "PriceOracle": { @@ -620,8 +620,8 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "kovan": { - "address": "0xdF75B68c75c30D177f4Dbd47cBcb5E2E4f3cf8F9", - "deployer": "0x6b40a028d2Ab94e5f6d3793F32D326CDf724Bb1D" + "address": "0x293f5BcC66762c28a5d3Bd8512a799D457F5296D", + "deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F" } }, "AToken": { @@ -645,8 +645,8 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "kovan": { - "address": "0x1A23ADa7218e0a66b7368E12E379Ea88d7a68a27", - "deployer": "0x6b40a028d2Ab94e5f6d3793F32D326CDf724Bb1D" + "address": "0xf303Ae6F24C29D94E367fdb5C7aE04D32BEbF13E", + "deployer": "0x85e4A467343c0dc4aDAB74Af84448D9c45D8ae6F" } }, "StableDebtToken": { diff --git a/docker-compose.yml b/docker-compose.yml index 61e4f178..a30c069a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,6 +2,8 @@ version: '3.5' services: contracts-env: + env_file: + - .env build: context: ./ working_dir: /src diff --git a/helpers/contracts-helpers.ts b/helpers/contracts-helpers.ts index d6a6d692..93f0c307 100644 --- a/helpers/contracts-helpers.ts +++ b/helpers/contracts-helpers.ts @@ -1,6 +1,6 @@ import {Contract, Signer, utils, ethers} from 'ethers'; import {CommonsConfig} from '../config/commons'; -import {getDb, BRE} from './misc-utils'; +import {getDb, BRE, waitForTx} from './misc-utils'; import { tEthereumAddress, eContractid, @@ -100,7 +100,7 @@ export const deployContract = async ( const contract = (await (await BRE.ethers.getContractFactory(contractName)).deploy( ...args )) as ContractType; - + await waitForTx(contract.deployTransaction); await registerContractInJsonDb(contractName, contract); return contract; }; @@ -204,6 +204,7 @@ export const deployLendingPool = async (verify?: boolean) => { ); const factory = await linkLibrariesToArtifact(lendingPoolArtifact); const lendingPool = await factory.deploy(); + await waitForTx(lendingPool.deployTransaction); const instance = (await lendingPool.deployed()) as LendingPool; if (verify) { await verifyContract(eContractid.LendingPool, instance.address, []); @@ -787,7 +788,7 @@ export const initReserves = async ( stableRateSlope2, }, ] = (Object.entries(reservesParams) as [string, IReserveParams][])[reserveParamIndex]; - console.log('deploy def reserve'); + console.log('deploy the interest rate strategy for ', assetSymbol); const rateStrategyContract = await deployDefaultReserveInterestRateStrategy( [ lendingPoolAddressesProvider.address, @@ -800,7 +801,7 @@ export const initReserves = async ( verify ); - console.log('deploy stable deb totken ', assetSymbol); + console.log('deploy the stable debt totken for ', assetSymbol); const stableDebtToken = await deployStableDebtToken( [ `Aave stable debt bearing ${assetSymbol === 'WETH' ? 'ETH' : assetSymbol}`, @@ -812,7 +813,7 @@ export const initReserves = async ( verify ); - console.log('deploy var deb totken ', assetSymbol); + console.log('deploy the variable debt totken for ', assetSymbol); const variableDebtToken = await deployVariableDebtToken( [ `Aave variable debt bearing ${assetSymbol === 'WETH' ? 'ETH' : assetSymbol}`, @@ -824,7 +825,7 @@ export const initReserves = async ( verify ); - console.log('deploy a token ', assetSymbol); + console.log('deploy the aToken for ', assetSymbol); const aToken = await deployGenericAToken( [ lendingPool.address, @@ -844,9 +845,8 @@ export const initReserves = async ( } } - console.log('init reserve currency ', assetSymbol); + console.log('initialize the reserve ', assetSymbol); await lendingPoolConfigurator.initReserve( - tokenAddress, aToken.address, stableDebtToken.address, variableDebtToken.address, diff --git a/helpers/etherscan-verification.ts b/helpers/etherscan-verification.ts index 65b6f440..a7393f0a 100644 --- a/helpers/etherscan-verification.ts +++ b/helpers/etherscan-verification.ts @@ -1,13 +1,20 @@ import {exit} from 'process'; import fs from 'fs'; +import globby from 'globby'; import {file} from 'tmp-promise'; import {BRE} from './misc-utils'; +const listSolidityFiles = (dir: string) => globby(`${dir}/**/*.sol`); + +const fatalErrors = [ + `The address provided as argument contains a contract, but its bytecode`, + `Daily limit of 100 source code submissions reached`, +]; + export const SUPPORTED_ETHERSCAN_NETWORKS = ['main', 'ropsten', 'kovan']; export const getEtherscanPath = async (contractName: string) => { - const compilerInput = await BRE.run('compile:get-compiler-input'); - const paths = Object.keys(compilerInput.sources); + const paths = await listSolidityFiles(BRE.config.paths.sources); const path = paths.find((p) => p.includes(contractName)); if (!path) { throw new Error( @@ -79,12 +86,22 @@ export const runTaskWithRetry = async ( cleanup(); } else { cleanup(); - console.error('[ERROR] Errors after all the retries, check the logs for more information.'); + console.error( + '[ETHERSCAN][ERROR] Errors after all the retries, check the logs for more information.' + ); } } catch (error) { counter--; - console.info(`[INFO] Retrying attemps: ${counter}.`); - console.error('[ERROR]', error.message); + console.info(`[ETHERSCAN][[INFO] Retrying attemps: ${counter}.`); + console.error('[ETHERSCAN][[ERROR]', error.message); + + if (fatalErrors.some((fatalError) => error.message.includes(fatalError))) { + console.error( + '[ETHERSCAN][[ERROR] Fatal error detected, skip retries and resume deployment.' + ); + return; + } + await runTaskWithRetry(task, params, counter, msDelay, cleanup); } }; diff --git a/helpers/init-helpers.ts b/helpers/init-helpers.ts index 6e049c51..599fc7ff 100644 --- a/helpers/init-helpers.ts +++ b/helpers/init-helpers.ts @@ -2,6 +2,7 @@ import {iMultiPoolsAssets, IReserveParams, tEthereumAddress} from './types'; import {LendingPool} from '../types/LendingPool'; import {LendingPoolConfigurator} from '../types/LendingPoolConfigurator'; import {AaveProtocolTestHelpers} from '../types/AaveProtocolTestHelpers'; +import {waitForTx} from './misc-utils'; export const enableReservesToBorrow = async ( reservesParams: iMultiPoolsAssets, @@ -29,7 +30,14 @@ export const enableReservesToBorrow = async ( continue; } - await lendingPoolConfigurator.enableBorrowingOnReserve(tokenAddress, stableBorrowRateEnabled); + console.log('Enabling borrowing on reserve ', assetSymbol); + + await waitForTx( + await lendingPoolConfigurator.enableBorrowingOnReserve( + tokenAddress, + stableBorrowRateEnabled + ) + ); } catch (e) { console.log( `Enabling reserve for borrowings for ${assetSymbol} failed with error ${e}. Skipped.` @@ -66,11 +74,15 @@ export const enableReservesAsCollateral = async ( } try { - await lendingPoolConfigurator.enableReserveAsCollateral( - tokenAddress, - baseLTVAsCollateral, - liquidationThreshold, - liquidationBonus + console.log(`Enabling reserve ${assetSymbol} as collateral`); + + await waitForTx( + await lendingPoolConfigurator.enableReserveAsCollateral( + tokenAddress, + baseLTVAsCollateral, + liquidationThreshold, + liquidationBonus + ) ); } catch (e) { console.log( diff --git a/helpers/misc-utils.ts b/helpers/misc-utils.ts index 67ac7fe2..8bf0c416 100644 --- a/helpers/misc-utils.ts +++ b/helpers/misc-utils.ts @@ -41,7 +41,7 @@ export const increaseTime = async (secondsToIncrease: number) => { await BRE.ethers.provider.send('evm_mine', []); }; -export const waitForTx = async (tx: ContractTransaction) => await tx.wait(); +export const waitForTx = async (tx: ContractTransaction) => await tx.wait(1); export const filterMapBy = (raw: {[key: string]: any}, fn: (key: string) => boolean) => Object.keys(raw) diff --git a/helpers/oracles-helpers.ts b/helpers/oracles-helpers.ts index b3439df9..f5b5941d 100644 --- a/helpers/oracles-helpers.ts +++ b/helpers/oracles-helpers.ts @@ -30,7 +30,7 @@ export const setInitialMarketRatesInRatesOracle = async ( const [, assetAddress] = (Object.entries(assetsAddresses) as [string, string][])[ assetAddressIndex ]; - await lendingRateOracleInstance.setMarketBorrowRate(assetAddress, borrowRate); + await waitForTx(await lendingRateOracleInstance.setMarketBorrowRate(assetAddress, borrowRate)); console.log('added Market Borrow Rate for: ', assetSymbol); } }; diff --git a/helpers/types.ts b/helpers/types.ts index 29cf3a77..305ec335 100644 --- a/helpers/types.ts +++ b/helpers/types.ts @@ -105,6 +105,7 @@ export enum ProtocolErrors { //require error messages - LendingPoolAddressesProviderRegistry PROVIDER_NOT_REGISTERED = '37', // 'Provider is not registered' + INVALID_ADDRESSES_PROVIDER_ID = '68', //return error messages - LendingPoolCollateralManager HEALTH_FACTOR_NOT_BELOW_THRESHOLD = '38', // 'Health factor is not below the threshold' diff --git a/package-lock.json b/package-lock.json index 2ad98251..1a9bae54 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5268,13 +5268,13 @@ "dependencies": { "ansi-regex": { "version": "4.1.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, "ansi-styles": { "version": "3.2.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { @@ -5283,7 +5283,7 @@ }, "bindings": { "version": "1.5.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", "dev": true, "requires": { @@ -5292,7 +5292,7 @@ }, "bip66": { "version": "1.1.5", - "resolved": false, + "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", "dev": true, "requires": { @@ -5301,19 +5301,19 @@ }, "bn.js": { "version": "4.11.8", - "resolved": false, + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", "dev": true }, "brorand": { "version": "1.1.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", "dev": true }, "browserify-aes": { "version": "1.2.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "requires": { @@ -5327,25 +5327,25 @@ }, "buffer-from": { "version": "1.1.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, "buffer-xor": { "version": "1.0.3", - "resolved": false, + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", "dev": true }, "camelcase": { "version": "5.3.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, "cipher-base": { "version": "1.0.4", - "resolved": false, + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "dev": true, "requires": { @@ -5355,7 +5355,7 @@ }, "cliui": { "version": "5.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "requires": { @@ -5366,7 +5366,7 @@ }, "color-convert": { "version": "1.9.3", - "resolved": false, + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "requires": { @@ -5375,13 +5375,13 @@ }, "color-name": { "version": "1.1.3", - "resolved": false, + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, "create-hash": { "version": "1.2.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "requires": { @@ -5394,7 +5394,7 @@ }, "create-hmac": { "version": "1.1.7", - "resolved": false, + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "requires": { @@ -5408,7 +5408,7 @@ }, "cross-spawn": { "version": "6.0.5", - "resolved": false, + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { @@ -5421,13 +5421,13 @@ }, "decamelize": { "version": "1.2.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, "drbg.js": { "version": "1.0.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", "dev": true, "requires": { @@ -5438,7 +5438,7 @@ }, "elliptic": { "version": "6.5.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.0.tgz", "integrity": "sha512-eFOJTMyCYb7xtE/caJ6JJu+bhi67WCYNbkGSknu20pmM8Ke/bqOfdnZWxyoGN26JgfxTbXrsCkEw4KheCT/KGg==", "dev": true, "requires": { @@ -5453,13 +5453,13 @@ }, "emoji-regex": { "version": "7.0.3", - "resolved": false, + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, "end-of-stream": { "version": "1.4.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", "dev": true, "requires": { @@ -5468,7 +5468,7 @@ }, "ethereumjs-util": { "version": "6.1.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz", "integrity": "sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q==", "dev": true, "requires": { @@ -5483,7 +5483,7 @@ }, "ethjs-util": { "version": "0.1.6", - "resolved": false, + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", "dev": true, "requires": { @@ -5493,7 +5493,7 @@ }, "evp_bytestokey": { "version": "1.0.3", - "resolved": false, + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "dev": true, "requires": { @@ -5503,7 +5503,7 @@ }, "execa": { "version": "1.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", "dev": true, "requires": { @@ -5518,13 +5518,13 @@ }, "file-uri-to-path": { "version": "1.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", "dev": true }, "find-up": { "version": "3.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { @@ -5533,13 +5533,13 @@ }, "get-caller-file": { "version": "2.0.5", - "resolved": false, + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, "get-stream": { "version": "4.1.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", "dev": true, "requires": { @@ -5548,7 +5548,7 @@ }, "hash-base": { "version": "3.0.4", - "resolved": false, + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", "dev": true, "requires": { @@ -5558,7 +5558,7 @@ }, "hash.js": { "version": "1.1.7", - "resolved": false, + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "dev": true, "requires": { @@ -5568,7 +5568,7 @@ }, "hmac-drbg": { "version": "1.0.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "dev": true, "requires": { @@ -5579,43 +5579,43 @@ }, "inherits": { "version": "2.0.4", - "resolved": false, + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, "invert-kv": { "version": "2.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", "dev": true }, "is-fullwidth-code-point": { "version": "2.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, "is-hex-prefixed": { "version": "1.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=", "dev": true }, "is-stream": { "version": "1.1.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, "isexe": { "version": "2.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, "keccak": { "version": "1.4.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", "dev": true, "requires": { @@ -5627,7 +5627,7 @@ }, "lcid": { "version": "2.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", "dev": true, "requires": { @@ -5636,7 +5636,7 @@ }, "locate-path": { "version": "3.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { @@ -5646,7 +5646,7 @@ }, "map-age-cleaner": { "version": "0.1.3", - "resolved": false, + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", "dev": true, "requires": { @@ -5655,7 +5655,7 @@ }, "md5.js": { "version": "1.3.5", - "resolved": false, + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "dev": true, "requires": { @@ -5666,7 +5666,7 @@ }, "mem": { "version": "4.3.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", "dev": true, "requires": { @@ -5677,37 +5677,37 @@ }, "mimic-fn": { "version": "2.1.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, "minimalistic-assert": { "version": "1.0.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", "dev": true }, "minimalistic-crypto-utils": { "version": "1.0.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", "dev": true }, "nan": { "version": "2.14.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", "dev": true }, "nice-try": { "version": "1.0.5", - "resolved": false, + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, "npm-run-path": { "version": "2.0.2", - "resolved": false, + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { @@ -5716,7 +5716,7 @@ }, "once": { "version": "1.4.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { @@ -5725,7 +5725,7 @@ }, "os-locale": { "version": "3.1.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", "dev": true, "requires": { @@ -5736,25 +5736,25 @@ }, "p-defer": { "version": "1.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", "dev": true }, "p-finally": { "version": "1.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", "dev": true }, "p-is-promise": { "version": "2.1.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", "dev": true }, "p-limit": { "version": "2.2.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", "dev": true, "requires": { @@ -5763,7 +5763,7 @@ }, "p-locate": { "version": "3.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { @@ -5772,25 +5772,25 @@ }, "p-try": { "version": "2.2.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, "path-exists": { "version": "3.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true }, "path-key": { "version": "2.0.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true }, "pump": { "version": "3.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, "requires": { @@ -5800,19 +5800,19 @@ }, "require-directory": { "version": "2.1.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, "require-main-filename": { "version": "2.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, "ripemd160": { "version": "2.0.2", - "resolved": false, + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "dev": true, "requires": { @@ -5822,7 +5822,7 @@ }, "rlp": { "version": "2.2.3", - "resolved": false, + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.3.tgz", "integrity": "sha512-l6YVrI7+d2vpW6D6rS05x2Xrmq8oW7v3pieZOJKBEdjuTF4Kz/iwk55Zyh1Zaz+KOB2kC8+2jZlp2u9L4tTzCQ==", "dev": true, "requires": { @@ -5832,13 +5832,13 @@ }, "safe-buffer": { "version": "5.2.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", "dev": true }, "secp256k1": { "version": "3.7.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.7.1.tgz", "integrity": "sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g==", "dev": true, "requires": { @@ -5854,19 +5854,19 @@ }, "semver": { "version": "5.7.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "dev": true }, "set-blocking": { "version": "2.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, "sha.js": { "version": "2.4.11", - "resolved": false, + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, "requires": { @@ -5876,7 +5876,7 @@ }, "shebang-command": { "version": "1.2.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { @@ -5885,25 +5885,25 @@ }, "shebang-regex": { "version": "1.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, "signal-exit": { "version": "3.0.2", - "resolved": false, + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, "source-map": { "version": "0.6.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, "source-map-support": { "version": "0.5.12", - "resolved": false, + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", "dev": true, "requires": { @@ -5913,7 +5913,7 @@ }, "string-width": { "version": "3.1.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { @@ -5924,7 +5924,7 @@ }, "strip-ansi": { "version": "5.2.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { @@ -5933,13 +5933,13 @@ }, "strip-eof": { "version": "1.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, "strip-hex-prefix": { "version": "1.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", "dev": true, "requires": { @@ -5948,7 +5948,7 @@ }, "which": { "version": "1.3.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { @@ -5957,13 +5957,13 @@ }, "which-module": { "version": "2.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, "wrap-ansi": { "version": "5.1.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "dev": true, "requires": { @@ -5974,19 +5974,19 @@ }, "wrappy": { "version": "1.0.2", - "resolved": false, + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, "y18n": { "version": "4.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "dev": true }, "yargs": { "version": "13.2.4", - "resolved": false, + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.4.tgz", "integrity": "sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg==", "dev": true, "requires": { @@ -6005,7 +6005,7 @@ }, "yargs-parser": { "version": "13.1.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", "dev": true, "requires": { @@ -16115,18 +16115,16 @@ } }, "globby": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", - "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz", + "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==", "dev": true, "requires": { - "@types/glob": "^7.1.1", "array-union": "^2.1.0", "dir-glob": "^3.0.1", - "fast-glob": "^3.0.3", - "glob": "^7.1.3", - "ignore": "^5.1.1", - "merge2": "^1.2.3", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", "slash": "^3.0.0" } }, @@ -19340,6 +19338,22 @@ "universalify": "^0.1.0" } }, + "globby": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", + "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", + "dev": true, + "requires": { + "@types/glob": "^7.1.1", + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.0.3", + "glob": "^7.1.3", + "ignore": "^5.1.1", + "merge2": "^1.2.3", + "slash": "^3.0.0" + } + }, "pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", diff --git a/package.json b/package.json index d5d355ca..f17dd906 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "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", + "aave:kovan:full:migration": "npm run buidler:kovan -- aave:full --verify", "aave:ropsten:dev:migration": "npm run buidler:ropsten -- aave:dev --verify", "aave:ropsten:full:migration": "npm run buidler:ropsten -- aave:full --verify", "aave:main:dev:migration": "npm run buidler:main -- aave:dev --verify", @@ -72,6 +72,7 @@ "ethereum-waffle": "3.0.2", "ethereumjs-util": "7.0.2", "ethers": "5.0.8", + "globby": "^11.0.1", "husky": "^4.2.5", "lowdb": "1.0.0", "prettier": "^2.0.5", diff --git a/test.log b/test.log index ca8c215e..e69de29b 100644 --- a/test.log +++ b/test.log @@ -1,3077 +0,0 @@ -Compiling... - - - - - - - - - - - - - - - - -Compiled 76 contracts successfully - --> Deploying test environment... -*** MintableERC20 *** - -Network: localhost -tx: 0x7fa031db361a2b22addc1542eb9dca3b16ddce863e1b52294c94ec3cf9ce1a82 -contract address: 0xbe66dC9DFEe580ED968403e35dF7b5159f873df8 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770435 - -****** - -*** DAI *** - -Network: localhost -tx: 0x7fa031db361a2b22addc1542eb9dca3b16ddce863e1b52294c94ec3cf9ce1a82 -contract address: 0xbe66dC9DFEe580ED968403e35dF7b5159f873df8 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770435 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0xbfedacf9ef4b74c7e64c1b5cbb30142abcb758d2f75ebfb7afcbd8f64e985b8c -contract address: 0x93AfC6Df4bB8F62F2493B19e577f8382c0BA9EBC -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770555 - -****** - -*** LEND *** - -Network: localhost -tx: 0xbfedacf9ef4b74c7e64c1b5cbb30142abcb758d2f75ebfb7afcbd8f64e985b8c -contract address: 0x93AfC6Df4bB8F62F2493B19e577f8382c0BA9EBC -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770555 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0x77fb425d1e7d898c3d9ef846acd4541625fa0b69caeb1c73a45e81925fa965a4 -contract address: 0x75Ded61646B5945BdDd0CD9a9Db7c8288DA6F810 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770555 - -****** - -*** TUSD *** - -Network: localhost -tx: 0x77fb425d1e7d898c3d9ef846acd4541625fa0b69caeb1c73a45e81925fa965a4 -contract address: 0x75Ded61646B5945BdDd0CD9a9Db7c8288DA6F810 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770555 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0x9279772c3bd0cc7ff7229fac6a46e2a19c46ddd507d15026d758b77f8a9d1934 -contract address: 0xdE7c40e675bF1aA45c18cCbaEb9662B16b0Ddf7E -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770435 - -****** - -*** BAT *** - -Network: localhost -tx: 0x9279772c3bd0cc7ff7229fac6a46e2a19c46ddd507d15026d758b77f8a9d1934 -contract address: 0xdE7c40e675bF1aA45c18cCbaEb9662B16b0Ddf7E -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770435 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0x6e201e503500ae5ee3b900a7a0970085b2d03e5702c1192ca07cb228d3dde9a9 -contract address: 0xEcb928A3c079a1696Aa5244779eEc3dE1717fACd -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770555 - -****** - -*** WETH *** - -Network: localhost -tx: 0x6e201e503500ae5ee3b900a7a0970085b2d03e5702c1192ca07cb228d3dde9a9 -contract address: 0xEcb928A3c079a1696Aa5244779eEc3dE1717fACd -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770555 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0x8a2b86528542d7500abbb9af3712b6e2d93a70dccff69ad5fbcc74973be2f0c3 -contract address: 0xDFbeeed692AA81E7f86E72F7ACbEA2A1C4d63544 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770555 - -****** - -*** USDC *** - -Network: localhost -tx: 0x8a2b86528542d7500abbb9af3712b6e2d93a70dccff69ad5fbcc74973be2f0c3 -contract address: 0xDFbeeed692AA81E7f86E72F7ACbEA2A1C4d63544 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770555 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0x759e5c27217595d2b42a14cabfd3fd66bdfe03d8c1976ffed978e3ddaa37bcba -contract address: 0x5191aA68c7dB195181Dd2441dBE23A48EA24b040 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770555 - -****** - -*** USDT *** - -Network: localhost -tx: 0x759e5c27217595d2b42a14cabfd3fd66bdfe03d8c1976ffed978e3ddaa37bcba -contract address: 0x5191aA68c7dB195181Dd2441dBE23A48EA24b040 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770555 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0x5ea082d2b1c31d832663b08ac1d7ad4190415a8ea5b4994b406a793a2e3b9f06 -contract address: 0x8F9422aa37215c8b3D1Ea1674138107F84D68F26 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770555 - -****** - -*** SUSD *** - -Network: localhost -tx: 0x5ea082d2b1c31d832663b08ac1d7ad4190415a8ea5b4994b406a793a2e3b9f06 -contract address: 0x8F9422aa37215c8b3D1Ea1674138107F84D68F26 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770555 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0xd44e0f48e38f7c216be9a16449efedfb231d7430a1c0fc3f8bcffdf7948ccfcf -contract address: 0xa89E20284Bd638F31b0011D0fC754Fc9d2fa73e3 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770435 - -****** - -*** ZRX *** - -Network: localhost -tx: 0xd44e0f48e38f7c216be9a16449efedfb231d7430a1c0fc3f8bcffdf7948ccfcf -contract address: 0xa89E20284Bd638F31b0011D0fC754Fc9d2fa73e3 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770435 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0x239d5b4ae02e9b51640fc4b37e76d04e5a8d4d89583046744365d5c986a2b03e -contract address: 0xaA935993065F2dDB1d13623B1941C7AEE3A60F23 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770435 - -****** - -*** MKR *** - -Network: localhost -tx: 0x239d5b4ae02e9b51640fc4b37e76d04e5a8d4d89583046744365d5c986a2b03e -contract address: 0xaA935993065F2dDB1d13623B1941C7AEE3A60F23 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770435 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0xf04a9569ae24444f812d6e27087a159b9f2d8efd6af87530cb84dee7be87eb60 -contract address: 0x35A2624888e207e4B3434E9a9E250bF6Ee68FeA3 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770555 - -****** - -*** WBTC *** - -Network: localhost -tx: 0xf04a9569ae24444f812d6e27087a159b9f2d8efd6af87530cb84dee7be87eb60 -contract address: 0x35A2624888e207e4B3434E9a9E250bF6Ee68FeA3 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770555 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0xd14a76002a7764f1942b286cdbd83a6c31c963a6536c11e245dd844c80bf2423 -contract address: 0x1f569c307949a908A4b8Ff7453a88Ca0b8D8df13 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770555 - -****** - -*** LINK *** - -Network: localhost -tx: 0xd14a76002a7764f1942b286cdbd83a6c31c963a6536c11e245dd844c80bf2423 -contract address: 0x1f569c307949a908A4b8Ff7453a88Ca0b8D8df13 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770555 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0x3eff7433edc5c39c2f4023a61518e744c4b551fc459f9a7b6ab1ca549b779895 -contract address: 0x4301cb254CCc126B9eb9cbBE030C6FDA2FA16D4a -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770435 - -****** - -*** KNC *** - -Network: localhost -tx: 0x3eff7433edc5c39c2f4023a61518e744c4b551fc459f9a7b6ab1ca549b779895 -contract address: 0x4301cb254CCc126B9eb9cbBE030C6FDA2FA16D4a -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770435 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0x264fbe1fd2c4bd18b3e256411d085b30f34386ae6a4566a0b2f0d0c04e6bec88 -contract address: 0x0766c9592a8686CAB0081b4f35449462c6e82F11 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770555 - -****** - -*** MANA *** - -Network: localhost -tx: 0x264fbe1fd2c4bd18b3e256411d085b30f34386ae6a4566a0b2f0d0c04e6bec88 -contract address: 0x0766c9592a8686CAB0081b4f35449462c6e82F11 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770555 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0xf7f19edbb06b36151a13ed1730693bda0470274d911b3017bb05a6e17959ba80 -contract address: 0xaF6D34adD35E1A565be4539E4d1069c48A49C953 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770435 - -****** - -*** REP *** - -Network: localhost -tx: 0xf7f19edbb06b36151a13ed1730693bda0470274d911b3017bb05a6e17959ba80 -contract address: 0xaF6D34adD35E1A565be4539E4d1069c48A49C953 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770435 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0x609c4f2e84f0f979bed72c3fabc665e49917afc02cccd616223eaaa597a0064c -contract address: 0x48bb3E35D2D6994374db457a6Bf61de2d9cC8E49 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770435 - -****** - -*** SNX *** - -Network: localhost -tx: 0x609c4f2e84f0f979bed72c3fabc665e49917afc02cccd616223eaaa597a0064c -contract address: 0x48bb3E35D2D6994374db457a6Bf61de2d9cC8E49 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770435 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0xdaa890cf86da34cfd100482d0245d86acb9521c435fb6b6606dd5af05be05b0e -contract address: 0x1E59BA56B1F61c3Ee946D8c7e2994B4A9b0cA45C -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770555 - -****** - -*** BUSD *** - -Network: localhost -tx: 0xdaa890cf86da34cfd100482d0245d86acb9521c435fb6b6606dd5af05be05b0e -contract address: 0x1E59BA56B1F61c3Ee946D8c7e2994B4A9b0cA45C -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770555 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0x34072a8a7ddff91366675c0443c6ed4a56f4ea38284d959ba5cac87d9176559d -contract address: 0x53813198c75959DDB604462831d8989C29152164 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770435 - -****** - -*** USD *** - -Network: localhost -tx: 0x34072a8a7ddff91366675c0443c6ed4a56f4ea38284d959ba5cac87d9176559d -contract address: 0x53813198c75959DDB604462831d8989C29152164 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3770435 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0xd9d0b27927d9ea1d6e01a0b3ab30ad5fff8b1fee863170c0e09bba3164473c86 -contract address: 0x0eD6115873ce6B807a03FE0df1f940387779b729 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3771395 - -****** - -*** UNI_DAI_ETH *** - -Network: localhost -tx: 0xd9d0b27927d9ea1d6e01a0b3ab30ad5fff8b1fee863170c0e09bba3164473c86 -contract address: 0x0eD6115873ce6B807a03FE0df1f940387779b729 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3771395 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0x7108f6a2b5d09c345cef81faed01768eebc82e88cfca411f19ff89d67f39d155 -contract address: 0xFFfDa24e7E3d5F89a24278f53d6f0F81B3bE0d6B -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3771515 - -****** - -*** UNI_USDC_ETH *** - -Network: localhost -tx: 0x7108f6a2b5d09c345cef81faed01768eebc82e88cfca411f19ff89d67f39d155 -contract address: 0xFFfDa24e7E3d5F89a24278f53d6f0F81B3bE0d6B -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3771515 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0x711140cdc325fa89a8fc7c57d40398135dbafbb8386a9714ac9406c097d7f5e1 -contract address: 0x5889354f21A1C8D8D2f82669d778f6Dab778B519 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3771515 - -****** - -*** UNI_SETH_ETH *** - -Network: localhost -tx: 0x711140cdc325fa89a8fc7c57d40398135dbafbb8386a9714ac9406c097d7f5e1 -contract address: 0x5889354f21A1C8D8D2f82669d778f6Dab778B519 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3771515 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0x96e564062931f9f5b4dfec6ff64447d1413db8b199f777e40ef49b6f4cf74e42 -contract address: 0x09F7bF33B3F8922268B34103af3a8AF83148C9B1 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3771515 - -****** - -*** UNI_LINK_ETH *** - -Network: localhost -tx: 0x96e564062931f9f5b4dfec6ff64447d1413db8b199f777e40ef49b6f4cf74e42 -contract address: 0x09F7bF33B3F8922268B34103af3a8AF83148C9B1 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3771515 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0x7e85b4e591d15586638a15aa1585d01b53792cffbb9e88f2858e86c401eb3563 -contract address: 0x8f3966F7d53Fd5f12b701C8835e1e32541613869 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3771395 - -****** - -*** UNI_MKR_ETH *** - -Network: localhost -tx: 0x7e85b4e591d15586638a15aa1585d01b53792cffbb9e88f2858e86c401eb3563 -contract address: 0x8f3966F7d53Fd5f12b701C8835e1e32541613869 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3771395 - -****** - -*** MintableERC20 *** - -Network: localhost -tx: 0x3a490bd7d0486d2de64b06bdfe5cbc71cf68360015175f695f765ffbdaa0db73 -contract address: 0x9Dc554694756dC303a087e04bA6918C333Bc26a7 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3771515 - -****** - -*** UNI_LEND_ETH *** - -Network: localhost -tx: 0x3a490bd7d0486d2de64b06bdfe5cbc71cf68360015175f695f765ffbdaa0db73 -contract address: 0x9Dc554694756dC303a087e04bA6918C333Bc26a7 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3771515 - -****** - -*** LendingPoolAddressesProvider *** - -Network: localhost -tx: 0xe9232d3aec0076f72b4dece0ec89cbc78a8373e4abf5561b0a5008887622851b -contract address: 0xAfC307938C1c0035942c141c31524504c89Aaa8B -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 6959345 - -****** - -*** LendingPoolAddressesProviderRegistry *** - -Network: localhost -tx: 0x3e67f200a858db6eb7fb8e1fd5939782b89d45fd82e40900fdf16d11da8e2d1b -contract address: 0x73DE1e0ab6A5C221258703bc546E0CAAcCc6EC87 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 2515695 - -****** - -Deployed lending pool, address: 0xD2720591186c6DCf1DaCE6FAF262f3eB595317C5 -Added pool to addresses provider -Address is 0x5d12dDe3286D94E0d85F9D3B01B7099cfA0aBCf1 -implementation set, address: 0x5d12dDe3286D94E0d85F9D3B01B7099cfA0aBCf1 -*** LendingPoolConfigurator *** - -Network: localhost -tx: 0xf708c6f21e3ea0ce6d809ecc76fbf2682b9bb398681aebb58942712dfc5fdc01 -contract address: 0xa7a62540B8F2a0C1e091e734E261d13fd9a2B226 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 9499999 - -****** - -*** PriceOracle *** - -Network: localhost -tx: 0x76a61118b12b1416a6a75626cf23450a5e9a00e561b99c992719e549e619f000 -contract address: 0xbeA90474c2F3C7c43bC7c36CaAf5272c927Af5a1 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 767525 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0x0e04f73e5593e0ae08c773127c7659a847c7c9cfbbe870b5b8169807ab7390d9 -contract address: 0xa191baa1E96FeFE2b700C536E245725F09717275 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524490 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0x9240496d0be4193febdb3233ecdd21b90f3d2e93e76d814d5d541f6b16015ae8 -contract address: 0xbD51e397Aa5012aa91628f0354f9670805BfA94E -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524430 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0x5e8af233bf52b883a0c4e7a2dfbd962649954d8ef4ad3e6cffba9c966887a1e8 -contract address: 0xFc40e47aFD52bD460D65B06c828E54A13d288CE4 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524430 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0xaa3066730f7ebd39de215205a768145fd99e65157d871d0c640f79f2eaf440ad -contract address: 0x5795a1e56931bB7Fb8389821f3574983502A785d -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524430 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0x8d9500b1f7bc9e00ebf25c25b81fb93603eca6a4ac1c6a23559873944ee873ca -contract address: 0x715Ad5d800535dB0d334F9F42e3eC393947996e3 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524490 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0xe4019cc104e2ff38106e730db33f74a256d59327614b2f9c3f4dd847ec53ff0e -contract address: 0xC452C5244F701108B4e8E8BCe693160046b30332 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524490 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0x5864636182a83ef038a4aa03551d9a1327ca7f6964e25b023bc32dc823000246 -contract address: 0x0B63c002cb44B2e5e580C3B3560a27F4101D95c0 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524430 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0x4c7e8f67718f9ef15d31e9527499897c6defbe50e91ccbf28d324e37f3936105 -contract address: 0x3F80d60280cc4AdF3e5891765b5545A6B36ebe57 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524490 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0xbbf4865f658e69a60041983d174c53c77d2132e6e498e64efe27434f03c3a911 -contract address: 0xCeB290A2C6614BF23B2faa0f0B8067F29C48DB0F -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524430 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0xfb956a1da74bf9ac7dd6daee9929a48bb6954730310a45d7a0e005dc7ff997ff -contract address: 0x90ee8009AA6add17A0de8Ee22666a91602fa4adf -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524430 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0xcc9a2257abeaeecd6fa045901912802ade13c615974e0b22db1eaaf1a3ba1cf3 -contract address: 0xc5BeCE9e44E7dE5464f102f6cD4e5b7aBC94B059 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524550 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0x8e1d91a3cca76bb345ad3b61df570df661418dba282d4bc5a0e3879170ef8b9d -contract address: 0xF63EA31f84CFF5D1Eb4b8C3ca0D9489490fB98d5 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524430 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0x63dc4fbb424450404f66b100c36cb33dd3e2efc1d73da8f386e8869ad1d68151 -contract address: 0xD8f534d97D241Fc9EC4A224C90BDD5E3F3990874 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524370 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0x82e4360e3ed1913609f51a2e80cee06aa9df2ebb9292f5f3abacf24aff0e686d -contract address: 0xDCAB55FBf59a253B3Fb0CD2Ba45F0c02413dF375 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524370 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0xf1da3e37ee20e209ccdd756fa2e07a2be9d01bf7675dea41309a2a56ff96c9b5 -contract address: 0x293965D84cE150Cbf5F36332ba47e997e2763bf2 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524430 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0x8ae4fb0d23dec3b653f720bae0a4eb0538f17a88dde2d596b7e78928a121e076 -contract address: 0x3CADfB3f580F805658B747057E2Cf4E570bA378A -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524430 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0x01a1c77c94c1c43e927bf5090b25ec4826a32801cfa55fb0b97d2d50c04e2f0e -contract address: 0x7549d6bb05083613eF87b723595553dCc570Ca21 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524430 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0xb240c91e88558e87d3be7b5c9c312c18eb3679144d2a0f3af8d7c1d053648cc4 -contract address: 0xd28bf46B340fD3ad0c3dBD979BbE6D1663F41D80 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524430 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0xfc87e10978edcdf0db0d9c5d5240e4db1d9e0567abe0a8047fe1f7ca28da2815 -contract address: 0xdd008b1A40e43ABD51C7Ba41c1F810aA77b77D22 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524430 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0xe5991391fac8afd904b94215614914404dd1acb81cb46c9a679c0adfff1894ef -contract address: 0x23F06e0ECec7ecDb9cf204FAA35C284B51B31C0e -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524430 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0xaeb4931c1d026a8d162c2c019d5d4ac6d667f78b34c714fd56ffeb01c7ebed92 -contract address: 0x9e63e23026BfA85E2BCdb6e81eF78c71071b6016 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524430 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0x1bd7ec12d77551e8af98729fea7cfd251eb14641724b6a0216fb307af7cfa26a -contract address: 0x4EfDBAb487985C09d3be2E7d2B8e98cc09A9757b -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524430 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0x84dd9d9906a51b08c845eba64c05e708064c351f17ae10a127efd6ff479cdf85 -contract address: 0xAbA65A243A64622eA13382160d410F269Cd63eC1 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524430 - -****** - -*** MockAggregator *** - -Network: localhost -tx: 0xa83c9fb3b2af5858ad72e5323e311bbeafde65b930ded1418006e4e660bf6f38 -contract address: 0x19E42cA990cF697D3dda0e59131215C43bB6989F -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 524430 - -****** - -*** ChainlinkProxyPriceProvider *** - -Network: localhost -tx: 0x0d084d72f9d6b20a27654ff6612be6cd271b1d7f5442399e0d7872ec5a0a480d -contract address: 0xE30c3983E51bC9d6baE3E9437710a1459e21e81F -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 6255480 - -****** - -*** LendingRateOracle *** - -Network: localhost -tx: 0xff049fb48683766195e7de8b648f8a805bc1c76e12cfc8811dbc46b40308908e -contract address: 0xDf69898e844197a24C658CcF9fD53dF15948dc8b -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 1720040 - -****** - -Initialize configuration -*** DefaultReserveInterestRateStrategy *** - -Network: localhost -tx: 0x7f2393d8b55ddd4f0bdf96dd1ae30cab9d26935db6bdfa9943ce54c69bfe3eaf -contract address: 0x303CEAFd0aF91A63576FF7dEFc01E66ca2D19E3a -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3277425 - -****** - -*** StableDebtToken *** - -Network: localhost -tx: 0xe4bacd3cf0bb45f3e03d8a99036b4a77bf70ac220ec8635d7be130c83805f2ca -contract address: 0x168ef56fCb0382f4808497C9570434684657A9D3 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 7425490 - -****** - -*** VariableDebtToken *** - -Network: localhost -tx: 0x1bd0700a586883870734011f942a2c0ec8af12431c2e4a20ed83f7127a319330 -contract address: 0x5366cD335B002b009304Dc74a21EC97e94510177 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 6936890 - -****** - -*** AToken *** - -Network: localhost -tx: 0x97b28bbdc29f1bf73d223aac5ce6a3298175135ae0089d0189a1a6748c3b36ff -contract address: 0x8821b8e3000629f2c43BB99A092f6687366592F0 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 9499999 - -****** - -*** DefaultReserveInterestRateStrategy *** - -Network: localhost -tx: 0x696fd437c7b45c15abe1e7c35d71915e74c2f8ba5ce76fdafcc03a0b72e1e6b8 -contract address: 0x3E447b144e446558c2467d95FcF17Eaee9d704Bf -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3277425 - -****** - -*** StableDebtToken *** - -Network: localhost -tx: 0xfe8ce2454ff8599e9c3bd21d1b4805b854875a1f1525abbe48b5bf7a1ed19f1b -contract address: 0x6452dDB1f891be0426b6B519E461a777aeAe2E9d -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 7425610 - -****** - -*** VariableDebtToken *** - -Network: localhost -tx: 0x24c25ca9ebb2588733588d07e05e6e74cd617c417296ac046c2d12fdc0b95e9d -contract address: 0x6174769FBbC16D956a7bf70c3Ae7283341CAe3B6 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 6937010 - -****** - -*** AToken *** - -Network: localhost -tx: 0x469a3347ec96fad195e41b5d62b21d2cf8ff0d603f0f2c62b0fada2ae09727a0 -contract address: 0x9e498c2dF52Efdd649140417E405B9DeedcfEbE1 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 9499999 - -****** - -*** DefaultReserveInterestRateStrategy *** - -Network: localhost -tx: 0x2e78bf0b216139babb6e33aea0ffbe3e165124e551e4131664f9f0717cdd4f2a -contract address: 0x184E5376484c2728e7A2cb4E7f2c1975f4a177dA -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3277425 - -****** - -*** StableDebtToken *** - -Network: localhost -tx: 0xb40b0345dc8645ccd2de39cec597afa889d61d337c83d98402848e20650f0b57 -contract address: 0x23Fa899d0b780f2f439354DcdC325ff738d1234d -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 7425610 - -****** - -*** VariableDebtToken *** - -Network: localhost -tx: 0x68079ed8c90d74997e59e47b4e99119f374f59793c5245e4a9254373042bbff3 -contract address: 0x398A7a447E4D9007Fa1A5F82F2D07F0B369bD26f -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 6937010 - -****** - -*** AToken *** - -Network: localhost -tx: 0x297d99eb0ebb373ac4d6aedb1d973974aaaf398c2fb2cb9b7ad6c1a523078a5b -contract address: 0xc9ffDd024B01AcE9B8ee692b85797593ddd25eBb -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 9499999 - -****** - -*** DefaultReserveInterestRateStrategy *** - -Network: localhost -tx: 0x29d94602d60b38369651722227f15226632a76aeb8225b3e7c20761ed8935d4e -contract address: 0x8A054E7463937F7bf914B2a0C6C1a9D7348f32d9 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3277425 - -****** - -*** StableDebtToken *** - -Network: localhost -tx: 0x8e926fd7735088a84c0253e4c0fc852d56f7b875bf497014f296c054c9382d50 -contract address: 0x9cbEE5c0A6178F61dcD57C3b21180C8602aBdAc1 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 7425610 - -****** - -*** VariableDebtToken *** - -Network: localhost -tx: 0x8713a3ce634d0280113197ed918c57ecb508ab053e8d6d562c9e54659abed5bc -contract address: 0xdE00B3eb5e9F867eE45F9B9E5aF0d102Fe6A093f -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 6937010 - -****** - -*** AToken *** - -Network: localhost -tx: 0x25e4771fd18e0bfbd9caabbba1c1ea0439705770362752945f567aec663aacea -contract address: 0x3Eb52adc2294219C9A8F27C6a0BCcBBBEEeB0637 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 9499999 - -****** - -*** DefaultReserveInterestRateStrategy *** - -Network: localhost -tx: 0x4ee8cad51cbfc07c56566826a77c12c07213bd5799200257bfcbbb5274654f9e -contract address: 0x1b59Cd56B9D76CF3FFE0b8671164Fbe7ACA33164 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3277425 - -****** - -*** StableDebtToken *** - -Network: localhost -tx: 0x48074d32ee1aa4263ffd99c906205b2cb211085ef64b6593b6c869e073feb20b -contract address: 0xEC828976783079948F5DfAc8e61de6a895EB59D2 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 7425610 - -****** - -*** VariableDebtToken *** - -Network: localhost -tx: 0x6082f47e348f616bf616739250d90c768d1638e599d52736942af94f093560a4 -contract address: 0xbA81aEa1F2b60dF39a96952FfbE121A0c82dc590 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 6937010 - -****** - -*** AToken *** - -Network: localhost -tx: 0xd685996cbfaee73738b4435112642be71a62bd5150b7622060d29a5bc10e86a2 -contract address: 0xdB70141346347383D8e01c565E74b1a607f3Dd05 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 9499999 - -****** - -*** DefaultReserveInterestRateStrategy *** - -Network: localhost -tx: 0x89c15e0f7e757ea6bb08a253ee7aeff7977641fc163e8063e15f714aa207f0cc -contract address: 0x3597899d1c79b516D724b33c6b5e404dCdD45Da1 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3276945 - -****** - -*** StableDebtToken *** - -Network: localhost -tx: 0x42a31cd5ec3a1a0616b2dcca2d6178f436454fc2ba7d4cd4c86daae9f0d8b724 -contract address: 0xc489495Ad73C2E75fbBA3916df7BD186F6b1696F -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 7425610 - -****** - -*** VariableDebtToken *** - -Network: localhost -tx: 0x0213cc4f1faf661fdc368dd513afbfd94743d931a3501d0df5d1ebc2629653d2 -contract address: 0xf77136FA9c9280c3bBCA29a431B770AD04BE0aE3 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 6937010 - -****** - -*** AToken *** - -Network: localhost -tx: 0x540c880640831ce39ae7be3f870f96a68fe64d5b77b4e5fb57a03b428faf3f19 -contract address: 0x1FB3ccD743653c4f8533268fFe4a9a9DA97db500 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 9499999 - -****** - -*** DefaultReserveInterestRateStrategy *** - -Network: localhost -tx: 0xea49a43b755144530500ffb8b8001b88558831737543deb69a451d0e5850e63d -contract address: 0x54f9224C1A99951ABc0A7e843CE19a92dFA2E3c4 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3276945 - -****** - -*** StableDebtToken *** - -Network: localhost -tx: 0xf85b360885516da2a05f4ec85a0a29861caac0a8d11ac0225d5d2e1b80d5ebb0 -contract address: 0xf62D2373BAbb096EF4f7dc508e5c153c73dD9CfE -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 7425490 - -****** - -*** VariableDebtToken *** - -Network: localhost -tx: 0x496c3e75abb9d525d1d38888324a42615a52975871565b6dcdefb70aca47d508 -contract address: 0x662b3D8C8Dc691C46334bcB2229336063e3c2487 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 6936890 - -****** - -*** AToken *** - -Network: localhost -tx: 0x37edd828c08b60bc80c517b50fc90f8218623c65e844a2db67e8748e50f9cb5e -contract address: 0xEa02aebdf8DccbD3bf2BaA9eeBa48b0275D370b8 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 9499999 - -****** - -*** DefaultReserveInterestRateStrategy *** - -Network: localhost -tx: 0x1370094924d5683d96bed3dcf4331597eada7653b9dca5f15cee62184a134de1 -contract address: 0x5a3343A0CF72dC6933362676Bb5831784CaA0014 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3276945 - -****** - -*** StableDebtToken *** - -Network: localhost -tx: 0x4617c93975b1b7681079d512168203358d18890f610b7bcb51c98748732d0b78 -contract address: 0xbC15a5eEA769cfB4BA6d7574c9942f0b8C40Ae03 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 7425490 - -****** - -*** VariableDebtToken *** - -Network: localhost -tx: 0xefa498d1e69d9fe6409a50b3aa506a592b807e94dddd1f21aea2cd7de547dd8f -contract address: 0x3c3AB51fF33032159e82E1FDEe6503dEd082F1d9 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 6936890 - -****** - -*** AToken *** - -Network: localhost -tx: 0xe80eca2e4658c64f6398e96298cefbb500fc9022a0fcffe444c310fbf6492911 -contract address: 0x2d17b3E44e413F1fDa30E569895863EeD139CE6B -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 9499999 - -****** - -*** DefaultReserveInterestRateStrategy *** - -Network: localhost -tx: 0x12bd37e159dabe8a4841f79d966ba2c38d83da6c82227045ab65f0a19bb157b9 -contract address: 0x09e2af829b1C36A6A8876925D1557C0FA1FF7eF5 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3276945 - -****** - -*** StableDebtToken *** - -Network: localhost -tx: 0xbda59242e7edfa65c64d898da377e5db00fba42d5f0f0bce70f9967e460aec7b -contract address: 0x64179c836DD6D887034e14be49c912d166786534 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 7425610 - -****** - -*** VariableDebtToken *** - -Network: localhost -tx: 0xdba8d42783dad76edf7623d93ca8720c94a246f2916f683577de0a94abea5eeb -contract address: 0x912e47ab2257B0fE50516444bb6a12CffaCFA322 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 6937010 - -****** - -*** AToken *** - -Network: localhost -tx: 0x994d41b318faa0d04d5e6475ec1c3faccd4670022897c77e2e10c6f87ff5d514 -contract address: 0x29f65c17aD1e6D6b3C99aE80093E4Bf382fA0F69 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 9499999 - -****** - -*** DefaultReserveInterestRateStrategy *** - -Network: localhost -tx: 0x0d4d2be3095a1aa2ec941bad0e6d41ce8de15cd8354d0cd56fa3d919c167d49e -contract address: 0xD4991960dB15FFd68cc78AAAF42dcC0B7ccb6459 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3276945 - -****** - -*** StableDebtToken *** - -Network: localhost -tx: 0xd32a1b9b1413871a3001c6e8ba0a9e4ef2a83c4ab09f28194e20befcd9e25090 -contract address: 0xAB45290275E6970b7B76FbaC8b39619EE05D0B69 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 7425610 - -****** - -*** VariableDebtToken *** - -Network: localhost -tx: 0x3cf245cc6e80e8b0e47af13b6a48e7784236c6f06be28a566c3f6f4b6edf4122 -contract address: 0xb1c9e66a9064208a930e446811aBE8f4c24310e0 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 6937010 - -****** - -*** AToken *** - -Network: localhost -tx: 0xe794f12c3bd49d9118d9ad2cf14efc0afaad2c4b3ae746f1aceb9c375840db48 -contract address: 0x4dab1e43593c3045D3FCb1eEaBBE839C16F12dA6 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 9499999 - -****** - -*** DefaultReserveInterestRateStrategy *** - -Network: localhost -tx: 0xc2db0defdfaf772c832b78fa1adb471d831ac9f2dd44f0c9829abc6136e90ce6 -contract address: 0x62650cE1014A9880f8651f5b4ADB3314F339Dc3b -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3276945 - -****** - -*** StableDebtToken *** - -Network: localhost -tx: 0x8065c8f31a805076424b8f6bc16b7d8fb38e3e6ee105d73b798f73bb0f8038d2 -contract address: 0x43d8f4f99eCEE76977B75F1659ad34d6A7652c93 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 7425490 - -****** - -*** VariableDebtToken *** - -Network: localhost -tx: 0x0f409992c4dcbd92e3fd2c2fca0ce635d82ce9dfa400dc7cf118be901918b331 -contract address: 0x5fc30A361D6dDf1dBa00b4D86aC2EBBe265E76fc -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 6936890 - -****** - -*** AToken *** - -Network: localhost -tx: 0x1b2509cbaa127b8d6b76a64c38c66a035ad59f69e3adddd9a5180f3297c47b9b -contract address: 0x2f77845F39273850bf6d734e21c0D8E7bdfF50F8 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 9499999 - -****** - -*** DefaultReserveInterestRateStrategy *** - -Network: localhost -tx: 0xc8572498fec572951914dc2e1558c8834da00750856e80964504270cc6971e16 -contract address: 0x739e654a4550FC22652eFD4d91fF3bf982bEDA4d -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3276945 - -****** - -*** StableDebtToken *** - -Network: localhost -tx: 0x152777a73df721c0de6d51a4118e8a492d25275e25757653c4f2267e7976ade0 -contract address: 0x708e2B13F6EB3f62686BAC1795c1e3C09e91eEaF -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 7425490 - -****** - -*** VariableDebtToken *** - -Network: localhost -tx: 0x5450edbf0e2695bf4add1f68970ba7b01fc13206a27f0833f3e882eff515b802 -contract address: 0x7c888989D880597456a250098e8F57B0686A2B29 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 6936890 - -****** - -*** AToken *** - -Network: localhost -tx: 0xd1931ba728e39a704c7fc1fdc0f87af362ed4e56384e828ad679607b182cf3f3 -contract address: 0x65df659Be90a49356a33458d806d9dE3d8F03969 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 9499999 - -****** - -*** DefaultReserveInterestRateStrategy *** - -Network: localhost -tx: 0x77ba9383e9e5b2960c06e763cd6af1219b5de6c18d91f9013bd69f7f03e06343 -contract address: 0xE5464F611113932335B397Eb0dD1601a896005C6 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3276945 - -****** - -*** StableDebtToken *** - -Network: localhost -tx: 0x81358741e66b74a3238e9781bd0fb634fee8ffce2a914d82dcba0a591d4f7430 -contract address: 0xF0cDB2EcE3A2188048b79B1f94b434c594B807fB -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 7425490 - -****** - -*** VariableDebtToken *** - -Network: localhost -tx: 0xe4552f83561f339dabcbbbeededbb56ccb1ab4d5fcf1ddfa2135982cf246985a -contract address: 0x9D8Ae53F3D152a668C7c2d7a6cB37FdD9aF38285 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 6936890 - -****** - -*** AToken *** - -Network: localhost -tx: 0x748c940099df36aae3b2b10368e70bde62e3e3dbe45ca55e7d5033f44f779a1d -contract address: 0x7C95b1ad025F0C9aB14192f87bF2aD53889bE4F7 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 9499999 - -****** - -*** DefaultReserveInterestRateStrategy *** - -Network: localhost -tx: 0xf4f55e9354a916fa5b9549b681025a341502d384d2f77645cf0f4060e0d1e637 -contract address: 0x9bD0Bec44106D8Ea8fFb6296d7A84742a290E064 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3276945 - -****** - -*** StableDebtToken *** - -Network: localhost -tx: 0xc40f435954d1fc3a8ad096e084a83b05647c26b0bbe9f32fee215bbfb8d4e9e8 -contract address: 0x00f126cCA2266bFb634Ed6DB17c4C74fb8cA5177 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 7425610 - -****** - -*** VariableDebtToken *** - -Network: localhost -tx: 0xab44990260fe38bf2b4fc6cf1100f3aad1326eb3e9cb415e5cb65f69102e6ba2 -contract address: 0x34Ac3eB6180FdD94043664C22043F004734Dc480 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 6937010 - -****** - -*** AToken *** - -Network: localhost -tx: 0x667372a46626f30abeebcf4516685a8417975a73478090f6083b0dc58eaef381 -contract address: 0x04dE7A5bCCf369cb28AB389BfD7a6262E870B0a6 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 9499999 - -****** - -*** DefaultReserveInterestRateStrategy *** - -Network: localhost -tx: 0xffecfe6215cd8137e3ba605236c39278b56592675dc35a802d53de8b5378005b -contract address: 0xC9366C94D1760624DFa702Ee99a04E9f6271Aa70 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3276945 - -****** - -*** StableDebtToken *** - -Network: localhost -tx: 0xe9c01fb60c1d3d74881c2833d199081cca4c4fa57701855d63c479c4a1006bc4 -contract address: 0xd405FD3185d05Ed8ba637C1C1ae772F9916A4F49 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 7425430 - -****** - -*** VariableDebtToken *** - -Network: localhost -tx: 0x13deded53ea75d1a7fae2ea5e517dcb2ec6501dd72847bfdf4d293929400ed11 -contract address: 0x54F1df7dB2E46dbeF18CF97A376b79108166fa36 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 6936830 - -****** - -*** AToken *** - -Network: localhost -tx: 0x3f8f8ec47ba5d1c5e02a248086dea3eac1a72367cc5f4a730e61afe787d444cf -contract address: 0xF778f628abF1C0E17618077bAEA4FDA95D334136 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 9499999 - -****** - -*** DefaultReserveInterestRateStrategy *** - -Network: localhost -tx: 0x1f791622f6dd6ee0e3ca7369a05f94de5ac9ad34758400c20bb62d720c52bdcc -contract address: 0x267B07Fd1032e9A4e10dBF2600C8407ee6CA1e8c -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3277425 - -****** - -*** StableDebtToken *** - -Network: localhost -tx: 0xbc9d4ce2f71b60a86e0936a9eccd7990fa8ed5731d53c2e0961fd8ce42b4ec3b -contract address: 0x61751f72Fa303F3bB256707dD3cD368c89E82f1b -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 7425490 - -****** - -*** VariableDebtToken *** - -Network: localhost -tx: 0x7af317b3ebd94924badd8b088357a9c144aa99243bb8a48de6b23cfdbc41e1b9 -contract address: 0x2E10b24b10692fa972510051A1e296D4535043ad -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 6936890 - -****** - -*** AToken *** - -Network: localhost -tx: 0x901aedab1094e416b81636292fd3df29b6e73aeb794526a728843bd4ff9c8ec2 -contract address: 0x99245fC7F2d63e1b09EE1b89f0861dcD09e7a4C1 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 9499999 - -****** - -*** DefaultReserveInterestRateStrategy *** - -Network: localhost -tx: 0x3fa610059efa2c6228780079b05e9d200fe986a7a6a48911278cb52e461b9e8f -contract address: 0xBe6d8642382C241c9B4B50c89574DbF3f4181E7D -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 3277425 - -****** - -*** StableDebtToken *** - -Network: localhost -tx: 0xc1af9ee6909ed0d6e2a5ff0deef43dbbdd0e85dfabeb20bb60f67f27b28a758c -contract address: 0x02BB514187B830d6A2111197cd7D8cb60650B970 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 7425610 - -****** - -*** VariableDebtToken *** - -Network: localhost -tx: 0x6612bc1ec1d383ce25143b2cb399480c4f76996b218d1150e8407fdf46520593 -contract address: 0x6774Ce86Abf5EBB22E9F45b5f55daCbB4170aD7f -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 6937010 - -****** - -*** AToken *** - -Network: localhost -tx: 0x99665e44ce3b98d3f39d6ed1bc18bbc2705109a8b5f54b36dca59e1cf3e928a0 -contract address: 0x007C1a44e85bDa8F562F916685A9DC8BdC6542bF -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 9499999 - -****** - -*** MockFlashLoanReceiver *** - -Network: localhost -tx: 0x04999d6cad119214e028099ca819a45a5f26cf5c523de92e83701bf79575f08d -contract address: 0xAd49512dFBaD6fc13D67d3935283c0606812E962 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 1872305 - -****** - -*** MockSwapAdapter *** - -Network: localhost -tx: 0xfd8e8e01a41ef55102549e5e4489b6dfe5405233a722d5913758517b3d50b53b -contract address: 0x749258D38b0473d96FEcc14cC5e7DCE12d7Bd6f6 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 1895365 - -****** - -*** WalletBalanceProvider *** - -Network: localhost -tx: 0xf36d7aaae62638f3e44de25aa1df006a96928b6459a7a3d2b80ed79e11ce190a -contract address: 0xA29C2A7e59aa49C71aF084695337E3AA5e820758 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 2512320 - -****** - -*** AaveProtocolTestHelpers *** - -Network: localhost -tx: 0x6f1847e62f402f758eaa6dfaa62f318688f8822c5090cd57157d13da892cc489 -contract address: 0x9305d862ee95a899b83906Cd9CB666aC269E5f66 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 2838385 - -****** - -setup: 22.427s -Pool loaded -Configurator loaded - -*************** -Setup and snapshot finished -*************** - - AToken: Modifiers - ✓ Tries to invoke mint not being the LendingPool - ✓ Tries to invoke burn not being the LendingPool - ✓ Tries to invoke transferOnLiquidation not being the LendingPool - ✓ Tries to invoke transferUnderlyingTo not being the LendingPool - - AToken: Transfer - ✓ User 0 deposits 1000 DAI, transfers to user 1 - ✓ User 0 deposits 1 WETH and user 1 tries to borrow, but the aTokens received as a transfer are not available as collateral (revert expected) - ✓ User 1 sets the DAI as collateral and borrows, tries to transfer everything back to user 0 (revert expected) - - LendingPoolConfigurator - - 1) Deactivates the ETH reserve - ✓ Rectivates the ETH reserve - ✓ Check the onlyLendingPoolManager on deactivateReserve - ✓ Check the onlyLendingPoolManager on activateReserve - ✓ Freezes the ETH reserve - ✓ Unfreezes the ETH reserve - ✓ Check the onlyLendingPoolManager on freezeReserve - ✓ Check the onlyLendingPoolManager on unfreezeReserve - ✓ Deactivates the ETH reserve for borrowing - ✓ Activates the ETH reserve for borrowing - ✓ Check the onlyLendingPoolManager on disableBorrowingOnReserve - ✓ Check the onlyLendingPoolManager on enableBorrowingOnReserve - ✓ Deactivates the ETH reserve as collateral - ✓ Activates the ETH reserve as collateral - ✓ Check the onlyLendingPoolManager on disableReserveAsCollateral - ✓ Check the onlyLendingPoolManager on enableReserveAsCollateral - ✓ Disable stable borrow rate on the ETH reserve - ✓ Enables stable borrow rate on the ETH reserve - ✓ Check the onlyLendingPoolManager on disableReserveStableRate - ✓ Check the onlyLendingPoolManager on enableReserveStableRate - ✓ Changes LTV of the reserve - ✓ Check the onlyLendingPoolManager on setLtv - ✓ Changes liquidation threshold of the reserve - ✓ Check the onlyLendingPoolManager on setLiquidationThreshold - ✓ Changes liquidation bonus of the reserve - ✓ Check the onlyLendingPoolManager on setLiquidationBonus - ✓ Check the onlyLendingPoolManager on setReserveDecimals - ✓ Check the onlyLendingPoolManager on setLiquidationBonus - ✓ Reverts when trying to disable the DAI reserve with liquidity on it - - LendingPool. repayWithCollateral() - ✓ User 1 provides some liquidity for others to borrow - ✓ User 2 deposit WETH and borrows DAI at Variable - ✓ It is not possible to do reentrancy on repayWithCollateral() - - 2) User 2 tries to repay his DAI Variable loan using his WETH collateral. First half the amount, after that, the rest - - 3) User 3 deposits WETH and borrows USDC at Variable - - 4) User 3 repays completely his USDC loan by swapping his WETH collateral - ✓ Revert expected. User 3 tries to repay with his collateral a currency he havent borrow - - 5) User 3 tries to repay with his collateral all his variable debt and part of the stable - - 6) User 4 tries to repay a bigger amount that what can be swapped of a particular collateral, repaying only the maximum allowed by that collateral - ✓ User 5 deposits WETH and DAI, then borrows USDC at Variable, then disables WETH as collateral - - 7) User 5 tries to repay his USDC loan by swapping his WETH collateral, should not revert even with WETH collateral disabled - - LendingPool. repayWithCollateral() with liquidator - ✓ User 1 provides some liquidity for others to borrow - - 8) User 5 liquidate User 3 collateral, all his variable debt and part of the stable - ✓ User 3 deposits WETH and borrows USDC at Variable - - 9) User 5 liquidates half the USDC loan of User 3 by swapping his WETH collateral - ✓ Revert expected. User 5 tries to liquidate an User 3 collateral a currency he havent borrow - - 10) User 5 liquidates all the USDC loan of User 3 by swapping his WETH collateral - ✓ User 2 deposit WETH and borrows DAI at Variable - - 11) It is not possible to do reentrancy on repayWithCollateral() - ✓ User 5 tries to liquidate User 2 DAI Variable loan using his WETH collateral, with good HF - - 12) User 5 liquidates User 2 DAI Variable loan using his WETH collateral, half the amount - - 13) User 2 tries to repay remaining DAI Variable loan using his WETH collateral - - 14) Liquidator tries to repay 4 user a bigger amount that what can be swapped of a particular collateral, repaying only the maximum allowed by that collateral - - 15) User 5 deposits WETH and DAI, then borrows USDC at Variable, then disables WETH as collateral - - 16) Liquidator tries to liquidates User 5 USDC loan by swapping his WETH collateral, should revert due WETH collateral disabled - - LendingPool FlashLoan function - ✓ Deposits ETH into the reserve - - 17) Takes WETH flashloan with mode = 0, returns the funds correctly - - 18) Takes an ETH flashloan with mode = 0 as big as the available liquidity - ✓ Takes WETH flashloan, does not return the funds with mode = 0. (revert expected) - ✓ Takes a WETH flashloan with an invalid mode. (revert expected) - - 19) Caller deposits 1000 DAI as collateral, Takes WETH flashloan with mode = 2, does not return the funds. A variable loan for caller is created - ✓ tries to take a very small flashloan, which would result in 0 fees (revert expected) - - 20) tries to take a flashloan that is bigger than the available liquidity (revert expected) - ✓ tries to take a flashloan using a non contract address as receiver (revert expected) - ✓ Deposits USDC into the reserve - - 21) Takes out a 500 USDC flashloan, returns the funds correctly - - 22) Takes out a 500 USDC flashloan with mode = 0, does not return the funds. (revert expected) - - 23) Caller deposits 5 WETH as collateral, Takes a USDC flashloan with mode = 2, does not return the funds. A loan for caller is created - ✓ Caller deposits 1000 DAI as collateral, Takes a WETH flashloan with mode = 0, does not approve the transfer of the funds - - 24) Caller takes a WETH flashloan with mode = 1 - - LendingPoolAddressesProvider - ✓ Test the accessibility of the LendingPoolAddressesProvider - - LendingPool liquidation - liquidator receiving aToken - - 25) LIQUIDATION - Deposits WETH, borrows DAI/Check liquidation fails because health factor is above 1 - - 26) LIQUIDATION - Drop the health factor below 1 - - 27) LIQUIDATION - Tries to liquidate a different currency than the loan principal - - 28) LIQUIDATION - Tries to liquidate a different collateral than the borrower collateral - - 29) LIQUIDATION - Liquidates the borrow - - 30) User 3 deposits 1000 USDC, user 4 1 WETH, user 4 borrows - drops HF, liquidates the borrow - - LendingPool liquidation - liquidator receiving the underlying asset - - 31) LIQUIDATION - Deposits WETH, borrows DAI - - 32) LIQUIDATION - Drop the health factor below 1 - - 33) LIQUIDATION - Liquidates the borrow - - 34) User 3 deposits 1000 USDC, user 4 1 WETH, user 4 borrows - drops HF, liquidates the borrow - ✓ User 4 deposits 1000 LEND - drops HF, liquidates the LEND, which results on a lower amount being liquidated - - LendingPool: Borrow negatives (reverts) - - 35) User 0 deposits 1000 DAI, user 1 deposits 1 WETH as collateral and tries to borrow 100 DAI with rate mode NONE (revert expected) - - 36) User 0 deposits 1000 DAI, user 1 deposits 1 WETH as collateral and tries to borrow 100 DAI with an invalid rate mode (revert expected) - - LendingPool: Borrow/repay (stable rate) - - 37) User 0 deposits 1000 DAI, user 1 deposits 1 WETH as collateral and borrows 100 DAI at stable rate - ✓ User 1 tries to borrow the rest of the DAI liquidity (revert expected) - ✓ User 1 repays the half of the DAI borrow after one year - ✓ User 1 repays the rest of the DAI borrow after one year - ✓ User 0 withdraws the deposited DAI plus interest - - 38) User 1 deposits 1000 DAI, user 2 tries to borrow 1000 DAI at a stable rate without any collateral (revert expected) - - 39) User 0 deposits 1000 DAI, user 1,2,3,4 deposit 1 WETH each and borrow 100 DAI at stable rate. Everything is repaid, user 0 withdraws - - 40) User 0 deposits 1000 DAI, user 1 deposits 2 WETH and borrow 100 DAI at stable rate first, then 100 DAI at variable rate, repays everything. User 0 withdraws - - LendingPool: Borrow/repay (variable rate) - ✓ User 2 deposits 1 DAI to account for rounding errors - - 41) User 0 deposits 1000 DAI, user 1 deposits 1 WETH as collateral and borrows 100 DAI at variable rate - ✓ User 1 tries to borrow the rest of the DAI liquidity (revert expected) - ✓ User 1 tries to repay 0 DAI (revert expected) - ✓ User 1 repays a small amount of DAI, enough to cover a small part of the interest - ✓ User 1 repays the DAI borrow after one year - ✓ User 0 withdraws the deposited DAI plus interest - ✓ User 1 withdraws the collateral - ✓ User 2 deposits a small amount of WETH to account for rounding errors - ✓ User 0 deposits 1 WETH, user 1 deposits 100 LINK as collateral and borrows 0.5 ETH at variable rate - ✓ User 1 tries to repay 0 ETH - ✓ User 2 tries to repay everything on behalf of user 1 using uint(-1) (revert expected) - ✓ User 3 repays a small amount of WETH on behalf of user 1 - ✓ User 1 repays the WETH borrow after one year - ✓ User 0 withdraws the deposited WETH plus interest - ✓ User 1 withdraws the collateral - ✓ User 2 deposits 1 USDC to account for rounding errors - - 42) User 0 deposits 1000 USDC, user 1 deposits 1 WETH as collateral and borrows 100 USDC at variable rate - ✓ User 1 tries to borrow the rest of the USDC liquidity (revert expected) - - 43) User 1 repays the USDC borrow after one year - ✓ User 0 withdraws the deposited USDC plus interest - ✓ User 1 withdraws the collateral - - 44) User 1 deposits 1000 DAI, user 3 tries to borrow 1000 DAI without any collateral (revert expected) - - 45) user 3 deposits 0.1 ETH collateral to borrow 100 DAI; 0.1 ETH is not enough to borrow 100 DAI (revert expected) - ✓ user 3 withdraws the 0.1 ETH - - 46) User 1 deposits 1000 USDC, user 3 tries to borrow 1000 USDC without any collateral (revert expected) - - 47) user 3 deposits 0.1 ETH collateral to borrow 100 USDC; 0.1 ETH is not enough to borrow 100 USDC (revert expected) - ✓ user 3 withdraws the 0.1 ETH - - 48) User 0 deposits 1000 DAI, user 6 deposits 2 WETH and borrow 100 DAI at variable rate first, then 100 DAI at stable rate, repays everything. User 0 withdraws - - LendingPool: Deposit - ✓ User 0 Deposits 1000 DAI in an empty reserve - ✓ User 1 deposits 1000 DAI after user 1 - ✓ User 0 deposits 1000 USDC in an empty reserve - ✓ User 1 deposits 1000 USDC after user 0 - ✓ User 0 deposits 1 WETH in an empty reserve - - 49) User 1 deposits 1 WETH after user 0 - ✓ User 1 deposits 0 ETH (revert expected) - ✓ User 1 deposits 0 DAI - ✓ User 1 deposits 100 DAI on behalf of user 2, user 2 tries to borrow 0.1 WETH - - LendingPool: Rebalance stable rate - ✓ User 0 tries to rebalance user 1 who has no borrows in progress (revert expected) - - 50) User 0 deposits 1000 DAI, user 1 deposits 1 ETH, borrows 100 DAI at a variable rate, user 0 rebalances user 1 (revert expected) - - 51) User 1 swaps to stable, user 0 tries to rebalance but the conditions are not met (revert expected) - - 52) User 2 deposits ETH and borrows the remaining DAI, causing the stable rates to rise (liquidity rate < user 1 borrow rate). User 0 tries to rebalance user 1 (revert expected) - - 53) User 2 borrows more DAI, causing the liquidity rate to rise above user 1 stable borrow rate User 0 rebalances user 1 - - LendingPool: Usage as collateral - - 54) User 0 Deposits 1000 DAI, disables DAI as collateral - - 55) User 1 Deposits 2 ETH, disables ETH as collateral, borrows 400 DAI (revert expected) - - 56) User 1 enables ETH as collateral, borrows 400 DAI - - 57) User 1 disables ETH as collateral (revert expected) - - LendingPool: Swap rate mode - ✓ User 0 tries to swap rate mode without any variable rate loan in progress (revert expected) - ✓ User 0 tries to swap rate mode without any stable rate loan in progress (revert expected) - - 58) User 0 deposits 1000 DAI, user 1 deposits 2 ETH as collateral, borrows 100 DAI at variable rate and swaps to stable after one year - ✓ User 1 borrows another 100 DAI, and swaps back to variable after one year, repays the loan - - LendingPool: Redeem negative test cases - ✓ Users 0 Deposits 1000 DAI and tries to redeem 0 DAI (revert expected) - - 59) Users 0 tries to redeem 1100 DAI from the 1000 DAI deposited (revert expected) - - 60) Users 1 deposits 1 WETH, borrows 100 DAI, tries to redeem the 1 WETH deposited (revert expected) - - LendingPool: withdraw - ✓ User 0 Deposits 1000 DAI in an empty reserve - ✓ User 0 withdraws half of the deposited DAI - ✓ User 0 withdraws remaining half of the deposited DAI - ✓ User 0 Deposits 1000 USDC in an empty reserve - ✓ User 0 withdraws half of the deposited USDC - ✓ User 0 withdraws remaining half of the deposited USDC - ✓ User 0 Deposits 1 WETH in an empty reserve - ✓ User 0 withdraws half of the deposited ETH - ✓ User 0 withdraws remaining half of the deposited ETH - ✓ Users 0 and 1 Deposit 1000 DAI, both withdraw - - 61) Users 0 deposits 1000 DAI, user 1 Deposit 1000 USDC and 1 WETH, borrows 100 DAI. User 1 tries to withdraw all the USDC - - Stable debt token tests - ✓ Tries to invoke mint not being the LendingPool - ✓ Tries to invoke burn not being the LendingPool - - Upgradeability -*** MockAToken *** - -Network: localhost -tx: 0x696dc0be963fe2924a4aa5558d3e5a3bf1fed36fe36d7d23c789a3777f35f512 -contract address: 0xFBdF1E93D0D88145e3CcA63bf8d513F83FB0903b -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 9499999 - -****** - -*** MockStableDebtToken *** - -Network: localhost -tx: 0x01436232ca0350c63f60eb508aa006612a889e9d678c026f810f6a4966382a11 -contract address: 0xE45fF4A0A8D0E9734C73874c034E03594E15ba28 -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 7628560 - -****** - -*** MockVariableDebtToken *** - -Network: localhost -tx: 0xefccca15b91974bbe2288e8671c0451f22dfdc62e088ccfe05a744402b4e0b2e -contract address: 0x5cCC6Abc4c9F7262B9485797a848Ec6CC28A11dF -deployer address: 0xc783df8a850f42e7F7e57013759C285caa701eB6 -gas price: 8000000000 -gas used: 7139960 - -****** - - ✓ Tries to update the DAI Atoken implementation with a different address than the lendingPoolManager - ✓ Upgrades the DAI Atoken implementation - ✓ Tries to update the DAI Stable debt token implementation with a different address than the lendingPoolManager - ✓ Upgrades the DAI stable debt token implementation - ✓ Tries to update the DAI variable debt token implementation with a different address than the lendingPoolManager - ✓ Upgrades the DAI variable debt token implementation - - Variable debt token tests - ✓ Tries to invoke mint not being the LendingPool - ✓ Tries to invoke burn not being the LendingPool - -·------------------------------------------------------------------|---------------------------|-------------|-----------------------------· -| Solc version: 0.6.8 · Optimizer enabled: true · Runs: 200 · Block limit: 10000000 gas │ -···································································|···························|·············|······························ -| Methods │ -·································|·································|·············|·············|·············|···············|·············· -| Contract · Method · Min · Max · Avg · # calls · eur (avg) │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPool · borrow · 262042 · 357423 · 307591 · 14 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPool · deposit · 106722 · 203343 · 166219 · 58 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPool · flashLoan · 174269 · 334932 · 281378 · 3 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPool · liquidationCall · - · - · 402890 · 1 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPool · repay · 133914 · 207869 · 181299 · 14 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPool · repayWithCollateral · 404877 · 475002 · 432357 · 3 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPool · setUserUseReserveAsCollateral · 93517 · 176141 · 148600 · 3 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPool · swapBorrowRateMode · - · - · 159870 · 1 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPool · withdraw · 171316 · 318009 · 207305 · 28 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPoolAddressesProvider · transferOwnership · - · - · 30839 · 1 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPoolConfigurator · activateReserve · - · - · 46958 · 4 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPoolConfigurator · disableBorrowingOnReserve · - · - · 51124 · 2 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPoolConfigurator · disableReserveAsCollateral · - · - · 51060 · 2 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPoolConfigurator · disableReserveStableRate · - · - · 51189 · 2 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPoolConfigurator · enableBorrowingOnReserve · - · - · 51700 · 4 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPoolConfigurator · enableReserveAsCollateral · - · - · 52549 · 4 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPoolConfigurator · enableReserveStableRate · - · - · 51069 · 4 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPoolConfigurator · freezeReserve · - · - · 51104 · 2 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPoolConfigurator · setLiquidationBonus · - · - · 51381 · 5 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPoolConfigurator · setLiquidationThreshold · - · - · 51382 · 3 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPoolConfigurator · setLtv · - · - · 51410 · 3 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPoolConfigurator · unfreezeReserve · - · - · 51167 · 4 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPoolConfigurator · updateAToken · - · - · 141032 · 3 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPoolConfigurator · updateStableDebtToken · - · - · 140990 · 3 · - │ -·································|·································|·············|·············|·············|···············|·············· -| LendingPoolConfigurator · updateVariableDebtToken · - · - · 140959 · 3 · - │ -·································|·································|·············|·············|·············|···············|·············· -| MintableERC20 · approve · 24907 · 44119 · 36154 · 42 · - │ -·································|·································|·············|·············|·············|···············|·············· -| MintableERC20 · mint · 35427 · 65487 · 44328 · 44 · - │ -·································|·································|·············|·············|·············|···············|·············· -| MintableERC20 · transfer · - · - · 79721 · 2 · - │ -·································|·································|·············|·············|·············|···············|·············· -| MockFlashLoanReceiver · setAmountToApprove · - · - · 41475 · 1 · - │ -·································|·································|·············|·············|·············|···············|·············· -| MockFlashLoanReceiver · setFailExecutionTransfer · 13614 · 42239 · 29921 · 7 · - │ -·································|·································|·············|·············|·············|···············|·············· -| MockSwapAdapter · setAmountToReturn · 26483 · 41519 · 29521 · 5 · - │ -·································|·································|·············|·············|·············|···············|·············· -| MockSwapAdapter · setTryReentrancy · - · - · 27257 · 1 · - │ -·································|·································|·············|·············|·············|···············|·············· -| PriceOracle · setAssetPrice · 28539 · 28551 · 28548 · 4 · - │ -·································|·································|·············|·············|·············|···············|·············· -| Deployments · · % of limit · │ -···································································|·············|·············|·············|···············|·············· -| MockVariableDebtToken · - · - · 1427992 · 14.3 % · - │ -···································································|·············|·············|·············|···············|·············· -| ValidationLogic · - · - · 1539063 · 15.4 % · - │ -·------------------------------------------------------------------|-------------|-------------|-------------|---------------|-------------· - - 112 passing (3m) - 61 failing - - 1) LendingPoolConfigurator - Deactivates the ETH reserve: - Error: VM Exception while processing transaction: revert 36 - at HttpProvider.send (node_modules/@nomiclabs/buidler/src/internal/core/providers/http.ts:36:34) - at getMultipliedGasEstimation (node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:150:45) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:108:14 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/accounts.ts:219:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:63:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:82:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at EthersProviderWrapper.send (node_modules/@nomiclabs/buidler-ethers/src/ethers-provider-wrapper.ts:13:48) - at EthersProviderWrapper.JsonRpcProvider.perform (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:432:21) - at EthersProviderWrapper. (node_modules/@ethersproject/providers/src.ts/base-provider.ts:850:42) - at step (node_modules/@ethersproject/providers/lib/base-provider.js:46:23) - at Object.next (node_modules/@ethersproject/providers/lib/base-provider.js:27:53) - at fulfilled (node_modules/@ethersproject/providers/lib/base-provider.js:18:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 2) LendingPool. repayWithCollateral() - User 2 tries to repay his DAI Variable loan using his WETH collateral. First half the amount, after that, the rest: - - AssertionError: expected '999594024748679625' to equal '961247816651583750' - + expected - actual - - -999594024748679625 - +961247816651583750 - - at /src/test/repay-with-collateral.spec.ts:169:68 - at step (test/repay-with-collateral.spec.ts:33:23) - at Object.next (test/repay-with-collateral.spec.ts:14:53) - at fulfilled (test/repay-with-collateral.spec.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 3) LendingPool. repayWithCollateral() - User 3 deposits WETH and borrows USDC at Variable: - Error: VM Exception while processing transaction: revert 11 - at HttpProvider.send (node_modules/@nomiclabs/buidler/src/internal/core/providers/http.ts:36:34) - at getMultipliedGasEstimation (node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:150:45) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:108:14 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/accounts.ts:219:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:63:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:82:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at EthersProviderWrapper.send (node_modules/@nomiclabs/buidler-ethers/src/ethers-provider-wrapper.ts:13:48) - at EthersProviderWrapper.JsonRpcProvider.perform (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:432:21) - at EthersProviderWrapper. (node_modules/@ethersproject/providers/src.ts/base-provider.ts:850:42) - at step (node_modules/@ethersproject/providers/lib/base-provider.js:46:23) - at Object.next (node_modules/@ethersproject/providers/lib/base-provider.js:27:53) - at fulfilled (node_modules/@ethersproject/providers/lib/base-provider.js:18:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 4) LendingPool. repayWithCollateral() - User 3 repays completely his USDC loan by swapping his WETH collateral: - Error: VM Exception while processing transaction: revert 40 - at HttpProvider.send (node_modules/@nomiclabs/buidler/src/internal/core/providers/http.ts:36:34) - at getMultipliedGasEstimation (node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:150:45) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:108:14 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/accounts.ts:219:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:63:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:82:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at EthersProviderWrapper.send (node_modules/@nomiclabs/buidler-ethers/src/ethers-provider-wrapper.ts:13:48) - at EthersProviderWrapper.JsonRpcProvider.perform (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:432:21) - at EthersProviderWrapper. (node_modules/@ethersproject/providers/src.ts/base-provider.ts:850:42) - at step (node_modules/@ethersproject/providers/lib/base-provider.js:46:23) - at Object.next (node_modules/@ethersproject/providers/lib/base-provider.js:27:53) - at fulfilled (node_modules/@ethersproject/providers/lib/base-provider.js:18:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 5) LendingPool. repayWithCollateral() - User 3 tries to repay with his collateral all his variable debt and part of the stable: - Error: VM Exception while processing transaction: revert 11 - at HttpProvider.send (node_modules/@nomiclabs/buidler/src/internal/core/providers/http.ts:36:34) - at getMultipliedGasEstimation (node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:150:45) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:108:14 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/accounts.ts:219:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:63:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:82:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at EthersProviderWrapper.send (node_modules/@nomiclabs/buidler-ethers/src/ethers-provider-wrapper.ts:13:48) - at EthersProviderWrapper.JsonRpcProvider.perform (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:432:21) - at EthersProviderWrapper. (node_modules/@ethersproject/providers/src.ts/base-provider.ts:850:42) - at step (node_modules/@ethersproject/providers/lib/base-provider.js:46:23) - at Object.next (node_modules/@ethersproject/providers/lib/base-provider.js:27:53) - at fulfilled (node_modules/@ethersproject/providers/lib/base-provider.js:18:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 6) LendingPool. repayWithCollateral() - User 4 tries to repay a bigger amount that what can be swapped of a particular collateral, repaying only the maximum allowed by that collateral: - - AssertionError: expected '52004058862' to equal '-2.383204320379782404696e+21' - + expected - actual - - -52004058862 - +-2.383204320379782404696e+21 - - at /src/test/repay-with-collateral.spec.ts:518:66 - at step (test/repay-with-collateral.spec.ts:33:23) - at Object.next (test/repay-with-collateral.spec.ts:14:53) - at fulfilled (test/repay-with-collateral.spec.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 7) LendingPool. repayWithCollateral() - User 5 tries to repay his USDC loan by swapping his WETH collateral, should not revert even with WETH collateral disabled: - - AssertionError: expected '9997370843952131411' to equal '9749035101915727008' - + expected - actual - - -9997370843952131411 - +9749035101915727008 - - at /src/test/repay-with-collateral.spec.ts:631:68 - at step (test/repay-with-collateral.spec.ts:33:23) - at Object.next (test/repay-with-collateral.spec.ts:14:53) - at fulfilled (test/repay-with-collateral.spec.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 8) LendingPool. repayWithCollateral() with liquidator - User 5 liquidate User 3 collateral, all his variable debt and part of the stable: - Error: VM Exception while processing transaction: revert 11 - at HttpProvider.send (node_modules/@nomiclabs/buidler/src/internal/core/providers/http.ts:36:34) - at getMultipliedGasEstimation (node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:150:45) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:108:14 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/accounts.ts:219:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:63:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:82:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at EthersProviderWrapper.send (node_modules/@nomiclabs/buidler-ethers/src/ethers-provider-wrapper.ts:13:48) - at EthersProviderWrapper.JsonRpcProvider.perform (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:432:21) - at EthersProviderWrapper. (node_modules/@ethersproject/providers/src.ts/base-provider.ts:850:42) - at step (node_modules/@ethersproject/providers/lib/base-provider.js:46:23) - at Object.next (node_modules/@ethersproject/providers/lib/base-provider.js:27:53) - at fulfilled (node_modules/@ethersproject/providers/lib/base-provider.js:18:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 9) LendingPool. repayWithCollateral() with liquidator - User 5 liquidates half the USDC loan of User 3 by swapping his WETH collateral: - - AssertionError: expected '1097065639317749425' to be less than '1000000000000000000' - + expected - actual - - -1097065639317749425 - +1000000000000000000 - - at /src/test/flash-liquidation-with-collateral.spec.ts:223:68 - at step (test/flash-liquidation-with-collateral.spec.ts:33:23) - at Object.next (test/flash-liquidation-with-collateral.spec.ts:14:53) - at fulfilled (test/flash-liquidation-with-collateral.spec.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 10) LendingPool. repayWithCollateral() with liquidator - User 5 liquidates all the USDC loan of User 3 by swapping his WETH collateral: - - AssertionError: expected '59993908751455423405' to equal '59418562594024569644' - + expected - actual - - -59993908751455423405 - +59418562594024569644 - - at /src/test/flash-liquidation-with-collateral.spec.ts:433:68 - at step (test/flash-liquidation-with-collateral.spec.ts:33:23) - at Object.next (test/flash-liquidation-with-collateral.spec.ts:14:53) - at fulfilled (test/flash-liquidation-with-collateral.spec.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 11) LendingPool. repayWithCollateral() with liquidator - It is not possible to do reentrancy on repayWithCollateral(): - AssertionError: Expected transaction to be reverted with 53, but other exception was thrown: Error: VM Exception while processing transaction: revert 38 - - - 12) LendingPool. repayWithCollateral() with liquidator - User 5 liquidates User 2 DAI Variable loan using his WETH collateral, half the amount: - - AssertionError: expected '1198981160048434745' to be less than '1000000000000000000' - + expected - actual - - -1198981160048434745 - +1000000000000000000 - - at /src/test/flash-liquidation-with-collateral.spec.ts:556:68 - at step (test/flash-liquidation-with-collateral.spec.ts:33:23) - at Object.next (test/flash-liquidation-with-collateral.spec.ts:14:53) - at fulfilled (test/flash-liquidation-with-collateral.spec.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 13) LendingPool. repayWithCollateral() with liquidator - User 2 tries to repay remaining DAI Variable loan using his WETH collateral: - Error: VM Exception while processing transaction: revert 53 - at HttpProvider.send (node_modules/@nomiclabs/buidler/src/internal/core/providers/http.ts:36:34) - at getMultipliedGasEstimation (node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:150:45) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:108:14 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/accounts.ts:219:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:63:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:82:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at EthersProviderWrapper.send (node_modules/@nomiclabs/buidler-ethers/src/ethers-provider-wrapper.ts:13:48) - at EthersProviderWrapper.JsonRpcProvider.perform (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:432:21) - at EthersProviderWrapper. (node_modules/@ethersproject/providers/src.ts/base-provider.ts:850:42) - at step (node_modules/@ethersproject/providers/lib/base-provider.js:46:23) - at Object.next (node_modules/@ethersproject/providers/lib/base-provider.js:27:53) - at fulfilled (node_modules/@ethersproject/providers/lib/base-provider.js:18:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 14) LendingPool. repayWithCollateral() with liquidator - Liquidator tries to repay 4 user a bigger amount that what can be swapped of a particular collateral, repaying only the maximum allowed by that collateral: - - AssertionError: expected '1270283356830566122' to be less than '1000000000000000000' - + expected - actual - - -1270283356830566122 - +1000000000000000000 - - at /src/test/flash-liquidation-with-collateral.spec.ts:761:73 - at step (test/flash-liquidation-with-collateral.spec.ts:33:23) - at Object.next (test/flash-liquidation-with-collateral.spec.ts:14:53) - at fulfilled (test/flash-liquidation-with-collateral.spec.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 15) LendingPool. repayWithCollateral() with liquidator - User 5 deposits WETH and DAI, then borrows USDC at Variable, then disables WETH as collateral: - Error: VM Exception while processing transaction: revert 11 - at HttpProvider.send (node_modules/@nomiclabs/buidler/src/internal/core/providers/http.ts:36:34) - at getMultipliedGasEstimation (node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:150:45) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:108:14 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/accounts.ts:219:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:63:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:82:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at EthersProviderWrapper.send (node_modules/@nomiclabs/buidler-ethers/src/ethers-provider-wrapper.ts:13:48) - at EthersProviderWrapper.JsonRpcProvider.perform (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:432:21) - at EthersProviderWrapper. (node_modules/@ethersproject/providers/src.ts/base-provider.ts:850:42) - at step (node_modules/@ethersproject/providers/lib/base-provider.js:46:23) - at Object.next (node_modules/@ethersproject/providers/lib/base-provider.js:27:53) - at fulfilled (node_modules/@ethersproject/providers/lib/base-provider.js:18:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 16) LendingPool. repayWithCollateral() with liquidator - Liquidator tries to liquidates User 5 USDC loan by swapping his WETH collateral, should revert due WETH collateral disabled: - AssertionError: Expected transaction to be reverted with 39, but other exception was thrown: Error: VM Exception while processing transaction: revert 38 - - - 17) LendingPool FlashLoan function - Takes WETH flashloan with mode = 0, returns the funds correctly: - - AssertionError: expected '485188345817617606687' to equal '1000720000000000000' - + expected - actual - - -485188345817617606687 - +1000720000000000000 - - at /src/test/flashloan.spec.ts:66:45 - at step (test/flashloan.spec.ts:33:23) - at Object.next (test/flashloan.spec.ts:14:53) - at fulfilled (test/flashloan.spec.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 18) LendingPool FlashLoan function - Takes an ETH flashloan with mode = 0 as big as the available liquidity: - - AssertionError: expected '485189246465617606687' to equal '1001620648000000000' - + expected - actual - - -485189246465617606687 - +1001620648000000000 - - at /src/test/flashloan.spec.ts:93:45 - at step (test/flashloan.spec.ts:33:23) - at Object.next (test/flashloan.spec.ts:14:53) - at fulfilled (test/flashloan.spec.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 19) LendingPool FlashLoan function - Caller deposits 1000 DAI as collateral, Takes WETH flashloan with mode = 2, does not return the funds. A variable loan for caller is created: - Error: VM Exception while processing transaction: revert 11 - at HttpProvider.send (node_modules/@nomiclabs/buidler/src/internal/core/providers/http.ts:36:34) - at getMultipliedGasEstimation (node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:150:45) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:108:14 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/accounts.ts:219:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:63:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:82:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at EthersProviderWrapper.send (node_modules/@nomiclabs/buidler-ethers/src/ethers-provider-wrapper.ts:13:48) - at EthersProviderWrapper.JsonRpcProvider.perform (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:432:21) - at EthersProviderWrapper. (node_modules/@ethersproject/providers/src.ts/base-provider.ts:850:42) - at step (node_modules/@ethersproject/providers/lib/base-provider.js:46:23) - at Object.next (node_modules/@ethersproject/providers/lib/base-provider.js:27:53) - at fulfilled (node_modules/@ethersproject/providers/lib/base-provider.js:18:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 20) LendingPool FlashLoan function - tries to take a flashloan that is bigger than the available liquidity (revert expected): - - AssertionError: ERC20: transfer amount exceeds balance: Expected transaction to be reverted - + expected - actual - - -Transaction NOT reverted. - +Transaction reverted. - - - - 21) LendingPool FlashLoan function - Takes out a 500 USDC flashloan, returns the funds correctly: - AssertionError: Expected "40000000000001000450000" to be equal 1000450000 - at /src/test/flashloan.spec.ts:254:34 - at step (test/flashloan.spec.ts:33:23) - at Object.next (test/flashloan.spec.ts:14:53) - at fulfilled (test/flashloan.spec.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 22) LendingPool FlashLoan function - Takes out a 500 USDC flashloan with mode = 0, does not return the funds. (revert expected): - AssertionError: Expected transaction to be reverted with 9, but other exception was thrown: Error: VM Exception while processing transaction: revert 11 - - - 23) LendingPool FlashLoan function - Caller deposits 5 WETH as collateral, Takes a USDC flashloan with mode = 2, does not return the funds. A loan for caller is created: - Error: VM Exception while processing transaction: revert 11 - at HttpProvider.send (node_modules/@nomiclabs/buidler/src/internal/core/providers/http.ts:36:34) - at getMultipliedGasEstimation (node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:150:45) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:108:14 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/accounts.ts:219:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:63:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:82:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at EthersProviderWrapper.send (node_modules/@nomiclabs/buidler-ethers/src/ethers-provider-wrapper.ts:13:48) - at EthersProviderWrapper.JsonRpcProvider.perform (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:432:21) - at EthersProviderWrapper. (node_modules/@ethersproject/providers/src.ts/base-provider.ts:850:42) - at step (node_modules/@ethersproject/providers/lib/base-provider.js:46:23) - at Object.next (node_modules/@ethersproject/providers/lib/base-provider.js:27:53) - at fulfilled (node_modules/@ethersproject/providers/lib/base-provider.js:18:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 24) LendingPool FlashLoan function - Caller takes a WETH flashloan with mode = 1: - Error: VM Exception while processing transaction: revert 11 - at HttpProvider.send (node_modules/@nomiclabs/buidler/src/internal/core/providers/http.ts:36:34) - at getMultipliedGasEstimation (node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:150:45) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:108:14 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/accounts.ts:219:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:63:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:82:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at EthersProviderWrapper.send (node_modules/@nomiclabs/buidler-ethers/src/ethers-provider-wrapper.ts:13:48) - at EthersProviderWrapper.JsonRpcProvider.perform (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:432:21) - at EthersProviderWrapper. (node_modules/@ethersproject/providers/src.ts/base-provider.ts:850:42) - at step (node_modules/@ethersproject/providers/lib/base-provider.js:46:23) - at Object.next (node_modules/@ethersproject/providers/lib/base-provider.js:27:53) - at fulfilled (node_modules/@ethersproject/providers/lib/base-provider.js:18:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 25) LendingPool liquidation - liquidator receiving aToken - LIQUIDATION - Deposits WETH, borrows DAI/Check liquidation fails because health factor is above 1: - - AssertionError: expected '2180' to equal '8000' - + expected - actual - - -2180 - +8000 - - at /src/test/liquidation-atoken.spec.ts:70:88 - at step (test/liquidation-atoken.spec.ts:33:23) - at Object.next (test/liquidation-atoken.spec.ts:14:53) - at fulfilled (test/liquidation-atoken.spec.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 26) LendingPool liquidation - liquidator receiving aToken - LIQUIDATION - Drop the health factor below 1: - - AssertionError: expected '1106703694383782217' to be less than '1000000000000000000' - + expected - actual - - -1106703694383782217 - +1000000000000000000 - - at /src/test/liquidation-atoken.spec.ts:94:68 - at step (test/liquidation-atoken.spec.ts:33:23) - at Object.next (test/liquidation-atoken.spec.ts:14:53) - at fulfilled (test/liquidation-atoken.spec.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 27) LendingPool liquidation - liquidator receiving aToken - LIQUIDATION - Tries to liquidate a different currency than the loan principal: - AssertionError: Expected transaction to be reverted with 40, but other exception was thrown: Error: VM Exception while processing transaction: revert 38 - - - 28) LendingPool liquidation - liquidator receiving aToken - LIQUIDATION - Tries to liquidate a different collateral than the borrower collateral: - AssertionError: Expected transaction to be reverted with 39, but other exception was thrown: Error: VM Exception while processing transaction: revert 38 - - - 29) LendingPool liquidation - liquidator receiving aToken - LIQUIDATION - Liquidates the borrow: - Error: VM Exception while processing transaction: revert 38 - at HttpProvider.send (node_modules/@nomiclabs/buidler/src/internal/core/providers/http.ts:36:34) - at getMultipliedGasEstimation (node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:150:45) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:108:14 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/accounts.ts:219:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:63:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:82:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at EthersProviderWrapper.send (node_modules/@nomiclabs/buidler-ethers/src/ethers-provider-wrapper.ts:13:48) - at EthersProviderWrapper.JsonRpcProvider.perform (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:432:21) - at EthersProviderWrapper. (node_modules/@ethersproject/providers/src.ts/base-provider.ts:850:42) - at step (node_modules/@ethersproject/providers/lib/base-provider.js:46:23) - at Object.next (node_modules/@ethersproject/providers/lib/base-provider.js:27:53) - at fulfilled (node_modules/@ethersproject/providers/lib/base-provider.js:18:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 30) LendingPool liquidation - liquidator receiving aToken - User 3 deposits 1000 USDC, user 4 1 WETH, user 4 borrows - drops HF, liquidates the borrow: - Error: VM Exception while processing transaction: revert 39 - at HttpProvider.send (node_modules/@nomiclabs/buidler/src/internal/core/providers/http.ts:36:34) - at getMultipliedGasEstimation (node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:150:45) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:108:14 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/accounts.ts:219:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:63:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:82:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at EthersProviderWrapper.send (node_modules/@nomiclabs/buidler-ethers/src/ethers-provider-wrapper.ts:13:48) - at EthersProviderWrapper.JsonRpcProvider.perform (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:432:21) - at EthersProviderWrapper. (node_modules/@ethersproject/providers/src.ts/base-provider.ts:850:42) - at step (node_modules/@ethersproject/providers/lib/base-provider.js:46:23) - at Object.next (node_modules/@ethersproject/providers/lib/base-provider.js:27:53) - at fulfilled (node_modules/@ethersproject/providers/lib/base-provider.js:18:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 31) LendingPool liquidation - liquidator receiving the underlying asset - LIQUIDATION - Deposits WETH, borrows DAI: - - AssertionError: expected '2053' to equal '8000' - + expected - actual - - -2053 - +8000 - - at /src/test/liquidation-underlying.spec.ts:75:88 - at step (test/liquidation-underlying.spec.ts:33:23) - at Object.next (test/liquidation-underlying.spec.ts:14:53) - at fulfilled (test/liquidation-underlying.spec.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 32) LendingPool liquidation - liquidator receiving the underlying asset - LIQUIDATION - Drop the health factor below 1: - - AssertionError: expected '1084735437615841522' to be less than '1000000000000000000' - + expected - actual - - -1084735437615841522 - +1000000000000000000 - - at /src/test/liquidation-underlying.spec.ts:94:68 - at step (test/liquidation-underlying.spec.ts:33:23) - at Object.next (test/liquidation-underlying.spec.ts:14:53) - at fulfilled (test/liquidation-underlying.spec.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 33) LendingPool liquidation - liquidator receiving the underlying asset - LIQUIDATION - Liquidates the borrow: - Error: VM Exception while processing transaction: revert 38 - at HttpProvider.send (node_modules/@nomiclabs/buidler/src/internal/core/providers/http.ts:36:34) - at getMultipliedGasEstimation (node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:150:45) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:108:14 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/accounts.ts:219:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:63:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:82:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at EthersProviderWrapper.send (node_modules/@nomiclabs/buidler-ethers/src/ethers-provider-wrapper.ts:13:48) - at EthersProviderWrapper.JsonRpcProvider.perform (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:432:21) - at EthersProviderWrapper. (node_modules/@ethersproject/providers/src.ts/base-provider.ts:850:42) - at step (node_modules/@ethersproject/providers/lib/base-provider.js:46:23) - at Object.next (node_modules/@ethersproject/providers/lib/base-provider.js:27:53) - at fulfilled (node_modules/@ethersproject/providers/lib/base-provider.js:18:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 34) LendingPool liquidation - liquidator receiving the underlying asset - User 3 deposits 1000 USDC, user 4 1 WETH, user 4 borrows - drops HF, liquidates the borrow: - Error: VM Exception while processing transaction: revert 39 - at HttpProvider.send (node_modules/@nomiclabs/buidler/src/internal/core/providers/http.ts:36:34) - at getMultipliedGasEstimation (node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:150:45) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:108:14 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/accounts.ts:219:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:63:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:82:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at EthersProviderWrapper.send (node_modules/@nomiclabs/buidler-ethers/src/ethers-provider-wrapper.ts:13:48) - at EthersProviderWrapper.JsonRpcProvider.perform (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:432:21) - at EthersProviderWrapper. (node_modules/@ethersproject/providers/src.ts/base-provider.ts:850:42) - at step (node_modules/@ethersproject/providers/lib/base-provider.js:46:23) - at Object.next (node_modules/@ethersproject/providers/lib/base-provider.js:27:53) - at fulfilled (node_modules/@ethersproject/providers/lib/base-provider.js:18:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 35) LendingPool: Borrow negatives (reverts) - User 0 deposits 1000 DAI, user 1 deposits 1 WETH as collateral and tries to borrow 100 DAI with rate mode NONE (revert expected): - - AssertionError: expected '100000000000000000' to be almost equal or equal '0' for property principalStableDebt - + expected - actual - - -100000000000000000 - +0 - - at expectEqual (test/helpers/actions.ts:664:26) - at /src/test/helpers/actions.ts:194:5 - at step (test/helpers/actions.ts:33:23) - at Object.next (test/helpers/actions.ts:14:53) - at fulfilled (test/helpers/actions.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 36) LendingPool: Borrow negatives (reverts) - User 0 deposits 1000 DAI, user 1 deposits 1 WETH as collateral and tries to borrow 100 DAI with an invalid rate mode (revert expected): - - AssertionError: expected '100000000000000000' to be almost equal or equal '0' for property principalStableDebt - + expected - actual - - -100000000000000000 - +0 - - at expectEqual (test/helpers/actions.ts:664:26) - at /src/test/helpers/actions.ts:194:5 - at step (test/helpers/actions.ts:33:23) - at Object.next (test/helpers/actions.ts:14:53) - at fulfilled (test/helpers/actions.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 37) LendingPool: Borrow/repay (stable rate) - User 0 deposits 1000 DAI, user 1 deposits 1 WETH as collateral and borrows 100 DAI at stable rate: - - AssertionError: expected '100000000000000000' to be almost equal or equal '0' for property principalStableDebt - + expected - actual - - -100000000000000000 - +0 - - at expectEqual (test/helpers/actions.ts:664:26) - at /src/test/helpers/actions.ts:194:5 - at step (test/helpers/actions.ts:33:23) - at Object.next (test/helpers/actions.ts:14:53) - at fulfilled (test/helpers/actions.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 38) LendingPool: Borrow/repay (stable rate) - User 1 deposits 1000 DAI, user 2 tries to borrow 1000 DAI at a stable rate without any collateral (revert expected): - - AssertionError: expected '0' to be almost equal or equal '1358000328427211421354' for property principalStableDebt - + expected - actual - - -0 - +1358000328427211421354 - - at expectEqual (test/helpers/actions.ts:664:26) - at /src/test/helpers/actions.ts:194:5 - at step (test/helpers/actions.ts:33:23) - at Object.next (test/helpers/actions.ts:14:53) - at fulfilled (test/helpers/actions.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 39) LendingPool: Borrow/repay (stable rate) - User 0 deposits 1000 DAI, user 1,2,3,4 deposit 1 WETH each and borrow 100 DAI at stable rate. Everything is repaid, user 0 withdraws: - - AssertionError: expected '100000000000000000' to be almost equal or equal '0' for property principalStableDebt - + expected - actual - - -100000000000000000 - +0 - - at expectEqual (test/helpers/actions.ts:664:26) - at /src/test/helpers/actions.ts:194:5 - at step (test/helpers/actions.ts:33:23) - at Object.next (test/helpers/actions.ts:14:53) - at fulfilled (test/helpers/actions.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 40) LendingPool: Borrow/repay (stable rate) - User 0 deposits 1000 DAI, user 1 deposits 2 WETH and borrow 100 DAI at stable rate first, then 100 DAI at variable rate, repays everything. User 0 withdraws: - - AssertionError: expected '100000000000000000' to be almost equal or equal '0' for property principalStableDebt - + expected - actual - - -100000000000000000 - +0 - - at expectEqual (test/helpers/actions.ts:664:26) - at /src/test/helpers/actions.ts:194:5 - at step (test/helpers/actions.ts:33:23) - at Object.next (test/helpers/actions.ts:14:53) - at fulfilled (test/helpers/actions.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 41) LendingPool: Borrow/repay (variable rate) - User 0 deposits 1000 DAI, user 1 deposits 1 WETH as collateral and borrows 100 DAI at variable rate: - - AssertionError: expected '100000000000000000' to be almost equal or equal '0' for property principalStableDebt - + expected - actual - - -100000000000000000 - +0 - - at expectEqual (test/helpers/actions.ts:664:26) - at /src/test/helpers/actions.ts:194:5 - at step (test/helpers/actions.ts:33:23) - at Object.next (test/helpers/actions.ts:14:53) - at fulfilled (test/helpers/actions.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 42) LendingPool: Borrow/repay (variable rate) - User 0 deposits 1000 USDC, user 1 deposits 1 WETH as collateral and borrows 100 USDC at variable rate: - - AssertionError: expected '100000000000000000' to be almost equal or equal '0' for property principalStableDebt - + expected - actual - - -100000000000000000 - +0 - - at expectEqual (test/helpers/actions.ts:664:26) - at /src/test/helpers/actions.ts:194:5 - at step (test/helpers/actions.ts:33:23) - at Object.next (test/helpers/actions.ts:14:53) - at fulfilled (test/helpers/actions.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 43) LendingPool: Borrow/repay (variable rate) - User 1 repays the USDC borrow after one year: - Error: VM Exception while processing transaction: revert 15 - at HttpProvider.send (node_modules/@nomiclabs/buidler/src/internal/core/providers/http.ts:36:34) - at getMultipliedGasEstimation (node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:150:45) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:108:14 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/accounts.ts:219:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:63:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:82:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at EthersProviderWrapper.send (node_modules/@nomiclabs/buidler-ethers/src/ethers-provider-wrapper.ts:13:48) - at EthersProviderWrapper.JsonRpcProvider.perform (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:432:21) - at EthersProviderWrapper. (node_modules/@ethersproject/providers/src.ts/base-provider.ts:850:42) - at step (node_modules/@ethersproject/providers/lib/base-provider.js:46:23) - at Object.next (node_modules/@ethersproject/providers/lib/base-provider.js:27:53) - at fulfilled (node_modules/@ethersproject/providers/lib/base-provider.js:18:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 44) LendingPool: Borrow/repay (variable rate) - User 1 deposits 1000 DAI, user 3 tries to borrow 1000 DAI without any collateral (revert expected): - - AssertionError: The collateral balance is 0: Expected transaction to be reverted - + expected - actual - - -Transaction NOT reverted. - +Transaction reverted. - - - - 45) LendingPool: Borrow/repay (variable rate) - user 3 deposits 0.1 ETH collateral to borrow 100 DAI; 0.1 ETH is not enough to borrow 100 DAI (revert expected): - - AssertionError: There is not enough collateral to cover a new borrow: Expected transaction to be reverted - + expected - actual - - -Transaction NOT reverted. - +Transaction reverted. - - - - 46) LendingPool: Borrow/repay (variable rate) - User 1 deposits 1000 USDC, user 3 tries to borrow 1000 USDC without any collateral (revert expected): - - AssertionError: The collateral balance is 0: Expected transaction to be reverted - + expected - actual - - -Transaction NOT reverted. - +Transaction reverted. - - - - 47) LendingPool: Borrow/repay (variable rate) - user 3 deposits 0.1 ETH collateral to borrow 100 USDC; 0.1 ETH is not enough to borrow 100 USDC (revert expected): - - AssertionError: There is not enough collateral to cover a new borrow: Expected transaction to be reverted - + expected - actual - - -Transaction NOT reverted. - +Transaction reverted. - - - - 48) LendingPool: Borrow/repay (variable rate) - User 0 deposits 1000 DAI, user 6 deposits 2 WETH and borrow 100 DAI at variable rate first, then 100 DAI at stable rate, repays everything. User 0 withdraws: - Error: VM Exception while processing transaction: revert 11 - at HttpProvider.send (node_modules/@nomiclabs/buidler/src/internal/core/providers/http.ts:36:34) - at getMultipliedGasEstimation (node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:150:45) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:108:14 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/accounts.ts:219:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:63:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:82:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at EthersProviderWrapper.send (node_modules/@nomiclabs/buidler-ethers/src/ethers-provider-wrapper.ts:13:48) - at EthersProviderWrapper.JsonRpcProvider.perform (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:432:21) - at EthersProviderWrapper. (node_modules/@ethersproject/providers/src.ts/base-provider.ts:850:42) - at step (node_modules/@ethersproject/providers/lib/base-provider.js:46:23) - at Object.next (node_modules/@ethersproject/providers/lib/base-provider.js:27:53) - at fulfilled (node_modules/@ethersproject/providers/lib/base-provider.js:18:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 49) LendingPool: Deposit - User 1 deposits 1 WETH after user 0: - - AssertionError: expected '100000000000000000' to be almost equal or equal '0' for property principalStableDebt - + expected - actual - - -100000000000000000 - +0 - - at expectEqual (test/helpers/actions.ts:664:26) - at /src/test/helpers/actions.ts:194:5 - at step (test/helpers/actions.ts:33:23) - at Object.next (test/helpers/actions.ts:14:53) - at fulfilled (test/helpers/actions.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 50) LendingPool: Rebalance stable rate - User 0 deposits 1000 DAI, user 1 deposits 1 ETH, borrows 100 DAI at a variable rate, user 0 rebalances user 1 (revert expected): - - AssertionError: expected '100000000000000000' to be almost equal or equal '0' for property principalStableDebt - + expected - actual - - -100000000000000000 - +0 - - at expectEqual (test/helpers/actions.ts:664:26) - at /src/test/helpers/actions.ts:194:5 - at step (test/helpers/actions.ts:33:23) - at Object.next (test/helpers/actions.ts:14:53) - at fulfilled (test/helpers/actions.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 51) LendingPool: Rebalance stable rate - User 1 swaps to stable, user 0 tries to rebalance but the conditions are not met (revert expected): - Error: VM Exception while processing transaction: revert 18 - at HttpProvider.send (node_modules/@nomiclabs/buidler/src/internal/core/providers/http.ts:36:34) - at getMultipliedGasEstimation (node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:150:45) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:108:14 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/accounts.ts:219:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:63:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at /src/node_modules/@nomiclabs/buidler/src/internal/core/providers/gas-providers.ts:82:21 - at Proxy.cloningSendWrapper (node_modules/@nomiclabs/buidler/src/internal/core/providers/wrapper.ts:9:12) - at EthersProviderWrapper.send (node_modules/@nomiclabs/buidler-ethers/src/ethers-provider-wrapper.ts:13:48) - at EthersProviderWrapper.JsonRpcProvider.perform (node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:432:21) - at EthersProviderWrapper. (node_modules/@ethersproject/providers/src.ts/base-provider.ts:850:42) - at step (node_modules/@ethersproject/providers/lib/base-provider.js:46:23) - at Object.next (node_modules/@ethersproject/providers/lib/base-provider.js:27:53) - at fulfilled (node_modules/@ethersproject/providers/lib/base-provider.js:18:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 52) LendingPool: Rebalance stable rate - User 2 deposits ETH and borrows the remaining DAI, causing the stable rates to rise (liquidity rate < user 1 borrow rate). User 0 tries to rebalance user 1 (revert expected): - - AssertionError: expected '0' to be almost equal or equal '100000000006972721' for property principalStableDebt - + expected - actual - - -0 - +100000000006972721 - - at expectEqual (test/helpers/actions.ts:664:26) - at /src/test/helpers/actions.ts:194:5 - at step (test/helpers/actions.ts:33:23) - at Object.next (test/helpers/actions.ts:14:53) - at fulfilled (test/helpers/actions.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 53) LendingPool: Rebalance stable rate - User 2 borrows more DAI, causing the liquidity rate to rise above user 1 stable borrow rate User 0 rebalances user 1: - - AssertionError: expected '0' to be almost equal or equal '100000000009270565' for property principalStableDebt - + expected - actual - - -0 - +100000000009270565 - - at expectEqual (test/helpers/actions.ts:664:26) - at /src/test/helpers/actions.ts:194:5 - at step (test/helpers/actions.ts:33:23) - at Object.next (test/helpers/actions.ts:14:53) - at fulfilled (test/helpers/actions.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 54) LendingPool: Usage as collateral - User 0 Deposits 1000 DAI, disables DAI as collateral: - - AssertionError: expected '4000000000706215436781' to be almost equal or equal '4000000000676018902879' for property currentATokenBalance - + expected - actual - - -4000000000706215436781 - +4000000000676018902879 - - at expectEqual (test/helpers/actions.ts:664:26) - at /src/test/helpers/actions.ts:509:5 - at step (test/helpers/actions.ts:33:23) - at Object.next (test/helpers/actions.ts:14:53) - at fulfilled (test/helpers/actions.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 55) LendingPool: Usage as collateral - User 1 Deposits 2 ETH, disables ETH as collateral, borrows 400 DAI (revert expected): - - AssertionError: expected '100000000000000000' to be almost equal or equal '0' for property principalStableDebt - + expected - actual - - -100000000000000000 - +0 - - at expectEqual (test/helpers/actions.ts:664:26) - at /src/test/helpers/actions.ts:194:5 - at step (test/helpers/actions.ts:33:23) - at Object.next (test/helpers/actions.ts:14:53) - at fulfilled (test/helpers/actions.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 56) LendingPool: Usage as collateral - User 1 enables ETH as collateral, borrows 400 DAI: - - AssertionError: expected '4000000000008306119' to be almost equal or equal '4000000000007484590' for property currentATokenBalance - + expected - actual - - -4000000000008306119 - +4000000000007484590 - - at expectEqual (test/helpers/actions.ts:664:26) - at /src/test/helpers/actions.ts:509:5 - at step (test/helpers/actions.ts:33:23) - at Object.next (test/helpers/actions.ts:14:53) - at fulfilled (test/helpers/actions.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 57) LendingPool: Usage as collateral - User 1 disables ETH as collateral (revert expected): - - AssertionError: User deposit is already being used as collateral: Expected transaction to be reverted - + expected - actual - - -Transaction NOT reverted. - +Transaction reverted. - - - - 58) LendingPool: Swap rate mode - User 0 deposits 1000 DAI, user 1 deposits 2 ETH as collateral, borrows 100 DAI at variable rate and swaps to stable after one year: - - AssertionError: expected '100000000000000000' to be almost equal or equal '0' for property principalStableDebt - + expected - actual - - -100000000000000000 - +0 - - at expectEqual (test/helpers/actions.ts:664:26) - at /src/test/helpers/actions.ts:194:5 - at step (test/helpers/actions.ts:33:23) - at Object.next (test/helpers/actions.ts:14:53) - at fulfilled (test/helpers/actions.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 59) LendingPool: Redeem negative test cases - Users 0 tries to redeem 1100 DAI from the 1000 DAI deposited (revert expected): - - AssertionError: User cannot redeem more than the available balance: Expected transaction to be reverted - + expected - actual - - -Transaction NOT reverted. - +Transaction reverted. - - - - 60) LendingPool: Redeem negative test cases - Users 1 deposits 1 WETH, borrows 100 DAI, tries to redeem the 1 WETH deposited (revert expected): - - AssertionError: expected '100000000000000000' to be almost equal or equal '0' for property principalStableDebt - + expected - actual - - -100000000000000000 - +0 - - at expectEqual (test/helpers/actions.ts:664:26) - at /src/test/helpers/actions.ts:194:5 - at step (test/helpers/actions.ts:33:23) - at Object.next (test/helpers/actions.ts:14:53) - at fulfilled (test/helpers/actions.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - 61) LendingPool: withdraw - Users 0 deposits 1000 DAI, user 1 Deposit 1000 USDC and 1 WETH, borrows 100 DAI. User 1 tries to withdraw all the USDC: - - AssertionError: expected '100000000000000000' to be almost equal or equal '0' for property principalStableDebt - + expected - actual - - -100000000000000000 - +0 - - at expectEqual (test/helpers/actions.ts:664:26) - at /src/test/helpers/actions.ts:194:5 - at step (test/helpers/actions.ts:33:23) - at Object.next (test/helpers/actions.ts:14:53) - at fulfilled (test/helpers/actions.ts:5:58) - at runMicrotasks () - at processTicksAndRejections (internal/process/task_queues.js:97:5) - - - diff --git a/test/addresses-provider-registry.spec.ts b/test/addresses-provider-registry.spec.ts index 457514e4..5630591d 100644 --- a/test/addresses-provider-registry.spec.ts +++ b/test/addresses-provider-registry.spec.ts @@ -18,6 +18,15 @@ makeSuite('AddressesProviderRegistry', (testEnv: TestEnv) => { ); }); + it('tries to register an addresses provider with id 0', async () => { + const {users, registry} = testEnv; + const {INVALID_ADDRESSES_PROVIDER_ID} = ProtocolErrors; + + await expect(registry.registerAddressesProvider(users[2].address, '0')).to.be.revertedWith( + INVALID_ADDRESSES_PROVIDER_ID + ); + }); + it('Registers a new mock addresses provider', async () => { const {users, registry} = testEnv; diff --git a/test/flashloan.spec.ts b/test/flashloan.spec.ts index 1ca080f9..4edd4848 100644 --- a/test/flashloan.spec.ts +++ b/test/flashloan.spec.ts @@ -48,8 +48,8 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => { await pool.flashLoan( _mockFlashLoanReceiver.address, - weth.address, - ethers.utils.parseEther('0.8'), + [weth.address], + [ethers.utils.parseEther('0.8')], 0, '0x10', '0' @@ -77,8 +77,8 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => { const reserveDataBefore = await helpersContract.getReserveData(weth.address); const txResult = await pool.flashLoan( _mockFlashLoanReceiver.address, - weth.address, - '1000720000000000000', + [weth.address], + ['1000720000000000000'], 0, '0x10', '0' @@ -108,8 +108,8 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => { .connect(caller.signer) .flashLoan( _mockFlashLoanReceiver.address, - weth.address, - ethers.utils.parseEther('0.8'), + [weth.address], + [ethers.utils.parseEther('0.8')], 0, '0x10', '0' @@ -128,8 +128,8 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => { .connect(caller.signer) .flashLoan( _mockFlashLoanReceiver.address, - weth.address, - ethers.utils.parseEther('0.8'), + [weth.address], + [ethers.utils.parseEther('0.8')], 0, '0x10', '0' @@ -148,8 +148,8 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => { .connect(caller.signer) .flashLoan( _mockFlashLoanReceiver.address, - weth.address, - ethers.utils.parseEther('0.8'), + [weth.address], + [ethers.utils.parseEther('0.8')], 4, '0x10', '0' @@ -176,8 +176,8 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => { .connect(caller.signer) .flashLoan( _mockFlashLoanReceiver.address, - weth.address, - ethers.utils.parseEther('0.8'), + [weth.address], + [ethers.utils.parseEther('0.8')], 2, '0x10', '0' @@ -193,22 +193,7 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => { const callerDebt = await wethDebtToken.balanceOf(caller.address); - expect(callerDebt.toString()).to.be.equal('800720000000000000', 'Invalid user debt'); - }); - - it('tries to take a very small flashloan, which would result in 0 fees (revert expected)', async () => { - const {pool, weth} = testEnv; - - await expect( - pool.flashLoan( - _mockFlashLoanReceiver.address, - weth.address, - '1', //1 wei loan - 2, - '0x10', - '0' - ) - ).to.be.revertedWith(REQUESTED_AMOUNT_TOO_SMALL); + expect(callerDebt.toString()).to.be.equal('800000000000000000', 'Invalid user debt'); }); it('tries to take a flashloan that is bigger than the available liquidity (revert expected)', async () => { @@ -217,8 +202,8 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => { await expect( pool.flashLoan( _mockFlashLoanReceiver.address, - weth.address, - '1004415000000000000', //slightly higher than the available liquidity + [weth.address], + ['1004415000000000000'], //slightly higher than the available liquidity 2, '0x10', '0' @@ -231,7 +216,7 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => { const {pool, deployer, weth} = testEnv; await expect( - pool.flashLoan(deployer.address, weth.address, '1000000000000000000', 2, '0x10', '0') + pool.flashLoan(deployer.address, [weth.address], ['1000000000000000000'], 2, '0x10', '0') ).to.be.reverted; }); @@ -257,8 +242,8 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => { await pool.flashLoan( _mockFlashLoanReceiver.address, - usdc.address, - flashloanAmount, + [usdc.address], + [flashloanAmount], 0, '0x10', '0' @@ -297,7 +282,14 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => { await expect( pool .connect(caller.signer) - .flashLoan(_mockFlashLoanReceiver.address, usdc.address, flashloanAmount, 2, '0x10', '0') + .flashLoan( + _mockFlashLoanReceiver.address, + [usdc.address], + [flashloanAmount], + 2, + '0x10', + '0' + ) ).to.be.revertedWith(COLLATERAL_BALANCE_IS_0); }); @@ -320,7 +312,7 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => { await pool .connect(caller.signer) - .flashLoan(_mockFlashLoanReceiver.address, usdc.address, flashloanAmount, 2, '0x10', '0'); + .flashLoan(_mockFlashLoanReceiver.address, [usdc.address], [flashloanAmount], 2, '0x10', '0'); const {variableDebtTokenAddress} = await helpersContract.getReserveTokensAddresses( usdc.address ); @@ -332,7 +324,7 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => { const callerDebt = await usdcDebtToken.balanceOf(caller.address); - expect(callerDebt.toString()).to.be.equal('500450000', 'Invalid user debt'); + expect(callerDebt.toString()).to.be.equal('500000000', 'Invalid user debt'); }); it('Caller deposits 1000 DAI as collateral, Takes a WETH flashloan with mode = 0, does not approve the transfer of the funds', async () => { @@ -355,7 +347,7 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => { await expect( pool .connect(caller.signer) - .flashLoan(_mockFlashLoanReceiver.address, weth.address, flashAmount, 0, '0x10', '0') + .flashLoan(_mockFlashLoanReceiver.address, [weth.address], [flashAmount], 0, '0x10', '0') ).to.be.revertedWith(SAFEERC20_LOWLEVEL_CALL); }); @@ -370,7 +362,7 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => { await pool .connect(caller.signer) - .flashLoan(_mockFlashLoanReceiver.address, weth.address, flashAmount, 1, '0x10', '0'); + .flashLoan(_mockFlashLoanReceiver.address, [weth.address], [flashAmount], 1, '0x10', '0'); const {stableDebtTokenAddress} = await helpersContract.getReserveTokensAddresses(weth.address); @@ -381,6 +373,6 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => { const callerDebt = await wethDebtToken.balanceOf(caller.address); - expect(callerDebt.toString()).to.be.equal('800720000000000000', 'Invalid user debt'); + expect(callerDebt.toString()).to.be.equal('800000000000000000', 'Invalid user debt'); }); }); diff --git a/test/pausable-functions.spec.ts b/test/pausable-functions.spec.ts index fdfe5341..48c50ee2 100644 --- a/test/pausable-functions.spec.ts +++ b/test/pausable-functions.spec.ts @@ -186,7 +186,7 @@ makeSuite('Pausable Pool', (testEnv: TestEnv) => { await expect( pool .connect(caller.signer) - .flashLoan(_mockFlashLoanReceiver.address, weth.address, flashAmount, 1, '0x10', '0') + .flashLoan(_mockFlashLoanReceiver.address, [weth.address], [flashAmount], 1, '0x10', '0') ).revertedWith(IS_PAUSED); // Unpause pool