FTM Price: $0.717447 (-0.73%)

Contract

0x9192B53FE173025733beB33467d730a4E6bB7f36
 

Overview

FTM Balance

Fantom LogoFantom LogoFantom Logo0 FTM

FTM Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040319418452022-02-25 14:43:57987 days ago1645800237IN
 Create: CDeployer
0 FTM8.82552752,500

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
336163472022-03-16 23:51:07967 days ago1647474667
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
330057592022-03-10 0:26:42974 days ago1646872002
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
329975602022-03-09 22:05:57975 days ago1646863557
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
329974382022-03-09 22:03:46975 days ago1646863426
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
329939412022-03-09 21:04:35975 days ago1646859875
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
329938782022-03-09 21:03:38975 days ago1646859818
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
324646002022-03-03 19:26:53981 days ago1646335613
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
323952512022-03-02 23:20:42982 days ago1646263242
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
323888372022-03-02 21:35:57982 days ago1646256957
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
323888052022-03-02 21:35:16982 days ago1646256916
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
323844792022-03-02 20:30:21982 days ago1646253021
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
323844012022-03-02 20:29:03982 days ago1646252943
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
323842942022-03-02 20:27:20982 days ago1646252840
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
323713792022-03-02 16:21:32982 days ago1646238092
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
323694892022-03-02 15:48:44982 days ago1646236124
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
323693222022-03-02 15:46:29982 days ago1646235989
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
323692402022-03-02 15:45:09982 days ago1646235909
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
323691912022-03-02 15:44:19982 days ago1646235859
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
323691082022-03-02 15:43:00982 days ago1646235780
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
323682832022-03-02 15:26:11982 days ago1646234771
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
320385782022-02-26 19:21:05986 days ago1645903265
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
320380652022-02-26 19:09:55986 days ago1645902595
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
320378692022-02-26 19:05:38986 days ago1645902338
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
320374522022-02-26 18:55:24986 days ago1645901724
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
320345642022-02-26 17:51:23986 days ago1645897883
0x9192B53F...4E6bB7f36
 Contract Creation0 FTM
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CDeployer

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at ftmscan.com on 2022-02-26
*/

// File: contracts\libraries\SafeMath.sol

pragma solidity =0.5.16;

// 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\ImpermaxERC20.sol

pragma solidity =0.5.16;


// This contract is basically UniswapV2ERC20 with small modifications
// src: https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol

contract ImpermaxERC20 {
	using SafeMath for uint;
	
	string public name;
	string public symbol;
	uint8 public decimals = 18;
	uint public totalSupply;
	mapping(address => uint) public balanceOf;
	mapping(address => mapping(address => uint)) public allowance;
	
	bytes32 public DOMAIN_SEPARATOR;
	mapping(address => uint) public nonces;
	
	event Transfer(address indexed from, address indexed to, uint value);
	event Approval(address indexed owner, address indexed spender, uint value);

	constructor() public {}	
	
	function _setName(string memory _name, string memory _symbol) internal {
		name = _name;
		symbol = _symbol;
		uint chainId;
		assembly {
			chainId := chainid
		}
		DOMAIN_SEPARATOR = keccak256(
			abi.encode(
				keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
				keccak256(bytes(_name)),
				keccak256(bytes("1")),
				chainId,
				address(this)
			)
		);
	}

	function _mint(address to, uint value) internal {
		totalSupply = totalSupply.add(value);
		balanceOf[to] = balanceOf[to].add(value);
		emit Transfer(address(0), to, value);
	}

	function _burn(address from, uint value) internal {
		balanceOf[from] = balanceOf[from].sub(value);
		totalSupply = totalSupply.sub(value);
		emit Transfer(from, address(0), value);
	}

	function _approve(address owner, address spender, uint value) private {
		allowance[owner][spender] = value;
		emit Approval(owner, spender, value);
	}

	function _transfer(address from, address to, uint value) internal {
		balanceOf[from] = balanceOf[from].sub(value, "Impermax: TRANSFER_TOO_HIGH");
		balanceOf[to] = balanceOf[to].add(value);
		emit Transfer(from, to, value);
	}

	function approve(address spender, uint value) external returns (bool) {
		_approve(msg.sender, spender, value);
		return true;
	}

	function transfer(address to, uint value) external returns (bool) {
		_transfer(msg.sender, to, value);
		return true;
	}

	function transferFrom(address from, address to, uint value) external returns (bool) {
		if (allowance[from][msg.sender] != uint(-1)) {
			allowance[from][msg.sender] = allowance[from][msg.sender].sub(value, "Impermax: TRANSFER_NOT_ALLOWED");
		}
		_transfer(from, to, value);
		return true;
	}
	
	function _checkSignature(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s, bytes32 typehash) internal {
		require(deadline >= block.timestamp, "Impermax: EXPIRED");
		bytes32 digest = keccak256(
			abi.encodePacked(
				'\x19\x01',
				DOMAIN_SEPARATOR,
				keccak256(abi.encode(typehash, owner, spender, value, nonces[owner]++, deadline))
			)
		);
		address recoveredAddress = ecrecover(digest, v, r, s);
		require(recoveredAddress != address(0) && recoveredAddress == owner, "Impermax: INVALID_SIGNATURE");	
	}

	// keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
	bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;
	function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external {
		_checkSignature(owner, spender, value, deadline, v, r, s, PERMIT_TYPEHASH);
		_approve(owner, spender, value);
	}
}

// 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\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\PoolToken.sol

pragma solidity =0.5.16;





contract PoolToken is IPoolToken, ImpermaxERC20 {
   	uint internal constant initialExchangeRate = 1e18;
	address public underlying;
	address public factory;
	uint public totalBalance;
	uint public constant MINIMUM_LIQUIDITY = 1000;
	
	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);
	
	/*** Initialize ***/
	
	// called once by the factory
	function _setFactory() external {
		require(factory == address(0), "Impermax: FACTORY_ALREADY_SET");
		factory = msg.sender;
	}
	
	/*** PoolToken ***/
	
	function _update() internal {
		totalBalance = IERC20(underlying).balanceOf(address(this));
		emit Sync(totalBalance);
	}

	function exchangeRate() public returns (uint) 
	{
		uint _totalSupply = totalSupply; // gas savings
		uint _totalBalance = totalBalance; // gas savings
		if (_totalSupply == 0 || _totalBalance == 0) return initialExchangeRate;
		return _totalBalance.mul(1e18).div(_totalSupply);
	}
	
	// this low-level function should be called from another contract
	function mint(address minter) external nonReentrant update returns (uint mintTokens) {
		uint balance = IERC20(underlying).balanceOf(address(this));
		uint mintAmount = balance.sub(totalBalance);
		mintTokens = mintAmount.mul(1e18).div(exchangeRate());

		if(totalSupply == 0) {
			// permanently lock the first MINIMUM_LIQUIDITY tokens
			mintTokens = mintTokens.sub(MINIMUM_LIQUIDITY);
			_mint(address(0), MINIMUM_LIQUIDITY);
		}
		require(mintTokens > 0, "Impermax: MINT_AMOUNT_ZERO");
		_mint(minter, mintTokens);
		emit Mint(msg.sender, minter, mintAmount, mintTokens);
	}

	// this low-level function should be called from another contract
	function redeem(address redeemer) external nonReentrant update returns (uint redeemAmount) {
		uint redeemTokens = balanceOf[address(this)];
		redeemAmount = redeemTokens.mul(exchangeRate()).div(1e18);

		require(redeemAmount > 0, "Impermax: REDEEM_AMOUNT_ZERO");
		require(redeemAmount <= totalBalance, "Impermax: INSUFFICIENT_CASH");
		_burn(address(this), redeemTokens);
		_safeTransfer(redeemer, redeemAmount);
		emit Redeem(msg.sender, redeemer, redeemAmount, redeemTokens);		
	}

	// force real balance to match totalBalance
	function skim(address to) external nonReentrant {
		_safeTransfer(to, IERC20(underlying).balanceOf(address(this)).sub(totalBalance));
	}

	// force totalBalance to match real balance
	function sync() external nonReentrant update {}
	
	/*** Utilities ***/
	
	// same safe transfer function used by UniSwapV2 (with fixed underlying)
	bytes4 private constant SELECTOR = bytes4(keccak256(bytes("transfer(address,uint256)")));
	function _safeTransfer(address to, uint amount) internal {
		(bool success, bytes memory data) = underlying.call(abi.encodeWithSelector(SELECTOR, to, amount));
		require(success && (data.length == 0 || abi.decode(data, (bool))), "Impermax: TRANSFER_FAILED");
	}
	
	// prevents a contract from calling itself, directly or indirectly.
	bool internal _notEntered = true;
	modifier nonReentrant() {
		require(_notEntered, "Impermax: REENTERED");
		_notEntered = false;
		_;
		_notEntered = true;
	}
	
	// update totalBalance with current balance
	modifier update() {
		_;
		_update();
	}
}

// File: contracts\CStorage.sol

pragma solidity =0.5.16;


contract CStorage {
	address public borrowable0;
	address public borrowable1;
	uint public safetyMarginSqrt = 1.58113883e18; //safetyMargin: 250%
	uint public liquidationIncentive = 1.04e18; //4%

    function safe112(uint n) internal pure returns (uint112) {
        require(n < 2**112, "Impermax: SAFE112");
        return uint112(n);
    }
}

// File: contracts\interfaces\IFactory.sol

pragma solidity >=0.5.0;

interface IFactory {
	event LendingPoolInitialized(address indexed uniswapV2Pair, address indexed token0, address indexed token1,
		address collateral, address borrowable0, address borrowable1, uint lendingPoolId);
	event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);
	event NewAdmin(address oldAdmin, address newAdmin);
	event NewReservesPendingAdmin(address oldReservesPendingAdmin, address newReservesPendingAdmin);
	event NewReservesAdmin(address oldReservesAdmin, address newReservesAdmin);
	event NewReservesManager(address oldReservesManager, address newReservesManager);
	
	function admin() external view returns (address);
	function pendingAdmin() external view returns (address);
	function reservesAdmin() external view returns (address);
	function reservesPendingAdmin() external view returns (address);
	function reservesManager() external view returns (address);

	function getLendingPool(address uniswapV2Pair) external view returns (
		bool initialized, 
		uint24 lendingPoolId, 
		address collateral, 
		address borrowable0, 
		address borrowable1
	);
	function allLendingPools(uint) external view returns (address uniswapV2Pair);
	function allLendingPoolsLength() external view returns (uint);
	
	function bDeployer() external view returns (address);
	function cDeployer() external view returns (address);

	function createCollateral(address uniswapV2Pair) external returns (address collateral);
	function createBorrowable0(address uniswapV2Pair) external returns (address borrowable0);
	function createBorrowable1(address uniswapV2Pair) external returns (address borrowable1);
	function initializeLendingPool(address uniswapV2Pair) external;

	function _setPendingAdmin(address newPendingAdmin) external;
	function _acceptAdmin() external;
	function _setReservesPendingAdmin(address newPendingAdmin) external;
	function _acceptReservesAdmin() external;
	function _setReservesManager(address newReservesManager) external;
}

// File: contracts\CSetter.sol

pragma solidity =0.5.16;





contract CSetter is PoolToken, CStorage {

	uint public constant SAFETY_MARGIN_SQRT_MIN = 1.00e18; //safetyMargin: 100%
	uint public constant SAFETY_MARGIN_SQRT_MAX = 1.58113884e18; //safetyMargin: 250%
	uint public constant LIQUIDATION_INCENTIVE_MIN = 1.00e18; //100%
	uint public constant LIQUIDATION_INCENTIVE_MAX = 1.05e18; //105%

	event NewSafetyMargin(uint newSafetyMarginSqrt);
	event NewLiquidationIncentive(uint newLiquidationIncentive);
	
	// called once by the factory at the time of deployment
	function _initialize (
		string calldata _name,
		string calldata _symbol,
		address _underlying, 
		address _borrowable0, 
		address _borrowable1
	) external {
		require(msg.sender == factory, "Impermax: UNAUTHORIZED"); // sufficient check
		_setName(_name, _symbol);
		underlying = _underlying;
		borrowable0 = _borrowable0;
		borrowable1 = _borrowable1;
	}

	function _setSafetyMarginSqrt(uint newSafetyMarginSqrt) external nonReentrant {
		_checkSetting(newSafetyMarginSqrt, SAFETY_MARGIN_SQRT_MIN, SAFETY_MARGIN_SQRT_MAX);
		safetyMarginSqrt = newSafetyMarginSqrt;
		emit NewSafetyMargin(newSafetyMarginSqrt);
	}

	function _setLiquidationIncentive(uint newLiquidationIncentive) external nonReentrant {
		_checkSetting(newLiquidationIncentive, LIQUIDATION_INCENTIVE_MIN, LIQUIDATION_INCENTIVE_MAX);
		liquidationIncentive = newLiquidationIncentive;
		emit NewLiquidationIncentive(newLiquidationIncentive);
	}
	
	function _checkSetting(uint parameter, uint min, uint max) internal view {
		_checkAdmin();
		require(parameter >= min, "Impermax: INVALID_SETTING");
		require(parameter <= max, "Impermax: INVALID_SETTING");
	}
	
	function _checkAdmin() internal view {
		require(msg.sender == IFactory(factory).admin(), "Impermax: UNAUTHORIZED");
	}
}

// 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 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\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 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);
	
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);

    function observationLength() external view returns (uint);
    function observations(uint) external view returns (
        uint timestamp,
        uint reserve0Cumulative,
        uint reserve1Cumulative
    );
    function currentCumulativePrices() external view returns (
        uint reserve0Cumulative,
        uint reserve1Cumulative,
        uint timestamp
    );
}

// File: contracts\libraries\UQ112x112.sol

pragma solidity =0.5.16;

// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
// src: https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/libraries/UQ112x112.sol

// range: [0, 2**112 - 1]
// resolution: 1 / 2**112

library UQ112x112 {
    uint224 constant Q112 = 2**112;

    // encode a uint112 as a UQ112x112
    function encode(uint112 y) internal pure returns (uint224 z) {
        z = uint224(y) * Q112; // never overflows
    }

    // divide a UQ112x112 by a uint112, returning a UQ112x112
    function uqdiv(uint224 x, uint112 y) internal pure returns (uint224 z) {
        z = x / uint224(y);
    }
}

// File: contracts\libraries\Math.sol

pragma solidity =0.5.16;

// a library for performing various math operations
// forked from: https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/libraries/Math.sol

library Math {
    function min(uint x, uint y) internal pure returns (uint z) {
        z = x < y ? x : y;
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrt(uint y) internal pure returns (uint z) {
        if (y > 3) {
            z = y;
            uint x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}

// File: contracts\Collateral.sol

pragma solidity =0.5.16;












contract Collateral is ICollateral, PoolToken, CStorage, CSetter {
    using UQ112x112 for uint224;
	
	constructor() public {}
	
	/*** Collateralization Model ***/

    function getTwapPrice112x112() public returns(uint224 twapPrice112x112) {
        uint length = IUniswapV2Pair(underlying).observationLength();
        (uint lastTimestamp, uint lastReserve0Cumulative, uint lastReserve1Cumulative) = IUniswapV2Pair(underlying).observations(length-2);
        (uint reserve0Cumulative, uint reserve1Cumulative, uint timestamp) = IUniswapV2Pair(underlying).currentCumulativePrices();
        uint timeElapsed = timestamp - lastTimestamp;
        uint112 twapReserve0 = safe112((reserve0Cumulative - lastReserve0Cumulative) / timeElapsed);
        uint112 twapReserve1 = safe112((reserve1Cumulative - lastReserve1Cumulative) / timeElapsed);
 		twapPrice112x112 = UQ112x112.encode(twapReserve1).uqdiv(twapReserve0); 
    }

    function getPrices() public returns (uint price0, uint price1) {
		uint224 twapPrice112x112 = getTwapPrice112x112();

		(uint112 reserve0, uint112 reserve1,) = IUniswapV2Pair(underlying).getReserves();
		uint256 collateralTotalSupply = IUniswapV2Pair(underlying).totalSupply();
		
		uint224 currentPrice112x112 = UQ112x112.encode(reserve1).uqdiv(reserve0);
		uint256 adjustmentSquared = uint256(twapPrice112x112).mul(2**32).div(currentPrice112x112);
		uint256 adjustment = Math.sqrt(adjustmentSquared.mul(2**32));

		uint256 currentBorrowable0Price = uint256(collateralTotalSupply).mul(1e18).div(reserve0*2);
		uint256 currentBorrowable1Price = uint256(collateralTotalSupply).mul(1e18).div(reserve1*2);
		
		price0 = currentBorrowable0Price.mul(adjustment).div(2**32);
		price1 = currentBorrowable1Price.mul(2**32).div(adjustment);
		
		/*
		 * Price calculation errors may happen in some edge pairs where
		 * reserve0 / reserve1 is close to 2**112 or 1/2**112
		 * We're going to prevent users from using pairs at risk from the UI
		 */
		require(price0 > 100, "Impermax: PRICE_CALCULATION_ERROR");
		require(price1 > 100, "Impermax: PRICE_CALCULATION_ERROR");
	}
	
	// returns liquidity in  collateral's underlying
	function _calculateLiquidity(uint amountCollateral, uint amount0, uint amount1) internal returns (uint liquidity, uint shortfall) {
		uint _safetyMarginSqrt = safetyMarginSqrt;
		(uint price0, uint price1) = getPrices();
		
		uint a = amount0.mul(price0).div(1e18);
		uint b = amount1.mul(price1).div(1e18);
		if(a < b) (a, b) = (b, a);
		a = a.mul(_safetyMarginSqrt).div(1e18);
		b = b.mul(1e18).div(_safetyMarginSqrt);
		uint collateralNeeded = a.add(b).mul(liquidationIncentive).div(1e18);		

		if(amountCollateral >= collateralNeeded){
			return (amountCollateral - collateralNeeded, 0);
		} else {
			return (0, collateralNeeded - amountCollateral);
		}
	}

	/*** ERC20 ***/
	
	function _transfer(address from, address to, uint value) internal {
		require(tokensUnlocked(from, value), "Impermax: INSUFFICIENT_LIQUIDITY");
		super._transfer(from, to, value);
	}
	
	function tokensUnlocked(address from, uint value) public returns (bool) {
		uint _balance = balanceOf[from];
		if (value > _balance) return false;
		uint finalBalance = _balance - value;
		uint amountCollateral = finalBalance.mul(exchangeRate()).div(1e18);
		uint amount0 = IBorrowable(borrowable0).borrowBalance(from);
		uint amount1 = IBorrowable(borrowable1).borrowBalance(from);
		(, uint shortfall) = _calculateLiquidity(amountCollateral, amount0, amount1);
		return shortfall == 0;
	}
	
	/*** Collateral ***/
	
	function accountLiquidityAmounts(address borrower, uint amount0, uint amount1) public returns (uint liquidity, uint shortfall) {
		if (amount0 == uint(-1)) amount0 = IBorrowable(borrowable0).borrowBalance(borrower);
		if (amount1 == uint(-1)) amount1 = IBorrowable(borrowable1).borrowBalance(borrower);
		uint amountCollateral = balanceOf[borrower].mul(exchangeRate()).div(1e18);
		return _calculateLiquidity(amountCollateral, amount0, amount1);
	}
	
	function accountLiquidity(address borrower) public returns (uint liquidity, uint shortfall) {
		return accountLiquidityAmounts(borrower, uint(-1), uint(-1));
	}
	
	function canBorrow(address borrower, address borrowable, uint accountBorrows) public returns (bool) {
		address _borrowable0 = borrowable0;
		address _borrowable1 = borrowable1;
		require(borrowable == _borrowable0 || borrowable == _borrowable1, "Impermax: INVALID_BORROWABLE" );
		uint amount0 = borrowable == _borrowable0 ? accountBorrows : uint(-1);
		uint amount1 = borrowable == _borrowable1 ? accountBorrows : uint(-1);
		(, uint shortfall) = accountLiquidityAmounts(borrower, amount0, amount1);
		return shortfall == 0;
	}
	
	// this function must be called from borrowable0 or borrowable1
	function seize(address liquidator, address borrower, uint repayAmount) external returns (uint seizeTokens) {
		require(msg.sender == borrowable0 || msg.sender == borrowable1, "Impermax: UNAUTHORIZED");
		
		(, uint shortfall) = accountLiquidity(borrower);
		require(shortfall > 0, "Impermax: INSUFFICIENT_SHORTFALL");
		
		uint price;
		if (msg.sender == borrowable0) (price, ) = getPrices();
		else  (, price) = getPrices();
		
		seizeTokens = repayAmount.mul(liquidationIncentive).div(1e18).mul(price).div( exchangeRate() );
		
		balanceOf[borrower] = balanceOf[borrower].sub(seizeTokens, "Impermax: LIQUIDATING_TOO_MUCH");
		balanceOf[liquidator] = balanceOf[liquidator].add(seizeTokens);
		emit Transfer(borrower, liquidator, seizeTokens);
	}

	// this low-level function should be called from another contract
	function flashRedeem(address redeemer, uint redeemAmount, bytes calldata data) external nonReentrant update {
		require(redeemAmount <= totalBalance, "Impermax: INSUFFICIENT_CASH");
		
		// optimistically transfer funds
		_safeTransfer(redeemer, redeemAmount);
		if (data.length > 0) IImpermaxCallee(redeemer).impermaxRedeem(msg.sender, redeemAmount, data);
		
		uint redeemTokens = balanceOf[address(this)];
		uint declaredRedeemTokens = redeemAmount.mul(1e18).div( exchangeRate() ).add(1); // rounded up
		require(redeemTokens >= declaredRedeemTokens, "Impermax: INSUFFICIENT_REDEEM_TOKENS");
		
		_burn(address(this), redeemTokens);
		emit Redeem(msg.sender, redeemer, redeemAmount, redeemTokens);
	}
}

// File: contracts\interfaces\ICDeployer.sol

pragma solidity >=0.5.0;

interface ICDeployer {
	function deployCollateral(address uniswapV2Pair) external returns (address collateral);
}

// File: contracts\CDeployer.sol

pragma solidity =0.5.16;



/*
 * This contract is used by the Factory to deploy Collateral(s)
 * The bytecode would be too long to fit in the Factory
 */
 
contract CDeployer is ICDeployer {
	constructor () public {}
	
	function deployCollateral(address uniswapV2Pair) external returns (address collateral) {
		bytes memory bytecode = type(Collateral).creationCode;
		bytes32 salt = keccak256(abi.encodePacked(msg.sender, uniswapV2Pair));
		assembly {
			collateral := create2(0, add(bytecode, 32), mload(bytecode), salt)
		}
	}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"constant":false,"inputs":[{"internalType":"address","name":"uniswapV2Pair","type":"address"}],"name":"deployCollateral","outputs":[{"internalType":"address","name":"collateral","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50613f39806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80637924fedd14610030575b600080fd5b6100636004803603602081101561004657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661008c565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60006060604051806020016100a090610159565b6020820181038252601f19601f82011660405250905060003384604051602001808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140192505050604051602081830303815290604052805190602001209050808251602084016000f5949350505050565b613d9e806101678339019056fe60806040526002805460ff19908116601217909155600b805490911660011790556715f155637eba0c00600d55670e6ed27d66680000600e5534801561004457600080fd5b50613d4a806100546000396000f3fe608060405234801561001057600080fd5b50600436106102de5760003560e01c80638c765e9411610186578063bc25cf77116100e3578063d490e7e011610097578063dd62ed3e11610071578063dd62ed3e14610971578063e22e013c146109ac578063fff6cae9146109e5576102de565b8063d490e7e014610903578063d505accf1461090b578063daf8881814610969576102de565b8063bd9a548b116100c8578063bd9a548b14610809578063c45a015514610811578063c548e3c514610819576102de565b8063bc25cf77146107d6578063bc9bd12a146103ad576102de565b8063ad7a672f1161013a578063b2a02ff11161011f578063b2a02ff11461076e578063ba9a7a56146107b1578063bb6ff386146107b9576102de565b8063ad7a672f1461075e578063afc8276c14610766576102de565b806395d89b411161016b57806395d89b41146106da5780639aac2c53146106e2578063a9059cbb14610725576102de565b80638c765e941461069f57806395a2251f146106a7576102de565b80633644e5151161023f5780636a627842116101f35780636f307dc3116101cd5780636f307dc31461063157806370a08231146106395780637ecebe001461066c576102de565b80636a627842146105865780636e01be10146105b95780636f13cb83146105f2576102de565b80634a5d316c116102245780634a5d316c146105155780634fd42e171461051d5780635a0f03c61461053a576102de565b80633644e515146105055780633ba0b9a91461050d576102de565b806323b872dd1161029657806330adf81f1161027b57806330adf81f146104d7578063313ce567146104df578063356c571f146104fd576102de565b806323b872dd146104635780632fa5ae1b146104a6576102de565b80630fb60fef116102c75780630fb60fef146103ad57806318160ddd146103c757806319f3400d146103cf576102de565b806306fdde03146102e3578063095ea7b314610360575b600080fd5b6102eb6109ed565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561032557818101518382015260200161030d565b50505050905090810190601f1680156103525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103996004803603604081101561037657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610a99565b604080519115158252519081900360200190f35b6103b5610ab0565b60408051918252519081900360200190f35b6103b5610abc565b610461600480360360608110156103e557600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235169160208101359181019060608101604082013564010000000081111561042257600080fd5b82018360208201111561043457600080fd5b8035906020019184600183028401116401000000008311171561045657600080fd5b509092509050610ac2565b005b6103996004803603606081101561047957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610de8565b6104ae610efc565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6103b5610f1d565b6104e7610f41565b6040805160ff9092168252519081900360200190f35b6103b5610f4a565b6103b5610f50565b6103b5610f56565b610461610fa6565b6104616004803603602081101561053357600080fd5b5035611057565b61056d6004803603602081101561055057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611171565b6040805192835260208301919091528051918290030190f35b6103b56004803603602081101561059c57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111a8565b610399600480360360408110156105cf57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611456565b61056d6004803603606081101561060857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060400135611649565b6104ae61184c565b6103b56004803603602081101561064f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611868565b6103b56004803603602081101561068257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661187a565b6103b561188c565b6103b5600480360360208110156106bd57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611892565b6102eb611ab6565b610399600480360360608110156106f857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135611b2e565b6103996004803603604081101561073b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611cc8565b6103b5611cd5565b6103b5611cdb565b6103b56004803603606081101561078457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135611ce7565b6103b5611fce565b610461600480360360208110156107cf57600080fd5b5035611fd4565b610461600480360360208110156107ec57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166120ee565b61056d612271565b6104ae6125b2565b610461600480360360a081101561082f57600080fd5b81019060208101813564010000000081111561084a57600080fd5b82018360208201111561085c57600080fd5b8035906020019184600183028401116401000000008311171561087e57600080fd5b91939092909160208101903564010000000081111561089c57600080fd5b8201836020820111156108ae57600080fd5b803590602001918460018302840111640100000000831117156108d057600080fd5b919350915073ffffffffffffffffffffffffffffffffffffffff81358116916020810135821691604090910135166125ce565b6103b5612754565b610461600480360360e081101561092157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135612760565b6104ae6127a4565b6103b56004803603604081101561098757600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166127c0565b6109b46127dd565b604080517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610461612a47565b6000805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610a915780601f10610a6657610100808354040283529160200191610a91565b820191906000526020600020905b815481529060010190602001808311610a7457829003601f168201915b505050505081565b6000610aa6338484612b15565b5060015b92915050565b670de0b6b3a764000081565b60035481565b600b5460ff16610b3357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600a54831115610bcc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f496d7065726d61783a20494e53554646494349454e545f434153480000000000604482015290519081900360640190fd5b610bd68484612b84565b8015610ca2576040517facb86cbb0000000000000000000000000000000000000000000000000000000081523360048201818152602483018690526060604484019081526064840185905273ffffffffffffffffffffffffffffffffffffffff88169363acb86cbb93928892889288929190608401848480828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b158015610c8957600080fd5b505af1158015610c9d573d6000803e3d6000fd5b505050505b3060009081526004602052604081205490610cf36001610ce7610cc3610f56565b610cdb89670de0b6b3a764000063ffffffff612d9016565b9063ffffffff612e0a16565b9063ffffffff612e4c16565b905080821015610d4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180613c5e6024913960400191505060405180910390fd5b610d583083612ec0565b6040805186815260208101849052815173ffffffffffffffffffffffffffffffffffffffff89169233927f3f693fff038bb8a046aa76d9516190ac7444f7d69cf952c4cbdc086fdef2d6fc929081900390910190a35050610db7612f84565b5050600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555050565b73ffffffffffffffffffffffffffffffffffffffff831660009081526005602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14610ee757604080518082018252601e81527f496d7065726d61783a205452414e534645525f4e4f545f414c4c4f574544000060208083019190915273ffffffffffffffffffffffffffffffffffffffff87166000908152600582528381203382529091529190912054610eb591849063ffffffff61305a16565b73ffffffffffffffffffffffffffffffffffffffff851660009081526005602090815260408083203384529091529020555b610ef284848461310b565b5060019392505050565b600b54610100900473ffffffffffffffffffffffffffffffffffffffff1681565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60025460ff1681565b600d5481565b60065481565b600354600a5460009190811580610f6b575080155b15610f8257670de0b6b3a764000092505050610fa3565b610f9e82610cdb83670de0b6b3a764000063ffffffff612d9016565b925050505b90565b60095473ffffffffffffffffffffffffffffffffffffffff161561102b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f496d7065726d61783a20464143544f52595f414c52454144595f534554000000604482015290519081900360640190fd5b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055565b600b5460ff166110c857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905561110b81670de0b6b3a7640000670e92596fd6290000613190565b600e8190556040805182815290517f8a9bb9067f9ecb13a322b548e6df3dd1bd10a54698834dac43ed8f0e765bf94d9181900360200190a150600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60008061119f837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80611649565b91509150915091565b600b5460009060ff1661121c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b1580156112b557600080fd5b505afa1580156112c9573d6000803e3d6000fd5b505050506040513d60208110156112df57600080fd5b5051600a549091506000906112fb90839063ffffffff61327616565b9050611320611308610f56565b610cdb83670de0b6b3a764000063ffffffff612d9016565b92506003546000141561134e5761133f836103e863ffffffff61327616565b925061134e60006103e86132b8565b600083116113bd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f496d7065726d61783a204d494e545f414d4f554e545f5a45524f000000000000604482015290519081900360640190fd5b6113c784846132b8565b6040805182815260208101859052815173ffffffffffffffffffffffffffffffffffffffff87169233927f2f00e3cdd69a77be7ed215ec7b2a36784dd158f921fca79ac29deffa353fe6ee929081900390910190a35050611426612f84565b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055919050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600460205260408120548083111561148e576000915050610aaa565b82810360006114b7670de0b6b3a7640000610cdb6114aa610f56565b859063ffffffff612d9016565b90506000600b60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634d73e9ba886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561155a57600080fd5b505afa15801561156e573d6000803e3d6000fd5b505050506040513d602081101561158457600080fd5b5051600c54604080517f4d73e9ba00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015291519394506000939190921691634d73e9ba916024808301926020929190829003018186803b1580156115ff57600080fd5b505afa158015611613573d6000803e3d6000fd5b505050506040513d602081101561162957600080fd5b50519050600061163a848484613369565b159a9950505050505050505050565b6000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84141561171c57600b54604080517f4d73e9ba00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152915161010090930490911691634d73e9ba91602480820192602092909190829003018186803b1580156116ed57600080fd5b505afa158015611701573d6000803e3d6000fd5b505050506040513d602081101561171757600080fd5b505193505b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8314156117e657600c54604080517f4d73e9ba00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015291519190921691634d73e9ba916024808301926020929190829003018186803b1580156117b757600080fd5b505afa1580156117cb573d6000803e3d6000fd5b505050506040513d60208110156117e157600080fd5b505192505b6000611831670de0b6b3a7640000610cdb6117ff610f56565b73ffffffffffffffffffffffffffffffffffffffff8a166000908152600460205260409020549063ffffffff612d9016565b905061183e818686613369565b92509250505b935093915050565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b60046020526000908152604090205481565b60076020526000908152604090205481565b600e5481565b600b5460009060ff1661190657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905530600090815260046020526040902054611962670de0b6b3a7640000610cdb611955610f56565b849063ffffffff612d9016565b9150600082116119d357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496d7065726d61783a2052454445454d5f414d4f554e545f5a45524f00000000604482015290519081900360640190fd5b600a54821115611a4457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f496d7065726d61783a20494e53554646494349454e545f434153480000000000604482015290519081900360640190fd5b611a4e3082612ec0565b611a588383612b84565b6040805183815260208101839052815173ffffffffffffffffffffffffffffffffffffffff86169233927f3f693fff038bb8a046aa76d9516190ac7444f7d69cf952c4cbdc086fdef2d6fc929081900390910190a350611426612f84565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610a915780601f10610a6657610100808354040283529160200191610a91565b600b54600c5460009173ffffffffffffffffffffffffffffffffffffffff6101009091048116918116908516821480611b9257508073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b611bfd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496d7065726d61783a20494e56414c49445f424f52524f5741424c4500000000604482015290519081900360640190fd5b60008273ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614611c58577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff611c5a565b845b905060008273ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614611cb7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff611cb9565b855b9050600061163a898484611649565b6000610aa633848461310b565b600a5481565b670e92596fd629000081565b600b54600090610100900473ffffffffffffffffffffffffffffffffffffffff16331480611d2c5750600c5473ffffffffffffffffffffffffffffffffffffffff1633145b611d9757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496d7065726d61783a20554e415554484f52495a454400000000000000000000604482015290519081900360640190fd5b6000611da284611171565b91505060008111611e1457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f496d7065726d61783a20494e53554646494349454e545f53484f525446414c4c604482015290519081900360640190fd5b600b54600090610100900473ffffffffffffffffffffffffffffffffffffffff16331415611e4c57611e44612271565b509050611e58565b611e54612271565b9150505b611e94611e63610f56565b610cdb83611e88670de0b6b3a7640000610cdb600e548b612d9090919063ffffffff16565b9063ffffffff612d9016565b9250611f1f836040518060400160405280601e81526020017f496d7065726d61783a204c49515549444154494e475f544f4f5f4d5543480000815250600460008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461305a9092919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff8087166000908152600460205260408082209390935590881681522054611f61908463ffffffff612e4c16565b73ffffffffffffffffffffffffffffffffffffffff80881660008181526004602090815260409182902094909455805187815290519193928916927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350509392505050565b6103e881565b600b5460ff1661204557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905561208881670de0b6b3a76400006715f15565d2c5f000613190565b600d8190556040805182815290517fdff9a61839be6f6ce5ea77311cc351786a39a9f337c507ff35e7b358fd39c0439181900360200190a150600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b600b5460ff1661215f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600a54600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905161224393859361223e93919273ffffffffffffffffffffffffffffffffffffffff909116916370a08231916024808301926020929190829003018186803b15801561220657600080fd5b505afa15801561221a573d6000803e3d6000fd5b505050506040513d602081101561223057600080fd5b50519063ffffffff61327616565b612b84565b50600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b600080600061227e6127dd565b9050600080600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156122eb57600080fd5b505afa1580156122ff573d6000803e3d6000fd5b505050506040513d606081101561231557600080fd5b508051602091820151600854604080517f18160ddd000000000000000000000000000000000000000000000000000000008152905193965091945060009373ffffffffffffffffffffffffffffffffffffffff909116926318160ddd926004808201939291829003018186803b15801561238e57600080fd5b505afa1580156123a2573d6000803e3d6000fd5b505050506040513d60208110156123b857600080fd5b5051905060006123f5846123cb8561345d565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169063ffffffff61348116565b905060006124347bffffffffffffffffffffffffffffffffffffffffffffffffffffffff80841690610cdb90891664010000000063ffffffff612d9016565b905060006124556124508364010000000063ffffffff612d9016565b6134c2565b905060006124886dffffffffffffffffffffffffffff6002890216610cdb87670de0b6b3a764000063ffffffff612d9016565b905060006124bb6dffffffffffffffffffffffffffff6002890216610cdb88670de0b6b3a764000063ffffffff612d9016565b90506124d6640100000000610cdb848663ffffffff612d9016565b9a506124f183610cdb8364010000000063ffffffff612d9016565b995060648b1161254c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613c826021913960400191505060405180910390fd5b60648a116125a5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613c826021913960400191505060405180910390fd5b5050505050505050509091565b60095473ffffffffffffffffffffffffffffffffffffffff1681565b60095473ffffffffffffffffffffffffffffffffffffffff16331461265457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496d7065726d61783a20554e415554484f52495a454400000000000000000000604482015290519081900360640190fd5b6126c787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b01819004810282018101909252898152925089915088908190840183828082843760009201919091525061351492505050565b6008805473ffffffffffffffffffffffffffffffffffffffff9485167fffffffffffffffffffffffff000000000000000000000000000000000000000091821617909155600b8054938516610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff90941693909317909255600c805491909316911617905550505050565b6715f15565d2c5f00081565b612790878787878787877f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96135f8565b61279b878787612b15565b50505050505050565b600c5473ffffffffffffffffffffffffffffffffffffffff1681565b600560209081526000928352604080842090915290825290205481565b600080600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ebeb31db6040518163ffffffff1660e01b815260040160206040518083038186803b15801561284857600080fd5b505afa15801561285c573d6000803e3d6000fd5b505050506040513d602081101561287257600080fd5b5051600854604080517f252c09d70000000000000000000000000000000000000000000000000000000081527ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe8401600482015290519293506000928392839273ffffffffffffffffffffffffffffffffffffffff9091169163252c09d791602480820192606092909190829003018186803b15801561291157600080fd5b505afa158015612925573d6000803e3d6000fd5b505050506040513d606081101561293b57600080fd5b508051602082015160409283015160085484517f1df8c717000000000000000000000000000000000000000000000000000000008152945193975091955093506000928392839273ffffffffffffffffffffffffffffffffffffffff1691631df8c717916004808301926060929190829003018186803b1580156129be57600080fd5b505afa1580156129d2573d6000803e3d6000fd5b505050506040513d60608110156129e857600080fd5b508051602082015160409092015190945090925090508581036000612a178288870381612a1157fe5b0461389b565b90506000612a298388870381612a1157fe5b9050612a38826123cb8361345d565b9a505050505050505050505090565b600b5460ff16612ab857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055612ae8612f84565b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260056020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600854604080518082018252601981527f7472616e7366657228616464726573732c75696e743235362900000000000000602091820152815173ffffffffffffffffffffffffffffffffffffffff86811660248301526044808301879052845180840390910181526064909201845291810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251815160009560609594169382918083835b60208310612c8a57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101612c4d565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612cec576040519150601f19603f3d011682016040523d82523d6000602084013e612cf1565b606091505b5091509150818015612d1f575080511580612d1f5750808060200190516020811015612d1c57600080fd5b50515b612d8a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f496d7065726d61783a205452414e534645525f4641494c454400000000000000604482015290519081900360640190fd5b50505050565b600082612d9f57506000610aaa565b82820282848281612dac57fe5b0414612e03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613cf56021913960400191505060405180910390fd5b9392505050565b6000612e0383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061391e565b600082820183811015612e0357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902054612ef6908263ffffffff61327616565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260046020526040902055600354612f2f908263ffffffff61327616565b60035560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b158015612ff557600080fd5b505afa158015613009573d6000803e3d6000fd5b505050506040513d602081101561301f57600080fd5b5051600a81905560408051918252517f8a0df8ef054fae2c3d2d19a7b322e864870cc9fd3cb07fb9526309c596244bf49181900360200190a1565b60008184841115613103576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156130c85781810151838201526020016130b0565b50505050905090810190601f1680156130f55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6131158382611456565b61318057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f496d7065726d61783a20494e53554646494349454e545f4c4951554944495459604482015290519081900360640190fd5b61318b83838361399d565b505050565b613198613ab6565b8183101561320757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f496d7065726d61783a20494e56414c49445f53455454494e4700000000000000604482015290519081900360640190fd5b8083111561318b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f496d7065726d61783a20494e56414c49445f53455454494e4700000000000000604482015290519081900360640190fd5b6000612e0383836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f770081525061305a565b6003546132cb908263ffffffff612e4c16565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902054613304908263ffffffff612e4c16565b73ffffffffffffffffffffffffffffffffffffffff831660008181526004602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600d546000908190818061337b612271565b9092509050600061339e670de0b6b3a7640000610cdb8a8663ffffffff612d9016565b905060006133be670de0b6b3a7640000610cdb8a8663ffffffff612d9016565b9050808210156133ca57905b6133e6670de0b6b3a7640000610cdb848863ffffffff612d9016565b915061340485610cdb83670de0b6b3a764000063ffffffff612d9016565b9050600061342d670de0b6b3a7640000610cdb600e54611e888688612e4c90919063ffffffff16565b9050808b10613449578a03965060009550611844945050505050565b600097508a90039550611844945050505050565b6dffffffffffffffffffffffffffff166e0100000000000000000000000000000290565b60006dffffffffffffffffffffffffffff82167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8416816134ba57fe5b049392505050565b60006003821115613505575080600160028204015b818110156134ff578091506002818285816134ee57fe5b0401816134f757fe5b0490506134d7565b5061350f565b811561350f575060015b919050565b8151613527906000906020850190613bcf565b50805161353b906001906020840190613bcf565b506040514690806052613ca382396040805191829003605201822086516020978801208383018352600184527f310000000000000000000000000000000000000000000000000000000000000093880193909352815180880191909152808201929092527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606083015260808201939093523060a0808301919091528351808303909101815260c090910190925250805192019190912060065550565b4285101561366757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496d7065726d61783a2045585049524544000000000000000000000000000000604482015290519081900360640190fd5b60065473ffffffffffffffffffffffffffffffffffffffff808a1660008181526007602090815260408083208054600180820190925582518085018a905280840196909652958e166060860152608085018d905260a085019590955260c08085018c90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff8a166101828501526101a284018990526101c28401889052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa1580156137a9573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81161580159061382457508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b61388f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f496d7065726d61783a20494e56414c49445f5349474e41545552450000000000604482015290519081900360640190fd5b50505050505050505050565b60006e010000000000000000000000000000821061391a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496d7065726d61783a2053414645313132000000000000000000000000000000604482015290519081900360640190fd5b5090565b60008183613987576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156130c85781810151838201526020016130b0565b50600083858161399357fe5b0495945050505050565b604080518082018252601b81527f496d7065726d61783a205452414e534645525f544f4f5f48494748000000000060208083019190915273ffffffffffffffffffffffffffffffffffffffff8616600090815260049091529190912054613a0b91839063ffffffff61305a16565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600460205260408082209390935590841681522054613a4d908263ffffffff612e4c16565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526004602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f851a4406040518163ffffffff1660e01b815260040160206040518083038186803b158015613b1e57600080fd5b505afa158015613b32573d6000803e3d6000fd5b505050506040513d6020811015613b4857600080fd5b505173ffffffffffffffffffffffffffffffffffffffff163314613bcd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496d7065726d61783a20554e415554484f52495a454400000000000000000000604482015290519081900360640190fd5b565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613c1057805160ff1916838001178555613c3d565b82800160010185558215613c3d579182015b82811115613c3d578251825591602001919060010190613c22565b5061391a92610fa39250905b8082111561391a5760008155600101613c4956fe496d7065726d61783a20494e53554646494349454e545f52454445454d5f544f4b454e53496d7065726d61783a2050524943455f43414c43554c4154494f4e5f4552524f52454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a7231582036639634c0d56dae503e6e9ea3b464cf5aa17490b002261826f0ac4dc9201d5264736f6c63430005100032a265627a7a72315820dfeccca4665ea5fea06184fda13b3d43bcec1ff60db2148d27e71a13678e4a9a64736f6c63430005100032

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80637924fedd14610030575b600080fd5b6100636004803603602081101561004657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661008c565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60006060604051806020016100a090610159565b6020820181038252601f19601f82011660405250905060003384604051602001808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b815260140192505050604051602081830303815290604052805190602001209050808251602084016000f5949350505050565b613d9e806101678339019056fe60806040526002805460ff19908116601217909155600b805490911660011790556715f155637eba0c00600d55670e6ed27d66680000600e5534801561004457600080fd5b50613d4a806100546000396000f3fe608060405234801561001057600080fd5b50600436106102de5760003560e01c80638c765e9411610186578063bc25cf77116100e3578063d490e7e011610097578063dd62ed3e11610071578063dd62ed3e14610971578063e22e013c146109ac578063fff6cae9146109e5576102de565b8063d490e7e014610903578063d505accf1461090b578063daf8881814610969576102de565b8063bd9a548b116100c8578063bd9a548b14610809578063c45a015514610811578063c548e3c514610819576102de565b8063bc25cf77146107d6578063bc9bd12a146103ad576102de565b8063ad7a672f1161013a578063b2a02ff11161011f578063b2a02ff11461076e578063ba9a7a56146107b1578063bb6ff386146107b9576102de565b8063ad7a672f1461075e578063afc8276c14610766576102de565b806395d89b411161016b57806395d89b41146106da5780639aac2c53146106e2578063a9059cbb14610725576102de565b80638c765e941461069f57806395a2251f146106a7576102de565b80633644e5151161023f5780636a627842116101f35780636f307dc3116101cd5780636f307dc31461063157806370a08231146106395780637ecebe001461066c576102de565b80636a627842146105865780636e01be10146105b95780636f13cb83146105f2576102de565b80634a5d316c116102245780634a5d316c146105155780634fd42e171461051d5780635a0f03c61461053a576102de565b80633644e515146105055780633ba0b9a91461050d576102de565b806323b872dd1161029657806330adf81f1161027b57806330adf81f146104d7578063313ce567146104df578063356c571f146104fd576102de565b806323b872dd146104635780632fa5ae1b146104a6576102de565b80630fb60fef116102c75780630fb60fef146103ad57806318160ddd146103c757806319f3400d146103cf576102de565b806306fdde03146102e3578063095ea7b314610360575b600080fd5b6102eb6109ed565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561032557818101518382015260200161030d565b50505050905090810190601f1680156103525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103996004803603604081101561037657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610a99565b604080519115158252519081900360200190f35b6103b5610ab0565b60408051918252519081900360200190f35b6103b5610abc565b610461600480360360608110156103e557600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235169160208101359181019060608101604082013564010000000081111561042257600080fd5b82018360208201111561043457600080fd5b8035906020019184600183028401116401000000008311171561045657600080fd5b509092509050610ac2565b005b6103996004803603606081101561047957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610de8565b6104ae610efc565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6103b5610f1d565b6104e7610f41565b6040805160ff9092168252519081900360200190f35b6103b5610f4a565b6103b5610f50565b6103b5610f56565b610461610fa6565b6104616004803603602081101561053357600080fd5b5035611057565b61056d6004803603602081101561055057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611171565b6040805192835260208301919091528051918290030190f35b6103b56004803603602081101561059c57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111a8565b610399600480360360408110156105cf57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611456565b61056d6004803603606081101561060857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060400135611649565b6104ae61184c565b6103b56004803603602081101561064f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611868565b6103b56004803603602081101561068257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661187a565b6103b561188c565b6103b5600480360360208110156106bd57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611892565b6102eb611ab6565b610399600480360360608110156106f857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135611b2e565b6103996004803603604081101561073b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611cc8565b6103b5611cd5565b6103b5611cdb565b6103b56004803603606081101561078457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135611ce7565b6103b5611fce565b610461600480360360208110156107cf57600080fd5b5035611fd4565b610461600480360360208110156107ec57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166120ee565b61056d612271565b6104ae6125b2565b610461600480360360a081101561082f57600080fd5b81019060208101813564010000000081111561084a57600080fd5b82018360208201111561085c57600080fd5b8035906020019184600183028401116401000000008311171561087e57600080fd5b91939092909160208101903564010000000081111561089c57600080fd5b8201836020820111156108ae57600080fd5b803590602001918460018302840111640100000000831117156108d057600080fd5b919350915073ffffffffffffffffffffffffffffffffffffffff81358116916020810135821691604090910135166125ce565b6103b5612754565b610461600480360360e081101561092157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135612760565b6104ae6127a4565b6103b56004803603604081101561098757600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166127c0565b6109b46127dd565b604080517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610461612a47565b6000805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610a915780601f10610a6657610100808354040283529160200191610a91565b820191906000526020600020905b815481529060010190602001808311610a7457829003601f168201915b505050505081565b6000610aa6338484612b15565b5060015b92915050565b670de0b6b3a764000081565b60035481565b600b5460ff16610b3357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600a54831115610bcc57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f496d7065726d61783a20494e53554646494349454e545f434153480000000000604482015290519081900360640190fd5b610bd68484612b84565b8015610ca2576040517facb86cbb0000000000000000000000000000000000000000000000000000000081523360048201818152602483018690526060604484019081526064840185905273ffffffffffffffffffffffffffffffffffffffff88169363acb86cbb93928892889288929190608401848480828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b158015610c8957600080fd5b505af1158015610c9d573d6000803e3d6000fd5b505050505b3060009081526004602052604081205490610cf36001610ce7610cc3610f56565b610cdb89670de0b6b3a764000063ffffffff612d9016565b9063ffffffff612e0a16565b9063ffffffff612e4c16565b905080821015610d4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180613c5e6024913960400191505060405180910390fd5b610d583083612ec0565b6040805186815260208101849052815173ffffffffffffffffffffffffffffffffffffffff89169233927f3f693fff038bb8a046aa76d9516190ac7444f7d69cf952c4cbdc086fdef2d6fc929081900390910190a35050610db7612f84565b5050600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555050565b73ffffffffffffffffffffffffffffffffffffffff831660009081526005602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14610ee757604080518082018252601e81527f496d7065726d61783a205452414e534645525f4e4f545f414c4c4f574544000060208083019190915273ffffffffffffffffffffffffffffffffffffffff87166000908152600582528381203382529091529190912054610eb591849063ffffffff61305a16565b73ffffffffffffffffffffffffffffffffffffffff851660009081526005602090815260408083203384529091529020555b610ef284848461310b565b5060019392505050565b600b54610100900473ffffffffffffffffffffffffffffffffffffffff1681565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60025460ff1681565b600d5481565b60065481565b600354600a5460009190811580610f6b575080155b15610f8257670de0b6b3a764000092505050610fa3565b610f9e82610cdb83670de0b6b3a764000063ffffffff612d9016565b925050505b90565b60095473ffffffffffffffffffffffffffffffffffffffff161561102b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f496d7065726d61783a20464143544f52595f414c52454144595f534554000000604482015290519081900360640190fd5b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055565b600b5460ff166110c857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905561110b81670de0b6b3a7640000670e92596fd6290000613190565b600e8190556040805182815290517f8a9bb9067f9ecb13a322b548e6df3dd1bd10a54698834dac43ed8f0e765bf94d9181900360200190a150600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60008061119f837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80611649565b91509150915091565b600b5460009060ff1661121c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b1580156112b557600080fd5b505afa1580156112c9573d6000803e3d6000fd5b505050506040513d60208110156112df57600080fd5b5051600a549091506000906112fb90839063ffffffff61327616565b9050611320611308610f56565b610cdb83670de0b6b3a764000063ffffffff612d9016565b92506003546000141561134e5761133f836103e863ffffffff61327616565b925061134e60006103e86132b8565b600083116113bd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f496d7065726d61783a204d494e545f414d4f554e545f5a45524f000000000000604482015290519081900360640190fd5b6113c784846132b8565b6040805182815260208101859052815173ffffffffffffffffffffffffffffffffffffffff87169233927f2f00e3cdd69a77be7ed215ec7b2a36784dd158f921fca79ac29deffa353fe6ee929081900390910190a35050611426612f84565b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055919050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600460205260408120548083111561148e576000915050610aaa565b82810360006114b7670de0b6b3a7640000610cdb6114aa610f56565b859063ffffffff612d9016565b90506000600b60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634d73e9ba886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561155a57600080fd5b505afa15801561156e573d6000803e3d6000fd5b505050506040513d602081101561158457600080fd5b5051600c54604080517f4d73e9ba00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b8116600483015291519394506000939190921691634d73e9ba916024808301926020929190829003018186803b1580156115ff57600080fd5b505afa158015611613573d6000803e3d6000fd5b505050506040513d602081101561162957600080fd5b50519050600061163a848484613369565b159a9950505050505050505050565b6000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84141561171c57600b54604080517f4d73e9ba00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152915161010090930490911691634d73e9ba91602480820192602092909190829003018186803b1580156116ed57600080fd5b505afa158015611701573d6000803e3d6000fd5b505050506040513d602081101561171757600080fd5b505193505b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8314156117e657600c54604080517f4d73e9ba00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015291519190921691634d73e9ba916024808301926020929190829003018186803b1580156117b757600080fd5b505afa1580156117cb573d6000803e3d6000fd5b505050506040513d60208110156117e157600080fd5b505192505b6000611831670de0b6b3a7640000610cdb6117ff610f56565b73ffffffffffffffffffffffffffffffffffffffff8a166000908152600460205260409020549063ffffffff612d9016565b905061183e818686613369565b92509250505b935093915050565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b60046020526000908152604090205481565b60076020526000908152604090205481565b600e5481565b600b5460009060ff1661190657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905530600090815260046020526040902054611962670de0b6b3a7640000610cdb611955610f56565b849063ffffffff612d9016565b9150600082116119d357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496d7065726d61783a2052454445454d5f414d4f554e545f5a45524f00000000604482015290519081900360640190fd5b600a54821115611a4457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f496d7065726d61783a20494e53554646494349454e545f434153480000000000604482015290519081900360640190fd5b611a4e3082612ec0565b611a588383612b84565b6040805183815260208101839052815173ffffffffffffffffffffffffffffffffffffffff86169233927f3f693fff038bb8a046aa76d9516190ac7444f7d69cf952c4cbdc086fdef2d6fc929081900390910190a350611426612f84565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610a915780601f10610a6657610100808354040283529160200191610a91565b600b54600c5460009173ffffffffffffffffffffffffffffffffffffffff6101009091048116918116908516821480611b9257508073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16145b611bfd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f496d7065726d61783a20494e56414c49445f424f52524f5741424c4500000000604482015290519081900360640190fd5b60008273ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614611c58577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff611c5a565b845b905060008273ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614611cb7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff611cb9565b855b9050600061163a898484611649565b6000610aa633848461310b565b600a5481565b670e92596fd629000081565b600b54600090610100900473ffffffffffffffffffffffffffffffffffffffff16331480611d2c5750600c5473ffffffffffffffffffffffffffffffffffffffff1633145b611d9757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496d7065726d61783a20554e415554484f52495a454400000000000000000000604482015290519081900360640190fd5b6000611da284611171565b91505060008111611e1457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f496d7065726d61783a20494e53554646494349454e545f53484f525446414c4c604482015290519081900360640190fd5b600b54600090610100900473ffffffffffffffffffffffffffffffffffffffff16331415611e4c57611e44612271565b509050611e58565b611e54612271565b9150505b611e94611e63610f56565b610cdb83611e88670de0b6b3a7640000610cdb600e548b612d9090919063ffffffff16565b9063ffffffff612d9016565b9250611f1f836040518060400160405280601e81526020017f496d7065726d61783a204c49515549444154494e475f544f4f5f4d5543480000815250600460008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461305a9092919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff8087166000908152600460205260408082209390935590881681522054611f61908463ffffffff612e4c16565b73ffffffffffffffffffffffffffffffffffffffff80881660008181526004602090815260409182902094909455805187815290519193928916927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350509392505050565b6103e881565b600b5460ff1661204557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905561208881670de0b6b3a76400006715f15565d2c5f000613190565b600d8190556040805182815290517fdff9a61839be6f6ce5ea77311cc351786a39a9f337c507ff35e7b358fd39c0439181900360200190a150600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b600b5460ff1661215f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600a54600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905161224393859361223e93919273ffffffffffffffffffffffffffffffffffffffff909116916370a08231916024808301926020929190829003018186803b15801561220657600080fd5b505afa15801561221a573d6000803e3d6000fd5b505050506040513d602081101561223057600080fd5b50519063ffffffff61327616565b612b84565b50600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b600080600061227e6127dd565b9050600080600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156122eb57600080fd5b505afa1580156122ff573d6000803e3d6000fd5b505050506040513d606081101561231557600080fd5b508051602091820151600854604080517f18160ddd000000000000000000000000000000000000000000000000000000008152905193965091945060009373ffffffffffffffffffffffffffffffffffffffff909116926318160ddd926004808201939291829003018186803b15801561238e57600080fd5b505afa1580156123a2573d6000803e3d6000fd5b505050506040513d60208110156123b857600080fd5b5051905060006123f5846123cb8561345d565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169063ffffffff61348116565b905060006124347bffffffffffffffffffffffffffffffffffffffffffffffffffffffff80841690610cdb90891664010000000063ffffffff612d9016565b905060006124556124508364010000000063ffffffff612d9016565b6134c2565b905060006124886dffffffffffffffffffffffffffff6002890216610cdb87670de0b6b3a764000063ffffffff612d9016565b905060006124bb6dffffffffffffffffffffffffffff6002890216610cdb88670de0b6b3a764000063ffffffff612d9016565b90506124d6640100000000610cdb848663ffffffff612d9016565b9a506124f183610cdb8364010000000063ffffffff612d9016565b995060648b1161254c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613c826021913960400191505060405180910390fd5b60648a116125a5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613c826021913960400191505060405180910390fd5b5050505050505050509091565b60095473ffffffffffffffffffffffffffffffffffffffff1681565b60095473ffffffffffffffffffffffffffffffffffffffff16331461265457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496d7065726d61783a20554e415554484f52495a454400000000000000000000604482015290519081900360640190fd5b6126c787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b01819004810282018101909252898152925089915088908190840183828082843760009201919091525061351492505050565b6008805473ffffffffffffffffffffffffffffffffffffffff9485167fffffffffffffffffffffffff000000000000000000000000000000000000000091821617909155600b8054938516610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff90941693909317909255600c805491909316911617905550505050565b6715f15565d2c5f00081565b612790878787878787877f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c96135f8565b61279b878787612b15565b50505050505050565b600c5473ffffffffffffffffffffffffffffffffffffffff1681565b600560209081526000928352604080842090915290825290205481565b600080600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ebeb31db6040518163ffffffff1660e01b815260040160206040518083038186803b15801561284857600080fd5b505afa15801561285c573d6000803e3d6000fd5b505050506040513d602081101561287257600080fd5b5051600854604080517f252c09d70000000000000000000000000000000000000000000000000000000081527ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe8401600482015290519293506000928392839273ffffffffffffffffffffffffffffffffffffffff9091169163252c09d791602480820192606092909190829003018186803b15801561291157600080fd5b505afa158015612925573d6000803e3d6000fd5b505050506040513d606081101561293b57600080fd5b508051602082015160409283015160085484517f1df8c717000000000000000000000000000000000000000000000000000000008152945193975091955093506000928392839273ffffffffffffffffffffffffffffffffffffffff1691631df8c717916004808301926060929190829003018186803b1580156129be57600080fd5b505afa1580156129d2573d6000803e3d6000fd5b505050506040513d60608110156129e857600080fd5b508051602082015160409092015190945090925090508581036000612a178288870381612a1157fe5b0461389b565b90506000612a298388870381612a1157fe5b9050612a38826123cb8361345d565b9a505050505050505050505090565b600b5460ff16612ab857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055612ae8612f84565b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260056020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600854604080518082018252601981527f7472616e7366657228616464726573732c75696e743235362900000000000000602091820152815173ffffffffffffffffffffffffffffffffffffffff86811660248301526044808301879052845180840390910181526064909201845291810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251815160009560609594169382918083835b60208310612c8a57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101612c4d565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612cec576040519150601f19603f3d011682016040523d82523d6000602084013e612cf1565b606091505b5091509150818015612d1f575080511580612d1f5750808060200190516020811015612d1c57600080fd5b50515b612d8a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f496d7065726d61783a205452414e534645525f4641494c454400000000000000604482015290519081900360640190fd5b50505050565b600082612d9f57506000610aaa565b82820282848281612dac57fe5b0414612e03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613cf56021913960400191505060405180910390fd5b9392505050565b6000612e0383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061391e565b600082820183811015612e0357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902054612ef6908263ffffffff61327616565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260046020526040902055600354612f2f908263ffffffff61327616565b60035560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b158015612ff557600080fd5b505afa158015613009573d6000803e3d6000fd5b505050506040513d602081101561301f57600080fd5b5051600a81905560408051918252517f8a0df8ef054fae2c3d2d19a7b322e864870cc9fd3cb07fb9526309c596244bf49181900360200190a1565b60008184841115613103576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156130c85781810151838201526020016130b0565b50505050905090810190601f1680156130f55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6131158382611456565b61318057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f496d7065726d61783a20494e53554646494349454e545f4c4951554944495459604482015290519081900360640190fd5b61318b83838361399d565b505050565b613198613ab6565b8183101561320757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f496d7065726d61783a20494e56414c49445f53455454494e4700000000000000604482015290519081900360640190fd5b8083111561318b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f496d7065726d61783a20494e56414c49445f53455454494e4700000000000000604482015290519081900360640190fd5b6000612e0383836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f770081525061305a565b6003546132cb908263ffffffff612e4c16565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902054613304908263ffffffff612e4c16565b73ffffffffffffffffffffffffffffffffffffffff831660008181526004602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600d546000908190818061337b612271565b9092509050600061339e670de0b6b3a7640000610cdb8a8663ffffffff612d9016565b905060006133be670de0b6b3a7640000610cdb8a8663ffffffff612d9016565b9050808210156133ca57905b6133e6670de0b6b3a7640000610cdb848863ffffffff612d9016565b915061340485610cdb83670de0b6b3a764000063ffffffff612d9016565b9050600061342d670de0b6b3a7640000610cdb600e54611e888688612e4c90919063ffffffff16565b9050808b10613449578a03965060009550611844945050505050565b600097508a90039550611844945050505050565b6dffffffffffffffffffffffffffff166e0100000000000000000000000000000290565b60006dffffffffffffffffffffffffffff82167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8416816134ba57fe5b049392505050565b60006003821115613505575080600160028204015b818110156134ff578091506002818285816134ee57fe5b0401816134f757fe5b0490506134d7565b5061350f565b811561350f575060015b919050565b8151613527906000906020850190613bcf565b50805161353b906001906020840190613bcf565b506040514690806052613ca382396040805191829003605201822086516020978801208383018352600184527f310000000000000000000000000000000000000000000000000000000000000093880193909352815180880191909152808201929092527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606083015260808201939093523060a0808301919091528351808303909101815260c090910190925250805192019190912060065550565b4285101561366757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496d7065726d61783a2045585049524544000000000000000000000000000000604482015290519081900360640190fd5b60065473ffffffffffffffffffffffffffffffffffffffff808a1660008181526007602090815260408083208054600180820190925582518085018a905280840196909652958e166060860152608085018d905260a085019590955260c08085018c90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff8a166101828501526101a284018990526101c28401889052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa1580156137a9573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81161580159061382457508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b61388f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f496d7065726d61783a20494e56414c49445f5349474e41545552450000000000604482015290519081900360640190fd5b50505050505050505050565b60006e010000000000000000000000000000821061391a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496d7065726d61783a2053414645313132000000000000000000000000000000604482015290519081900360640190fd5b5090565b60008183613987576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156130c85781810151838201526020016130b0565b50600083858161399357fe5b0495945050505050565b604080518082018252601b81527f496d7065726d61783a205452414e534645525f544f4f5f48494748000000000060208083019190915273ffffffffffffffffffffffffffffffffffffffff8616600090815260049091529190912054613a0b91839063ffffffff61305a16565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600460205260408082209390935590841681522054613a4d908263ffffffff612e4c16565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526004602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f851a4406040518163ffffffff1660e01b815260040160206040518083038186803b158015613b1e57600080fd5b505afa158015613b32573d6000803e3d6000fd5b505050506040513d6020811015613b4857600080fd5b505173ffffffffffffffffffffffffffffffffffffffff163314613bcd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496d7065726d61783a20554e415554484f52495a454400000000000000000000604482015290519081900360640190fd5b565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613c1057805160ff1916838001178555613c3d565b82800160010185558215613c3d579182015b82811115613c3d578251825591602001919060010190613c22565b5061391a92610fa39250905b8082111561391a5760008155600101613c4956fe496d7065726d61783a20494e53554646494349454e545f52454445454d5f544f4b454e53496d7065726d61783a2050524943455f43414c43554c4154494f4e5f4552524f52454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a7231582036639634c0d56dae503e6e9ea3b464cf5aa17490b002261826f0ac4dc9201d5264736f6c63430005100032a265627a7a72315820dfeccca4665ea5fea06184fda13b3d43bcec1ff60db2148d27e71a13678e4a9a64736f6c63430005100032

Deployed Bytecode Sourcemap

40255:384:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;40255:384:0;;;;;;;;;;;;;;;;;;;40322:314;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;40322:314:0;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;40389:18;40414:21;40438:29;;;;;;;;:::i;:::-;41:4:-1;34:5;30:16;25:3;21:26;14:5;7:41;87:2;83:7;78:2;73:3;69:12;65:26;61:2;54:38;40438:29:0;40414:53;;40472:12;40514:10;40526:13;40497:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;40497:43:0;;;40487:54;;;;;;40472:69;;40622:4;40611:8;40605:15;40600:2;40590:8;40586:17;40583:1;40575:52;40561:66;40555:77;-1:-1:-1;;;;40555:77:0:o;40255:384::-;;;;;;;;:::o

Swarm Source

bzzr://dfeccca4665ea5fea06184fda13b3d43bcec1ff60db2148d27e71a13678e4a9a

Block Transaction Gas Used Reward
view all blocks produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.