ETH Price: $3,341.15 (-1.02%)

Contract

0x5e169082fFf23cEE6766062B96051A78c543127D
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Redeem199630602024-05-27 18:41:35179 days ago1716835295IN
Impermax: Router
0 ETH0.0028158921.94600224
Redeem199630502024-05-27 18:39:23179 days ago1716835163IN
Impermax: Router
0 ETH0.0028377420.78581114
Redeem199522162024-05-26 6:19:35181 days ago1716704375IN
Impermax: Router
0 ETH0.000510542.6
Redeem ETH199326142024-05-23 12:34:23183 days ago1716467663IN
Impermax: Router
0 ETH0.0030932417.72328857
Redeem198996282024-05-18 21:51:47188 days ago1716069107IN
Impermax: Router
0 ETH0.00046512.93964257
Redeem197746302024-05-01 10:17:35205 days ago1714558655IN
Impermax: Router
0 ETH0.00204268.38603859
Redeem197746142024-05-01 10:14:23205 days ago1714558463IN
Impermax: Router
0 ETH0.001409119.31459177
Redeem ETH197076662024-04-22 1:29:47215 days ago1713749387IN
Impermax: Router
0 ETH0.000976525.1884215
Redeem ETH197076252024-04-22 1:21:35215 days ago1713748895IN
Impermax: Router
0 ETH0.000874085.00814262
Deleverage197075842024-04-22 1:13:11215 days ago1713748391IN
Impermax: Router
0 ETH0.002865.36646947
Redeem197071312024-04-21 23:41:47215 days ago1713742907IN
Impermax: Router
0 ETH0.001021696
Redeem ETH197025702024-04-21 8:24:47215 days ago1713687887IN
Impermax: Router
0 ETH0.001225478.43550367
Redeem ETH196667472024-04-16 8:06:59220 days ago1713254819IN
Impermax: Router
0 ETH0.001769959.41047655
Redeem196667392024-04-16 8:05:23220 days ago1713254723IN
Impermax: Router
0 ETH0.001555529.16079471
Redeem ETH196667302024-04-16 8:03:35220 days ago1713254615IN
Impermax: Router
0 ETH0.001692548.99424862
Redeem196329582024-04-11 14:25:35225 days ago1712845535IN
Impermax: Router
0 ETH0.005338134.19404444
Repay ETH196329012024-04-11 14:14:11225 days ago1712844851IN
Impermax: Router
1 ETH0.0053023940.89080472
Repay196328932024-04-11 14:12:35225 days ago1712844755IN
Impermax: Router
0 ETH0.0056569543.75031421
Repay196327912024-04-11 13:51:47225 days ago1712843507IN
Impermax: Router
0 ETH0.0040532727.23463898
Repay ETH196327872024-04-11 13:50:59225 days ago1712843459IN
Impermax: Router
1 ETH0.0038962630.07559967
Deleverage196327712024-04-11 13:47:47225 days ago1712843267IN
Impermax: Router
0 ETH0.0128722329.88796483
Deleverage196327402024-04-11 13:41:35225 days ago1712842895IN
Impermax: Router
0 ETH0.0116976927.67080725
Repay196327172024-04-11 13:36:47225 days ago1712842607IN
Impermax: Router
0 ETH0.0024238724.12752182
Deleverage196326562024-04-11 13:24:35225 days ago1712841875IN
Impermax: Router
0 ETH0.0102744424.73047008
Redeem195518082024-03-31 5:29:35237 days ago1711862975IN
Impermax: Router
0 ETH0.0035497720.0164576
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
199326142024-05-23 12:34:23183 days ago1716467663
Impermax: Router
0.508662 ETH
199326142024-05-23 12:34:23183 days ago1716467663
Impermax: Router
0.508662 ETH
197076662024-04-22 1:29:47215 days ago1713749387
Impermax: Router
0.0457092 ETH
197076662024-04-22 1:29:47215 days ago1713749387
Impermax: Router
0.0457092 ETH
197076252024-04-22 1:21:35215 days ago1713748895
Impermax: Router
0.0457269 ETH
197076252024-04-22 1:21:35215 days ago1713748895
Impermax: Router
0.0457269 ETH
197075842024-04-22 1:13:11215 days ago1713748391
Impermax: Router
0.07796939 ETH
197075842024-04-22 1:13:11215 days ago1713748391
Impermax: Router
0.07796939 ETH
197025702024-04-21 8:24:47215 days ago1713687887
Impermax: Router
0.00832881 ETH
197025702024-04-21 8:24:47215 days ago1713687887
Impermax: Router
0.00832881 ETH
196667472024-04-16 8:06:59220 days ago1713254819
Impermax: Router
0.0430623 ETH
196667472024-04-16 8:06:59220 days ago1713254819
Impermax: Router
0.0430623 ETH
196667302024-04-16 8:03:35220 days ago1713254615
Impermax: Router
0.05563374 ETH
196667302024-04-16 8:03:35220 days ago1713254615
Impermax: Router
0.05563374 ETH
196329012024-04-11 14:14:11225 days ago1712844851
Impermax: Router
0.89413587 ETH
196329012024-04-11 14:14:11225 days ago1712844851
Impermax: Router
0.10586412 ETH
196327872024-04-11 13:50:59225 days ago1712843459
Impermax: Router
0.40571013 ETH
196327872024-04-11 13:50:59225 days ago1712843459
Impermax: Router
0.59428986 ETH
196327712024-04-11 13:47:47225 days ago1712843267
Impermax: Router
0.01738233 ETH
196327712024-04-11 13:47:47225 days ago1712843267
Impermax: Router
0.01738233 ETH
196327402024-04-11 13:41:35225 days ago1712842895
Impermax: Router
0.61705502 ETH
196327402024-04-11 13:41:35225 days ago1712842895
Impermax: Router
0.61705502 ETH
196326562024-04-11 13:24:35225 days ago1712841875
Impermax: Router
0.02500921 ETH
196326562024-04-11 13:24:35225 days ago1712841875
Impermax: Router
0.02500921 ETH
194026912024-03-10 5:45:11258 days ago1710049511
Impermax: Router
0.01 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Router01

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion
File 1 of 1 : FlattenedRouter01.sol
// File: contracts\interfaces\IRouter01.sol

pragma solidity >=0.5.0;

interface IRouter01 {
	function factory() external pure returns (address);
	function bDeployer() external pure returns (address);
	function cDeployer() external pure returns (address);
	function WETH() external pure returns (address);
	
	function mint(address poolToken, uint amount, address to, uint deadline) external returns (uint tokens);
	function mintETH(address poolToken, address to, uint deadline) external payable returns (uint tokens);
	function mintCollateral(address poolToken, uint amount, address to, uint deadline, bytes calldata permitData) external returns (uint tokens);
	
	function redeem(address poolToken, uint tokens, address to, uint deadline, bytes calldata permitData) external returns (uint amount);
	function redeemETH(address poolToken, uint tokens, address to, uint deadline, bytes calldata permitData) external returns (uint amountETH);

	function borrow(address borrowable, uint amount, address to, uint deadline, bytes calldata permitData) external;
	function borrowETH(address borrowable, uint amountETH, address to, uint deadline, bytes calldata permitData) external;
	
	function repay(address borrowable, uint amountMax, address borrower, uint deadline) external returns (uint amount);
	function repayETH(address borrowable, address borrower, uint deadline) external payable returns (uint amountETH);

	function liquidate(address borrowable, uint amountMax, address borrower, address to, uint deadline) external returns (uint amount, uint seizeTokens);
	function liquidateETH(address borrowable, address borrower, address to, uint deadline) external payable returns (uint amountETH, uint seizeTokens);
	
	function leverage(
		address uniswapV2Pair, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin,
		address to, uint deadline, bytes calldata permitDataA, bytes calldata permitDataB
	) external;
	function deleverage(
		address uniswapV2Pair, uint redeemTokens, uint amountAMin, uint amountBMin, uint deadline, bytes calldata permitData
	) external;
	
	function getBorrowable(address uniswapV2Pair, uint8 index) external view returns (address borrowable);
	function getCollateral(address uniswapV2Pair) external view returns (address collateral);
	function getLendingPool(address uniswapV2Pair) external view returns (address collateral, address borrowableA, address borrowableB);
}

// File: contracts\interfaces\IPoolToken.sol

pragma solidity >=0.5.0;

interface IPoolToken {

	/*** Impermax ERC20 ***/
	
	event Transfer(address indexed from, address indexed to, uint value);
	event Approval(address indexed owner, address indexed spender, uint value);
	
	function name() external pure returns (string memory);
	function symbol() external pure returns (string memory);
	function decimals() external pure returns (uint8);
	function totalSupply() external view returns (uint);
	function balanceOf(address owner) external view returns (uint);
	function allowance(address owner, address spender) external view returns (uint);
	function approve(address spender, uint value) external returns (bool);
	function transfer(address to, uint value) external returns (bool);
	function transferFrom(address from, address to, uint value) external returns (bool);
	
	function DOMAIN_SEPARATOR() external view returns (bytes32);
	function PERMIT_TYPEHASH() external pure returns (bytes32);
	function nonces(address owner) external view returns (uint);
	function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
	
	/*** Pool Token ***/
	
	event Mint(address indexed sender, address indexed minter, uint mintAmount, uint mintTokens);
	event Redeem(address indexed sender, address indexed redeemer, uint redeemAmount, uint redeemTokens);
	event Sync(uint totalBalance);
	
	function underlying() external view returns (address);
	function factory() external view returns (address);
	function totalBalance() external view returns (uint);
	function MINIMUM_LIQUIDITY() external pure returns (uint);

	function exchangeRate() external returns (uint);
	function mint(address minter) external returns (uint mintTokens);
	function redeem(address redeemer) external returns (uint redeemAmount);
	function skim(address to) external;
	function sync() external;
	
	function _setFactory() external;
}

// File: contracts\interfaces\IBorrowable.sol

pragma solidity >=0.5.0;

interface IBorrowable {

	/*** Impermax ERC20 ***/
	
	event Transfer(address indexed from, address indexed to, uint value);
	event Approval(address indexed owner, address indexed spender, uint value);
	
	function name() external pure returns (string memory);
	function symbol() external pure returns (string memory);
	function decimals() external pure returns (uint8);
	function totalSupply() external view returns (uint);
	function balanceOf(address owner) external view returns (uint);
	function allowance(address owner, address spender) external view returns (uint);
	function approve(address spender, uint value) external returns (bool);
	function transfer(address to, uint value) external returns (bool);
	function transferFrom(address from, address to, uint value) external returns (bool);
	
	function DOMAIN_SEPARATOR() external view returns (bytes32);
	function PERMIT_TYPEHASH() external pure returns (bytes32);
	function nonces(address owner) external view returns (uint);
	function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
	
	/*** Pool Token ***/
	
	event Mint(address indexed sender, address indexed minter, uint mintAmount, uint mintTokens);
	event Redeem(address indexed sender, address indexed redeemer, uint redeemAmount, uint redeemTokens);
	event Sync(uint totalBalance);
	
	function underlying() external view returns (address);
	function factory() external view returns (address);
	function totalBalance() external view returns (uint);
	function MINIMUM_LIQUIDITY() external pure returns (uint);

	function exchangeRate() external returns (uint);
	function mint(address minter) external returns (uint mintTokens);
	function redeem(address redeemer) external returns (uint redeemAmount);
	function skim(address to) external;
	function sync() external;
	
	function _setFactory() external;
	
	/*** Borrowable ***/

	event BorrowApproval(address indexed owner, address indexed spender, uint value);
	event Borrow(address indexed sender, address indexed borrower, address indexed receiver, uint borrowAmount, uint repayAmount, uint accountBorrowsPrior, uint accountBorrows, uint totalBorrows);
	event Liquidate(address indexed sender, address indexed borrower, address indexed liquidator, uint seizeTokens, uint repayAmount, uint accountBorrowsPrior, uint accountBorrows, uint totalBorrows);
	
	function BORROW_FEE() external pure returns (uint);
	function collateral() external view returns (address);
	function reserveFactor() external view returns (uint);
	function exchangeRateLast() external view returns (uint);
	function borrowIndex() external view returns (uint);
	function totalBorrows() external view returns (uint);
	function borrowAllowance(address owner, address spender) external view returns (uint);
	function borrowBalance(address borrower) external view returns (uint);	
	function borrowTracker() external view returns (address);
	
	function BORROW_PERMIT_TYPEHASH() external pure returns (bytes32);
	function borrowApprove(address spender, uint256 value) external returns (bool);
	function borrowPermit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
	function borrow(address borrower, address receiver, uint borrowAmount, bytes calldata data) external;
	function liquidate(address borrower, address liquidator) external returns (uint seizeTokens);
	function trackBorrow(address borrower) external;
	
	/*** Borrowable Interest Rate Model ***/

	event AccrueInterest(uint interestAccumulated, uint borrowIndex, uint totalBorrows);
	event CalculateKink(uint kinkRate);
	event CalculateBorrowRate(uint borrowRate);
	
	function KINK_BORROW_RATE_MAX() external pure returns (uint);
	function KINK_BORROW_RATE_MIN() external pure returns (uint);
	function KINK_MULTIPLIER() external pure returns (uint);
	function borrowRate() external view returns (uint);
	function kinkBorrowRate() external view returns (uint);
	function kinkUtilizationRate() external view returns (uint);
	function adjustSpeed() external view returns (uint);
	function rateUpdateTimestamp() external view returns (uint32);
	function accrualTimestamp() external view returns (uint32);
	
	function accrueInterest() external;
	
	/*** Borrowable Setter ***/

	event NewReserveFactor(uint newReserveFactor);
	event NewKinkUtilizationRate(uint newKinkUtilizationRate);
	event NewAdjustSpeed(uint newAdjustSpeed);
	event NewBorrowTracker(address newBorrowTracker);

	function RESERVE_FACTOR_MAX() external pure returns (uint);
	function KINK_UR_MIN() external pure returns (uint);
	function KINK_UR_MAX() external pure returns (uint);
	function ADJUST_SPEED_MIN() external pure returns (uint);
	function ADJUST_SPEED_MAX() external pure returns (uint);
	
	function _initialize (
		string calldata _name, 
		string calldata _symbol,
		address _underlying, 
		address _collateral
	) external;
	function _setReserveFactor(uint newReserveFactor) external;
	function _setKinkUtilizationRate(uint newKinkUtilizationRate) external;
	function _setAdjustSpeed(uint newAdjustSpeed) external;
	function _setBorrowTracker(address newBorrowTracker) external;
}

// File: contracts\interfaces\ICollateral.sol

pragma solidity >=0.5.0;

interface ICollateral {

	/*** Impermax ERC20 ***/
	
	event Transfer(address indexed from, address indexed to, uint value);
	event Approval(address indexed owner, address indexed spender, uint value);
	
	function name() external pure returns (string memory);
	function symbol() external pure returns (string memory);
	function decimals() external pure returns (uint8);
	function totalSupply() external view returns (uint);
	function balanceOf(address owner) external view returns (uint);
	function allowance(address owner, address spender) external view returns (uint);
	function approve(address spender, uint value) external returns (bool);
	function transfer(address to, uint value) external returns (bool);
	function transferFrom(address from, address to, uint value) external returns (bool);
	
	function DOMAIN_SEPARATOR() external view returns (bytes32);
	function PERMIT_TYPEHASH() external pure returns (bytes32);
	function nonces(address owner) external view returns (uint);
	function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
	
	/*** Pool Token ***/
	
	event Mint(address indexed sender, address indexed minter, uint mintAmount, uint mintTokens);
	event Redeem(address indexed sender, address indexed redeemer, uint redeemAmount, uint redeemTokens);
	event Sync(uint totalBalance);
	
	function underlying() external view returns (address);
	function factory() external view returns (address);
	function totalBalance() external view returns (uint);
	function MINIMUM_LIQUIDITY() external pure returns (uint);

	function exchangeRate() external returns (uint);
	function mint(address minter) external returns (uint mintTokens);
	function redeem(address redeemer) external returns (uint redeemAmount);
	function skim(address to) external;
	function sync() external;
	
	function _setFactory() external;
	
	/*** Collateral ***/
	
	function borrowable0() external view returns (address);
	function borrowable1() external view returns (address);
	function simpleUniswapOracle() external view returns (address);
	function safetyMarginSqrt() external view returns (uint);
	function liquidationIncentive() external view returns (uint);
	
	function getPrices() external returns (uint price0, uint price1);
	function tokensUnlocked(address from, uint value) external returns (bool);
	function accountLiquidityAmounts(address account, uint amount0, uint amount1) external returns (uint liquidity, uint shortfall);
	function accountLiquidity(address account) external returns (uint liquidity, uint shortfall);
	function canBorrow(address account, address borrowable, uint accountBorrows) external returns (bool);
	function seize(address liquidator, address borrower, uint repayAmount) external returns (uint seizeTokens);
	function flashRedeem(address redeemer, uint redeemAmount, bytes calldata data) external;
	
	/*** Collateral Setter ***/
	
	event NewSafetyMargin(uint newSafetyMarginSqrt);
	event NewLiquidationIncentive(uint newLiquidationIncentive);

	function SAFETY_MARGIN_SQRT_MIN() external pure returns (uint);
	function SAFETY_MARGIN_SQRT_MAX() external pure returns (uint);
	function LIQUIDATION_INCENTIVE_MIN() external pure returns (uint);
	function LIQUIDATION_INCENTIVE_MAX() external pure returns (uint);
	
	function _initialize (
		string calldata _name, 
		string calldata _symbol,
		address _underlying, 
		address _borrowable0, 
		address _borrowable1
	) external;
	function _setSafetyMarginSqrt(uint newSafetyMarginSqrt) external;
	function _setLiquidationIncentive(uint newLiquidationIncentive) external;
}

// File: contracts\interfaces\IImpermaxCallee.sol

pragma solidity >=0.5.0;

interface IImpermaxCallee {
    function impermaxBorrow(address sender, address borrower, uint borrowAmount, bytes calldata data) external;
    function impermaxRedeem(address sender, uint redeemAmount, bytes calldata data) external;
}

// File: contracts\interfaces\IERC20.sol

pragma solidity >=0.5.0;

interface IERC20 {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);
}

// File: contracts\interfaces\IWETH.sol

pragma solidity >=0.5.0;

interface IWETH {
    function deposit() external payable;
    function transfer(address to, uint value) external returns (bool);
    function withdraw(uint) external;
}

// File: contracts\interfaces\IUniswapV2Pair.sol

pragma solidity >=0.5.0;

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

// File: contracts\libraries\SafeMath.sol

pragma solidity =0.6.6;

// From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/Math.sol
// Subject to the MIT license.

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting with custom message on overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, errorMessage);

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on underflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot underflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction underflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on underflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot underflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, errorMessage);

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers.
     * Reverts on division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers.
     * Reverts with custom message on division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

// File: contracts\libraries\TransferHelper.sol

// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity =0.6.6;

// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::safeApprove: approve failed'
        );
    }

    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::safeTransfer: transfer failed'
        );
    }

    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::transferFrom: transferFrom failed'
        );
    }

    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'TransferHelper::safeTransferETH: ETH transfer failed');
    }
}

// File: contracts\libraries\UniswapV2Library.sol

pragma solidity >=0.5.0;

library UniswapV2Library {
    using SafeMath for uint;

    // returns sorted token addresses, used to handle return values from pairs sorted in this order
    function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
        require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES');
        (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
        require(token0 != address(0), 'UniswapV2Library: ZERO_ADDRESS');
    }

    // calculates the CREATE2 address for a pair without making any external calls
    function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {
        (address token0, address token1) = sortTokens(tokenA, tokenB);
        pair = address(uint(keccak256(abi.encodePacked(
                hex'ff',
                factory,
                keccak256(abi.encodePacked(token0, token1)),
                hex'96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f' // init code hash
            ))));
    }

    // fetches and sorts the reserves for a pair
    function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {
        (address token0,) = sortTokens(tokenA, tokenB);
        (uint reserve0, uint reserve1,) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves();
        (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
    }

    // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
    function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {
        require(amountA > 0, 'UniswapV2Library: INSUFFICIENT_AMOUNT');
        require(reserveA > 0 && reserveB > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
        amountB = amountA.mul(reserveB) / reserveA;
    }

    // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {
        require(amountIn > 0, 'UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT');
        require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
        uint amountInWithFee = amountIn.mul(997);
        uint numerator = amountInWithFee.mul(reserveOut);
        uint denominator = reserveIn.mul(1000).add(amountInWithFee);
        amountOut = numerator / denominator;
    }

    // given an output amount of an asset and pair reserves, returns a required input amount of the other asset
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {
        require(amountOut > 0, 'UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT');
        require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
        uint numerator = reserveIn.mul(amountOut).mul(1000);
        uint denominator = reserveOut.sub(amountOut).mul(997);
        amountIn = (numerator / denominator).add(1);
    }

    // performs chained getAmountOut calculations on any number of pairs
    function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {
        require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
        amounts = new uint[](path.length);
        amounts[0] = amountIn;
        for (uint i; i < path.length - 1; i++) {
            (uint reserveIn, uint reserveOut) = getReserves(factory, path[i], path[i + 1]);
            amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut);
        }
    }

    // performs chained getAmountIn calculations on any number of pairs
    function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) {
        require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
        amounts = new uint[](path.length);
        amounts[amounts.length - 1] = amountOut;
        for (uint i = path.length - 1; i > 0; i--) {
            (uint reserveIn, uint reserveOut) = getReserves(factory, path[i - 1], path[i]);
            amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);
        }
    }
}

// File: contracts\Router01.sol

pragma solidity =0.6.6;
pragma experimental ABIEncoderV2;

contract Router01 is IRouter01, IImpermaxCallee {
	using SafeMath for uint;

	address public immutable override factory;
	address public immutable override bDeployer;
	address public immutable override cDeployer;
	address public immutable override WETH;

	modifier ensure(uint deadline) {
		require(deadline >= block.timestamp, "ImpermaxRouter: EXPIRED");
		_;
	}

	modifier checkETH(address poolToken) {
		require(WETH == IPoolToken(poolToken).underlying(), "ImpermaxRouter: NOT_WETH");
		_;
	}

	constructor(address _factory, address _bDeployer, address _cDeployer, address _WETH) public {
		factory = _factory;
		bDeployer = _bDeployer;
		cDeployer = _cDeployer;
		WETH = _WETH;
	}

	receive() external payable {
		assert(msg.sender == WETH); // only accept ETH via fallback from the WETH contract
	}

	/*** Mint ***/
	
	function _mint(
		address poolToken, 
		address underlying, 
		uint amount,
		address from,
		address to
	) internal virtual returns (uint tokens) {
		if (from == address(this)) TransferHelper.safeTransfer(underlying, poolToken, amount);
		else TransferHelper.safeTransferFrom(underlying, from, poolToken, amount);
		tokens = IPoolToken(poolToken).mint(to);
	}
	function mint(
		address poolToken, 
		uint amount,
		address to,
		uint deadline
	) external virtual override ensure(deadline) returns (uint tokens) {
		return _mint(poolToken, IPoolToken(poolToken).underlying(), amount, msg.sender, to);
	}
	function mintETH(
		address poolToken, 
		address to,
		uint deadline
	) external virtual override payable ensure(deadline) checkETH(poolToken) returns (uint tokens) {
		IWETH(WETH).deposit{value: msg.value}();
		return _mint(poolToken, WETH, msg.value, address(this), to);
	}
	function mintCollateral(
		address poolToken, 
		uint amount,
		address to,
		uint deadline,
		bytes calldata permitData
	) external virtual override ensure(deadline) returns (uint tokens) {
		address uniswapV2Pair = IPoolToken(poolToken).underlying();
		_permitUniswapV2Pair(uniswapV2Pair, amount, deadline, permitData);
		return _mint(poolToken, uniswapV2Pair, amount, msg.sender, to);
	}
	
	/*** Redeem ***/
	
	function redeem(
		address poolToken,
		uint tokens,
		address to,
		uint deadline,
		bytes memory permitData
	) public virtual override ensure(deadline) returns (uint amount) {
		_permit(poolToken, tokens, deadline, permitData);
		IPoolToken(poolToken).transferFrom(msg.sender, poolToken, tokens);
		amount = IPoolToken(poolToken).redeem(to);
	}
	function redeemETH(
		address poolToken, 
		uint tokens,
		address to,
		uint deadline,
		bytes memory permitData
	) public virtual override ensure(deadline) checkETH(poolToken) returns (uint amountETH) {
		amountETH = redeem(poolToken, tokens, address(this), deadline, permitData);
		IWETH(WETH).withdraw(amountETH);
		TransferHelper.safeTransferETH(to, amountETH);
	}
			
	/*** Borrow ***/

	function borrow(
		address borrowable, 
		uint amount,
		address to,
		uint deadline,
		bytes memory permitData
	) public virtual override ensure(deadline) {
		_borrowPermit(borrowable, amount, deadline, permitData);
		IBorrowable(borrowable).borrow(msg.sender, to, amount, new bytes(0));
	}
	function borrowETH(
		address borrowable, 
		uint amountETH,
		address to,
		uint deadline,
		bytes memory permitData
	) public virtual override ensure(deadline) checkETH(borrowable) {
		borrow(borrowable, amountETH, address(this), deadline, permitData);
		IWETH(WETH).withdraw(amountETH);
		TransferHelper.safeTransferETH(to, amountETH);
	}
	
	/*** Repay ***/
	
	function _repayAmount(
		address borrowable, 
		uint amountMax,
		address borrower
	) internal virtual returns (uint amount) {
		IBorrowable(borrowable).accrueInterest();
		uint borrowedAmount = IBorrowable(borrowable).borrowBalance(borrower);
		amount = amountMax < borrowedAmount ? amountMax : borrowedAmount;
	}
	function repay(
		address borrowable, 
		uint amountMax,
		address borrower,
		uint deadline
	) external virtual override ensure(deadline) returns (uint amount) {
		amount = _repayAmount(borrowable, amountMax, borrower);
		TransferHelper.safeTransferFrom(IBorrowable(borrowable).underlying(), msg.sender, borrowable, amount);
		IBorrowable(borrowable).borrow(borrower, address(0), 0, new bytes(0));
	}
	function repayETH(
		address borrowable, 
		address borrower,
		uint deadline
	) external virtual override payable ensure(deadline) checkETH(borrowable) returns (uint amountETH) {
		amountETH = _repayAmount(borrowable, msg.value, borrower);
		IWETH(WETH).deposit{value: amountETH}();
		assert(IWETH(WETH).transfer(borrowable, amountETH));
		IBorrowable(borrowable).borrow(borrower, address(0), 0, new bytes(0));
		// refund surpluss eth, if any
		if (msg.value > amountETH) TransferHelper.safeTransferETH(msg.sender, msg.value - amountETH);
	}
	
	/*** Liquidate ***/

	function liquidate(
		address borrowable, 
		uint amountMax,
		address borrower,
		address to,
		uint deadline
	) external virtual override ensure(deadline) returns (uint amount, uint seizeTokens) {
		amount = _repayAmount(borrowable, amountMax, borrower);
		TransferHelper.safeTransferFrom(IBorrowable(borrowable).underlying(), msg.sender, borrowable, amount);
		seizeTokens = IBorrowable(borrowable).liquidate(borrower, to);
	}
	function liquidateETH(
		address borrowable, 
		address borrower,
		address to,
		uint deadline
	) external virtual override payable ensure(deadline) checkETH(borrowable) returns (uint amountETH, uint seizeTokens) {
		amountETH = _repayAmount(borrowable, msg.value, borrower);
		IWETH(WETH).deposit{value: amountETH}();
		assert(IWETH(WETH).transfer(borrowable, amountETH));
		seizeTokens = IBorrowable(borrowable).liquidate(borrower, to);
		// refund surpluss eth, if any
		if (msg.value > amountETH) TransferHelper.safeTransferETH(msg.sender, msg.value - amountETH);
	}
		
	/*** Leverage LP Token ***/
	
	function _leverage(
		address uniswapV2Pair, 
		uint amountA,
		uint amountB,
		address to
	) internal virtual {
		address borrowableA = getBorrowable(uniswapV2Pair, 0);
		// mint collateral
		bytes memory borrowBData = abi.encode(CalleeData({
			callType: CallType.ADD_LIQUIDITY_AND_MINT,
			uniswapV2Pair: uniswapV2Pair,
			borrowableIndex: 1,
			data: abi.encode(AddLiquidityAndMintCalldata({
				amountA: amountA,
				amountB: amountB,
				to: to
			}))
		}));	
		// borrow borrowableB
		bytes memory borrowAData = abi.encode(CalleeData({
			callType: CallType.BORROWB,
			uniswapV2Pair: uniswapV2Pair,
			borrowableIndex: 0,
			data: abi.encode(BorrowBCalldata({
				borrower: msg.sender,
				receiver: address(this),
				borrowAmount: amountB,
				data: borrowBData
			}))
		}));
		// borrow borrowableA
		IBorrowable(borrowableA).borrow(msg.sender, address(this), amountA, borrowAData);	
	}
	function leverage(
		address uniswapV2Pair,  
		uint amountADesired,
		uint amountBDesired,
		uint amountAMin,
		uint amountBMin,
		address to,
		uint deadline,
		bytes calldata permitDataA,
		bytes calldata permitDataB
	) external virtual override ensure(deadline) {
		_borrowPermit(getBorrowable(uniswapV2Pair, 0), amountADesired, deadline, permitDataA);
		_borrowPermit(getBorrowable(uniswapV2Pair, 1), amountBDesired, deadline, permitDataB);
		(uint amountA, uint amountB) = _optimalLiquidity(uniswapV2Pair, amountADesired, amountBDesired, amountAMin, amountBMin);
		_leverage(uniswapV2Pair, amountA, amountB, to);
	}

	function _addLiquidityAndMint(
		address uniswapV2Pair, 
		uint amountA,
		uint amountB,
		address to
	) internal virtual {
		(address collateral, address borrowableA, address borrowableB) = getLendingPool(uniswapV2Pair);
		// add liquidity to uniswap pair
		TransferHelper.safeTransfer(IBorrowable(borrowableA).underlying(), uniswapV2Pair, amountA);
		TransferHelper.safeTransfer(IBorrowable(borrowableB).underlying(), uniswapV2Pair, amountB);
		IUniswapV2Pair(uniswapV2Pair).mint(collateral);
		// mint collateral
		ICollateral(collateral).mint(to);
	}
		
	/*** Deleverage LP Token ***/
	
	function deleverage(
		address uniswapV2Pair,  
		uint redeemTokens,
		uint amountAMin,
		uint amountBMin,
		uint deadline,
		bytes calldata permitData
	) external virtual override ensure(deadline) {
		address collateral = getCollateral(uniswapV2Pair);
		uint exchangeRate = ICollateral(collateral).exchangeRate();
		require(redeemTokens > 0, "ImpermaxRouter: REDEEM_ZERO");		
		uint redeemAmount = (redeemTokens - 1).mul(exchangeRate).div(1e18);
		_permit(collateral, redeemTokens, deadline, permitData);
		bytes memory redeemData = abi.encode(CalleeData({
			callType: CallType.REMOVE_LIQ_AND_REPAY,
			uniswapV2Pair: uniswapV2Pair,
			borrowableIndex: 0,
			data: abi.encode(RemoveLiqAndRepayCalldata({
				borrower: msg.sender,
				redeemTokens: redeemTokens,
				redeemAmount: redeemAmount,
				amountAMin: amountAMin,
				amountBMin: amountBMin
			}))
		}));
		// flashRedeem
		ICollateral(collateral).flashRedeem(address(this), redeemAmount, redeemData);
	}

	function _removeLiqAndRepay(
		address uniswapV2Pair,
		address borrower,
		uint redeemTokens,
		uint redeemAmount,
		uint amountAMin,
		uint amountBMin
	) internal virtual {
		(address collateral, address borrowableA, address borrowableB) = getLendingPool(uniswapV2Pair);
		address tokenA = IBorrowable(borrowableA).underlying();
		address tokenB = IBorrowable(borrowableB).underlying();
		// removeLiquidity
		TransferHelper.safeTransfer(uniswapV2Pair, uniswapV2Pair, redeemAmount);
		(uint amountAMax, uint amountBMax) = IUniswapV2Pair(uniswapV2Pair).burn(address(this));
		require(amountAMax >= amountAMin, "ImpermaxRouter: INSUFFICIENT_A_AMOUNT");
		require(amountBMax >= amountBMin, "ImpermaxRouter: INSUFFICIENT_B_AMOUNT");
		// repay and refund
		_repayAndRefund(borrowableA, tokenA, borrower, amountAMax);
		_repayAndRefund(borrowableB, tokenB, borrower, amountBMax);
		// repay flash redeem
		ICollateral(collateral).transferFrom(borrower, collateral, redeemTokens);
	}
	
	function _repayAndRefund(
		address borrowable,
		address token,
		address borrower,
		uint amountMax
	) internal virtual {
		//repay
		uint amount = _repayAmount(borrowable, amountMax, borrower);
		TransferHelper.safeTransfer(token, borrowable, amount);
		IBorrowable(borrowable).borrow(borrower, address(0), 0, new bytes(0));		
		// refund excess
		if (amountMax > amount) {
			uint refundAmount = amountMax - amount;
			if (token == WETH) {		
				IWETH(WETH).withdraw(refundAmount);
				TransferHelper.safeTransferETH(borrower, refundAmount);
			}
			else TransferHelper.safeTransfer(token, borrower, refundAmount);
		}
	}
	
	/*** Impermax Callee ***/
		
	enum CallType {ADD_LIQUIDITY_AND_MINT, BORROWB, REMOVE_LIQ_AND_REPAY}
	struct CalleeData {
		CallType callType;
		address uniswapV2Pair;
		uint8 borrowableIndex;
		bytes data;		
	}
	struct AddLiquidityAndMintCalldata {
		uint amountA;
		uint amountB;
		address to;
	}
	struct BorrowBCalldata {
		address borrower; 
		address receiver;
		uint borrowAmount;
		bytes data;
	}
	struct RemoveLiqAndRepayCalldata {
		address borrower;
		uint redeemTokens;
		uint redeemAmount;
		uint amountAMin;
		uint amountBMin;
	}
	
	function impermaxBorrow(address sender, address borrower, uint borrowAmount, bytes calldata data) external virtual override {
		borrower; borrowAmount;
		CalleeData memory calleeData = abi.decode(data, (CalleeData));
		address declaredCaller = getBorrowable(calleeData.uniswapV2Pair, calleeData.borrowableIndex);
		// only succeeds if called by a borrowable and if that borrowable has been called by the router
		require(sender == address(this), "ImpermaxRouter: SENDER_NOT_ROUTER");
		require(msg.sender == declaredCaller, "ImpermaxRouter: UNAUTHORIZED_CALLER");
		if (calleeData.callType == CallType.ADD_LIQUIDITY_AND_MINT) {
			AddLiquidityAndMintCalldata memory d = abi.decode(calleeData.data, (AddLiquidityAndMintCalldata));
			_addLiquidityAndMint(calleeData.uniswapV2Pair, d.amountA, d.amountB, d.to);
		}
		else if (calleeData.callType == CallType.BORROWB) {
			BorrowBCalldata memory d = abi.decode(calleeData.data, (BorrowBCalldata));
			address borrowableB = getBorrowable(calleeData.uniswapV2Pair, 1);
			IBorrowable(borrowableB).borrow(d.borrower, d.receiver, d.borrowAmount, d.data);
		}
		else revert();
	}
	
	function impermaxRedeem(address sender, uint redeemAmount, bytes calldata data) external virtual override {
		redeemAmount;
		CalleeData memory calleeData = abi.decode(data, (CalleeData));
		address declaredCaller = getCollateral(calleeData.uniswapV2Pair);
		// only succeeds if called by a collateral and if that collateral has been called by the router
		require(sender == address(this), "ImpermaxRouter: SENDER_NOT_ROUTER");
		require(msg.sender == declaredCaller, "ImpermaxRouter: UNAUTHORIZED_CALLER");
		if (calleeData.callType == CallType.REMOVE_LIQ_AND_REPAY) {
			RemoveLiqAndRepayCalldata memory d = abi.decode(calleeData.data, (RemoveLiqAndRepayCalldata));
			_removeLiqAndRepay(calleeData.uniswapV2Pair, d.borrower, d.redeemTokens, d.redeemAmount, d.amountAMin, d.amountBMin);
		}
		else revert();
	}
		
	/*** Utilities ***/
	
	function _permit(
		address poolToken, 
		uint amount, 
		uint deadline,
		bytes memory permitData
	) internal virtual {
		if (permitData.length == 0) return;
		(bool approveMax, uint8 v, bytes32 r, bytes32 s) = abi.decode(permitData, (bool, uint8, bytes32, bytes32));
		uint value = approveMax ? uint(-1) : amount;
		IPoolToken(poolToken).permit(msg.sender, address(this), value, deadline, v, r, s);
	}
	function _permitUniswapV2Pair(
		address uniswapV2Pair, 
		uint amount, 
		uint deadline,
		bytes memory permitData
	) internal virtual {
		if (permitData.length == 0) return;
		(bool approveMax, uint8 v, bytes32 r, bytes32 s) = abi.decode(permitData, (bool, uint8, bytes32, bytes32));
		uint value = approveMax ? uint(-1) : amount;
		IUniswapV2Pair(uniswapV2Pair).permit(msg.sender, address(this), value, deadline, v, r, s);
	}
	function _borrowPermit(
		address borrowable, 
		uint amount, 
		uint deadline,
		bytes memory permitData
	) internal virtual {
		if (permitData.length == 0) return;
		(bool approveMax, uint8 v, bytes32 r, bytes32 s) = abi.decode(permitData, (bool, uint8, bytes32, bytes32));
		uint value = approveMax ? uint(-1) : amount;
		IBorrowable(borrowable).borrowPermit(msg.sender, address(this), value, deadline, v, r, s);
	}
	
	function _optimalLiquidity(
		address uniswapV2Pair,
		uint amountADesired,
		uint amountBDesired,
		uint amountAMin,
		uint amountBMin
	) public virtual view returns (uint amountA, uint amountB) {
		(uint reserveA, uint reserveB,) = IUniswapV2Pair(uniswapV2Pair).getReserves();
		uint amountBOptimal = UniswapV2Library.quote(amountADesired, reserveA, reserveB);
		if (amountBOptimal <= amountBDesired) {
			require(amountBOptimal >= amountBMin, "ImpermaxRouter: INSUFFICIENT_B_AMOUNT");
			(amountA, amountB) = (amountADesired, amountBOptimal);
		} else {
			uint amountAOptimal = UniswapV2Library.quote(amountBDesired, reserveB, reserveA);
			assert(amountAOptimal <= amountADesired);
			require(amountAOptimal >= amountAMin, "ImpermaxRouter: INSUFFICIENT_A_AMOUNT");
			(amountA, amountB) = (amountAOptimal, amountBDesired);
		}
	}
	
	function getBorrowable(address uniswapV2Pair, uint8 index) public virtual override view returns (address borrowable) {
		require(index < 2, "ImpermaxRouter: INDEX_TOO_HIGH");
		borrowable = address(uint(keccak256(abi.encodePacked(
			hex"ff",
			bDeployer,
			keccak256(abi.encodePacked(factory, uniswapV2Pair, index)),
			hex"605ba1db56496978613939baf0ae31dccceea3f5ca53dfaa76512bc880d7bb8f" // Borrowable bytecode keccak256
		))));
	}
	function getCollateral(address uniswapV2Pair) public virtual override view returns (address collateral) {
		collateral = address(uint(keccak256(abi.encodePacked(
			hex"ff",
			cDeployer,
			keccak256(abi.encodePacked(factory, uniswapV2Pair)),
			hex"4b8788d8761647e6330407671d3c6c80afaed3d047800dba0e0e3befde047767" // Collateral bytecode keccak256
		))));
	}
	function getLendingPool(address uniswapV2Pair) public virtual override view returns (address collateral, address borrowableA, address borrowableB) {
		collateral = getCollateral(uniswapV2Pair);
		borrowableA = getBorrowable(uniswapV2Pair, 0);
		borrowableB = getBorrowable(uniswapV2Pair, 1);
	}
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 999999
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_bDeployer","type":"address"},{"internalType":"address","name":"_cDeployer","type":"address"},{"internalType":"address","name":"_WETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"uniswapV2Pair","type":"address"},{"internalType":"uint256","name":"amountADesired","type":"uint256"},{"internalType":"uint256","name":"amountBDesired","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"}],"name":"_optimalLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bDeployer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"borrowable","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"permitData","type":"bytes"}],"name":"borrow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"borrowable","type":"address"},{"internalType":"uint256","name":"amountETH","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"permitData","type":"bytes"}],"name":"borrowETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cDeployer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"uniswapV2Pair","type":"address"},{"internalType":"uint256","name":"redeemTokens","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"permitData","type":"bytes"}],"name":"deleverage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"uniswapV2Pair","type":"address"},{"internalType":"uint8","name":"index","type":"uint8"}],"name":"getBorrowable","outputs":[{"internalType":"address","name":"borrowable","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"uniswapV2Pair","type":"address"}],"name":"getCollateral","outputs":[{"internalType":"address","name":"collateral","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"uniswapV2Pair","type":"address"}],"name":"getLendingPool","outputs":[{"internalType":"address","name":"collateral","type":"address"},{"internalType":"address","name":"borrowableA","type":"address"},{"internalType":"address","name":"borrowableB","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"borrowAmount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"impermaxBorrow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"redeemAmount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"impermaxRedeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"uniswapV2Pair","type":"address"},{"internalType":"uint256","name":"amountADesired","type":"uint256"},{"internalType":"uint256","name":"amountBDesired","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"permitDataA","type":"bytes"},{"internalType":"bytes","name":"permitDataB","type":"bytes"}],"name":"leverage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"borrowable","type":"address"},{"internalType":"uint256","name":"amountMax","type":"uint256"},{"internalType":"address","name":"borrower","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"liquidate","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"seizeTokens","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"borrowable","type":"address"},{"internalType":"address","name":"borrower","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"liquidateETH","outputs":[{"internalType":"uint256","name":"amountETH","type":"uint256"},{"internalType":"uint256","name":"seizeTokens","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"poolToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"mint","outputs":[{"internalType":"uint256","name":"tokens","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"poolToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"permitData","type":"bytes"}],"name":"mintCollateral","outputs":[{"internalType":"uint256","name":"tokens","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"poolToken","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"mintETH","outputs":[{"internalType":"uint256","name":"tokens","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"poolToken","type":"address"},{"internalType":"uint256","name":"tokens","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"permitData","type":"bytes"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"poolToken","type":"address"},{"internalType":"uint256","name":"tokens","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"permitData","type":"bytes"}],"name":"redeemETH","outputs":[{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"borrowable","type":"address"},{"internalType":"uint256","name":"amountMax","type":"uint256"},{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"repay","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"borrowable","type":"address"},{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"repayETH","outputs":[{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6101006040523480156200001257600080fd5b5060405162004b6138038062004b61833981016040819052620000359162000083565b6001600160601b0319606094851b811660805292841b831660a05290831b821660c05290911b1660e052620000e3565b80516001600160a01b03811681146200007d57600080fd5b92915050565b6000806000806080858703121562000099578384fd5b620000a5868662000065565b9350620000b6866020870162000065565b9250620000c7866040870162000065565b9150620000d8866060870162000065565b905092959194509250565b60805160601c60a05160601c60c05160601c60e05160601c6149d862000189600039806101a1528061074a528061080352806109515280610a075280610b555280610bd05280610c89528061148a52806114f8528061157d5280611cdb5280611f005280611f7b528061203452806134de528061356d5250806118c75280611afa525080611d2352806121ce525080611b1b5280611cff52806121ef52506149d86000f3fe6080604052600436106101845760003560e01c806377370d62116100d6578063c45a01551161007f578063eb03419a11610059578063eb03419a14610449578063ef974e9c1461045c578063fcb2a8951461047c576101ca565b8063c45a0155146103ff578063db5a269014610414578063dbe5f2fb14610429576101ca565b80639b56d6c9116100b05780639b56d6c9146103aa578063acb86cbb146103ca578063ad5c4648146103ea576101ca565b806377370d62146103485780637a4660d514610368578063876d9d9e1461038a576101ca565b80633c173a4f1161013857806367bf252f1161011257806367bf252f146102f55780636aee7c1e14610315578063703de94c14610335576101ca565b80633c173a4f1461028757806343e26448146102a75780635c1e6404146102c7576101ca565b80632b005cfc116101695780632b005cfc146102345780632c3445041461025457806335bb105914610274576101ca565b80630572bf5f146101cf5780631f1cc5bc14610207576101ca565b366101ca573373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146101c857fe5b005b600080fd5b3480156101db57600080fd5b506101ef6101ea366004613751565b61049c565b6040516101fe9392919061427f565b60405180910390f35b34801561021357600080fd5b50610227610222366004613995565b6104cc565b6040516101fe91906148a6565b34801561024057600080fd5b5061022761024f366004613995565b610676565b34801561026057600080fd5b506101c861026f366004613995565b61087f565b6102276102823660046137d9565b610a81565b34801561029357600080fd5b506102276102a23660046138e4565b610dce565b3480156102b357600080fd5b506102276102c236600461391b565b610e9f565b3480156102d357600080fd5b506102e76102e236600461388a565b610fba565b6040516101fe9291906148af565b34801561030157600080fd5b506101c8610310366004613aa6565b611141565b34801561032157600080fd5b506102276103303660046138e4565b611244565b6102276103433660046137d9565b6113b6565b34801561035457600080fd5b506101c8610363366004613b75565b6115a4565b34801561037457600080fd5b5061037d6118c5565b6040516101fe9190614144565b34801561039657600080fd5b506101c86103a5366004613819565b6118e9565b3480156103b657600080fd5b5061037d6103c5366004613751565b611af6565b3480156103d657600080fd5b506101c86103e5366004613a09565b611baf565b3480156103f657600080fd5b5061037d611cd9565b34801561040b57600080fd5b5061037d611cfd565b34801561042057600080fd5b5061037d611d21565b34801561043557600080fd5b506101c8610444366004613995565b611d45565b6102e7610457366004613789565b611e2b565b34801561046857600080fd5b5061037d610477366004613bf0565b61218d565b34801561048857600080fd5b506102e7610497366004613a63565b612286565b60008060006104aa84611af6565b92506104b784600061218d565b91506104c484600161218d565b929491935050565b60008242811015610512576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b60405180910390fd5b61051e878786866123f0565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8816906323b872dd906105749033908b908b906004016141f2565b602060405180830381600087803b15801561058e57600080fd5b505af11580156105a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c69190613c28565b506040517f95a2251f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8816906395a2251f90610619908890600401614144565b602060405180830381600087803b15801561063357600080fd5b505af1158015610647573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066b9190613f00565b979650505050505050565b600082428110156106b3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b868073ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b1580156106fa57600080fd5b505afa15801561070e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610732919061376d565b73ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16146107b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614675565b6107c388883088886104cc565b6040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815290935073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690632e1a7d4d906108389086906004016148a6565b600060405180830381600087803b15801561085257600080fd5b505af1158015610866573d6000803e3d6000fd5b5050505061087486846124eb565b505095945050505050565b81428110156108ba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b858073ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b15801561090157600080fd5b505afa158015610915573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610939919061376d565b73ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16146109bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614675565b6109ca8787308787611d45565b6040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690632e1a7d4d90610a3c9089906004016148a6565b600060405180830381600087803b158015610a5657600080fd5b505af1158015610a6a573d6000803e3d6000fd5b50505050610a7885876124eb565b50505050505050565b60008142811015610abe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b848073ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015610b0557600080fd5b505afa158015610b19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3d919061376d565b73ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614610bc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614675565b610bcc8634876125a4565b92507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0846040518263ffffffff1660e01b81526004016000604051808303818588803b158015610c3657600080fd5b505af1158015610c4a573d6000803e3d6000fd5b50506040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016935063a9059cbb9250610cc39150899087906004016142af565b602060405180830381600087803b158015610cdd57600080fd5b505af1158015610cf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d159190613c28565b610d1b57fe5b60408051600080825260208201928390527f1e7dcc0d0000000000000000000000000000000000000000000000000000000090925273ffffffffffffffffffffffffffffffffffffffff881691631e7dcc0d91610d7f918991819060248101614165565b600060405180830381600087803b158015610d9957600080fd5b505af1158015610dad573d6000803e3d6000fd5b5050505082341115610dc557610dc5338434036124eb565b50509392505050565b60008142811015610e0b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b610e95868773ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015610e5557600080fd5b505afa158015610e69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8d919061376d565b8733886126c5565b9695505050505050565b60008342811015610edc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b60008873ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2457600080fd5b505afa158015610f38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5c919061376d565b9050610fa081898888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506123f092505050565b610fad89828a338b6126c5565b9998505050505050505050565b6000808242811015610ff8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b6110038888886125a4565b925061108e8873ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b15801561104e57600080fd5b505afa158015611062573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611086919061376d565b338a866127a5565b6040517f86b9d81f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8916906386b9d81f906110e29089908990600401614258565b602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111349190613f00565b9150509550959350505050565b844281101561117c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b6111c861118a8d600061218d565b8c8888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506128ca92505050565b6112146111d68d600161218d565b8b8886868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506128ca92505050565b6000806112248e8e8e8e8e612286565b915091506112348e83838c612987565b5050505050505050505050505050565b60008142811015611281576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b61128c8686866125a4565b91506113178673ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b1580156112d757600080fd5b505afa1580156112eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130f919061376d565b3388856127a5565b60408051600080825260208201928390527f1e7dcc0d0000000000000000000000000000000000000000000000000000000090925273ffffffffffffffffffffffffffffffffffffffff881691631e7dcc0d9161137b918891819060248101614165565b600060405180830381600087803b15801561139557600080fd5b505af11580156113a9573d6000803e3d6000fd5b5050505050949350505050565b600081428110156113f3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b848073ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b15801561143a57600080fd5b505afa15801561144e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611472919061376d565b73ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16146114f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614675565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561155e57600080fd5b505af1158015611572573d6000803e3d6000fd5b5050505050610e95867f00000000000000000000000000000000000000000000000000000000000000003430896126c5565b82428110156115df576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b60006115ea89611af6565b905060008173ffffffffffffffffffffffffffffffffffffffff16633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561163657600080fd5b505af115801561164a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061166e9190613f00565b9050600089116116aa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906145e1565b60006116f6670de0b6b3a76400006116ea7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8d018563ffffffff612c1b16565b9063ffffffff612c7816565b905061173a838b8989898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506123f092505050565b604080516080810190915260609080600281526020018d73ffffffffffffffffffffffffffffffffffffffff168152602001600060ff1681526020016040518060a001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020018e81526020018581526020018d81526020018c8152506040516020016117c39190614856565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815291525161180191906020016147f8565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f19f3400d000000000000000000000000000000000000000000000000000000008252915073ffffffffffffffffffffffffffffffffffffffff8516906319f3400d9061188590309086908690600401614223565b600060405180830381600087803b15801561189f57600080fd5b505af11580156118b3573d6000803e3d6000fd5b50505050505050505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6118f16135ee565b6118fd82840184613da7565b905060006119138260200151836040015161218d565b905073ffffffffffffffffffffffffffffffffffffffff87163014611964576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105099061445c565b3373ffffffffffffffffffffffffffffffffffffffff8216146119b3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906142e8565b6000825160028111156119c257fe5b1415611a0c576119d0613615565b82606001518060200190518101906119e89190613c93565b9050611a068360200151826000015183602001518460400151612cba565b50610a78565b600182516002811115611a1b57fe5b14156101ca57611a2961364c565b8260600151806020019051810190611a419190613cd6565b90506000611a548460200151600161218d565b82516020840151604080860151606087015191517f1e7dcc0d00000000000000000000000000000000000000000000000000000000815294955073ffffffffffffffffffffffffffffffffffffffff861694631e7dcc0d94611abd949093909291600401614165565b600060405180830381600087803b158015611ad757600080fd5b505af1158015611aeb573d6000803e3d6000fd5b505050505050610a78565b60007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000083604051602001611b4c929190613f85565b60405160208183030381529060405280519060200120604051602001611b73929190614042565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012092915050565b611bb76135ee565b611bc382840184613da7565b90506000611bd48260200151611af6565b905073ffffffffffffffffffffffffffffffffffffffff86163014611c25576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105099061445c565b3373ffffffffffffffffffffffffffffffffffffffff821614611c74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906142e8565b600282516002811115611c8357fe5b14156101ca57611c91613672565b8260600151806020019051810190611ca99190613e50565b9050610a78836020015182600001518360200151846040015185606001518660800151612f31565b505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b8142811015611d80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b611d8c868685856128ca565b604080516000815260208101918290527f1e7dcc0d0000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff871690631e7dcc0d90611df190339088908a9060248101614165565b600060405180830381600087803b158015611e0b57600080fd5b505af1158015611e1f573d6000803e3d6000fd5b50505050505050505050565b6000808242811015611e69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b868073ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015611eb057600080fd5b505afa158015611ec4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee8919061376d565b73ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1614611f6c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614675565b611f778834896125a4565b93507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b158015611fe157600080fd5b505af1158015611ff5573d6000803e3d6000fd5b50506040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016935063a9059cbb925061206e91508b9088906004016142af565b602060405180830381600087803b15801561208857600080fd5b505af115801561209c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120c09190613c28565b6120c657fe5b6040517f86b9d81f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8916906386b9d81f9061211a908a908a90600401614258565b602060405180830381600087803b15801561213457600080fd5b505af1158015612148573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061216c9190613f00565b92508334111561218257612182338534036124eb565b505094509492505050565b600060028260ff16106121cc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144f0565b7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000848460405160200161222293929190613fbf565b604051602081830303815290604052805190602001206040516020016122499291906140c3565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209392505050565b6000806000808873ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156122d257600080fd5b505afa1580156122e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061230a9190613eac565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff169150600061233c898484613200565b905087811161238a578581101561237f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614709565b8894509250826123e3565b6000612397898486613200565b9050898111156123a357fe5b878110156123dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614345565b94508793505b5050509550959350505050565b80516123fb576124e5565b600080600080848060200190518101906124159190613c48565b935093509350935060008461242a578761244c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b6040517fd505accf00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff8a169063d505accf906124ad903390309086908d908b908b908b906004016141a4565b600060405180830381600087803b1580156124c757600080fd5b505af11580156124db573d6000803e3d6000fd5b5050505050505050505b50505050565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff84169083906040516125229190614026565b60006040518083038185875af1925050503d806000811461255f576040519150601f19603f3d011682016040523d82523d6000602084013e612564565b606091505b505090508061259f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906143ff565b505050565b60008373ffffffffffffffffffffffffffffffffffffffff1663a6afed956040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156125ee57600080fd5b505af1158015612602573d6000803e3d6000fd5b50506040517f4d73e9ba0000000000000000000000000000000000000000000000000000000081526000925073ffffffffffffffffffffffffffffffffffffffff87169150634d73e9ba9061265b908690600401614144565b60206040518083038186803b15801561267357600080fd5b505afa158015612687573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126ab9190613f00565b90508084106126ba57806126bc565b835b95945050505050565b600073ffffffffffffffffffffffffffffffffffffffff83163014156126f5576126f08587866132a2565b612701565b612701858488876127a5565b6040517f6a62784200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871690636a62784290612753908590600401614144565b602060405180830381600087803b15801561276d57600080fd5b505af1158015612781573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e959190613f00565b600060608573ffffffffffffffffffffffffffffffffffffffff166323b872dd8686866040516024016127da939291906141f2565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516128289190614026565b6000604051808303816000865af19150503d8060008114612865576040519150601f19603f3d011682016040523d82523d6000602084013e61286a565b606091505b50915091508180156128945750805115806128945750808060200190518101906128949190613c28565b611cd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906143a2565b80516128d5576124e5565b600080600080848060200190518101906128ef9190613c48565b93509350935093506000846129045787612926565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b6040517f9e79b55c00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff8a1690639e79b55c906124ad903390309086908d908b908b908b906004016141a4565b600061299485600061218d565b905060606040518060800160405280600060028111156129b057fe5b81526020018773ffffffffffffffffffffffffffffffffffffffff168152602001600160ff16815260200160405180606001604052808881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff16815250604051602001612a1c9190614766565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152915251612a5a91906020016147f8565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815260808301909152915060609080600181526020018873ffffffffffffffffffffffffffffffffffffffff168152602001600060ff16815260200160405180608001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff16815260200188815260200185815250604051602001612b1c919061479d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152915251612b5a91906020016147f8565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f1e7dcc0d000000000000000000000000000000000000000000000000000000008252915073ffffffffffffffffffffffffffffffffffffffff841690631e7dcc0d90612be090339030908b908790600401614165565b600060405180830381600087803b158015612bfa57600080fd5b505af1158015612c0e573d6000803e3d6000fd5b5050505050505050505050565b600082612c2a57506000612c72565b82820282848281612c3757fe5b0414612c6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614584565b90505b92915050565b6000612c6f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506133cc565b6000806000612cc88761049c565b925092509250612d568273ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015612d1757600080fd5b505afa158015612d2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d4f919061376d565b88886132a2565b612dde8173ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015612d9f57600080fd5b505afa158015612db3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dd7919061376d565b88876132a2565b6040517f6a62784200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff881690636a62784290612e30908690600401614144565b602060405180830381600087803b158015612e4a57600080fd5b505af1158015612e5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e829190613f00565b506040517f6a62784200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841690636a62784290612ed5908790600401614144565b602060405180830381600087803b158015612eef57600080fd5b505af1158015612f03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f279190613f00565b5050505050505050565b6000806000612f3f8961049c565b92509250925060008273ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015612f8d57600080fd5b505afa158015612fa1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fc5919061376d565b905060008273ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b15801561300f57600080fd5b505afa158015613023573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613047919061376d565b90506130548b8c8a6132a2565b6000808c73ffffffffffffffffffffffffffffffffffffffff166389afcb44306040518263ffffffff1660e01b81526004016130909190614144565b6040805180830381600087803b1580156130a957600080fd5b505af11580156130bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130e19190613f18565b915091508882101561311f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614345565b87811015613159576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614709565b61316586858e8561341d565b61317185848e8461341d565b8673ffffffffffffffffffffffffffffffffffffffff166323b872dd8d898e6040518463ffffffff1660e01b81526004016131ae939291906141f2565b602060405180830381600087803b1580156131c857600080fd5b505af11580156131dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112349190613c28565b600080841161323b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614618565b60008311801561324b5750600082115b613281576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614527565b82613292858463ffffffff612c1b16565b8161329957fe5b04949350505050565b600060608473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040516024016132d59291906142af565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516133239190614026565b6000604051808303816000865af19150503d8060008114613360576040519150601f19603f3d011682016040523d82523d6000602084013e613365565b606091505b509150915081801561338f57508051158061338f57508080602001905181019061338f9190613c28565b6133c5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906146ac565b5050505050565b60008183613407576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050991906142d5565b50600083858161341357fe5b0495945050505050565b600061342a8583856125a4565b90506134378486836132a2565b60408051600080825260208201928390527f1e7dcc0d0000000000000000000000000000000000000000000000000000000090925273ffffffffffffffffffffffffffffffffffffffff871691631e7dcc0d9161349b918791819060248101614165565b600060405180830381600087803b1580156134b557600080fd5b505af11580156134c9573d6000803e3d6000fd5b50505050808211156133c557600081830390507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156135e3576040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690632e1a7d4d906135a29084906004016148a6565b600060405180830381600087803b1580156135bc57600080fd5b505af11580156135d0573d6000803e3d6000fd5b505050506135de84826124eb565b611cd1565b611cd18585836132a2565b60408051608081019091528060008152600060208201819052604082015260609081015290565b60405180606001604052806000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b604080516080810182526000808252602082018190529181019190915260608082015290565b6040518060a00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001600081525090565b60008083601f8401126136c8578182fd5b50813567ffffffffffffffff8111156136df578182fd5b6020830191508360208285010111156136f757600080fd5b9250929050565b600082601f83011261370e578081fd5b813561372161371c826148e4565b6148bd565b915080825283602082850101111561373857600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215613762578081fd5b8135612c6f81614952565b60006020828403121561377e578081fd5b8151612c6f81614952565b6000806000806080858703121561379e578283fd5b84356137a981614952565b935060208501356137b981614952565b925060408501356137c981614952565b9396929550929360600135925050565b6000806000606084860312156137ed578283fd5b83356137f881614952565b9250602084013561380881614952565b929592945050506040919091013590565b600080600080600060808688031215613830578081fd5b853561383b81614952565b9450602086013561384b81614952565b935060408601359250606086013567ffffffffffffffff81111561386d578182fd5b613879888289016136b7565b969995985093965092949392505050565b600080600080600060a086880312156138a1578283fd5b85356138ac81614952565b94506020860135935060408601356138c381614952565b925060608601356138d381614952565b949793965091946080013592915050565b600080600080608085870312156138f9578182fd5b843561390481614952565b93506020850135925060408501356137c981614952565b60008060008060008060a08789031215613933578384fd5b863561393e81614952565b955060208701359450604087013561395581614952565b935060608701359250608087013567ffffffffffffffff811115613977578182fd5b61398389828a016136b7565b979a9699509497509295939492505050565b600080600080600060a086880312156139ac578283fd5b85356139b781614952565b94506020860135935060408601356139ce81614952565b925060608601359150608086013567ffffffffffffffff8111156139f0578182fd5b6139fc888289016136fe565b9150509295509295909350565b60008060008060608587031215613a1e578182fd5b8435613a2981614952565b935060208501359250604085013567ffffffffffffffff811115613a4b578283fd5b613a57878288016136b7565b95989497509550505050565b600080600080600060a08688031215613a7a578283fd5b8535613a8581614952565b97602087013597506040870135966060810135965060800135945092505050565b60008060008060008060008060008060006101208c8e031215613ac7578889fd5b613ad18c35614952565b8b359a5060208c0135995060408c0135985060608c0135975060808c01359650613afe60a08d0135614952565b60a08c0135955060c08c0135945067ffffffffffffffff8060e08e01351115613b25578485fd5b613b358e60e08f01358f016136b7565b90955093506101008d0135811015613b4b578283fd5b50613b5d8d6101008e01358e016136b7565b81935080925050509295989b509295989b9093969950565b600080600080600080600060c0888a031215613b8f578081fd5b8735613b9a81614952565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff811115613bd1578182fd5b613bdd8a828b016136b7565b989b979a50959850939692959293505050565b60008060408385031215613c02578182fd5b8235613c0d81614952565b91506020830135613c1d81614993565b809150509250929050565b600060208284031215613c39578081fd5b81518015158114612c6f578182fd5b60008060008060808587031215613c5d578182fd5b84518015158114613c6c578283fd5b6020860151909450613c7d81614993565b6040860151606090960151949790965092505050565b600060608284031215613ca4578081fd5b613cae60606148bd565b82518152602083015160208201526040830151613cca81614952565b60408201529392505050565b60006020808385031215613ce8578182fd5b825167ffffffffffffffff80821115613cff578384fd5b81850160808188031215613d11578485fd5b613d1b60806148bd565b92508051613d2881614952565b835280840151613d3781614952565b8385015260408181015190840152606081015182811115613d56578586fd5b019050601f81018613613d67578384fd5b8051613d7561371c826148e4565b8181528785838501011115613d88578586fd5b613d9782868301878601614926565b6060840152509095945050505050565b600060208284031215613db8578081fd5b813567ffffffffffffffff80821115613dcf578283fd5b81840160808187031215613de1578384fd5b613deb60806148bd565b9250803560038110613dfb578485fd5b83526020810135613e0b81614952565b60208401526040810135613e1e81614993565b6040840152606081013582811115613e34578485fd5b613e40878284016136fe565b6060850152509195945050505050565b600060a08284031215613e61578081fd5b613e6b60a06148bd565b8251613e7681614952565b80825250602083015160208201526040830151604082015260608301516060820152608083015160808201528091505092915050565b600080600060608486031215613ec0578081fd5b8351613ecb81614977565b6020850151909350613edc81614977565b604085015190925063ffffffff81168114613ef5578182fd5b809150509250925092565b600060208284031215613f11578081fd5b5051919050565b60008060408385031215613f2a578182fd5b505080516020909101519092909150565b60008151808452613f53816020860160208601614926565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606093841b811682529190921b16601482015260280190565b606093841b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000090811682529290931b909116601483015260f81b7fff0000000000000000000000000000000000000000000000000000000000000016602882015260290190565b60008251614038818460208701614926565b9190910192915050565b7fff00000000000000000000000000000000000000000000000000000000000000815260609290921b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600183015260158201527f4b8788d8761647e6330407671d3c6c80afaed3d047800dba0e0e3befde047767603582015260550190565b7fff00000000000000000000000000000000000000000000000000000000000000815260609290921b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600183015260158201527f605ba1db56496978613939baf0ae31dccceea3f5ca53dfaa76512bc880d7bb8f603582015260550190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152610e956080830184613f3b565b73ffffffffffffffffffffffffffffffffffffffff97881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b600073ffffffffffffffffffffffffffffffffffffffff85168252836020830152606060408301526126bc6060830184613f3b565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff93841681529183166020830152909116604082015260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b600060208252612c6f6020830184613f3b565b60208082526023908201527f496d7065726d6178526f757465723a20554e415554484f52495a45445f43414c60408201527f4c45520000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f496d7065726d6178526f757465723a20494e53554646494349454e545f415f4160408201527f4d4f554e54000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526031908201527f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a20747260408201527f616e7366657246726f6d206661696c6564000000000000000000000000000000606082015260800190565b60208082526034908201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60408201527f20455448207472616e73666572206661696c6564000000000000000000000000606082015260800190565b60208082526021908201527f496d7065726d6178526f757465723a2053454e4445525f4e4f545f524f55544560408201527f5200000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526017908201527f496d7065726d6178526f757465723a2045585049524544000000000000000000604082015260600190565b6020808252601e908201527f496d7065726d6178526f757465723a20494e4445585f544f4f5f484947480000604082015260600190565b60208082526028908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c60408201527f4951554944495459000000000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f496d7065726d6178526f757465723a2052454445454d5f5a45524f0000000000604082015260600190565b60208082526025908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4160408201527f4d4f554e54000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526018908201527f496d7065726d6178526f757465723a204e4f545f574554480000000000000000604082015260600190565b6020808252602d908201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260408201527f616e73666572206661696c656400000000000000000000000000000000000000606082015260800190565b60208082526025908201527f496d7065726d6178526f757465723a20494e53554646494349454e545f425f4160408201527f4d4f554e54000000000000000000000000000000000000000000000000000000606082015260800190565b815181526020808301519082015260409182015173ffffffffffffffffffffffffffffffffffffffff169181019190915260600190565b60006020825273ffffffffffffffffffffffffffffffffffffffff808451166020840152806020850151166040840152506040830151606083015260608301516080808401526147f060a0840182613f3b565b949350505050565b60006020825282516003811061480a57fe5b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015260ff604084015116606083015260608301516080808401526147f060a0840182613f3b565b600060a08201905073ffffffffffffffffffffffffffffffffffffffff83511682526020830151602083015260408301516040830152606083015160608301526080830151608083015292915050565b90815260200190565b918252602082015260400190565b60405181810167ffffffffffffffff811182821017156148dc57600080fd5b604052919050565b600067ffffffffffffffff8211156148fa578081fd5b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b83811015614941578181015183820152602001614929565b838111156124e55750506000910152565b73ffffffffffffffffffffffffffffffffffffffff8116811461497457600080fd5b50565b6dffffffffffffffffffffffffffff8116811461497457600080fd5b60ff8116811461497457600080fdfea2646970667358221220dc36b116a0ee76dda6fadfb9130c6cb73f32546c556db01ff72475062572f4d964736f6c634300060600330000000000000000000000008c3736e2fe63cc2cd89ee228d9dbcab6ce5b767b00000000000000000000000031864bc58a47a4fc8782b4135873788e876de9eb000000000000000000000000c12e00de204d58ead5b5ce9054e94aee7747fb6c000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

Deployed Bytecode

0x6080604052600436106101845760003560e01c806377370d62116100d6578063c45a01551161007f578063eb03419a11610059578063eb03419a14610449578063ef974e9c1461045c578063fcb2a8951461047c576101ca565b8063c45a0155146103ff578063db5a269014610414578063dbe5f2fb14610429576101ca565b80639b56d6c9116100b05780639b56d6c9146103aa578063acb86cbb146103ca578063ad5c4648146103ea576101ca565b806377370d62146103485780637a4660d514610368578063876d9d9e1461038a576101ca565b80633c173a4f1161013857806367bf252f1161011257806367bf252f146102f55780636aee7c1e14610315578063703de94c14610335576101ca565b80633c173a4f1461028757806343e26448146102a75780635c1e6404146102c7576101ca565b80632b005cfc116101695780632b005cfc146102345780632c3445041461025457806335bb105914610274576101ca565b80630572bf5f146101cf5780631f1cc5bc14610207576101ca565b366101ca573373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216146101c857fe5b005b600080fd5b3480156101db57600080fd5b506101ef6101ea366004613751565b61049c565b6040516101fe9392919061427f565b60405180910390f35b34801561021357600080fd5b50610227610222366004613995565b6104cc565b6040516101fe91906148a6565b34801561024057600080fd5b5061022761024f366004613995565b610676565b34801561026057600080fd5b506101c861026f366004613995565b61087f565b6102276102823660046137d9565b610a81565b34801561029357600080fd5b506102276102a23660046138e4565b610dce565b3480156102b357600080fd5b506102276102c236600461391b565b610e9f565b3480156102d357600080fd5b506102e76102e236600461388a565b610fba565b6040516101fe9291906148af565b34801561030157600080fd5b506101c8610310366004613aa6565b611141565b34801561032157600080fd5b506102276103303660046138e4565b611244565b6102276103433660046137d9565b6113b6565b34801561035457600080fd5b506101c8610363366004613b75565b6115a4565b34801561037457600080fd5b5061037d6118c5565b6040516101fe9190614144565b34801561039657600080fd5b506101c86103a5366004613819565b6118e9565b3480156103b657600080fd5b5061037d6103c5366004613751565b611af6565b3480156103d657600080fd5b506101c86103e5366004613a09565b611baf565b3480156103f657600080fd5b5061037d611cd9565b34801561040b57600080fd5b5061037d611cfd565b34801561042057600080fd5b5061037d611d21565b34801561043557600080fd5b506101c8610444366004613995565b611d45565b6102e7610457366004613789565b611e2b565b34801561046857600080fd5b5061037d610477366004613bf0565b61218d565b34801561048857600080fd5b506102e7610497366004613a63565b612286565b60008060006104aa84611af6565b92506104b784600061218d565b91506104c484600161218d565b929491935050565b60008242811015610512576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b60405180910390fd5b61051e878786866123f0565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8816906323b872dd906105749033908b908b906004016141f2565b602060405180830381600087803b15801561058e57600080fd5b505af11580156105a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c69190613c28565b506040517f95a2251f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8816906395a2251f90610619908890600401614144565b602060405180830381600087803b15801561063357600080fd5b505af1158015610647573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066b9190613f00565b979650505050505050565b600082428110156106b3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b868073ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b1580156106fa57600080fd5b505afa15801561070e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610732919061376d565b73ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16146107b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614675565b6107c388883088886104cc565b6040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815290935073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21690632e1a7d4d906108389086906004016148a6565b600060405180830381600087803b15801561085257600080fd5b505af1158015610866573d6000803e3d6000fd5b5050505061087486846124eb565b505095945050505050565b81428110156108ba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b858073ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b15801561090157600080fd5b505afa158015610915573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610939919061376d565b73ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16146109bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614675565b6109ca8787308787611d45565b6040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21690632e1a7d4d90610a3c9089906004016148a6565b600060405180830381600087803b158015610a5657600080fd5b505af1158015610a6a573d6000803e3d6000fd5b50505050610a7885876124eb565b50505050505050565b60008142811015610abe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b848073ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015610b0557600080fd5b505afa158015610b19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3d919061376d565b73ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1614610bc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614675565b610bcc8634876125a4565b92507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1663d0e30db0846040518263ffffffff1660e01b81526004016000604051808303818588803b158015610c3657600080fd5b505af1158015610c4a573d6000803e3d6000fd5b50506040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216935063a9059cbb9250610cc39150899087906004016142af565b602060405180830381600087803b158015610cdd57600080fd5b505af1158015610cf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d159190613c28565b610d1b57fe5b60408051600080825260208201928390527f1e7dcc0d0000000000000000000000000000000000000000000000000000000090925273ffffffffffffffffffffffffffffffffffffffff881691631e7dcc0d91610d7f918991819060248101614165565b600060405180830381600087803b158015610d9957600080fd5b505af1158015610dad573d6000803e3d6000fd5b5050505082341115610dc557610dc5338434036124eb565b50509392505050565b60008142811015610e0b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b610e95868773ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015610e5557600080fd5b505afa158015610e69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8d919061376d565b8733886126c5565b9695505050505050565b60008342811015610edc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b60008873ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2457600080fd5b505afa158015610f38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5c919061376d565b9050610fa081898888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506123f092505050565b610fad89828a338b6126c5565b9998505050505050505050565b6000808242811015610ff8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b6110038888886125a4565b925061108e8873ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b15801561104e57600080fd5b505afa158015611062573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611086919061376d565b338a866127a5565b6040517f86b9d81f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8916906386b9d81f906110e29089908990600401614258565b602060405180830381600087803b1580156110fc57600080fd5b505af1158015611110573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111349190613f00565b9150509550959350505050565b844281101561117c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b6111c861118a8d600061218d565b8c8888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506128ca92505050565b6112146111d68d600161218d565b8b8886868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506128ca92505050565b6000806112248e8e8e8e8e612286565b915091506112348e83838c612987565b5050505050505050505050505050565b60008142811015611281576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b61128c8686866125a4565b91506113178673ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b1580156112d757600080fd5b505afa1580156112eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130f919061376d565b3388856127a5565b60408051600080825260208201928390527f1e7dcc0d0000000000000000000000000000000000000000000000000000000090925273ffffffffffffffffffffffffffffffffffffffff881691631e7dcc0d9161137b918891819060248101614165565b600060405180830381600087803b15801561139557600080fd5b505af11580156113a9573d6000803e3d6000fd5b5050505050949350505050565b600081428110156113f3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b848073ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b15801561143a57600080fd5b505afa15801561144e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611472919061376d565b73ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16146114f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614675565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561155e57600080fd5b505af1158015611572573d6000803e3d6000fd5b5050505050610e95867f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc23430896126c5565b82428110156115df576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b60006115ea89611af6565b905060008173ffffffffffffffffffffffffffffffffffffffff16633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561163657600080fd5b505af115801561164a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061166e9190613f00565b9050600089116116aa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906145e1565b60006116f6670de0b6b3a76400006116ea7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8d018563ffffffff612c1b16565b9063ffffffff612c7816565b905061173a838b8989898080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506123f092505050565b604080516080810190915260609080600281526020018d73ffffffffffffffffffffffffffffffffffffffff168152602001600060ff1681526020016040518060a001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020018e81526020018581526020018d81526020018c8152506040516020016117c39190614856565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815291525161180191906020016147f8565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f19f3400d000000000000000000000000000000000000000000000000000000008252915073ffffffffffffffffffffffffffffffffffffffff8516906319f3400d9061188590309086908690600401614223565b600060405180830381600087803b15801561189f57600080fd5b505af11580156118b3573d6000803e3d6000fd5b50505050505050505050505050505050565b7f000000000000000000000000c12e00de204d58ead5b5ce9054e94aee7747fb6c81565b6118f16135ee565b6118fd82840184613da7565b905060006119138260200151836040015161218d565b905073ffffffffffffffffffffffffffffffffffffffff87163014611964576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105099061445c565b3373ffffffffffffffffffffffffffffffffffffffff8216146119b3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906142e8565b6000825160028111156119c257fe5b1415611a0c576119d0613615565b82606001518060200190518101906119e89190613c93565b9050611a068360200151826000015183602001518460400151612cba565b50610a78565b600182516002811115611a1b57fe5b14156101ca57611a2961364c565b8260600151806020019051810190611a419190613cd6565b90506000611a548460200151600161218d565b82516020840151604080860151606087015191517f1e7dcc0d00000000000000000000000000000000000000000000000000000000815294955073ffffffffffffffffffffffffffffffffffffffff861694631e7dcc0d94611abd949093909291600401614165565b600060405180830381600087803b158015611ad757600080fd5b505af1158015611aeb573d6000803e3d6000fd5b505050505050610a78565b60007f000000000000000000000000c12e00de204d58ead5b5ce9054e94aee7747fb6c7f0000000000000000000000008c3736e2fe63cc2cd89ee228d9dbcab6ce5b767b83604051602001611b4c929190613f85565b60405160208183030381529060405280519060200120604051602001611b73929190614042565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012092915050565b611bb76135ee565b611bc382840184613da7565b90506000611bd48260200151611af6565b905073ffffffffffffffffffffffffffffffffffffffff86163014611c25576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105099061445c565b3373ffffffffffffffffffffffffffffffffffffffff821614611c74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906142e8565b600282516002811115611c8357fe5b14156101ca57611c91613672565b8260600151806020019051810190611ca99190613e50565b9050610a78836020015182600001518360200151846040015185606001518660800151612f31565b505050505050565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b7f0000000000000000000000008c3736e2fe63cc2cd89ee228d9dbcab6ce5b767b81565b7f00000000000000000000000031864bc58a47a4fc8782b4135873788e876de9eb81565b8142811015611d80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b611d8c868685856128ca565b604080516000815260208101918290527f1e7dcc0d0000000000000000000000000000000000000000000000000000000090915273ffffffffffffffffffffffffffffffffffffffff871690631e7dcc0d90611df190339088908a9060248101614165565b600060405180830381600087803b158015611e0b57600080fd5b505af1158015611e1f573d6000803e3d6000fd5b50505050505050505050565b6000808242811015611e69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144b9565b868073ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015611eb057600080fd5b505afa158015611ec4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee8919061376d565b73ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1614611f6c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614675565b611f778834896125a4565b93507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b158015611fe157600080fd5b505af1158015611ff5573d6000803e3d6000fd5b50506040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216935063a9059cbb925061206e91508b9088906004016142af565b602060405180830381600087803b15801561208857600080fd5b505af115801561209c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120c09190613c28565b6120c657fe5b6040517f86b9d81f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8916906386b9d81f9061211a908a908a90600401614258565b602060405180830381600087803b15801561213457600080fd5b505af1158015612148573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061216c9190613f00565b92508334111561218257612182338534036124eb565b505094509492505050565b600060028260ff16106121cc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906144f0565b7f00000000000000000000000031864bc58a47a4fc8782b4135873788e876de9eb7f0000000000000000000000008c3736e2fe63cc2cd89ee228d9dbcab6ce5b767b848460405160200161222293929190613fbf565b604051602081830303815290604052805190602001206040516020016122499291906140c3565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209392505050565b6000806000808873ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156122d257600080fd5b505afa1580156122e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061230a9190613eac565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff169150600061233c898484613200565b905087811161238a578581101561237f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614709565b8894509250826123e3565b6000612397898486613200565b9050898111156123a357fe5b878110156123dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614345565b94508793505b5050509550959350505050565b80516123fb576124e5565b600080600080848060200190518101906124159190613c48565b935093509350935060008461242a578761244c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b6040517fd505accf00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff8a169063d505accf906124ad903390309086908d908b908b908b906004016141a4565b600060405180830381600087803b1580156124c757600080fd5b505af11580156124db573d6000803e3d6000fd5b5050505050505050505b50505050565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff84169083906040516125229190614026565b60006040518083038185875af1925050503d806000811461255f576040519150601f19603f3d011682016040523d82523d6000602084013e612564565b606091505b505090508061259f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906143ff565b505050565b60008373ffffffffffffffffffffffffffffffffffffffff1663a6afed956040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156125ee57600080fd5b505af1158015612602573d6000803e3d6000fd5b50506040517f4d73e9ba0000000000000000000000000000000000000000000000000000000081526000925073ffffffffffffffffffffffffffffffffffffffff87169150634d73e9ba9061265b908690600401614144565b60206040518083038186803b15801561267357600080fd5b505afa158015612687573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126ab9190613f00565b90508084106126ba57806126bc565b835b95945050505050565b600073ffffffffffffffffffffffffffffffffffffffff83163014156126f5576126f08587866132a2565b612701565b612701858488876127a5565b6040517f6a62784200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871690636a62784290612753908590600401614144565b602060405180830381600087803b15801561276d57600080fd5b505af1158015612781573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e959190613f00565b600060608573ffffffffffffffffffffffffffffffffffffffff166323b872dd8686866040516024016127da939291906141f2565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516128289190614026565b6000604051808303816000865af19150503d8060008114612865576040519150601f19603f3d011682016040523d82523d6000602084013e61286a565b606091505b50915091508180156128945750805115806128945750808060200190518101906128949190613c28565b611cd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906143a2565b80516128d5576124e5565b600080600080848060200190518101906128ef9190613c48565b93509350935093506000846129045787612926565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b6040517f9e79b55c00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff8a1690639e79b55c906124ad903390309086908d908b908b908b906004016141a4565b600061299485600061218d565b905060606040518060800160405280600060028111156129b057fe5b81526020018773ffffffffffffffffffffffffffffffffffffffff168152602001600160ff16815260200160405180606001604052808881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff16815250604051602001612a1c9190614766565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152915251612a5a91906020016147f8565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815260808301909152915060609080600181526020018873ffffffffffffffffffffffffffffffffffffffff168152602001600060ff16815260200160405180608001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff16815260200188815260200185815250604051602001612b1c919061479d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152915251612b5a91906020016147f8565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f1e7dcc0d000000000000000000000000000000000000000000000000000000008252915073ffffffffffffffffffffffffffffffffffffffff841690631e7dcc0d90612be090339030908b908790600401614165565b600060405180830381600087803b158015612bfa57600080fd5b505af1158015612c0e573d6000803e3d6000fd5b5050505050505050505050565b600082612c2a57506000612c72565b82820282848281612c3757fe5b0414612c6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614584565b90505b92915050565b6000612c6f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506133cc565b6000806000612cc88761049c565b925092509250612d568273ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015612d1757600080fd5b505afa158015612d2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d4f919061376d565b88886132a2565b612dde8173ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015612d9f57600080fd5b505afa158015612db3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dd7919061376d565b88876132a2565b6040517f6a62784200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff881690636a62784290612e30908690600401614144565b602060405180830381600087803b158015612e4a57600080fd5b505af1158015612e5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e829190613f00565b506040517f6a62784200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841690636a62784290612ed5908790600401614144565b602060405180830381600087803b158015612eef57600080fd5b505af1158015612f03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f279190613f00565b5050505050505050565b6000806000612f3f8961049c565b92509250925060008273ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015612f8d57600080fd5b505afa158015612fa1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fc5919061376d565b905060008273ffffffffffffffffffffffffffffffffffffffff16636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b15801561300f57600080fd5b505afa158015613023573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613047919061376d565b90506130548b8c8a6132a2565b6000808c73ffffffffffffffffffffffffffffffffffffffff166389afcb44306040518263ffffffff1660e01b81526004016130909190614144565b6040805180830381600087803b1580156130a957600080fd5b505af11580156130bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130e19190613f18565b915091508882101561311f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614345565b87811015613159576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614709565b61316586858e8561341d565b61317185848e8461341d565b8673ffffffffffffffffffffffffffffffffffffffff166323b872dd8d898e6040518463ffffffff1660e01b81526004016131ae939291906141f2565b602060405180830381600087803b1580156131c857600080fd5b505af11580156131dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112349190613c28565b600080841161323b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614618565b60008311801561324b5750600082115b613281576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050990614527565b82613292858463ffffffff612c1b16565b8161329957fe5b04949350505050565b600060608473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040516024016132d59291906142af565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516133239190614026565b6000604051808303816000865af19150503d8060008114613360576040519150601f19603f3d011682016040523d82523d6000602084013e613365565b606091505b509150915081801561338f57508051158061338f57508080602001905181019061338f9190613c28565b6133c5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610509906146ac565b5050505050565b60008183613407576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050991906142d5565b50600083858161341357fe5b0495945050505050565b600061342a8583856125a4565b90506134378486836132a2565b60408051600080825260208201928390527f1e7dcc0d0000000000000000000000000000000000000000000000000000000090925273ffffffffffffffffffffffffffffffffffffffff871691631e7dcc0d9161349b918791819060248101614165565b600060405180830381600087803b1580156134b557600080fd5b505af11580156134c9573d6000803e3d6000fd5b50505050808211156133c557600081830390507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156135e3576040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21690632e1a7d4d906135a29084906004016148a6565b600060405180830381600087803b1580156135bc57600080fd5b505af11580156135d0573d6000803e3d6000fd5b505050506135de84826124eb565b611cd1565b611cd18585836132a2565b60408051608081019091528060008152600060208201819052604082015260609081015290565b60405180606001604052806000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b604080516080810182526000808252602082018190529181019190915260608082015290565b6040518060a00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001600081525090565b60008083601f8401126136c8578182fd5b50813567ffffffffffffffff8111156136df578182fd5b6020830191508360208285010111156136f757600080fd5b9250929050565b600082601f83011261370e578081fd5b813561372161371c826148e4565b6148bd565b915080825283602082850101111561373857600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215613762578081fd5b8135612c6f81614952565b60006020828403121561377e578081fd5b8151612c6f81614952565b6000806000806080858703121561379e578283fd5b84356137a981614952565b935060208501356137b981614952565b925060408501356137c981614952565b9396929550929360600135925050565b6000806000606084860312156137ed578283fd5b83356137f881614952565b9250602084013561380881614952565b929592945050506040919091013590565b600080600080600060808688031215613830578081fd5b853561383b81614952565b9450602086013561384b81614952565b935060408601359250606086013567ffffffffffffffff81111561386d578182fd5b613879888289016136b7565b969995985093965092949392505050565b600080600080600060a086880312156138a1578283fd5b85356138ac81614952565b94506020860135935060408601356138c381614952565b925060608601356138d381614952565b949793965091946080013592915050565b600080600080608085870312156138f9578182fd5b843561390481614952565b93506020850135925060408501356137c981614952565b60008060008060008060a08789031215613933578384fd5b863561393e81614952565b955060208701359450604087013561395581614952565b935060608701359250608087013567ffffffffffffffff811115613977578182fd5b61398389828a016136b7565b979a9699509497509295939492505050565b600080600080600060a086880312156139ac578283fd5b85356139b781614952565b94506020860135935060408601356139ce81614952565b925060608601359150608086013567ffffffffffffffff8111156139f0578182fd5b6139fc888289016136fe565b9150509295509295909350565b60008060008060608587031215613a1e578182fd5b8435613a2981614952565b935060208501359250604085013567ffffffffffffffff811115613a4b578283fd5b613a57878288016136b7565b95989497509550505050565b600080600080600060a08688031215613a7a578283fd5b8535613a8581614952565b97602087013597506040870135966060810135965060800135945092505050565b60008060008060008060008060008060006101208c8e031215613ac7578889fd5b613ad18c35614952565b8b359a5060208c0135995060408c0135985060608c0135975060808c01359650613afe60a08d0135614952565b60a08c0135955060c08c0135945067ffffffffffffffff8060e08e01351115613b25578485fd5b613b358e60e08f01358f016136b7565b90955093506101008d0135811015613b4b578283fd5b50613b5d8d6101008e01358e016136b7565b81935080925050509295989b509295989b9093969950565b600080600080600080600060c0888a031215613b8f578081fd5b8735613b9a81614952565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff811115613bd1578182fd5b613bdd8a828b016136b7565b989b979a50959850939692959293505050565b60008060408385031215613c02578182fd5b8235613c0d81614952565b91506020830135613c1d81614993565b809150509250929050565b600060208284031215613c39578081fd5b81518015158114612c6f578182fd5b60008060008060808587031215613c5d578182fd5b84518015158114613c6c578283fd5b6020860151909450613c7d81614993565b6040860151606090960151949790965092505050565b600060608284031215613ca4578081fd5b613cae60606148bd565b82518152602083015160208201526040830151613cca81614952565b60408201529392505050565b60006020808385031215613ce8578182fd5b825167ffffffffffffffff80821115613cff578384fd5b81850160808188031215613d11578485fd5b613d1b60806148bd565b92508051613d2881614952565b835280840151613d3781614952565b8385015260408181015190840152606081015182811115613d56578586fd5b019050601f81018613613d67578384fd5b8051613d7561371c826148e4565b8181528785838501011115613d88578586fd5b613d9782868301878601614926565b6060840152509095945050505050565b600060208284031215613db8578081fd5b813567ffffffffffffffff80821115613dcf578283fd5b81840160808187031215613de1578384fd5b613deb60806148bd565b9250803560038110613dfb578485fd5b83526020810135613e0b81614952565b60208401526040810135613e1e81614993565b6040840152606081013582811115613e34578485fd5b613e40878284016136fe565b6060850152509195945050505050565b600060a08284031215613e61578081fd5b613e6b60a06148bd565b8251613e7681614952565b80825250602083015160208201526040830151604082015260608301516060820152608083015160808201528091505092915050565b600080600060608486031215613ec0578081fd5b8351613ecb81614977565b6020850151909350613edc81614977565b604085015190925063ffffffff81168114613ef5578182fd5b809150509250925092565b600060208284031215613f11578081fd5b5051919050565b60008060408385031215613f2a578182fd5b505080516020909101519092909150565b60008151808452613f53816020860160208601614926565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606093841b811682529190921b16601482015260280190565b606093841b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000090811682529290931b909116601483015260f81b7fff0000000000000000000000000000000000000000000000000000000000000016602882015260290190565b60008251614038818460208701614926565b9190910192915050565b7fff00000000000000000000000000000000000000000000000000000000000000815260609290921b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600183015260158201527f4b8788d8761647e6330407671d3c6c80afaed3d047800dba0e0e3befde047767603582015260550190565b7fff00000000000000000000000000000000000000000000000000000000000000815260609290921b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016600183015260158201527f605ba1db56496978613939baf0ae31dccceea3f5ca53dfaa76512bc880d7bb8f603582015260550190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152610e956080830184613f3b565b73ffffffffffffffffffffffffffffffffffffffff97881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b600073ffffffffffffffffffffffffffffffffffffffff85168252836020830152606060408301526126bc6060830184613f3b565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff93841681529183166020830152909116604082015260600190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b600060208252612c6f6020830184613f3b565b60208082526023908201527f496d7065726d6178526f757465723a20554e415554484f52495a45445f43414c60408201527f4c45520000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f496d7065726d6178526f757465723a20494e53554646494349454e545f415f4160408201527f4d4f554e54000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526031908201527f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a20747260408201527f616e7366657246726f6d206661696c6564000000000000000000000000000000606082015260800190565b60208082526034908201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60408201527f20455448207472616e73666572206661696c6564000000000000000000000000606082015260800190565b60208082526021908201527f496d7065726d6178526f757465723a2053454e4445525f4e4f545f524f55544560408201527f5200000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526017908201527f496d7065726d6178526f757465723a2045585049524544000000000000000000604082015260600190565b6020808252601e908201527f496d7065726d6178526f757465723a20494e4445585f544f4f5f484947480000604082015260600190565b60208082526028908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c60408201527f4951554944495459000000000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f496d7065726d6178526f757465723a2052454445454d5f5a45524f0000000000604082015260600190565b60208082526025908201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4160408201527f4d4f554e54000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526018908201527f496d7065726d6178526f757465723a204e4f545f574554480000000000000000604082015260600190565b6020808252602d908201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260408201527f616e73666572206661696c656400000000000000000000000000000000000000606082015260800190565b60208082526025908201527f496d7065726d6178526f757465723a20494e53554646494349454e545f425f4160408201527f4d4f554e54000000000000000000000000000000000000000000000000000000606082015260800190565b815181526020808301519082015260409182015173ffffffffffffffffffffffffffffffffffffffff169181019190915260600190565b60006020825273ffffffffffffffffffffffffffffffffffffffff808451166020840152806020850151166040840152506040830151606083015260608301516080808401526147f060a0840182613f3b565b949350505050565b60006020825282516003811061480a57fe5b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015260ff604084015116606083015260608301516080808401526147f060a0840182613f3b565b600060a08201905073ffffffffffffffffffffffffffffffffffffffff83511682526020830151602083015260408301516040830152606083015160608301526080830151608083015292915050565b90815260200190565b918252602082015260400190565b60405181810167ffffffffffffffff811182821017156148dc57600080fd5b604052919050565b600067ffffffffffffffff8211156148fa578081fd5b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60005b83811015614941578181015183820152602001614929565b838111156124e55750506000910152565b73ffffffffffffffffffffffffffffffffffffffff8116811461497457600080fd5b50565b6dffffffffffffffffffffffffffff8116811461497457600080fd5b60ff8116811461497457600080fdfea2646970667358221220dc36b116a0ee76dda6fadfb9130c6cb73f32546c556db01ff72475062572f4d964736f6c63430006060033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000008c3736e2fe63cc2cd89ee228d9dbcab6ce5b767b00000000000000000000000031864bc58a47a4fc8782b4135873788e876de9eb000000000000000000000000c12e00de204d58ead5b5ce9054e94aee7747fb6c000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

-----Decoded View---------------
Arg [0] : _factory (address): 0x8C3736e2FE63cc2cD89Ee228D9dBcAb6CE5B767B
Arg [1] : _bDeployer (address): 0x31864bc58A47A4Fc8782B4135873788E876dE9eB
Arg [2] : _cDeployer (address): 0xC12E00DE204d58eAd5B5cE9054E94aeE7747fB6C
Arg [3] : _WETH (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000008c3736e2fe63cc2cd89ee228d9dbcab6ce5b767b
Arg [1] : 00000000000000000000000031864bc58a47a4fc8782b4135873788e876de9eb
Arg [2] : 000000000000000000000000c12e00de204d58ead5b5ce9054e94aee7747fb6c
Arg [3] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.