Fixed tests

This commit is contained in:
The3D 2020-06-27 04:13:32 +02:00
parent 1980773a58
commit abc0d3edb6
69 changed files with 657 additions and 792 deletions

View File

@ -4,8 +4,8 @@ pragma solidity ^0.6.8;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "../libraries/EthAddressLib.sol";
import "../mocks/tokens/MintableERC20.sol"; import "../mocks/tokens/MintableERC20.sol";
import "../libraries/EthAddressLib.sol";
/// @title MockKyberProxy /// @title MockKyberProxy
/// @author Aave /// @author Aave

View File

@ -36,7 +36,7 @@ contract DefaultReserveInterestRateStrategy is IReserveInterestRateStrategy {
using WadRayMath for uint256; using WadRayMath for uint256;
using SafeMath for uint256; using SafeMath for uint256;
LendingPoolAddressesProvider public addressesProvider; LendingPoolAddressesProvider public immutable addressesProvider;
//base variable borrow rate when Utilization rate = 0. Expressed in ray //base variable borrow rate when Utilization rate = 0. Expressed in ray
uint256 internal immutable baseVariableBorrowRate; uint256 internal immutable baseVariableBorrowRate;

View File

@ -772,8 +772,8 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
//protocol fee is the part of the amountFee reserved for the protocol - the rest goes to depositors //protocol fee is the part of the amountFee reserved for the protocol - the rest goes to depositors
vars.protocolFee = vars.amountFee.mul(FLASHLOAN_FEE_PROTOCOL).div(10000); vars.protocolFee = vars.amountFee.mul(FLASHLOAN_FEE_PROTOCOL).div(10000);
require(vars.availableLiquidityBefore >= _amount, "26"); require(vars.availableLiquidityBefore >= _amount, "There is not enough liquidity available to borrow");
require(vars.amountFee > 0 && vars.protocolFee > 0, "27"); require(vars.amountFee > 0 && vars.protocolFee > 0, "The requested amount is too small for a FlashLoan.");
//get the FlashLoanReceiver instance //get the FlashLoanReceiver instance
IFlashLoanReceiver receiver = IFlashLoanReceiver(_receiver); IFlashLoanReceiver receiver = IFlashLoanReceiver(_receiver);
@ -789,7 +789,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
//check that the actual balance of the core contract includes the returned amount //check that the actual balance of the core contract includes the returned amount
uint256 availableLiquidityAfter = IERC20(_reserve).universalBalanceOf(address(this)); uint256 availableLiquidityAfter = IERC20(_reserve).universalBalanceOf(address(this));
require(availableLiquidityAfter == vars.availableLiquidityBefore.add(vars.amountFee), "28"); require(availableLiquidityAfter == vars.availableLiquidityBefore.add(vars.amountFee), "The actual balance of the protocol is inconsistent");
reserve.updateStateOnFlashLoan( reserve.updateStateOnFlashLoan(
_reserve, _reserve,
@ -830,7 +830,8 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
bool usageAsCollateralEnabled, bool usageAsCollateralEnabled,
bool borrowingEnabled, bool borrowingEnabled,
bool stableBorrowRateEnabled, bool stableBorrowRateEnabled,
bool isActive bool isActive,
bool isFreezed
) )
{ {
CoreLibrary.ReserveData storage reserve = reserves[_reserve]; CoreLibrary.ReserveData storage reserve = reserves[_reserve];
@ -844,7 +845,8 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
reserve.usageAsCollateralEnabled, reserve.usageAsCollateralEnabled,
reserve.borrowingEnabled, reserve.borrowingEnabled,
reserve.isStableBorrowRateEnabled, reserve.isStableBorrowRateEnabled,
reserve.isActive reserve.isActive,
reserve.isFreezed
); );
} }
@ -898,7 +900,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
totalFeesETH, totalFeesETH,
ltv, ltv,
currentLiquidationThreshold, currentLiquidationThreshold,
healthFactor
) = GenericLogic.calculateUserAccountData( ) = GenericLogic.calculateUserAccountData(
_user, _user,
reserves, reserves,
@ -907,7 +909,6 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
addressesProvider.getPriceOracle() addressesProvider.getPriceOracle()
); );
healthFactor = 0;
availableBorrowsETH = GenericLogic.calculateAvailableBorrowsETH( availableBorrowsETH = GenericLogic.calculateAvailableBorrowsETH(
totalCollateralETH, totalCollateralETH,
@ -1061,13 +1062,18 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
function setReserveActive(address _reserve, bool _active) external onlyLendingPoolConfigurator { function setReserveActive(address _reserve, bool _active) external onlyLendingPoolConfigurator {
CoreLibrary.ReserveData storage reserve = reserves[_reserve]; CoreLibrary.ReserveData storage reserve = reserves[_reserve];
require( if(!_active){
_active && reserve.isActive = false;
}
else{
require(
reserve.lastLiquidityCumulativeIndex > 0 && reserve.lastLiquidityCumulativeIndex > 0 &&
reserve.lastVariableBorrowCumulativeIndex > 0, reserve.lastVariableBorrowCumulativeIndex > 0,
"29" "Reserve has not been initialized yet"
); );
reserve.isActive = _active; reserve.isActive = true;
}
} }
/** /**

View File

@ -299,7 +299,7 @@ contract LendingPoolConfigurator is VersionedInitializable {
* @dev disable stable rate borrowing on a reserve * @dev disable stable rate borrowing on a reserve
* @param _reserve the address of the reserve * @param _reserve the address of the reserve
**/ **/
function disableReserveStableBorrowRate(address _reserve) external onlyLendingPoolManager { function disableReserveStableRate(address _reserve) external onlyLendingPoolManager {
LendingPool pool = LendingPool(payable(poolAddressesProvider.getLendingPool())); LendingPool pool = LendingPool(payable(poolAddressesProvider.getLendingPool()));
pool.setReserveStableBorrowRateEnabled(_reserve, false); pool.setReserveStableBorrowRateEnabled(_reserve, false);

View File

@ -109,9 +109,9 @@ contract LendingPoolLiquidationManager is ReentrancyGuard, VersionedInitializabl
uint256 userStableRate; uint256 userStableRate;
uint256 maxCollateralToLiquidate; uint256 maxCollateralToLiquidate;
uint256 principalAmountNeeded; uint256 principalAmountNeeded;
uint256 healthFactor;
AToken collateralAtoken; AToken collateralAtoken;
bool isCollateralEnabled; bool isCollateralEnabled;
bool healthFactorBelowThreshold;
} }
/** /**
@ -146,7 +146,7 @@ contract LendingPoolLiquidationManager is ReentrancyGuard, VersionedInitializabl
LiquidationCallLocalVars memory vars; LiquidationCallLocalVars memory vars;
(, , , , , vars.healthFactorBelowThreshold) = GenericLogic.calculateUserAccountData( (, , , , , vars.healthFactor) = GenericLogic.calculateUserAccountData(
msg.sender, msg.sender,
reserves, reserves,
usersReserveData, usersReserveData,
@ -154,7 +154,7 @@ contract LendingPoolLiquidationManager is ReentrancyGuard, VersionedInitializabl
addressesProvider.getPriceOracle() addressesProvider.getPriceOracle()
); );
if (!vars.healthFactorBelowThreshold) { if (vars.healthFactor >= GenericLogic.HEALTH_FACTOR_LIQUIDATION_THRESHOLD) {
return ( return (
uint256(LiquidationErrors.HEALTH_FACTOR_ABOVE_THRESHOLD), uint256(LiquidationErrors.HEALTH_FACTOR_ABOVE_THRESHOLD),
"Health factor is not below the threshold" "Health factor is not below the threshold"

View File

@ -12,9 +12,11 @@ import {WadRayMath} from "./WadRayMath.sol";
import "../interfaces/IPriceOracleGetter.sol"; import "../interfaces/IPriceOracleGetter.sol";
import {IFeeProvider} from "../interfaces/IFeeProvider.sol"; import {IFeeProvider} from "../interfaces/IFeeProvider.sol";
/**
import "./EthAddressLib.sol"; * @title GenericLogic library
* @author Aave
* @title Implements protocol-level logic to check the status of the user across all the reserves
*/
library GenericLogic { library GenericLogic {
using ReserveLogic for CoreLibrary.ReserveData; using ReserveLogic for CoreLibrary.ReserveData;
using UserLogic for CoreLibrary.UserReserveData; using UserLogic for CoreLibrary.UserReserveData;
@ -38,13 +40,12 @@ library GenericLogic {
} }
/** /**
* @dev check if a specific balance decrease is allowed (i.e. doesn't bring the user borrow position health factor under 1e18) * @dev check if a specific balance decrease is allowed (i.e. doesn't bring the user borrow position health factor under HEALTH_FACTOR_LIQUIDATION_THRESHOLD)
* @param _reserve the address of the reserve * @param _reserve the address of the reserve
* @param _user the address of the user * @param _user the address of the user
* @param _amount the amount to decrease * @param _amount the amount to decrease
* @return true if the decrease of the balance is allowed * @return true if the decrease of the balance is allowed
**/ **/
function balanceDecreaseAllowed( function balanceDecreaseAllowed(
address _reserve, address _reserve,
address _user, address _user,
@ -70,7 +71,6 @@ library GenericLogic {
vars.totalFeesETH, vars.totalFeesETH,
, ,
vars.currentLiquidationThreshold, vars.currentLiquidationThreshold,
) = calculateUserAccountData(_user, _reservesData, _usersData, _reserves, _oracle); ) = calculateUserAccountData(_user, _reservesData, _usersData, _reserves, _oracle);
if (vars.borrowBalanceETH == 0) { if (vars.borrowBalanceETH == 0) {
@ -80,7 +80,7 @@ library GenericLogic {
vars.amountToDecreaseETH = IPriceOracleGetter(_oracle) vars.amountToDecreaseETH = IPriceOracleGetter(_oracle)
.getAssetPrice(_reserve) .getAssetPrice(_reserve)
.mul(_amount) .mul(_amount)
.div(10 ** vars.decimals); .div(10 ** _reservesData[_reserve].decimals);
vars.collateralBalancefterDecrease = vars.collateralBalanceETH.sub( vars.collateralBalancefterDecrease = vars.collateralBalanceETH.sub(
vars.amountToDecreaseETH vars.amountToDecreaseETH
@ -146,7 +146,7 @@ library GenericLogic {
mapping(address => mapping(address => CoreLibrary.UserReserveData)) storage _usersReserveData, mapping(address => mapping(address => CoreLibrary.UserReserveData)) storage _usersReserveData,
address[] memory _reserves, address[] memory _reserves,
address _oracle address _oracle
) public view returns (uint256, uint256, uint256, uint256, uint256, bool) { ) public view returns (uint256, uint256, uint256, uint256, uint256, uint256) {
CalculateUserAccountDataVars memory vars; CalculateUserAccountDataVars memory vars;
for (vars.i = 0; vars.i < _reserves.length; vars.i++) { for (vars.i = 0; vars.i < _reserves.length; vars.i++) {
@ -212,14 +212,13 @@ library GenericLogic {
vars.totalFeesETH, vars.totalFeesETH,
vars.currentLiquidationThreshold vars.currentLiquidationThreshold
); );
vars.healthFactorBelowThreshold = vars.healthFactor < HEALTH_FACTOR_LIQUIDATION_THRESHOLD;
return ( return (
vars.totalCollateralBalanceETH, vars.totalCollateralBalanceETH,
vars.totalBorrowBalanceETH, vars.totalBorrowBalanceETH,
vars.totalFeesETH, vars.totalFeesETH,
vars.currentLtv, vars.currentLtv,
vars.currentLiquidationThreshold, vars.currentLiquidationThreshold,
vars.healthFactorBelowThreshold vars.healthFactor
); );
} }
@ -229,6 +228,7 @@ library GenericLogic {
* @param borrowBalanceETH the total borrow balance in ETH * @param borrowBalanceETH the total borrow balance in ETH
* @param totalFeesETH the total fees in ETH * @param totalFeesETH the total fees in ETH
* @param liquidationThreshold the avg liquidation threshold * @param liquidationThreshold the avg liquidation threshold
* @return the health factor calculated from the balances provided
**/ **/
function calculateHealthFactorFromBalances( function calculateHealthFactorFromBalances(
uint256 collateralBalanceETH, uint256 collateralBalanceETH,

View File

@ -15,6 +15,12 @@ import "../interfaces/IReserveInterestRateStrategy.sol";
import "../tokenization/AToken.sol"; import "../tokenization/AToken.sol";
import "./WadRayMath.sol"; import "./WadRayMath.sol";
/**
* @title ReserveLogic library
* @author Aave
* @notice Implements the logic to update the state of the reserves
*/
library ReserveLogic { library ReserveLogic {
using SafeMath for uint256; using SafeMath for uint256;
using WadRayMath for uint256; using WadRayMath for uint256;
@ -68,7 +74,8 @@ library ReserveLogic {
//refresh interest rates //refresh interest rates
updateInterestRatesAndTimestamp(_reserve, _reserveAddress, _income, 0); updateInterestRatesAndTimestamp(_reserve, _reserveAddress, _income, 0);
} }
/** /**
* @dev updates the state of the core as a consequence of a repay action. * @dev updates the state of the core as a consequence of a repay action.
* @param _reserve the address of the reserve on which the user is repaying * @param _reserve the address of the reserve on which the user is repaying
@ -76,7 +83,6 @@ library ReserveLogic {
* @param _paybackAmount the amount being paid back * @param _paybackAmount the amount being paid back
* @param _balanceIncrease the accrued interest on the borrowed amount * @param _balanceIncrease the accrued interest on the borrowed amount
**/ **/
function updateStateOnRepay( function updateStateOnRepay(
CoreLibrary.ReserveData storage _reserve, CoreLibrary.ReserveData storage _reserve,
CoreLibrary.UserReserveData storage _user, CoreLibrary.UserReserveData storage _user,
@ -145,8 +151,6 @@ library ReserveLogic {
} else { } else {
revert("Invalid rate mode received"); revert("Invalid rate mode received");
} }
} }
/** /**
@ -205,7 +209,6 @@ library ReserveLogic {
* @param _amountToLiquidate the amount being repaid by the liquidator * @param _amountToLiquidate the amount being repaid by the liquidator
* @param _balanceIncrease the accrued interest on the borrowed amount * @param _balanceIncrease the accrued interest on the borrowed amount
**/ **/
function updateStateOnLiquidationAsPrincipal( function updateStateOnLiquidationAsPrincipal(
CoreLibrary.ReserveData storage _reserve, CoreLibrary.ReserveData storage _reserve,
CoreLibrary.UserReserveData storage _user, CoreLibrary.UserReserveData storage _user,
@ -312,7 +315,6 @@ library ReserveLogic {
* @param _liquidityAdded the amount of liquidity added to the protocol (deposit or repay) in the previous action * @param _liquidityAdded the amount of liquidity added to the protocol (deposit or repay) in the previous action
* @param _liquidityTaken the amount of liquidity taken from the protocol (redeem or borrow) * @param _liquidityTaken the amount of liquidity taken from the protocol (redeem or borrow)
**/ **/
function updateInterestRatesAndTimestamp( function updateInterestRatesAndTimestamp(
CoreLibrary.ReserveData storage _reserve, CoreLibrary.ReserveData storage _reserve,
address _reserveAddress, address _reserveAddress,
@ -363,7 +365,6 @@ library ReserveLogic {
* @param _reserve the reserve address * @param _reserve the reserve address
* @return the reserve current variable borrow rate * @return the reserve current variable borrow rate
**/ **/
function getReserveCurrentVariableBorrowRate(CoreLibrary.ReserveData storage _reserve) function getReserveCurrentVariableBorrowRate(CoreLibrary.ReserveData storage _reserve)
external external
view view
@ -382,7 +383,6 @@ library ReserveLogic {
* @param _reserve the reserve address * @param _reserve the reserve address
* @return the reserve current stable borrow rate * @return the reserve current stable borrow rate
**/ **/
function getReserveCurrentStableBorrowRate( function getReserveCurrentStableBorrowRate(
CoreLibrary.ReserveData storage _reserve, CoreLibrary.ReserveData storage _reserve,
uint256 _baseRate uint256 _baseRate
@ -395,7 +395,6 @@ library ReserveLogic {
* @param _reserve the reserve for which the information is needed * @param _reserve the reserve for which the information is needed
* @return the utilization rate in ray * @return the utilization rate in ray
**/ **/
function getUtilizationRate(CoreLibrary.ReserveData storage _reserve, address _reserveAddress) function getUtilizationRate(CoreLibrary.ReserveData storage _reserve, address _reserveAddress)
public public
view view

View File

@ -8,6 +8,11 @@ import {IFeeProvider} from "../interfaces/IFeeProvider.sol";
import {SafeMath} from "@openzeppelin/contracts/math/SafeMath.sol"; import {SafeMath} from "@openzeppelin/contracts/math/SafeMath.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
/**
* @title UserLogic library
* @author Aave
* @notice Implements user specific logic.
*/
library UserLogic { library UserLogic {
using CoreLibrary for CoreLibrary.UserReserveData; using CoreLibrary for CoreLibrary.UserReserveData;
using CoreLibrary for CoreLibrary.ReserveData; using CoreLibrary for CoreLibrary.ReserveData;

View File

@ -16,6 +16,11 @@ import {IPriceOracleGetter} from "../interfaces/IPriceOracleGetter.sol";
import {IFeeProvider} from "../interfaces/IFeeProvider.sol"; import {IFeeProvider} from "../interfaces/IFeeProvider.sol";
import "@nomiclabs/buidler/console.sol"; import "@nomiclabs/buidler/console.sol";
/**
* @title ReserveLogic library
* @author Aave
* @notice Implements functions to validate specific action on the protocol.
*/
library ValidationLogic { library ValidationLogic {
using ReserveLogic for CoreLibrary.ReserveData; using ReserveLogic for CoreLibrary.ReserveData;
using UserLogic for CoreLibrary.UserReserveData; using UserLogic for CoreLibrary.UserReserveData;
@ -23,19 +28,30 @@ library ValidationLogic {
using WadRayMath for uint256; using WadRayMath for uint256;
using UniversalERC20 for IERC20; using UniversalERC20 for IERC20;
/**
* @dev validates a deposit.
* @param _reserve the reserve state on which the user is depositing
* @param _amount the amount to be deposited
*/
function validateDeposit(CoreLibrary.ReserveData storage _reserve, uint256 _amount) function validateDeposit(CoreLibrary.ReserveData storage _reserve, uint256 _amount)
external external
view view
{ {
validateReserveStateAndAmount(_reserve, _amount); internalValidateReserveStateAndAmount(_reserve, _amount);
} }
/**
* @dev validates a redeem.
* @param _reserve the reserve state from which the user is redeeming
* @param _reserveAddress the address of the reserve
* @param _amount the amount to be redeemed
*/
function validateRedeem( function validateRedeem(
CoreLibrary.ReserveData storage _reserve, CoreLibrary.ReserveData storage _reserve,
address _reserveAddress, address _reserveAddress,
uint256 _amount uint256 _amount
) external view { ) external view {
validateReserveStateAndAmount(_reserve, _amount); internalValidateReserveStateAndAmount(_reserve, _amount);
require(msg.sender == _reserve.aTokenAddress, "31"); require(msg.sender == _reserve.aTokenAddress, "31");
@ -45,6 +61,7 @@ library ValidationLogic {
require(currentAvailableLiquidity >= _amount, "4"); require(currentAvailableLiquidity >= _amount, "4");
} }
struct ValidateBorrowLocalVars { struct ValidateBorrowLocalVars {
uint256 principalBorrowBalance; uint256 principalBorrowBalance;
uint256 currentLtv; uint256 currentLtv;
@ -58,10 +75,27 @@ library ValidationLogic {
uint256 currentReserveStableRate; uint256 currentReserveStableRate;
uint256 availableLiquidity; uint256 availableLiquidity;
uint256 finalUserBorrowRate; uint256 finalUserBorrowRate;
uint256 healthFactor;
CoreLibrary.InterestRateMode rateMode; CoreLibrary.InterestRateMode rateMode;
bool healthFactorBelowThreshold; bool healthFactorBelowThreshold;
} }
/**
* @dev validates a borrow.
* @param _reserve the reserve state from which the user is borrowing
* @param _user the state of the user for the specific reserve
* @param _reserveAddress the address of the reserve
* @param _amount the amount to be borrowed
* @param _amountInETH the amount to be borrowed, in ETH
* @param _interestRateMode the interest rate mode at which the user is borrowing
* @param _borrowFee the fee
* @param _maxStableLoanPercent the max amount of the liquidity that can be borrowed at stable rate, in percentage
* @param _reservesData the state of all the reserves
* @param _usersData the state of all the users for all the reserves
* @param _reserves the addresses of all the active reserves
* @param _oracle the price oracle
*/
function validateBorrow( function validateBorrow(
CoreLibrary.ReserveData storage _reserve, CoreLibrary.ReserveData storage _reserve,
CoreLibrary.UserReserveData storage _user, CoreLibrary.UserReserveData storage _user,
@ -76,10 +110,10 @@ library ValidationLogic {
address[] calldata _reserves, address[] calldata _reserves,
address _oracle address _oracle
) external view { ) external view {
ValidateBorrowLocalVars memory vars; ValidateBorrowLocalVars memory vars;
internalValidateReserveStateAndAmount(_reserve, _amount);
validateReserveStateAndAmount(_reserve, _amount);
require(_reserve.borrowingEnabled, "5"); require(_reserve.borrowingEnabled, "5");
@ -101,7 +135,7 @@ library ValidationLogic {
vars.userTotalFeesETH, vars.userTotalFeesETH,
vars.currentLtv, vars.currentLtv,
vars.currentLiquidationThreshold, vars.currentLiquidationThreshold,
vars.healthFactorBelowThreshold vars.healthFactor
) = GenericLogic.calculateUserAccountData( ) = GenericLogic.calculateUserAccountData(
msg.sender, msg.sender,
_reservesData, _reservesData,
@ -112,7 +146,7 @@ library ValidationLogic {
require(vars.userCollateralBalanceETH > 0, "The collateral balance is 0"); require(vars.userCollateralBalanceETH > 0, "The collateral balance is 0");
require(!vars.healthFactorBelowThreshold, "8"); require(vars.healthFactor > GenericLogic.HEALTH_FACTOR_LIQUIDATION_THRESHOLD, "8");
require(_borrowFee > 0, "The amount to borrow is too small"); require(_borrowFee > 0, "The amount to borrow is too small");
@ -155,6 +189,17 @@ library ValidationLogic {
} }
} }
/**
* @dev validates a repay.
* @param _reserve the reserve state from which the user is repaying
* @param _reserveAddress the address of the reserve
* @param _amountSent the amount sent for the repayment. Can be an actual value or uint(-1)
* @param _onBehalfOf the address of the user msg.sender is repaying for
* @param _borrowBalance the borrow balance of the user
* @param _actualPaybackAmount the actual amount being repaid
* @param _msgValue the value passed to the repay() function
*/
function validateRepay( function validateRepay(
CoreLibrary.ReserveData storage _reserve, CoreLibrary.ReserveData storage _reserve,
address _reserveAddress, address _reserveAddress,
@ -163,7 +208,7 @@ library ValidationLogic {
uint256 _borrowBalance, uint256 _borrowBalance,
uint256 _actualPaybackAmount, uint256 _actualPaybackAmount,
uint256 _msgValue uint256 _msgValue
) external view { ) external view {
require(_reserve.isActive, "Action requires an active reserve"); require(_reserve.isActive, "Action requires an active reserve");
require(_amountSent > 0, "Amount must be greater than 0"); require(_amountSent > 0, "Amount must be greater than 0");
@ -175,6 +220,13 @@ library ValidationLogic {
require(!IERC20(_reserveAddress).isETH() || _msgValue >= _actualPaybackAmount, "Invalid msg.value sent for the repayment"); require(!IERC20(_reserveAddress).isETH() || _msgValue >= _actualPaybackAmount, "Invalid msg.value sent for the repayment");
} }
/**
* @dev validates a swap of borrow rate mode.
* @param _reserve the reserve state on which the user is swapping the rate
* @param _user the user state for the reserve on which user is swapping the rate
* @param _borrowBalance the borrow balance of the user
* @param _currentRateMode the rate mode of the borrow
*/
function validateSwapRateMode( function validateSwapRateMode(
CoreLibrary.ReserveData storage _reserve, CoreLibrary.ReserveData storage _reserve,
CoreLibrary.UserReserveData storage _user, CoreLibrary.UserReserveData storage _user,
@ -205,6 +257,14 @@ library ValidationLogic {
} }
/**
* @dev validates the choice of a user of setting (or not) an asset as collateral
* @param _reserve the state of the reserve that the user is enabling or disabling as collateral
* @param _reserveAddress the address of the reserve
* @param _reservesData the data of all the reserves
* @param _usersData the data of all the users
*/
function validateSetUseReserveAsCollateral( function validateSetUseReserveAsCollateral(
CoreLibrary.ReserveData storage _reserve, CoreLibrary.ReserveData storage _reserve,
address _reserveAddress, address _reserveAddress,
@ -233,7 +293,12 @@ library ValidationLogic {
} }
function validateReserveStateAndAmount(CoreLibrary.ReserveData storage _reserve, uint256 _amount) /**
* @dev validates that the reserve is active and the amount is greater than 0
* @param _reserve the state of the reserve being validated
* @param _amount the amount being validated
*/
function internalValidateReserveStateAndAmount(CoreLibrary.ReserveData storage _reserve, uint256 _amount)
internal internal
view view
{ {

View File

@ -36,7 +36,7 @@ contract AaveProtocolTestHelpers {
address[] memory reserves = pool.getReserves(); address[] memory reserves = pool.getReserves();
TokenData[] memory aTokens = new TokenData[](reserves.length); TokenData[] memory aTokens = new TokenData[](reserves.length);
for (uint256 i = 0; i < reserves.length; i++) { for (uint256 i = 0; i < reserves.length; i++) {
(,,,,address aTokenAddress,,,,) = pool.getReserveConfigurationData(reserves[i]); (,,,,address aTokenAddress,,,,,) = pool.getReserveConfigurationData(reserves[i]);
aTokens[i] = TokenData({ aTokens[i] = TokenData({
symbol: AToken(aTokenAddress).symbol(), symbol: AToken(aTokenAddress).symbol(),
tokenAddress: aTokenAddress tokenAddress: aTokenAddress

View File

@ -92,7 +92,7 @@ contract WalletBalanceProvider {
uint256[] memory balances = new uint256[](reserves.length); uint256[] memory balances = new uint256[](reserves.length);
for (uint256 j = 0; j < reserves.length; j++) { for (uint256 j = 0; j < reserves.length; j++) {
(, , , , , , , , bool isActive) = pool.getReserveConfigurationData(reserves[j]); (, , , , , , , , bool isActive,) = pool.getReserveConfigurationData(reserves[j]);
if (!isActive) { if (!isActive) {
balances[j] = 0; balances[j] = 0;

View File

@ -58,7 +58,7 @@ export enum ProtocolErrors {
TRANSFERRED_AMOUNT_GT_ZERO = "Transferred amount needs to be greater than zero", TRANSFERRED_AMOUNT_GT_ZERO = "Transferred amount needs to be greater than zero",
ZERO_COLLATERAL = "The collateral balance is 0", ZERO_COLLATERAL = "The collateral balance is 0",
INCONSISTENT_PROTOCOL_BALANCE = "The actual balance of the protocol is inconsistent", INCONSISTENT_PROTOCOL_BALANCE = "The actual balance of the protocol is inconsistent",
TOO_SMALL_FLASH_LOAN = "The requested amount is too small for a flashLoan.", TOO_SMALL_FLASH_LOAN = "The requested amount is too small for a FlashLoan.",
NOT_ENOUGH_LIQUIDITY_TO_BORROW = "There is not enough liquidity available to borrow", NOT_ENOUGH_LIQUIDITY_TO_BORROW = "There is not enough liquidity available to borrow",
HF_IS_NOT_BELLOW_THRESHOLD = "Health factor is not below the threshold", HF_IS_NOT_BELLOW_THRESHOLD = "Health factor is not below the threshold",
INVALID_HF = "Invalid health factor", INVALID_HF = "Invalid health factor",

View File

@ -15,7 +15,7 @@ makeSuite("LendingPoolConfigurator", (testEnv: TestEnv) => {
it("Deactivates the ETH reserve", async () => { it("Deactivates the ETH reserve", async () => {
const {configurator, pool} = testEnv; const {configurator, pool} = testEnv;
await configurator.deactivateReserve(MOCK_ETH_ADDRESS); await configurator.deactivateReserve(MOCK_ETH_ADDRESS);
const isActive = await pool.getReserveIsActive(MOCK_ETH_ADDRESS); const {isActive} = await pool.getReserveConfigurationData(MOCK_ETH_ADDRESS);
expect(isActive).to.be.equal(false); expect(isActive).to.be.equal(false);
}); });
@ -23,7 +23,7 @@ makeSuite("LendingPoolConfigurator", (testEnv: TestEnv) => {
const {configurator, pool} = testEnv; const {configurator, pool} = testEnv;
await configurator.activateReserve(MOCK_ETH_ADDRESS); await configurator.activateReserve(MOCK_ETH_ADDRESS);
const isActive = await pool.getReserveIsActive(MOCK_ETH_ADDRESS); const {isActive} = await pool.getReserveConfigurationData(MOCK_ETH_ADDRESS);
expect(isActive).to.be.equal(true); expect(isActive).to.be.equal(true);
}); });
@ -46,7 +46,7 @@ makeSuite("LendingPoolConfigurator", (testEnv: TestEnv) => {
it("Freezes the ETH reserve", async () => { it("Freezes the ETH reserve", async () => {
const {configurator, pool} = testEnv; const {configurator, pool} = testEnv;
await configurator.freezeReserve(MOCK_ETH_ADDRESS); await configurator.freezeReserve(MOCK_ETH_ADDRESS);
const isFreezed = await pool.getReserveIsFreezed(MOCK_ETH_ADDRESS); const {isFreezed} = await pool.getReserveConfigurationData(MOCK_ETH_ADDRESS);
expect(isFreezed).to.be.equal(true); expect(isFreezed).to.be.equal(true);
}); });
@ -54,7 +54,7 @@ makeSuite("LendingPoolConfigurator", (testEnv: TestEnv) => {
const {configurator, pool} = testEnv; const {configurator, pool} = testEnv;
await configurator.unfreezeReserve(MOCK_ETH_ADDRESS); await configurator.unfreezeReserve(MOCK_ETH_ADDRESS);
const isFreezed = await pool.getReserveIsFreezed(MOCK_ETH_ADDRESS); const {isFreezed} = await pool.getReserveConfigurationData(MOCK_ETH_ADDRESS);
expect(isFreezed).to.be.equal(false); expect(isFreezed).to.be.equal(false);
}); });
@ -77,19 +77,19 @@ makeSuite("LendingPoolConfigurator", (testEnv: TestEnv) => {
it("Deactivates the ETH reserve for borrowing", async () => { it("Deactivates the ETH reserve for borrowing", async () => {
const {configurator, pool} = testEnv; const {configurator, pool} = testEnv;
await configurator.disableBorrowingOnReserve(MOCK_ETH_ADDRESS); await configurator.disableBorrowingOnReserve(MOCK_ETH_ADDRESS);
const isEnabled = await pool.isReserveBorrowingEnabled(MOCK_ETH_ADDRESS); const {borrowingEnabled} = await pool.getReserveConfigurationData(MOCK_ETH_ADDRESS);
expect(isEnabled).to.be.equal(false); expect(borrowingEnabled).to.be.equal(false);
}); });
it("Activates the ETH reserve for borrowing", async () => { it("Activates the ETH reserve for borrowing", async () => {
const {configurator, pool} = testEnv; const {configurator, pool} = testEnv;
await configurator.enableBorrowingOnReserve(MOCK_ETH_ADDRESS, true); await configurator.enableBorrowingOnReserve(MOCK_ETH_ADDRESS, true);
const isEnabled = await pool.isReserveBorrowingEnabled(MOCK_ETH_ADDRESS); const {borrowingEnabled} = await pool.getReserveConfigurationData(MOCK_ETH_ADDRESS);
const interestIndex = await pool.getReserveLiquidityCumulativeIndex( const {variableBorrowIndex} = await pool.getReserveData(
MOCK_ETH_ADDRESS MOCK_ETH_ADDRESS
); )
expect(isEnabled).to.be.equal(true); expect(borrowingEnabled).to.be.equal(true);
expect(interestIndex.toString()).to.be.equal(RAY); expect(variableBorrowIndex.toString()).to.be.equal(RAY);
}); });
it("Check the onlyLendingPoolManager on disableBorrowingOnReserve ", async () => { it("Check the onlyLendingPoolManager on disableBorrowingOnReserve ", async () => {
@ -115,10 +115,10 @@ makeSuite("LendingPoolConfigurator", (testEnv: TestEnv) => {
it("Deactivates the ETH reserve as collateral", async () => { it("Deactivates the ETH reserve as collateral", async () => {
const {configurator, pool} = testEnv; const {configurator, pool} = testEnv;
await configurator.disableReserveAsCollateral(MOCK_ETH_ADDRESS); await configurator.disableReserveAsCollateral(MOCK_ETH_ADDRESS);
const isEnabled = await pool.isReserveUsageAsCollateralEnabled( const {usageAsCollateralEnabled} = await pool.getReserveConfigurationData(
MOCK_ETH_ADDRESS MOCK_ETH_ADDRESS
); );
expect(isEnabled).to.be.equal(false); expect(usageAsCollateralEnabled).to.be.equal(false);
}); });
it("Activates the ETH reserve as collateral", async () => { it("Activates the ETH reserve as collateral", async () => {
@ -130,10 +130,10 @@ makeSuite("LendingPoolConfigurator", (testEnv: TestEnv) => {
"105" "105"
); );
const isEnabled = await pool.isReserveUsageAsCollateralEnabled( const {usageAsCollateralEnabled} = await pool.getReserveConfigurationData(
MOCK_ETH_ADDRESS MOCK_ETH_ADDRESS
); );
expect(isEnabled).to.be.equal(true); expect(usageAsCollateralEnabled).to.be.equal(true);
}); });
it("Check the onlyLendingPoolManager on disableReserveAsCollateral ", async () => { it("Check the onlyLendingPoolManager on disableReserveAsCollateral ", async () => {
@ -158,38 +158,38 @@ makeSuite("LendingPoolConfigurator", (testEnv: TestEnv) => {
it("Disable stable borrow rate on the ETH reserve", async () => { it("Disable stable borrow rate on the ETH reserve", async () => {
const {configurator, pool} = testEnv; const {configurator, pool} = testEnv;
await configurator.disableReserveStableBorrowRate(MOCK_ETH_ADDRESS); await configurator.disableReserveStableRate(MOCK_ETH_ADDRESS);
const isEnabled = await pool.getReserveIsStableBorrowRateEnabled( const {stableBorrowRateEnabled} = await pool.getReserveConfigurationData(
MOCK_ETH_ADDRESS MOCK_ETH_ADDRESS
); );
expect(isEnabled).to.be.equal(false); expect(stableBorrowRateEnabled).to.be.equal(false);
}); });
it("Enables stable borrow rate on the ETH reserve", async () => { it("Enables stable borrow rate on the ETH reserve", async () => {
const {configurator, pool} = testEnv; const {configurator, pool} = testEnv;
await configurator.enableReserveStableBorrowRate(MOCK_ETH_ADDRESS); await configurator.enableReserveStableRate(MOCK_ETH_ADDRESS);
const isEnabled = await pool.getReserveIsStableBorrowRateEnabled( const {stableBorrowRateEnabled} = await pool.getReserveConfigurationData(
MOCK_ETH_ADDRESS MOCK_ETH_ADDRESS
); );
expect(isEnabled).to.be.equal(true); expect(stableBorrowRateEnabled).to.be.equal(true);
}); });
it("Check the onlyLendingPoolManager on disableReserveStableBorrowRate", async () => { it("Check the onlyLendingPoolManager on disableReserveStableRate", async () => {
const {configurator, users} = testEnv; const {configurator, users} = testEnv;
await expect( await expect(
configurator configurator
.connect(users[2].signer) .connect(users[2].signer)
.disableReserveStableBorrowRate(MOCK_ETH_ADDRESS), .disableReserveStableRate(MOCK_ETH_ADDRESS),
INVALID_POOL_MANAGER_CALLER_MSG INVALID_POOL_MANAGER_CALLER_MSG
).to.be.revertedWith(INVALID_POOL_MANAGER_CALLER_MSG); ).to.be.revertedWith(INVALID_POOL_MANAGER_CALLER_MSG);
}); });
it("Check the onlyLendingPoolManager on enableReserveStableBorrowRate", async () => { it("Check the onlyLendingPoolManager on enableReserveStableRate", async () => {
const {configurator, users} = testEnv; const {configurator, users} = testEnv;
await expect( await expect(
configurator configurator
.connect(users[2].signer) .connect(users[2].signer)
.enableReserveStableBorrowRate(MOCK_ETH_ADDRESS), .enableReserveStableRate(MOCK_ETH_ADDRESS),
INVALID_POOL_MANAGER_CALLER_MSG INVALID_POOL_MANAGER_CALLER_MSG
).to.be.revertedWith(INVALID_POOL_MANAGER_CALLER_MSG); ).to.be.revertedWith(INVALID_POOL_MANAGER_CALLER_MSG);
}); });
@ -236,7 +236,7 @@ makeSuite("LendingPoolConfigurator", (testEnv: TestEnv) => {
it("Changes liquidation bonus of the reserve", async () => { it("Changes liquidation bonus of the reserve", async () => {
const {configurator, pool} = testEnv; const {configurator, pool} = testEnv;
await configurator.setReserveLiquidationBonus(MOCK_ETH_ADDRESS, "110"); await configurator.setReserveLiquidationBonus(MOCK_ETH_ADDRESS, "110");
const liquidationBonus = await pool.getReserveLiquidationBonus( const {liquidationBonus} = await pool.getReserveConfigurationData(
MOCK_ETH_ADDRESS MOCK_ETH_ADDRESS
); );
expect(liquidationBonus).to.be.bignumber.equal( expect(liquidationBonus).to.be.bignumber.equal(
@ -265,22 +265,6 @@ makeSuite("LendingPoolConfigurator", (testEnv: TestEnv) => {
).to.be.revertedWith(INVALID_POOL_MANAGER_CALLER_MSG); ).to.be.revertedWith(INVALID_POOL_MANAGER_CALLER_MSG);
}); });
it("Removes the last added reserve", async () => {
const {configurator, pool} = testEnv;
const reservesBefore = await pool.getReserves();
const lastReserve = reservesBefore[reservesBefore.length - 1];
await configurator.removeLastAddedReserve(lastReserve);
const reservesAfter = await pool.getReserves();
expect(reservesAfter.length).to.be.equal(
reservesBefore.length - 1,
"Invalid number of reserves after removal"
);
});
it("Check the onlyLendingPoolManager on setReserveLiquidationBonus", async () => { it("Check the onlyLendingPoolManager on setReserveLiquidationBonus", async () => {
const {configurator, users} = testEnv; const {configurator, users} = testEnv;
await expect( await expect(

View File

@ -61,10 +61,12 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => {
const currentLiquidityRate = reserveData.liquidityRate; const currentLiquidityRate = reserveData.liquidityRate;
const currentLiquidityIndex = reserveData.liquidityIndex; const currentLiquidityIndex = reserveData.liquidityIndex;
expect(reserveData.totalLiquidity).to.be.bignumber.equal('1000504000000000000'); const totalLiquidity = new BigNumber(reserveData.availableLiquidity).plus(reserveData.totalBorrowsStable).plus(reserveData.totalBorrowsVariable);
expect(currentLiquidityRate).to.be.bignumber.equal('0');
expect(currentLiquidityIndex).to.be.bignumber.equal('1000504000000000000000000000'); expect(totalLiquidity.toString()).to.be.equal('1000504000000000000');
expect(tokenDistributorBalance).to.be.bignumber.equal('216000000000000'); expect(currentLiquidityRate.toString()).to.be.equal('0');
expect(currentLiquidityIndex.toString()).to.be.equal('1000504000000000000000000000');
expect(tokenDistributorBalance.toString()).to.be.equal('216000000000000');
}); });
it('Takes an ETH flashloan as big as the available liquidity', async () => { it('Takes an ETH flashloan as big as the available liquidity', async () => {
@ -89,10 +91,12 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => {
const currentLiqudityRate = reserveData.liquidityRate; const currentLiqudityRate = reserveData.liquidityRate;
const currentLiquidityIndex = reserveData.liquidityIndex; const currentLiquidityIndex = reserveData.liquidityIndex;
expect(reserveData.totalLiquidity).to.be.bignumber.equal('1001134317520000000'); const totalLiquidity = new BigNumber(reserveData.availableLiquidity).plus(reserveData.totalBorrowsStable).plus(reserveData.totalBorrowsVariable);
expect(currentLiqudityRate).to.be.bignumber.equal('0');
expect(currentLiquidityIndex).to.be.bignumber.equal('1001134317520000000000000000'); expect(totalLiquidity.toString()).to.be.equal('1001134317520000000');
expect(tokenDistributorBalance).to.be.bignumber.equal('486136080000000'); expect(currentLiqudityRate.toString()).to.be.equal('0');
expect(currentLiquidityIndex.toString()).to.be.equal('1001134317520000000000000000');
expect(tokenDistributorBalance.toString()).to.be.equal('486136080000000');
}); });
it('Takes ETH flashloan, does not return the funds (revert expected)', async () => { it('Takes ETH flashloan, does not return the funds (revert expected)', async () => {
@ -112,8 +116,7 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => {
MOCK_ETH_ADDRESS, MOCK_ETH_ADDRESS,
ethers.utils.parseEther('0.8'), ethers.utils.parseEther('0.8'),
'0x10' '0x10'
), )
INCONSISTENT_PROTOCOL_BALANCE
).to.be.revertedWith(INCONSISTENT_PROTOCOL_BALANCE); ).to.be.revertedWith(INCONSISTENT_PROTOCOL_BALANCE);
}); });
@ -126,8 +129,7 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => {
MOCK_ETH_ADDRESS, MOCK_ETH_ADDRESS,
'1', //1 wei loan '1', //1 wei loan
'0x10' '0x10'
), )
TOO_SMALL_FLASH_LOAN
).to.be.revertedWith(TOO_SMALL_FLASH_LOAN); ).to.be.revertedWith(TOO_SMALL_FLASH_LOAN);
}); });
@ -153,7 +155,7 @@ makeSuite('LendingPool FlashLoan function', (testEnv: TestEnv) => {
}); });
it('Deposits DAI into the reserve', async () => { it('Deposits DAI into the reserve', async () => {
const {dai, pool} = testEnv; const {dai, pool} = testEnv;
await dai.mint(await convertToCurrencyDecimals(dai.address, '1000')); await dai.mint(await convertToCurrencyDecimals(dai.address, '1000'));

View File

@ -37,6 +37,7 @@ export interface TestEnv {
dai: MintableErc20; dai: MintableErc20;
aDai: AToken; aDai: AToken;
usdc: MintableErc20; usdc: MintableErc20;
lend: MintableErc20;
addressesProvider: LendingPoolAddressesProvider addressesProvider: LendingPoolAddressesProvider
} }
@ -57,6 +58,7 @@ const testEnv: TestEnv = {
dai: {} as MintableErc20, dai: {} as MintableErc20,
aDai: {} as AToken, aDai: {} as AToken,
usdc: {} as MintableErc20, usdc: {} as MintableErc20,
lend: {} as MintableErc20,
addressesProvider: {} as LendingPoolAddressesProvider addressesProvider: {} as LendingPoolAddressesProvider
} as TestEnv; } as TestEnv;
@ -81,31 +83,27 @@ export async function initializeMakeSuite() {
console.log("Configurator loaded"); console.log("Configurator loaded");
testEnv.oracle = await getPriceOracle(); testEnv.oracle = await getPriceOracle();
console.log("oracle loaded");
testEnv.addressesProvider = await getLendingPoolAddressesProvider(); testEnv.addressesProvider = await getLendingPoolAddressesProvider();
console.log("addresses provider loaded");
testEnv.helpersContract = await getAaveProtocolTestHelpers(); testEnv.helpersContract = await getAaveProtocolTestHelpers();
console.log("helpers loaded");
const aDaiAddress = (await testEnv.helpersContract.getAllATokens()).find( const aDaiAddress = (await testEnv.helpersContract.getAllATokens()).find(
(aToken) => aToken.symbol === "aDAI" (aToken) => aToken.symbol === "aDAI"
)?.tokenAddress; )?.tokenAddress;
console.log("getting reserves");
const reservesTokens = await testEnv.helpersContract.getAllReservesTokens(); const reservesTokens = await testEnv.helpersContract.getAllReservesTokens();
console.log("reserve tokens loaded");
const daiAddress = reservesTokens.find(token => token.symbol === "DAI")?.tokenAddress; const daiAddress = reservesTokens.find(token => token.symbol === "DAI")?.tokenAddress;
const usdcAddress = reservesTokens.find(token => token.symbol === "USDC")?.tokenAddress; const usdcAddress = reservesTokens.find(token => token.symbol === "USDC")?.tokenAddress;
const lendAddress = reservesTokens.find(token => token.symbol === "LEND")?.tokenAddress;
if (!aDaiAddress) { if (!aDaiAddress) {
console.log(`atoken-modifiers.spec: aDAI not correctly initialized`); console.log(`atoken-modifiers.spec: aDAI not correctly initialized`);
process.exit(1); process.exit(1);
} }
if (!daiAddress || !usdcAddress) { if (!daiAddress || !usdcAddress || !lendAddress) {
console.log(`atoken-modifiers.spec: USDC or DAI not correctly initialized`); console.log(`atoken-modifiers.spec: USDC or DAI not correctly initialized`);
process.exit(1); process.exit(1);
} }
@ -113,6 +111,7 @@ export async function initializeMakeSuite() {
testEnv.aDai = await getAToken(aDaiAddress); testEnv.aDai = await getAToken(aDaiAddress);
testEnv.dai = await getMintableErc20(daiAddress); testEnv.dai = await getMintableErc20(daiAddress);
testEnv.usdc = await getMintableErc20(usdcAddress); testEnv.usdc = await getMintableErc20(usdcAddress);
testEnv.lend = await getMintableErc20(lendAddress);
} }
export function makeSuite(name: string, tests: (testEnv: TestEnv) => void) { export function makeSuite(name: string, tests: (testEnv: TestEnv) => void) {

View File

@ -15,11 +15,8 @@ makeSuite("LendingPoolAddressesProvider", (testEnv: TestEnv) => {
addressesProvider.setFeeProviderImpl, addressesProvider.setFeeProviderImpl,
addressesProvider.setLendingPoolImpl, addressesProvider.setLendingPoolImpl,
addressesProvider.setLendingPoolConfiguratorImpl, addressesProvider.setLendingPoolConfiguratorImpl,
addressesProvider.setLendingPoolCoreImpl,
addressesProvider.setLendingPoolDataProviderImpl,
addressesProvider.setLendingPoolLiquidationManager, addressesProvider.setLendingPoolLiquidationManager,
addressesProvider.setLendingPoolManager, addressesProvider.setLendingPoolManager,
addressesProvider.setLendingPoolParametersProviderImpl,
addressesProvider.setPriceOracle, addressesProvider.setPriceOracle,
addressesProvider.setLendingRateOracle, addressesProvider.setLendingRateOracle,
]) { ]) {

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -149,4 +149,4 @@ const _abi = [
]; ];
const _bytecode = const _bytecode =
"0x608060405234801561001057600080fd5b50610652806100206000396000f3fe60806040526004361061004a5760003560e01c80633659cfe6146100545780634f1ef286146100875780635c60da1b146101075780638f28397014610138578063f851a4401461016b575b610052610180565b005b34801561006057600080fd5b506100526004803603602081101561007757600080fd5b50356001600160a01b031661019a565b6100526004803603604081101561009d57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100c857600080fd5b8201836020820111156100da57600080fd5b803590602001918460018302840111640100000000831117156100fc57600080fd5b5090925090506101d4565b34801561011357600080fd5b5061011c610281565b604080516001600160a01b039092168252519081900360200190f35b34801561014457600080fd5b506100526004803603602081101561015b57600080fd5b50356001600160a01b03166102be565b34801561017757600080fd5b5061011c610378565b6101886103a3565b610198610193610403565b610428565b565b6101a261044c565b6001600160a01b0316336001600160a01b031614156101c9576101c481610471565b6101d1565b6101d1610180565b50565b6101dc61044c565b6001600160a01b0316336001600160a01b03161415610274576101fe83610471565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461025b576040519150601f19603f3d011682016040523d82523d6000602084013e610260565b606091505b505090508061026e57600080fd5b5061027c565b61027c610180565b505050565b600061028b61044c565b6001600160a01b0316336001600160a01b031614156102b3576102ac610403565b90506102bb565b6102bb610180565b90565b6102c661044c565b6001600160a01b0316336001600160a01b031614156101c9576001600160a01b0381166103245760405162461bcd60e51b81526004018080602001828103825260368152602001806105ac6036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61034d61044c565b604080516001600160a01b03928316815291841660208301528051918290030190a16101c4816104b1565b600061038261044c565b6001600160a01b0316336001600160a01b031614156102b3576102ac61044c565b6103ab61044c565b6001600160a01b0316336001600160a01b031614156103fb5760405162461bcd60e51b815260040180806020018281038252603281526020018061057a6032913960400191505060405180910390fd5b610198610198565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015610447573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b61047a816104d5565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6104de8161053d565b6105195760405162461bcd60e51b815260040180806020018281038252603b8152602001806105e2603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061057157508115155b94935050505056fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220153c3fcf73e6d2ff5abc19385f928b0ad6ca58f36558f457764b0ad8f1b590d964736f6c63430006080033"; "0x608060405234801561001057600080fd5b50610652806100206000396000f3fe60806040526004361061004a5760003560e01c80633659cfe6146100545780634f1ef286146100875780635c60da1b146101075780638f28397014610138578063f851a4401461016b575b610052610180565b005b34801561006057600080fd5b506100526004803603602081101561007757600080fd5b50356001600160a01b031661019a565b6100526004803603604081101561009d57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100c857600080fd5b8201836020820111156100da57600080fd5b803590602001918460018302840111640100000000831117156100fc57600080fd5b5090925090506101d4565b34801561011357600080fd5b5061011c610281565b604080516001600160a01b039092168252519081900360200190f35b34801561014457600080fd5b506100526004803603602081101561015b57600080fd5b50356001600160a01b03166102be565b34801561017757600080fd5b5061011c610378565b6101886103a3565b610198610193610403565b610428565b565b6101a261044c565b6001600160a01b0316336001600160a01b031614156101c9576101c481610471565b6101d1565b6101d1610180565b50565b6101dc61044c565b6001600160a01b0316336001600160a01b03161415610274576101fe83610471565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461025b576040519150601f19603f3d011682016040523d82523d6000602084013e610260565b606091505b505090508061026e57600080fd5b5061027c565b61027c610180565b505050565b600061028b61044c565b6001600160a01b0316336001600160a01b031614156102b3576102ac610403565b90506102bb565b6102bb610180565b90565b6102c661044c565b6001600160a01b0316336001600160a01b031614156101c9576001600160a01b0381166103245760405162461bcd60e51b81526004018080602001828103825260368152602001806105ac6036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61034d61044c565b604080516001600160a01b03928316815291841660208301528051918290030190a16101c4816104b1565b600061038261044c565b6001600160a01b0316336001600160a01b031614156102b3576102ac61044c565b6103ab61044c565b6001600160a01b0316336001600160a01b031614156103fb5760405162461bcd60e51b815260040180806020018281038252603281526020018061057a6032913960400191505060405180910390fd5b610198610198565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015610447573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b61047a816104d5565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6104de8161053d565b6105195760405162461bcd60e51b815260040180806020018281038252603b8152602001806105e2603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061057157508115155b94935050505056fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220bd1c64e491a10408727bf2c0ba11cafb0e603d67e73d56ba5f1e5aaf164d9e6864736f6c63430006080033";

View File

@ -58,4 +58,4 @@ const _abi = [
]; ];
const _bytecode = const _bytecode =
"0x6080604052348015600f57600080fd5b50609e8061001e6000396000f3fe6080604052600a600c565b005b6012601e565b601e601a6020565b6045565b565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e8080156063573d6000f35b3d6000fdfea2646970667358221220f39c60065bf5bc2b317031ab707b9f77fec3571f3c29e70ce25a3329a851e15664736f6c63430006080033"; "0x6080604052348015600f57600080fd5b50609e8061001e6000396000f3fe6080604052600a600c565b005b6012601e565b601e601a6020565b6045565b565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e8080156063573d6000f35b3d6000fdfea26469706673582212204da865f60c349026a6987afe00968cca8fac24d5035d8f57aa280f04a1b54d3664736f6c63430006080033";

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -113,4 +113,4 @@ const _abi = [
]; ];
const _bytecode = const _bytecode =
"0x60806040526000805534801561001457600080fd5b50610411806100246000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80639403ed3a1461005c578063b0d73d4e14610076578063c211f9a41461007e578063c4d66de814610086578063e563a7d0146100ae575b600080fd5b6100646100da565b60408051918252519081900360200190f35b6100646100e0565b6100646100e5565b6100ac6004803603602081101561009c57600080fd5b50356001600160a01b03166100eb565b005b610064600480360360408110156100c457600080fd5b506001600160a01b038135169060200135610193565b60345481565b600181565b60345490565b60006100f56101b3565b60015490915060ff168061010c575061010c6101b8565b80610118575060005481115b6101535760405162461bcd60e51b815260040180806020018281038252602e8152602001806103ae602e913960400191505060405180910390fd5b60015460ff16158015610172576001805460ff19168117905560008290555b6608e1bc9bf04000603455801561018e576001805460ff191690555b505050565b60006101aa603454836101be90919063ffffffff16565b90505b92915050565b600190565b303b1590565b60006101aa670de0b6b3a76400006101ee6101df868663ffffffff6101fa16565b6706f05b59d3b2000090610253565b9063ffffffff6102ad16565b600082610209575060006101ad565b8282028284828161021657fe5b04146101aa5760405162461bcd60e51b815260040180806020018281038252602181526020018061038d6021913960400191505060405180910390fd5b6000828201838110156101aa576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60006101aa83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250600081836103765760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561033b578181015183820152602001610323565b50505050905090810190601f1680156103685780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161038257fe5b049594505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a2646970667358221220b6d286d1f0b82789105155b663f2705ed827df2cb1cad4c6923082f530bb3d2264736f6c63430006080033"; "0x60806040526000805534801561001457600080fd5b50610411806100246000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80639403ed3a1461005c578063b0d73d4e14610076578063c211f9a41461007e578063c4d66de814610086578063e563a7d0146100ae575b600080fd5b6100646100da565b60408051918252519081900360200190f35b6100646100e0565b6100646100e5565b6100ac6004803603602081101561009c57600080fd5b50356001600160a01b03166100eb565b005b610064600480360360408110156100c457600080fd5b506001600160a01b038135169060200135610193565b60345481565b600181565b60345490565b60006100f56101b3565b60015490915060ff168061010c575061010c6101b8565b80610118575060005481115b6101535760405162461bcd60e51b815260040180806020018281038252602e8152602001806103ae602e913960400191505060405180910390fd5b60015460ff16158015610172576001805460ff19168117905560008290555b6608e1bc9bf04000603455801561018e576001805460ff191690555b505050565b60006101aa603454836101be90919063ffffffff16565b90505b92915050565b600190565b303b1590565b60006101aa670de0b6b3a76400006101ee6101df868663ffffffff6101fa16565b6706f05b59d3b2000090610253565b9063ffffffff6102ad16565b600082610209575060006101ad565b8282028284828161021657fe5b04146101aa5760405162461bcd60e51b815260040180806020018281038252602181526020018061038d6021913960400191505060405180910390fd5b6000828201838110156101aa576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60006101aa83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250600081836103765760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561033b578181015183820152602001610323565b50505050905090810190601f1680156103685780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161038257fe5b049594505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a26469706673582212207eabb5efb8d78530e775320ed5f3b20065bf5c6faaefa5dcb53b3408e375131c64736f6c63430006080033";

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -78,4 +78,4 @@ const _abi = [
]; ];
const _bytecode = const _bytecode =
"0x608060405234801561001057600080fd5b50610398806100206000396000f3fe60806040526004361061001e5760003560e01c8063d1f5789414610028575b6100266100de565b005b6100266004803603604081101561003e57600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561006957600080fd5b82018360208201111561007b57600080fd5b8035906020019184600183028401116401000000008311171561009d57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506100f8945050505050565b6100e66100f6565b6100f66100f161023a565b61025f565b565b600061010261023a565b6001600160a01b03161461011557600080fd5b604080517f656970313936372e70726f78792e696d706c656d656e746174696f6e000000008152905190819003601c0190207f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6000199091011461017557fe5b61017e82610283565b805115610236576000826001600160a01b0316826040518082805190602001908083835b602083106101c15780518252601f1990920191602091820191016101a2565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610221576040519150601f19603f3d011682016040523d82523d6000602084013e610226565b606091505b505090508061023457600080fd5b505b5050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561027e573d6000f35b3d6000fd5b61028c816102eb565b6102c75760405162461bcd60e51b815260040180806020018281038252603b815260200180610328603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061031f57508115155b94935050505056fe43616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a264697066735822122039ea210f3068bef90dab509c4cdfa0a898049566f198f6e2518a306b66f48d6464736f6c63430006080033"; "0x608060405234801561001057600080fd5b50610398806100206000396000f3fe60806040526004361061001e5760003560e01c8063d1f5789414610028575b6100266100de565b005b6100266004803603604081101561003e57600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561006957600080fd5b82018360208201111561007b57600080fd5b8035906020019184600183028401116401000000008311171561009d57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506100f8945050505050565b6100e66100f6565b6100f66100f161023a565b61025f565b565b600061010261023a565b6001600160a01b03161461011557600080fd5b604080517f656970313936372e70726f78792e696d706c656d656e746174696f6e000000008152905190819003601c0190207f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6000199091011461017557fe5b61017e82610283565b805115610236576000826001600160a01b0316826040518082805190602001908083835b602083106101c15780518252601f1990920191602091820191016101a2565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610221576040519150601f19603f3d011682016040523d82523d6000602084013e610226565b606091505b505090508061023457600080fd5b505b5050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561027e573d6000f35b3d6000fd5b61028c816102eb565b6102c75760405162461bcd60e51b815260040180806020018281038252603b815260200180610328603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061031f57508115155b94935050505056fe43616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220b6b16d8651a66b5c8ef499a27cce045b5f1b3a1f188c7546bf319b120f169ff864736f6c63430006080033";

View File

@ -406,6 +406,7 @@ export class LendingPool extends Contract {
borrowingEnabled: boolean; borrowingEnabled: boolean;
stableBorrowRateEnabled: boolean; stableBorrowRateEnabled: boolean;
isActive: boolean; isActive: boolean;
isFreezed: boolean;
0: BigNumber; 0: BigNumber;
1: BigNumber; 1: BigNumber;
2: BigNumber; 2: BigNumber;
@ -415,6 +416,7 @@ export class LendingPool extends Contract {
6: boolean; 6: boolean;
7: boolean; 7: boolean;
8: boolean; 8: boolean;
9: boolean;
}>; }>;
getReserveData( getReserveData(
@ -663,6 +665,7 @@ export class LendingPool extends Contract {
borrowingEnabled: boolean; borrowingEnabled: boolean;
stableBorrowRateEnabled: boolean; stableBorrowRateEnabled: boolean;
isActive: boolean; isActive: boolean;
isFreezed: boolean;
0: BigNumber; 0: BigNumber;
1: BigNumber; 1: BigNumber;
2: BigNumber; 2: BigNumber;
@ -672,6 +675,7 @@ export class LendingPool extends Contract {
6: boolean; 6: boolean;
7: boolean; 7: boolean;
8: boolean; 8: boolean;
9: boolean;
}>; }>;
getReserveData( getReserveData(

View File

@ -90,10 +90,6 @@ interface LendingPoolAddressesProviderInterface extends Interface {
encodeTopics([newAddress]: [string | null]): string[]; encodeTopics([newAddress]: [string | null]): string[];
}>; }>;
LendingPoolCoreUpdated: TypedEventDescription<{
encodeTopics([newAddress]: [string | null]): string[];
}>;
LendingPoolLiquidationManagerUpdated: TypedEventDescription<{ LendingPoolLiquidationManagerUpdated: TypedEventDescription<{
encodeTopics([newAddress]: [string | null]): string[]; encodeTopics([newAddress]: [string | null]): string[];
}>; }>;
@ -307,8 +303,6 @@ export class LendingPoolAddressesProvider extends Contract {
LendingPoolConfiguratorUpdated(newAddress: string | null): EventFilter; LendingPoolConfiguratorUpdated(newAddress: string | null): EventFilter;
LendingPoolCoreUpdated(newAddress: string | null): EventFilter;
LendingPoolLiquidationManagerUpdated( LendingPoolLiquidationManagerUpdated(
newAddress: string | null newAddress: string | null
): EventFilter; ): EventFilter;

File diff suppressed because one or more lines are too long

View File

@ -186,4 +186,4 @@ const _abi = [
]; ];
const _bytecode = const _bytecode =
"0x608060405234801561001057600080fd5b5060006100246001600160e01b0361007316565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350610077565b3390565b610750806100866000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b1461010a578063d258191e1461012e578063d570d9541461015a578063f2fde38b146101925761007d565b80630de2670714610082578063365ccbbf146100aa578063715018a614610102575b600080fd5b6100a86004803603602081101561009857600080fd5b50356001600160a01b03166101b8565b005b6100b26102be565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156100ee5781810151838201526020016100d6565b505050509050019250505060405180910390f35b6100a86103bb565b61011261045d565b604080516001600160a01b039092168252519081900360200190f35b6100a86004803603604081101561014457600080fd5b506001600160a01b03813516906020013561046c565b6101806004803603602081101561017057600080fd5b50356001600160a01b0316610520565b60408051918252519081900360200190f35b6100a8600480360360208110156101a857600080fd5b50356001600160a01b031661053b565b6101c0610633565b6000546001600160a01b03908116911614610210576040805162461bcd60e51b815260206004820181905260248201526000805160206106fb833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526001602052604090205461027a576040805162461bcd60e51b815260206004820152601a60248201527f50726f7669646572206973206e6f742072656769737465726564000000000000604482015290519081900360640190fd5b6001600160a01b038116600081815260016020526040808220829055517f851e5971c053e6b76e3a1e0b8ffa81430df738007fad86e195c409a757faccd29190a250565b600254606090818167ffffffffffffffff811180156102dc57600080fd5b50604051908082528060200260200182016040528015610306578160200160208202803683370190505b50905060005b6002548110156103b4576000600160006002848154811061032957fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190205411156103ac576002818154811061036157fe5b9060005260206000200160009054906101000a90046001600160a01b031682828151811061038b57fe5b60200260200101906001600160a01b031690816001600160a01b0316815250505b60010161030c565b5091505090565b6103c3610633565b6000546001600160a01b03908116911614610413576040805162461bcd60e51b815260206004820181905260248201526000805160206106fb833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b610474610633565b6000546001600160a01b039081169116146104c4576040805162461bcd60e51b815260206004820181905260248201526000805160206106fb833981519152604482015290519081900360640190fd5b6001600160a01b03821660009081526001602052604090208190556104e882610637565b6040516001600160a01b038316907f2db38786c10176b033a1608361716b0ca992e3af55dc05b6dc710969790beeda90600090a25050565b6001600160a01b031660009081526001602052604090205490565b610543610633565b6000546001600160a01b03908116911614610593576040805162461bcd60e51b815260206004820181905260248201526000805160206106fb833981519152604482015290519081900360640190fd5b6001600160a01b0381166105d85760405162461bcd60e51b81526004018080602001828103825260268152602001806106d56026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b60005b60025481101561068457816001600160a01b03166002828154811061065b57fe5b6000918252602090912001546001600160a01b0316141561067c57506106d1565b60010161063a565b50600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0383161790555b5056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220e2a84f2ba2379b488e40b239204f1ef8e03c486e04e58a3c47a34f2f8661e0d864736f6c63430006080033"; "0x608060405234801561001057600080fd5b5060006100246001600160e01b0361007316565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350610077565b3390565b610750806100866000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b1461010a578063d258191e1461012e578063d570d9541461015a578063f2fde38b146101925761007d565b80630de2670714610082578063365ccbbf146100aa578063715018a614610102575b600080fd5b6100a86004803603602081101561009857600080fd5b50356001600160a01b03166101b8565b005b6100b26102be565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156100ee5781810151838201526020016100d6565b505050509050019250505060405180910390f35b6100a86103bb565b61011261045d565b604080516001600160a01b039092168252519081900360200190f35b6100a86004803603604081101561014457600080fd5b506001600160a01b03813516906020013561046c565b6101806004803603602081101561017057600080fd5b50356001600160a01b0316610520565b60408051918252519081900360200190f35b6100a8600480360360208110156101a857600080fd5b50356001600160a01b031661053b565b6101c0610633565b6000546001600160a01b03908116911614610210576040805162461bcd60e51b815260206004820181905260248201526000805160206106fb833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526001602052604090205461027a576040805162461bcd60e51b815260206004820152601a60248201527f50726f7669646572206973206e6f742072656769737465726564000000000000604482015290519081900360640190fd5b6001600160a01b038116600081815260016020526040808220829055517f851e5971c053e6b76e3a1e0b8ffa81430df738007fad86e195c409a757faccd29190a250565b600254606090818167ffffffffffffffff811180156102dc57600080fd5b50604051908082528060200260200182016040528015610306578160200160208202803683370190505b50905060005b6002548110156103b4576000600160006002848154811061032957fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190205411156103ac576002818154811061036157fe5b9060005260206000200160009054906101000a90046001600160a01b031682828151811061038b57fe5b60200260200101906001600160a01b031690816001600160a01b0316815250505b60010161030c565b5091505090565b6103c3610633565b6000546001600160a01b03908116911614610413576040805162461bcd60e51b815260206004820181905260248201526000805160206106fb833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b610474610633565b6000546001600160a01b039081169116146104c4576040805162461bcd60e51b815260206004820181905260248201526000805160206106fb833981519152604482015290519081900360640190fd5b6001600160a01b03821660009081526001602052604090208190556104e882610637565b6040516001600160a01b038316907f2db38786c10176b033a1608361716b0ca992e3af55dc05b6dc710969790beeda90600090a25050565b6001600160a01b031660009081526001602052604090205490565b610543610633565b6000546001600160a01b03908116911614610593576040805162461bcd60e51b815260206004820181905260248201526000805160206106fb833981519152604482015290519081900360640190fd5b6001600160a01b0381166105d85760405162461bcd60e51b81526004018080602001828103825260268152602001806106d56026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b60005b60025481101561068457816001600160a01b03166002828154811061065b57fe5b6000918252602090912001546001600160a01b0316141561067c57506106d1565b60010161063a565b50600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0383161790555b5056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220e906f3c4dc6df21fb70344f5253c4d5f59c429f9242bdf11f6cbcab677cc378064736f6c63430006080033";

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -163,4 +163,4 @@ const _abi = [
]; ];
const _bytecode = const _bytecode =
"0x608060405234801561001057600080fd5b5060006100246001600160e01b0361007316565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350610077565b3390565b6104d3806100866000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80639f86a0ee1161005b5780639f86a0ee146100dc578063bb85c0bb14610108578063f2fde38b14610140578063fbe5ba1e146101665761007d565b8063715018a61461008257806372eb293d1461008c5780638da5cb5b146100b8575b600080fd5b61008a61018c565b005b61008a600480360360408110156100a257600080fd5b506001600160a01b03813516906020013561022e565b6100c06102a2565b604080516001600160a01b039092168252519081900360200190f35b61008a600480360360408110156100f257600080fd5b506001600160a01b0381351690602001356102b1565b61012e6004803603602081101561011e57600080fd5b50356001600160a01b0316610325565b60408051918252519081900360200190f35b61008a6004803603602081101561015657600080fd5b50356001600160a01b0316610340565b61012e6004803603602081101561017c57600080fd5b50356001600160a01b0316610438565b610194610453565b6000546001600160a01b039081169116146101e4576040805162461bcd60e51b8152602060048201819052602482015260008051602061047e833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b610236610453565b6000546001600160a01b03908116911614610286576040805162461bcd60e51b8152602060048201819052602482015260008051602061047e833981519152604482015290519081900360640190fd5b6001600160a01b03909116600090815260016020526040902055565b6000546001600160a01b031690565b6102b9610453565b6000546001600160a01b03908116911614610309576040805162461bcd60e51b8152602060048201819052602482015260008051602061047e833981519152604482015290519081900360640190fd5b6001600160a01b03909116600090815260026020526040902055565b6001600160a01b031660009081526001602052604090205490565b610348610453565b6000546001600160a01b03908116911614610398576040805162461bcd60e51b8152602060048201819052602482015260008051602061047e833981519152604482015290519081900360640190fd5b6001600160a01b0381166103dd5760405162461bcd60e51b81526004018080602001828103825260268152602001806104586026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b031660009081526002602052604090205490565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212204134584d2bf186a26bc5c000197a27d72a145e0a3eaa0ba592365833121b292164736f6c63430006080033"; "0x608060405234801561001057600080fd5b5060006100246001600160e01b0361007316565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350610077565b3390565b6104d3806100866000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80639f86a0ee1161005b5780639f86a0ee146100dc578063bb85c0bb14610108578063f2fde38b14610140578063fbe5ba1e146101665761007d565b8063715018a61461008257806372eb293d1461008c5780638da5cb5b146100b8575b600080fd5b61008a61018c565b005b61008a600480360360408110156100a257600080fd5b506001600160a01b03813516906020013561022e565b6100c06102a2565b604080516001600160a01b039092168252519081900360200190f35b61008a600480360360408110156100f257600080fd5b506001600160a01b0381351690602001356102b1565b61012e6004803603602081101561011e57600080fd5b50356001600160a01b0316610325565b60408051918252519081900360200190f35b61008a6004803603602081101561015657600080fd5b50356001600160a01b0316610340565b61012e6004803603602081101561017c57600080fd5b50356001600160a01b0316610438565b610194610453565b6000546001600160a01b039081169116146101e4576040805162461bcd60e51b8152602060048201819052602482015260008051602061047e833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b610236610453565b6000546001600160a01b03908116911614610286576040805162461bcd60e51b8152602060048201819052602482015260008051602061047e833981519152604482015290519081900360640190fd5b6001600160a01b03909116600090815260016020526040902055565b6000546001600160a01b031690565b6102b9610453565b6000546001600160a01b03908116911614610309576040805162461bcd60e51b8152602060048201819052602482015260008051602061047e833981519152604482015290519081900360640190fd5b6001600160a01b03909116600090815260026020526040902055565b6001600160a01b031660009081526001602052604090205490565b610348610453565b6000546001600160a01b03908116911614610398576040805162461bcd60e51b8152602060048201819052602482015260008051602061047e833981519152604482015290519081900360640190fd5b6001600160a01b0381166103dd5760405162461bcd60e51b81526004018080602001828103825260268152602001806104586026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b031660009081526002602052604090205490565b339056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212205a70c695df428b295326b997bc040b37bae1f9ec1bd06c08f157cb36423fc98664736f6c63430006080033";

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -166,4 +166,4 @@ const _abi = [
]; ];
const _bytecode = const _bytecode =
"0x60806040526000805460ff60a01b1916905534801561001d57600080fd5b506040516108c53803806108c58339818101604052602081101561004057600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610853806100726000396000f3fe6080604052600436106100385760003560e01c8063388f70f114610044578063c72c4d1014610072578063ee872558146100a35761003f565b3661003f57005b600080fd5b34801561005057600080fd5b506100706004803603602081101561006757600080fd5b50351515610172565b005b34801561007e57600080fd5b50610087610190565b604080516001600160a01b039092168252519081900360200190f35b3480156100af57600080fd5b50610070600480360360808110156100c657600080fd5b6001600160a01b0382351691602081013591604082013591908101906080810160608201356401000000008111156100fd57600080fd5b82018360208201111561010f57600080fd5b8035906020019184600183028401116401000000008311171561013157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061019f945050505050565b60008054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031681565b836101aa308261035c565b8411156101fe576040805162461bcd60e51b815260206004820181905260248201527f496e76616c69642062616c616e636520666f722074686520636f6e7472616374604482015290519081900360640190fd5b600054600160a01b900460ff161561025f57604080516001600160a01b03871681526020810186905280820185905290517f816f6a6bc084e1996be1a831afa1af30763d0501b6b43b9e1922a11f347366d79181900360600190a150610356565b61026761041b565b6001600160a01b0316856001600160a01b0316146102f257806001600160a01b031663a0712d68846040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b1580156102c557600080fd5b505af11580156102d9573d6000803e3d6000fd5b505050506040513d60208110156102ef57600080fd5b50505b61030b85610306868663ffffffff61043316565b610494565b604080516001600160a01b03871681526020810186905280820185905290517f7d94e9d0c906b8d7b2b52a581b9e9ba728aa6f8cd8532bd87243d193f47401be9181900360600190a1505b50505050565b600061036661041b565b6001600160a01b0316826001600160a01b0316141561039057506001600160a01b03821631610415565b816001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156103e657600080fd5b505afa1580156103fa573d6000803e3d6000fd5b505050506040513d602081101561041057600080fd5b505190505b92915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b60008282018381101561048d576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60008060009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104e357600080fd5b505afa1580156104f7573d6000803e3d6000fd5b505050506040513d602081101561050d57600080fd5b5051905061051c818484610521565b505050565b61052961041b565b6001600160a01b0316826001600160a01b03161415610598576040516001600160a01b038416908290600081818185875af1925050503d806000811461058b576040519150601f19603f3d011682016040523d82523d6000602084013e610590565b606091505b50505061051c565b61051c6001600160a01b038316848363ffffffff6105b216565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261051c908490610611826001600160a01b03166107b7565b610662576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106106a05780518252601f199092019160209182019101610681565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610702576040519150601f19603f3d011682016040523d82523d6000602084013e610707565b606091505b50915091508161075e576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156103565780806020019051602081101561077a57600080fd5b50516103565760405162461bcd60e51b815260040180806020018281038252602a8152602001806107f4602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906107eb57508115155b94935050505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220d7b37dd94d5f3606332633199b3128ca2d6f0fef114884da808c8d9dec540e6364736f6c63430006080033"; "0x60806040526000805460ff60a01b1916905534801561001d57600080fd5b5060405161097d38038061097d8339818101604052602081101561004057600080fd5b5051600080546001600160a01b039092166001600160a01b031990921691909117905561090b806100726000396000f3fe6080604052600436106100385760003560e01c8063388f70f114610044578063c72c4d1014610072578063ee872558146100a35761003f565b3661003f57005b600080fd5b34801561005057600080fd5b506100706004803603602081101561006757600080fd5b50351515610172565b005b34801561007e57600080fd5b50610087610190565b604080516001600160a01b039092168252519081900360200190f35b3480156100af57600080fd5b50610070600480360360808110156100c657600080fd5b6001600160a01b0382351691602081013591604082013591908101906080810160608201356401000000008111156100fd57600080fd5b82018360208201111561010f57600080fd5b8035906020019184600183028401116401000000008311171561013157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061019f945050505050565b60008054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031681565b836101aa308261035c565b8411156101fe576040805162461bcd60e51b815260206004820181905260248201527f496e76616c69642062616c616e636520666f722074686520636f6e7472616374604482015290519081900360640190fd5b600054600160a01b900460ff161561025f57604080516001600160a01b03871681526020810186905280820185905290517f816f6a6bc084e1996be1a831afa1af30763d0501b6b43b9e1922a11f347366d79181900360600190a150610356565b61026761041b565b6001600160a01b0316856001600160a01b0316146102f257806001600160a01b031663a0712d68846040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b1580156102c557600080fd5b505af11580156102d9573d6000803e3d6000fd5b505050506040513d60208110156102ef57600080fd5b50505b61030b85610306868663ffffffff61043316565b610494565b604080516001600160a01b03871681526020810186905280820185905290517f7d94e9d0c906b8d7b2b52a581b9e9ba728aa6f8cd8532bd87243d193f47401be9181900360600190a1505b50505050565b600061036661041b565b6001600160a01b0316826001600160a01b0316141561039057506001600160a01b03821631610415565b816001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156103e657600080fd5b505afa1580156103fa573d6000803e3d6000fd5b505050506040513d602081101561041057600080fd5b505190505b92915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b60008282018381101561048d576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60008060009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104e357600080fd5b505afa1580156104f7573d6000803e3d6000fd5b505050506040513d602081101561050d57600080fd5b5051905061051c818484610521565b505050565b61052961041b565b6001600160a01b0316826001600160a01b03161415610598576040516001600160a01b038416908290600081818185875af1925050503d806000811461058b576040519150601f19603f3d011682016040523d82523d6000602084013e610590565b606091505b50505061051c565b61051c6001600160a01b038316848363ffffffff6105b216565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261051c9084906060610654826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166106b09092919063ffffffff16565b80519091501561051c5780806020019051602081101561067357600080fd5b505161051c5760405162461bcd60e51b815260040180806020018281038252602a8152602001806108ac602a913960400191505060405180910390fd5b60606106bf84846000856106c7565b949350505050565b60606106d285610872565b610723576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106107625780518252601f199092019160209182019101610743565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146107c4576040519150601f19603f3d011682016040523d82523d6000602084013e6107c9565b606091505b509150915081156107dd5791506106bf9050565b8051156107ed5780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561083757818101518382015260200161081f565b50505050905090810190601f1680156108645780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906106bf57505015159291505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220a299983b72bd4ca32d420156e97674b8e9505e79a24f73825976473a30f93d2764736f6c63430006080033";

File diff suppressed because one or more lines are too long

View File

@ -121,4 +121,4 @@ const _abi = [
]; ];
const _bytecode = const _bytecode =
"0x608060405234801561001057600080fd5b506040516105fd3803806105fd8339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610598806100656000396000f3fe6080604052600436106100295760003560e01c806329589f611461002e5780634f1b86eb146100ec575b600080fd5b6100da600480360361010081101561004557600080fd5b6001600160a01b0382358116926020810135926040820135831692606083013581169260808101359260a08201359260c0830135169190810190610100810160e082013564010000000081111561009b57600080fd5b8201836020820111156100ad57600080fd5b803590602001918460018302840111640100000000831117156100cf57600080fd5b50909250905061011d565b60408051918252519081900360200190f35b3480156100f857600080fd5b50610101610266565b604080516001600160a01b039092168252519081900360200190f35b600080546040805163140e25ad60e31b8152670de0b6b3a7640000600482015290516001600160a01b039092169163a0712d689160248082019260209290919082900301818787803b15801561017257600080fd5b505af1158015610186573d6000803e3d6000fd5b505050506040513d602081101561019c57600080fd5b50516101ef576040805162461bcd60e51b815260206004820181905260248201527f54524144455f574954485f48494e542e205265766572746564206d696e742829604482015290519081900360640190fd5b6101f7610275565b6001600160a01b03168a6001600160a01b03161461022a5761022a6001600160a01b038b1633308c63ffffffff61028d16565b60005461024f906001600160a01b031633670de0b6b3a764000063ffffffff6102ed16565b50670de0b6b3a76400009998505050505050505050565b6000546001600160a01b031681565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526102e7908590610344565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261033f908490610344565b505050565b610356826001600160a01b03166104fc565b6103a7576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106103e55780518252601f1990920191602091820191016103c6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610447576040519150601f19603f3d011682016040523d82523d6000602084013e61044c565b606091505b5091509150816104a3576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156102e7578080602001905160208110156104bf57600080fd5b50516102e75760405162461bcd60e51b815260040180806020018281038252602a815260200180610539602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061053057508115155b94935050505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212204217cd7d546f66051c30fdaa4e283314470f9c5edda974b8ca382dab7b05781364736f6c63430006080033"; "0x608060405234801561001057600080fd5b506040516106b53803806106b58339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610650806100656000396000f3fe6080604052600436106100295760003560e01c806329589f611461002e5780634f1b86eb146100ec575b600080fd5b6100da600480360361010081101561004557600080fd5b6001600160a01b0382358116926020810135926040820135831692606083013581169260808101359260a08201359260c0830135169190810190610100810160e082013564010000000081111561009b57600080fd5b8201836020820111156100ad57600080fd5b803590602001918460018302840111640100000000831117156100cf57600080fd5b50909250905061011d565b60408051918252519081900360200190f35b3480156100f857600080fd5b50610101610266565b604080516001600160a01b039092168252519081900360200190f35b600080546040805163140e25ad60e31b8152670de0b6b3a7640000600482015290516001600160a01b039092169163a0712d689160248082019260209290919082900301818787803b15801561017257600080fd5b505af1158015610186573d6000803e3d6000fd5b505050506040513d602081101561019c57600080fd5b50516101ef576040805162461bcd60e51b815260206004820181905260248201527f54524144455f574954485f48494e542e205265766572746564206d696e742829604482015290519081900360640190fd5b6101f7610275565b6001600160a01b03168a6001600160a01b03161461022a5761022a6001600160a01b038b1633308c63ffffffff61028d16565b60005461024f906001600160a01b031633670de0b6b3a764000063ffffffff6102ed16565b50670de0b6b3a76400009998505050505050505050565b6000546001600160a01b031681565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526102e7908590610344565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261033f908490610344565b505050565b6060610399826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166103f59092919063ffffffff16565b80519091501561033f578080602001905160208110156103b857600080fd5b505161033f5760405162461bcd60e51b815260040180806020018281038252602a8152602001806105f1602a913960400191505060405180910390fd5b6060610404848460008561040c565b949350505050565b6060610417856105b7565b610468576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106104a75780518252601f199092019160209182019101610488565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610509576040519150601f19603f3d011682016040523d82523d6000602084013e61050e565b606091505b509150915081156105225791506104049050565b8051156105325780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561057c578181015183820152602001610564565b50505050905090810190601f1680156105a95780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061040457505015159291505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122066073a4fdabfdc9fdc75e5c06b763b6d46c77b60344a68746725799a4b1b9b7264736f6c63430006080033";

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -81,4 +81,4 @@ const _abi = [
]; ];
const _bytecode = const _bytecode =
"0x60806040526040516103d93803806103d98339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b5060408181527f656970313936372e70726f78792e696d706c656d656e746174696f6e0000000082525190819003601c01902060008051602061037e83398151915260001990910114925061012a91505057fe5b61013c826001600160e01b036101fb16565b8051156101f4576000826001600160a01b0316826040518082805190602001908083835b6020831061017f5780518252601f199092019160209182019101610160565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146101df576040519150601f19603f3d011682016040523d82523d6000602084013e6101e4565b606091505b50509050806101f257600080fd5b505b5050610297565b61020e8161025b60201b6100201760201c565b6102495760405162461bcd60e51b815260040180806020018281038252603b81526020018061039e603b913960400191505060405180910390fd5b60008051602061037e83398151915255565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061028f57508115155b949350505050565b60d9806102a56000396000f3fe6080604052600a600c565b005b6012601e565b601e601a605b565b6080565b565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590605357508115155b949350505050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015609e573d6000f35b3d6000fdfea2646970667358221220fc521e0ffd1e17d0f9982bc9bf3fa4a81d19f85e90c79d5f83a08aaace87fc5564736f6c63430006080033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc43616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373"; "0x60806040526040516103d93803806103d98339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b5060408181527f656970313936372e70726f78792e696d706c656d656e746174696f6e0000000082525190819003601c01902060008051602061037e83398151915260001990910114925061012a91505057fe5b61013c826001600160e01b036101fb16565b8051156101f4576000826001600160a01b0316826040518082805190602001908083835b6020831061017f5780518252601f199092019160209182019101610160565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146101df576040519150601f19603f3d011682016040523d82523d6000602084013e6101e4565b606091505b50509050806101f257600080fd5b505b5050610297565b61020e8161025b60201b6100201760201c565b6102495760405162461bcd60e51b815260040180806020018281038252603b81526020018061039e603b913960400191505060405180910390fd5b60008051602061037e83398151915255565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061028f57508115155b949350505050565b60d9806102a56000396000f3fe6080604052600a600c565b005b6012601e565b601e601a605b565b6080565b565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590605357508115155b949350505050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015609e573d6000f35b3d6000fdfea26469706673582212204ee01122e5fcbff438ad1062473a5fe6887186d5edfc23e8ac1f913068bf5bdd64736f6c63430006080033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc43616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373";

View File

@ -134,4 +134,4 @@ const _abi = [
]; ];
const _bytecode = const _bytecode =
"0x608060405234801561001057600080fd5b5060405161099e38038061099e8339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610939806100656000396000f3fe6080604052600436106100385760003560e01c80639e3c930914610083578063b59b28ef1461014f578063f7888aec146102d35761007e565b3661007e5761004633610320565b61007c576040805162461bcd60e51b8152602060048201526002602482015261191960f11b604482015290519081900360640190fd5b005b600080fd5b34801561008f57600080fd5b506100b6600480360360208110156100a657600080fd5b50356001600160a01b031661035c565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156100fa5781810151838201526020016100e2565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610139578181015183820152602001610121565b5050505090500194505050505060405180910390f35b34801561015b57600080fd5b506102836004803603604081101561017257600080fd5b81019060208101813564010000000081111561018d57600080fd5b82018360208201111561019f57600080fd5b803590602001918460208302840111640100000000831117156101c157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561021157600080fd5b82018360208201111561022357600080fd5b8035906020019184602083028401116401000000008311171561024557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506106a9945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102bf5781810151838201526020016102a7565b505050509050019250505060405180910390f35b3480156102df57600080fd5b5061030e600480360360408110156102f657600080fd5b506001600160a01b0381358116916020013516610841565b60408051918252519081900360200190f35b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061035457508115155b949350505050565b60608060008060009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103ae57600080fd5b505afa1580156103c2573d6000803e3d6000fd5b505050506040513d60208110156103d857600080fd5b505160408051630240bc6b60e21b815290519192506060916001600160a01b03841691630902f1ac916004808301926000929190829003018186803b15801561042057600080fd5b505afa158015610434573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561045d57600080fd5b810190808051604051939291908464010000000082111561047d57600080fd5b90830190602082018581111561049257600080fd5b82518660208202830111640100000000821117156104af57600080fd5b82525081516020918201928201910280838360005b838110156104dc5781810151838201526020016104c4565b5050505090500160405250505090506060815167ffffffffffffffff8111801561050557600080fd5b5060405190808252806020026020018201604052801561052f578160200160208202803683370190505b50905060005b825181101561069d576000846001600160a01b0316633e15014185848151811061055b57fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b031681526020019150506101206040518083038186803b1580156105aa57600080fd5b505afa1580156105be573d6000803e3d6000fd5b505050506040513d6101208110156105d557600080fd5b5061010001519050806106025760008383815181106105f057fe5b60200260200101818152505050610695565b61060a6108eb565b6001600160a01b031684838151811061061f57fe5b60200260200101516001600160a01b03161461066f576106528885848151811061064557fe5b6020026020010151610841565b83838151811061065e57fe5b602002602001018181525050610693565b876001600160a01b03163183838151811061068657fe5b6020026020010181815250505b505b600101610535565b50909350915050915091565b606080825184510267ffffffffffffffff811180156106c757600080fd5b506040519080825280602002602001820160405280156106f1578160200160208202803683370190505b50905060005b84518110156108375760005b845181101561082e57845182026107186108eb565b6001600160a01b031686838151811061072d57fe5b60200260200101516001600160a01b031614156107815786838151811061075057fe5b60200260200101516001600160a01b031631848383018151811061077057fe5b602002602001018181525050610825565b6107a686838151811061079057fe5b60200260200101516001600160a01b0316610320565b6107e7576040805162461bcd60e51b815260206004820152600d60248201526c24a72b20a624a22faa27a5a2a760991b604482015290519081900360640190fd5b61080a8784815181106107f657fe5b602002602001015187848151811061064557fe5b848383018151811061081857fe5b6020026020010181815250505b50600101610703565b506001016106f7565b5090505b92915050565b6000610855826001600160a01b0316610320565b156108e357816001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156108b057600080fd5b505afa1580156108c4573d6000803e3d6000fd5b505050506040513d60208110156108da57600080fd5b5051905061083b565b50600061083b565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee9056fea26469706673582212208c6bcedafd15a7d3756d6a8fbd61ed98a9671546b7947bb9d84e7963e3864dbd64736f6c63430006080033"; "0x608060405234801561001057600080fd5b5060405161099e38038061099e8339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610939806100656000396000f3fe6080604052600436106100385760003560e01c80639e3c930914610083578063b59b28ef1461014f578063f7888aec146102d35761007e565b3661007e5761004633610320565b61007c576040805162461bcd60e51b8152602060048201526002602482015261191960f11b604482015290519081900360640190fd5b005b600080fd5b34801561008f57600080fd5b506100b6600480360360208110156100a657600080fd5b50356001600160a01b031661035c565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156100fa5781810151838201526020016100e2565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610139578181015183820152602001610121565b5050505090500194505050505060405180910390f35b34801561015b57600080fd5b506102836004803603604081101561017257600080fd5b81019060208101813564010000000081111561018d57600080fd5b82018360208201111561019f57600080fd5b803590602001918460208302840111640100000000831117156101c157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561021157600080fd5b82018360208201111561022357600080fd5b8035906020019184602083028401116401000000008311171561024557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506106a9945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102bf5781810151838201526020016102a7565b505050509050019250505060405180910390f35b3480156102df57600080fd5b5061030e600480360360408110156102f657600080fd5b506001600160a01b0381358116916020013516610841565b60408051918252519081900360200190f35b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061035457508115155b949350505050565b60608060008060009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103ae57600080fd5b505afa1580156103c2573d6000803e3d6000fd5b505050506040513d60208110156103d857600080fd5b505160408051630240bc6b60e21b815290519192506060916001600160a01b03841691630902f1ac916004808301926000929190829003018186803b15801561042057600080fd5b505afa158015610434573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561045d57600080fd5b810190808051604051939291908464010000000082111561047d57600080fd5b90830190602082018581111561049257600080fd5b82518660208202830111640100000000821117156104af57600080fd5b82525081516020918201928201910280838360005b838110156104dc5781810151838201526020016104c4565b5050505090500160405250505090506060815167ffffffffffffffff8111801561050557600080fd5b5060405190808252806020026020018201604052801561052f578160200160208202803683370190505b50905060005b825181101561069d576000846001600160a01b0316633e15014185848151811061055b57fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b031681526020019150506101406040518083038186803b1580156105aa57600080fd5b505afa1580156105be573d6000803e3d6000fd5b505050506040513d6101408110156105d557600080fd5b5061010001519050806106025760008383815181106105f057fe5b60200260200101818152505050610695565b61060a6108eb565b6001600160a01b031684838151811061061f57fe5b60200260200101516001600160a01b03161461066f576106528885848151811061064557fe5b6020026020010151610841565b83838151811061065e57fe5b602002602001018181525050610693565b876001600160a01b03163183838151811061068657fe5b6020026020010181815250505b505b600101610535565b50909350915050915091565b606080825184510267ffffffffffffffff811180156106c757600080fd5b506040519080825280602002602001820160405280156106f1578160200160208202803683370190505b50905060005b84518110156108375760005b845181101561082e57845182026107186108eb565b6001600160a01b031686838151811061072d57fe5b60200260200101516001600160a01b031614156107815786838151811061075057fe5b60200260200101516001600160a01b031631848383018151811061077057fe5b602002602001018181525050610825565b6107a686838151811061079057fe5b60200260200101516001600160a01b0316610320565b6107e7576040805162461bcd60e51b815260206004820152600d60248201526c24a72b20a624a22faa27a5a2a760991b604482015290519081900360640190fd5b61080a8784815181106107f657fe5b602002602001015187848151811061064557fe5b848383018151811061081857fe5b6020026020010181815250505b50600101610703565b506001016106f7565b5090505b92915050565b6000610855826001600160a01b0316610320565b156108e357816001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156108b057600080fd5b505afa1580156108c4573d6000803e3d6000fd5b505050506040513d60208110156108da57600080fd5b5051905061083b565b50600061083b565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee9056fea2646970667358221220c55061105db32b5ffbe17936cb06af117ec14e7ad4e1c3288fffe7c2858f9d9d64736f6c63430006080033";