false
false
100

Contract Address Details

0x99d17986FcfFeB42700F6A9fCD15927bf1FD0DF3

Contract Name
UniswapV2Locker
Creator
0x2cb572–a2d739 at 0x0934e8–5edae8
Balance
0 KAVA ( )
Tokens
Fetching tokens...
Transactions
Fetching transactions...
Transfers
Fetching transfers...
Gas Used
Fetching gas used...
Last Balance Update
9524677
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
UniswapV2Locker




Optimization enabled
true
Compiler version
v0.6.12+commit.27d51765




Optimization runs
200
EVM Version
default




Verified at
2022-06-28T07:25:44.133056Z

Constructor Arguments

0000000000000000000000004fd2c40c25dd40e9bf0ce8479ba384178b8671b5

Arg [0] (address) : 0x4fd2c40c25dd40e9bf0ce8479ba384178b8671b5

              

Contract source code

// Sources flattened with hardhat v2.7.0 https://hardhat.org

// File contracts/TransferHelper.sol

pragma solidity 0.6.12;
// ALL RIGHTS RESERVED
/**
    helper methods for interacting with ERC20 tokens that do not consistently return true/false
    with the addition of a transfer function to send eth or an erc20 token
*/
library TransferHelper {
    function safeApprove(address token, address to, uint value) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED');
    }

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

    function safeTransferFrom(address token, address from, address to, uint value) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED');
    }
    
    // sends ETH or an erc20 token
    function safeTransferBaseToken(address token, address payable to, uint value, bool isERC20) internal {
        if (!isERC20) {
            to.transfer(value);
        } else {
            (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
            require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED');
        }
    }
}


// File contracts/EnumerableSet.sol


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

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;

        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping (bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) { // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            bytes32 lastvalue = set._values[lastIndex];

            // Move the last value to the index where the value to delete is
            set._values[toDeleteIndex] = lastvalue;
            // Update the index for the moved value
            set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        require(set._values.length > index, "EnumerableSet: index out of bounds");
        return set._values[index];
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint256(_at(set._inner, index)));
    }


    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}


// File contracts/SafeMath.sol

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

pragma solidity >=0.6.0 <0.8.0;

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    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 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) {
        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/Context.sol

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

pragma solidity >=0.6.0 <0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}


// File contracts/Ownable.sol

// File: Ownable.sol

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

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */

abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}


// File contracts/ReentrancyGuard.sol

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

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}


// File contracts/UniswapV2Locker.sol
// SPDX-License-Identifier: UNLICENSED
// This contract locks uniswap v2 liquidity tokens. Used to give investors peace of mind a token team has locked liquidity
// and that the univ2 tokens cannot be removed from uniswap until the specified unlock date has been reached.

pragma solidity 0.6.12;

interface IUniswapV2Pair {
    function factory() external view returns (address);

    function token0() external view returns (address);

    function token1() external view returns (address);
}

interface IERCBurn {
    function burn(uint256 _amount) external;

    function approve(address spender, uint256 amount) external returns (bool);

    function allowance(address owner, address spender)
        external
        returns (uint256);

    function balanceOf(address account) external view returns (uint256);
}

interface IUniFactory {
    function getPair(address tokenA, address tokenB)
        external
        view
        returns (address);
}

interface IMigrator {
    function migrate(
        address lpToken,
        uint256 amount,
        uint256 unlockDate,
        address owner
    ) external returns (bool);
}

contract UniswapV2Locker is Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    using EnumerableSet for EnumerableSet.AddressSet;

    EnumerableSet.AddressSet allowedUniswapFactories;

    struct UserInfo {
        EnumerableSet.AddressSet lockedTokens; // records all tokens the user has locked
        mapping(address => uint256[]) locksForToken; // map erc20 address to lock id for that token
    }

    struct TokenLock {
        uint256 lockDate; // the date the token was locked
        uint256 amount; // the amount of tokens still locked (initialAmount minus withdrawls)
        uint256 initialAmount; // the initial lock amount
        uint256 unlockDate; // the date the token can be withdrawn
        uint256 lockID; // lockID nonce per uni pair
        address owner;
        string logoUrl; // Logo URL for the pair;
    }

    mapping(address => UserInfo) private users;

    EnumerableSet.AddressSet private lockedTokens;
    mapping(address => TokenLock[]) public tokenLocks; //map univ2 pair to all its locks

    struct FeeStruct {
        uint256 ethFee; // Small eth fee to prevent spam on the platform
        IERCBurn secondaryFeeToken; //
        uint256 secondaryTokenFee; // optional,
        uint256 secondaryTokenDiscount; // discount on liquidity fee for burning secondaryToken
        uint256 liquidityFee; // fee on univ2 liquidity tokens
        uint256 referralPercent; // fee for referrals
        IERCBurn referralToken; // token the refferer must hold to qualify as a referrer
        uint256 referralHold; // balance the referrer must hold to qualify as a referrer
        uint256 referralDiscount; // discount on flatrate fees for using a valid referral address
    }

    FeeStruct public gFees;
    EnumerableSet.AddressSet private feeWhitelist;

    address payable devaddr;

    IMigrator migrator;

    event onDeposit(
        address lpToken,
        address user,
        uint256 amount,
        uint256 lockDate,
        uint256 unlockDate
    );
    event onWithdraw(address lpToken, uint256 amount);

    constructor(address _uniswapFactory) public {
        devaddr = msg.sender;
        gFees.referralPercent = 0; // 25% = 250
        gFees.ethFee = 0; // 1 eth = 1e18
        gFees.secondaryTokenFee = 0; // 1 token = 1e18
        gFees.secondaryTokenDiscount = 0; // 20% = 200
        gFees.liquidityFee = 0; // 1% = 10
        gFees.referralHold = 0; // 10 eth = 10e18
        gFees.referralDiscount = 0; // 10% = 100
        allowedUniswapFactories.add(_uniswapFactory);
    }

    function toggleUniswapFactory(address _uniswapFactory, uint8 add)
        public
        onlyOwner
    {
        if (add == 0) {
            allowedUniswapFactories.remove(_uniswapFactory);
        } else {
            allowedUniswapFactories.add(_uniswapFactory);
        }
    }

    function setDev(address payable _devaddr) public onlyOwner {
        devaddr = _devaddr;
    }

    /**
     * @notice set the migrator contract which allows locked lp tokens to be migrated to uniswap v3
     */
    function setMigrator(IMigrator _migrator) public onlyOwner {
        migrator = _migrator;
    }

    function setSecondaryFeeToken(address _secondaryFeeToken) public onlyOwner {
        gFees.secondaryFeeToken = IERCBurn(_secondaryFeeToken);
    }

    /**
     * @notice referrers need to hold the specified token and hold amount to be elegible for referral fees
     */
    function setReferralTokenAndHold(IERCBurn _referralToken, uint256 _hold)
        public
        onlyOwner
    {
        gFees.referralToken = _referralToken;
        gFees.referralHold = _hold;
    }

    function setFees(
        uint256 _referralPercent,
        uint256 _referralDiscount,
        uint256 _ethFee,
        uint256 _secondaryTokenFee,
        uint256 _secondaryTokenDiscount,
        uint256 _liquidityFee
    ) public onlyOwner {
        gFees.referralPercent = _referralPercent;
        gFees.referralDiscount = _referralDiscount;
        gFees.ethFee = _ethFee;
        gFees.secondaryTokenFee = _secondaryTokenFee;
        gFees.secondaryTokenDiscount = _secondaryTokenDiscount;
        gFees.liquidityFee = _liquidityFee;
    }

    /**
     * @notice whitelisted accounts dont pay flatrate fees on locking
     */
    function whitelistFeeAccount(address _user, bool _add) public onlyOwner {
        if (_add) {
            feeWhitelist.add(_user);
        } else {
            feeWhitelist.remove(_user);
        }
    }

    /**
     * @notice Creates a new lock
     * @param _lpToken the univ2 token address
     * @param _amount amount of LP tokens to lock
     * @param _unlock_date the unix timestamp (in seconds) until unlock
     * @param _referral the referrer address if any or address(0) for none
     * @param _fee_in_eth fees can be paid in eth or in a secondary token with a discount on univ2 tokens
     * @param _withdrawer the user who can withdraw liquidity once the lock expires.
     */
    function lockLPToken(
        address _lpToken,
        uint256 _amount,
        uint256 _unlock_date,
        address payable _referral,
        bool _fee_in_eth,
        address payable _withdrawer,
        string memory logoUrl
    ) external payable nonReentrant {
        require(_unlock_date < 10000000000, "TIMESTAMP INVALID"); // prevents errors when timestamp entered in milliseconds
        require(_amount > 0, "INSUFFICIENT");

        // ensure this pair is a univ2 pair by querying the factory
        IUniswapV2Pair lpair = IUniswapV2Pair(address(_lpToken));
        require(
            allowedUniswapFactories.contains(lpair.factory()),
            "INVALID_UNISWAP_FACTORY"
        );
        address factoryPairAddress = IUniFactory(lpair.factory()).getPair(
            lpair.token0(),
            lpair.token1()
        );
        require(factoryPairAddress == address(_lpToken), "NOT UNIV2");

        TransferHelper.safeTransferFrom(
            _lpToken,
            address(msg.sender),
            address(this),
            _amount
        );

        if (
            _referral != address(0) &&
            address(gFees.referralToken) != address(0)
        ) {
            require(
                gFees.referralToken.balanceOf(_referral) >= gFees.referralHold,
                "INADEQUATE BALANCE"
            );
        }

        // flatrate fees
        if (!feeWhitelist.contains(msg.sender)) {
            if (_fee_in_eth) {
                // charge fee in eth
                uint256 ethFee = gFees.ethFee;
                if (_referral != address(0)) {
                    ethFee = ethFee.mul(1000 - gFees.referralDiscount).div(
                        1000
                    );
                }
                require(msg.value == ethFee, "FEE NOT MET");
                uint256 devFee = ethFee;
                if (ethFee != 0 && _referral != address(0)) {
                    // referral fee
                    uint256 referralFee = devFee.mul(gFees.referralPercent).div(
                        1000
                    );
                    _referral.transfer(referralFee);
                    devFee = devFee.sub(referralFee);
                }
                devaddr.transfer(devFee);
            } else {
                // charge fee in token
                uint256 burnFee = gFees.secondaryTokenFee;
                if (_referral != address(0)) {
                    burnFee = burnFee.mul(1000 - gFees.referralDiscount).div(
                        1000
                    );
                }
                TransferHelper.safeTransferFrom(
                    address(gFees.secondaryFeeToken),
                    address(msg.sender),
                    address(this),
                    burnFee
                );
                if (gFees.referralPercent != 0 && _referral != address(0)) {
                    // referral fee
                    uint256 referralFee = burnFee
                        .mul(gFees.referralPercent)
                        .div(1000);
                    TransferHelper.safeApprove(
                        address(gFees.secondaryFeeToken),
                        _referral,
                        referralFee
                    );
                    TransferHelper.safeTransfer(
                        address(gFees.secondaryFeeToken),
                        _referral,
                        referralFee
                    );
                    burnFee = burnFee.sub(referralFee);
                }
                gFees.secondaryFeeToken.burn(burnFee);
            }
        } else if (msg.value > 0) {
            // refund eth if a whitelisted member sent it by mistake
            msg.sender.transfer(msg.value);
        }

        // percent fee
        uint256 liquidityFee = _amount.mul(gFees.liquidityFee).div(1000);
        if (!_fee_in_eth && !feeWhitelist.contains(msg.sender)) {
            // fee discount for large lockers using secondary token
            liquidityFee = liquidityFee
                .mul(1000 - gFees.secondaryTokenDiscount)
                .div(1000);
        }
        TransferHelper.safeTransfer(_lpToken, devaddr, liquidityFee);
        uint256 amountLocked = _amount.sub(liquidityFee);

        TokenLock memory token_lock;
        token_lock.lockDate = block.timestamp;
        token_lock.amount = amountLocked;
        token_lock.initialAmount = amountLocked;
        token_lock.unlockDate = _unlock_date;
        token_lock.lockID = tokenLocks[_lpToken].length;
        token_lock.owner = _withdrawer;
        token_lock.logoUrl = logoUrl;
        // record the lock for the univ2pair
        tokenLocks[_lpToken].push(token_lock);
        lockedTokens.add(_lpToken);

        // record the lock for the user
        UserInfo storage user = users[_withdrawer];
        user.lockedTokens.add(_lpToken);
        uint256[] storage user_locks = user.locksForToken[_lpToken];
        user_locks.push(token_lock.lockID);

        emit onDeposit(
            _lpToken,
            msg.sender,
            token_lock.amount,
            token_lock.lockDate,
            token_lock.unlockDate
        );
    }

    /**
     * @notice change the logo url of a lock
     */
    function updateLogoUrl(
        address _lpToken,
        uint256 _index,
        uint256 _lockID,
        string memory logoUrl
    ) external nonReentrant {
        uint256 lockID = users[msg.sender].locksForToken[_lpToken][_index];
        TokenLock storage userLock = tokenLocks[_lpToken][lockID];
        require(
            lockID == _lockID && userLock.owner == msg.sender,
            "LOCK MISMATCH"
        ); // ensures correct lock is affected
        userLock.logoUrl = logoUrl;
    }

    /**
     * @notice extend a lock with a new unlock date, _index and _lockID ensure the correct lock is changed
     * this prevents errors when a user performs multiple tx per block possibly with varying gas prices
     */
    function relock(
        address _lpToken,
        uint256 _index,
        uint256 _lockID,
        uint256 _unlock_date
    ) external nonReentrant {
        require(_unlock_date < 10000000000, "TIMESTAMP INVALID"); // prevents errors when timestamp entered in milliseconds
        uint256 lockID = users[msg.sender].locksForToken[_lpToken][_index];
        TokenLock storage userLock = tokenLocks[_lpToken][lockID];
        require(
            lockID == _lockID && userLock.owner == msg.sender,
            "LOCK MISMATCH"
        ); // ensures correct lock is affected
        require(userLock.unlockDate < _unlock_date, "UNLOCK BEFORE");

        uint256 liquidityFee = userLock.amount.mul(gFees.liquidityFee).div(
            1000
        );
        uint256 amountLocked = userLock.amount.sub(liquidityFee);

        userLock.amount = amountLocked;
        userLock.unlockDate = _unlock_date;

        // send univ2 fee to dev address
        TransferHelper.safeTransfer(_lpToken, devaddr, liquidityFee);
    }

    /**
     * @notice withdraw a specified amount from a lock. _index and _lockID ensure the correct lock is changed
     * this prevents errors when a user performs multiple tx per block possibly with varying gas prices
     */
    function withdraw(
        address _lpToken,
        uint256 _index,
        uint256 _lockID,
        uint256 _amount
    ) external nonReentrant {
        require(_amount > 0, "ZERO WITHDRAWL");
        uint256 lockID = users[msg.sender].locksForToken[_lpToken][_index];
        TokenLock storage userLock = tokenLocks[_lpToken][lockID];
        require(
            lockID == _lockID && userLock.owner == msg.sender,
            "LOCK MISMATCH"
        ); // ensures correct lock is affected
        require(userLock.unlockDate < block.timestamp, "NOT YET");
        userLock.amount = userLock.amount.sub(_amount);

        // clean user storage
        if (userLock.amount == 0) {
            uint256[] storage userLocks = users[msg.sender].locksForToken[
                _lpToken
            ];
            userLocks[_index] = userLocks[userLocks.length - 1];
            userLocks.pop();
            if (userLocks.length == 0) {
                users[msg.sender].lockedTokens.remove(_lpToken);
            }
        }

        TransferHelper.safeTransfer(_lpToken, msg.sender, _amount);
        emit onWithdraw(_lpToken, _amount);
    }

    /**
     * @notice increase the amount of tokens per a specific lock, this is preferable to creating a new lock, less fees, and faster loading on our live block explorer
     */
    function incrementLock(
        address _lpToken,
        uint256 _index,
        uint256 _lockID,
        uint256 _amount
    ) external nonReentrant {
        require(_amount > 0, "ZERO AMOUNT");
        uint256 lockID = users[msg.sender].locksForToken[_lpToken][_index];
        TokenLock storage userLock = tokenLocks[_lpToken][lockID];
        require(
            lockID == _lockID && userLock.owner == msg.sender,
            "LOCK MISMATCH"
        ); // ensures correct lock is affected

        TransferHelper.safeTransferFrom(
            _lpToken,
            address(msg.sender),
            address(this),
            _amount
        );

        // send univ2 fee to dev address
        uint256 liquidityFee = _amount.mul(gFees.liquidityFee).div(1000);
        TransferHelper.safeTransfer(_lpToken, devaddr, liquidityFee);
        uint256 amountLocked = _amount.sub(liquidityFee);

        userLock.amount = userLock.amount.add(amountLocked);

        emit onDeposit(
            _lpToken,
            msg.sender,
            amountLocked,
            userLock.lockDate,
            userLock.unlockDate
        );
    }

    /**
     * @notice split a lock into two seperate locks, useful when a lock is about to expire and youd like to relock a portion
     * and withdraw a smaller portion
     */
    function splitLock(
        address _lpToken,
        uint256 _index,
        uint256 _lockID,
        uint256 _amount
    ) external payable nonReentrant {
        require(_amount > 0, "ZERO AMOUNT");
        uint256 lockID = users[msg.sender].locksForToken[_lpToken][_index];
        TokenLock storage userLock = tokenLocks[_lpToken][lockID];
        require(
            lockID == _lockID && userLock.owner == msg.sender,
            "LOCK MISMATCH"
        ); // ensures correct lock is affected

        require(msg.value == gFees.ethFee, "FEE NOT MET");
        devaddr.transfer(gFees.ethFee);

        userLock.amount = userLock.amount.sub(_amount);

        TokenLock memory token_lock;
        token_lock.lockDate = userLock.lockDate;
        token_lock.amount = _amount;
        token_lock.initialAmount = _amount;
        token_lock.unlockDate = userLock.unlockDate;
        token_lock.lockID = tokenLocks[_lpToken].length;
        token_lock.owner = msg.sender;

        // record the lock for the univ2pair
        tokenLocks[_lpToken].push(token_lock);

        // record the lock for the user
        UserInfo storage user = users[msg.sender];
        uint256[] storage user_locks = user.locksForToken[_lpToken];
        user_locks.push(token_lock.lockID);
    }

    /**
     * @notice transfer a lock to a new owner, e.g. presale project -> project owner
     */
    function transferLockOwnership(
        address _lpToken,
        uint256 _index,
        uint256 _lockID,
        address payable _newOwner
    ) external {
        require(msg.sender != _newOwner, "OWNER");
        uint256 lockID = users[msg.sender].locksForToken[_lpToken][_index];
        TokenLock storage transferredLock = tokenLocks[_lpToken][lockID];
        require(
            lockID == _lockID && transferredLock.owner == msg.sender,
            "LOCK MISMATCH"
        ); // ensures correct lock is affected

        // record the lock for the new Owner
        UserInfo storage user = users[_newOwner];
        user.lockedTokens.add(_lpToken);
        uint256[] storage user_locks = user.locksForToken[_lpToken];
        user_locks.push(transferredLock.lockID);

        // remove the lock from the old owner
        uint256[] storage userLocks = users[msg.sender].locksForToken[_lpToken];
        userLocks[_index] = userLocks[userLocks.length - 1];
        userLocks.pop();
        if (userLocks.length == 0) {
            users[msg.sender].lockedTokens.remove(_lpToken);
        }
        transferredLock.owner = _newOwner;
    }

    /**
     * @notice migrates liquidity to uniswap v3
     */
    function migrate(
        address _lpToken,
        uint256 _index,
        uint256 _lockID,
        uint256 _amount
    ) external nonReentrant {
        require(address(migrator) != address(0), "NOT SET");
        require(_amount > 0, "ZERO MIGRATION");

        uint256 lockID = users[msg.sender].locksForToken[_lpToken][_index];
        TokenLock storage userLock = tokenLocks[_lpToken][lockID];
        require(
            lockID == _lockID && userLock.owner == msg.sender,
            "LOCK MISMATCH"
        ); // ensures correct lock is affected
        userLock.amount = userLock.amount.sub(_amount);

        // clean user storage
        if (userLock.amount == 0) {
            uint256[] storage userLocks = users[msg.sender].locksForToken[
                _lpToken
            ];
            userLocks[_index] = userLocks[userLocks.length - 1];
            userLocks.pop();
            if (userLocks.length == 0) {
                users[msg.sender].lockedTokens.remove(_lpToken);
            }
        }

        TransferHelper.safeApprove(_lpToken, address(migrator), _amount);
        migrator.migrate(_lpToken, _amount, userLock.unlockDate, msg.sender);
    }

    function getNumLocksForToken(address _lpToken)
        external
        view
        returns (uint256)
    {
        return tokenLocks[_lpToken].length;
    }

    function getNumLockedTokens() external view returns (uint256) {
        return lockedTokens.length();
    }

    function getLockedTokenAtIndex(uint256 _index)
        external
        view
        returns (address)
    {
        return lockedTokens.at(_index);
    }

    // user functions
    function getUserNumLockedTokens(address _user)
        external
        view
        returns (uint256)
    {
        UserInfo storage user = users[_user];
        return user.lockedTokens.length();
    }

    function getUserLockedTokenAtIndex(address _user, uint256 _index)
        external
        view
        returns (address)
    {
        UserInfo storage user = users[_user];
        return user.lockedTokens.at(_index);
    }

    function getUserNumLocksForToken(address _user, address _lpToken)
        external
        view
        returns (uint256)
    {
        UserInfo storage user = users[_user];
        return user.locksForToken[_lpToken].length;
    }

    function getUserLockForTokenAtIndex(
        address _user,
        address _lpToken,
        uint256 _index
    )
        external
        view
        returns (
            uint256,
            uint256,
            uint256,
            uint256,
            uint256,
            address
        )
    {
        uint256 lockID = users[_user].locksForToken[_lpToken][_index];
        TokenLock storage tokenLock = tokenLocks[_lpToken][lockID];
        return (
            tokenLock.lockDate,
            tokenLock.amount,
            tokenLock.initialAmount,
            tokenLock.unlockDate,
            tokenLock.lockID,
            tokenLock.owner
        );
    }

    // whitelist
    function getWhitelistedUsersLength() external view returns (uint256) {
        return feeWhitelist.length();
    }

    function getWhitelistedUserAtIndex(uint256 _index)
        external
        view
        returns (address)
    {
        return feeWhitelist.at(_index);
    }

    function getUserWhitelistStatus(address _user)
        external
        view
        returns (bool)
    {
        return feeWhitelist.contains(_user);
    }

    function getUniswapFactoriesLength() external view returns (uint256) {
        return allowedUniswapFactories.length();
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_uniswapFactory","internalType":"address"}]},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"onDeposit","inputs":[{"type":"address","name":"lpToken","internalType":"address","indexed":false},{"type":"address","name":"user","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"lockDate","internalType":"uint256","indexed":false},{"type":"uint256","name":"unlockDate","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"onWithdraw","inputs":[{"type":"address","name":"lpToken","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"ethFee","internalType":"uint256"},{"type":"address","name":"secondaryFeeToken","internalType":"contract IERCBurn"},{"type":"uint256","name":"secondaryTokenFee","internalType":"uint256"},{"type":"uint256","name":"secondaryTokenDiscount","internalType":"uint256"},{"type":"uint256","name":"liquidityFee","internalType":"uint256"},{"type":"uint256","name":"referralPercent","internalType":"uint256"},{"type":"address","name":"referralToken","internalType":"contract IERCBurn"},{"type":"uint256","name":"referralHold","internalType":"uint256"},{"type":"uint256","name":"referralDiscount","internalType":"uint256"}],"name":"gFees","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getLockedTokenAtIndex","inputs":[{"type":"uint256","name":"_index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getNumLockedTokens","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getNumLocksForToken","inputs":[{"type":"address","name":"_lpToken","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getUniswapFactoriesLength","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"address","name":"","internalType":"address"}],"name":"getUserLockForTokenAtIndex","inputs":[{"type":"address","name":"_user","internalType":"address"},{"type":"address","name":"_lpToken","internalType":"address"},{"type":"uint256","name":"_index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getUserLockedTokenAtIndex","inputs":[{"type":"address","name":"_user","internalType":"address"},{"type":"uint256","name":"_index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getUserNumLockedTokens","inputs":[{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getUserNumLocksForToken","inputs":[{"type":"address","name":"_user","internalType":"address"},{"type":"address","name":"_lpToken","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"getUserWhitelistStatus","inputs":[{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getWhitelistedUserAtIndex","inputs":[{"type":"uint256","name":"_index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getWhitelistedUsersLength","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"incrementLock","inputs":[{"type":"address","name":"_lpToken","internalType":"address"},{"type":"uint256","name":"_index","internalType":"uint256"},{"type":"uint256","name":"_lockID","internalType":"uint256"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"lockLPToken","inputs":[{"type":"address","name":"_lpToken","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"uint256","name":"_unlock_date","internalType":"uint256"},{"type":"address","name":"_referral","internalType":"address payable"},{"type":"bool","name":"_fee_in_eth","internalType":"bool"},{"type":"address","name":"_withdrawer","internalType":"address payable"},{"type":"string","name":"logoUrl","internalType":"string"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"migrate","inputs":[{"type":"address","name":"_lpToken","internalType":"address"},{"type":"uint256","name":"_index","internalType":"uint256"},{"type":"uint256","name":"_lockID","internalType":"uint256"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"relock","inputs":[{"type":"address","name":"_lpToken","internalType":"address"},{"type":"uint256","name":"_index","internalType":"uint256"},{"type":"uint256","name":"_lockID","internalType":"uint256"},{"type":"uint256","name":"_unlock_date","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setDev","inputs":[{"type":"address","name":"_devaddr","internalType":"address payable"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setFees","inputs":[{"type":"uint256","name":"_referralPercent","internalType":"uint256"},{"type":"uint256","name":"_referralDiscount","internalType":"uint256"},{"type":"uint256","name":"_ethFee","internalType":"uint256"},{"type":"uint256","name":"_secondaryTokenFee","internalType":"uint256"},{"type":"uint256","name":"_secondaryTokenDiscount","internalType":"uint256"},{"type":"uint256","name":"_liquidityFee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMigrator","inputs":[{"type":"address","name":"_migrator","internalType":"contract IMigrator"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setReferralTokenAndHold","inputs":[{"type":"address","name":"_referralToken","internalType":"contract IERCBurn"},{"type":"uint256","name":"_hold","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setSecondaryFeeToken","inputs":[{"type":"address","name":"_secondaryFeeToken","internalType":"address"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"splitLock","inputs":[{"type":"address","name":"_lpToken","internalType":"address"},{"type":"uint256","name":"_index","internalType":"uint256"},{"type":"uint256","name":"_lockID","internalType":"uint256"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"toggleUniswapFactory","inputs":[{"type":"address","name":"_uniswapFactory","internalType":"address"},{"type":"uint8","name":"add","internalType":"uint8"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"lockDate","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint256","name":"initialAmount","internalType":"uint256"},{"type":"uint256","name":"unlockDate","internalType":"uint256"},{"type":"uint256","name":"lockID","internalType":"uint256"},{"type":"address","name":"owner","internalType":"address"},{"type":"string","name":"logoUrl","internalType":"string"}],"name":"tokenLocks","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferLockOwnership","inputs":[{"type":"address","name":"_lpToken","internalType":"address"},{"type":"uint256","name":"_index","internalType":"uint256"},{"type":"uint256","name":"_lockID","internalType":"uint256"},{"type":"address","name":"_newOwner","internalType":"address payable"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateLogoUrl","inputs":[{"type":"address","name":"_lpToken","internalType":"address"},{"type":"uint256","name":"_index","internalType":"uint256"},{"type":"uint256","name":"_lockID","internalType":"uint256"},{"type":"string","name":"logoUrl","internalType":"string"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"whitelistFeeAccount","inputs":[{"type":"address","name":"_user","internalType":"address"},{"type":"bool","name":"_add","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"address","name":"_lpToken","internalType":"address"},{"type":"uint256","name":"_index","internalType":"uint256"},{"type":"uint256","name":"_lockID","internalType":"uint256"},{"type":"uint256","name":"_amount","internalType":"uint256"}]}]
              

Contract Creation Code

0x60806040523480156200001157600080fd5b506040516200395838038062003958833981810160405260208110156200003757600080fd5b5051600062000045620000eb565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001805560138054336001600160a01b03199091161790556000600d8190556008819055600a819055600b819055600c819055600f819055601055620000e3600282620000ef602090811b62002daf17901c565b505062000176565b3390565b600062000106836001600160a01b0384166200010f565b90505b92915050565b60006200011d83836200015e565b620001555750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000109565b50600062000109565b60009081526001919091016020526040902054151590565b6137d280620001866000396000f3fe6080604052600436106101d85760003560e01c80638da5cb5b11610102578063b9863a4411610095578063d4ff493f11610064578063d4ff493f14610994578063ee42427814610a13578063f02c264314610a58578063f2fde38b14610a91576101d8565b8063b9863a44146107ef578063bef497fd14610836578063ccebfa3f1461087d578063d477f05f14610961576101d8565b80639efc3142116100d15780639efc31421461066d578063a39698151461073c578063a69d9c4f1461076f578063a9b07cea146107aa576101d8565b80638da5cb5b1461056f578063903df8061461058457806390e1a003146105bd57806391ff1eb114610632576101d8565b80634fc7bcf51161017a578063783451e811610149578063783451e8146104b557806386f6c3c1146104ca5780638931a4be146105125780638c301df814610545576101d8565b80634fc7bcf5146103e7578063582d5adc1461042357806360491d241461045b578063715018a6146104a0576101d8565b806323cf3118116101b657806323cf31181461027d57806339e5ec2e146102b25780634532d7761461038d5780634bb18e3f146103d2576101d8565b806314dd79a3146101dd5780631541202a146102235780631f2a1d2f1461024a575b600080fd5b3480156101e957600080fd5b506102076004803603602081101561020057600080fd5b5035610ac4565b604080516001600160a01b039092168252519081900360200190f35b34801561022f57600080fd5b50610238610ad7565b60408051918252519081900360200190f35b34801561025657600080fd5b506102386004803603602081101561026d57600080fd5b50356001600160a01b0316610ae8565b34801561028957600080fd5b506102b0600480360360208110156102a057600080fd5b50356001600160a01b0316610b03565b005b6102b0600480360360e08110156102c857600080fd5b6001600160a01b0382358116926020810135926040820135926060830135811692608081013515159260a08201359092169181019060e0810160c082013564010000000081111561031857600080fd5b82018360208201111561032a57600080fd5b8035906020019184600183028401116401000000008311171561034c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610b7d945050505050565b34801561039957600080fd5b506102b0600480360360808110156103b057600080fd5b506001600160a01b038135169060208101359060408101359060600135611587565b3480156103de57600080fd5b5061023861184b565b3480156103f357600080fd5b506102b06004803603604081101561040a57600080fd5b5080356001600160a01b0316906020013560ff16611857565b6102b06004803603608081101561043957600080fd5b506001600160a01b0381351690602081013590604081013590606001356118d9565b34801561046757600080fd5b506102b06004803603608081101561047e57600080fd5b506001600160a01b038135169060208101359060408101359060600135611be7565b3480156104ac57600080fd5b506102b0611e1a565b3480156104c157600080fd5b50610238611ebc565b3480156104d657600080fd5b506102b0600480360360c08110156104ed57600080fd5b5080359060208101359060408101359060608101359060808101359060a00135611ec8565b34801561051e57600080fd5b506102b06004803603602081101561053557600080fd5b50356001600160a01b0316611f3d565b34801561055157600080fd5b506102076004803603602081101561056857600080fd5b5035611fb7565b34801561057b57600080fd5b50610207611fc4565b34801561059057600080fd5b50610207600480360360408110156105a757600080fd5b506001600160a01b038135169060200135611fd3565b3480156105c957600080fd5b506105d2611ffd565b604051808a8152602001896001600160a01b03168152602001888152602001878152602001868152602001858152602001846001600160a01b03168152602001838152602001828152602001995050505050505050505060405180910390f35b34801561063e57600080fd5b506102b06004803603604081101561065557600080fd5b506001600160a01b038135169060200135151561202b565b34801561067957600080fd5b506102b06004803603608081101561069057600080fd5b6001600160a01b0382351691602081013591604082013591908101906080810160608201356401000000008111156106c757600080fd5b8201836020820111156106d957600080fd5b803590602001918460018302840111640100000000831117156106fb57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061209f945050505050565b34801561074857600080fd5b506102386004803603602081101561075f57600080fd5b50356001600160a01b03166121eb565b34801561077b57600080fd5b506102386004803603604081101561079257600080fd5b506001600160a01b0381358116916020013516612213565b3480156107b657600080fd5b506102b0600480360360808110156107cd57600080fd5b506001600160a01b038135169060208101359060408101359060600135612242565b3480156107fb57600080fd5b506108226004803603602081101561081257600080fd5b50356001600160a01b0316612480565b604080519115158252519081900360200190f35b34801561084257600080fd5b506102b06004803603608081101561085957600080fd5b506001600160a01b038135811691602081013591604082013591606001351661248d565b34801561088957600080fd5b506108b6600480360360408110156108a057600080fd5b506001600160a01b0381351690602001356126bf565b60405180888152602001878152602001868152602001858152602001848152602001836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610920578181015183820152602001610908565b50505050905090810190601f16801561094d5780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390f35b34801561096d57600080fd5b506102b06004803603602081101561098457600080fd5b50356001600160a01b03166127b1565b3480156109a057600080fd5b506109d7600480360360608110156109b757600080fd5b506001600160a01b0381358116916020810135909116906040013561282b565b60408051968752602087019590955285850193909352606085019190915260808401526001600160a01b031660a0830152519081900360c00190f35b348015610a1f57600080fd5b506102b060048036036080811015610a3657600080fd5b506001600160a01b03813516906020810135906040810135906060013561291d565b348015610a6457600080fd5b506102b060048036036040811015610a7b57600080fd5b506001600160a01b038135169060200135612c39565b348015610a9d57600080fd5b506102b060048036036020811015610ab457600080fd5b50356001600160a01b0316612cb7565b6000610ad1600583612dc4565b92915050565b6000610ae36002612dd0565b905090565b6001600160a01b031660009081526007602052604090205490565b610b0b612ddb565b6000546001600160a01b03908116911614610b5b576040805162461bcd60e51b81526020600482018190526024820152600080516020613759833981519152604482015290519081900360640190fd5b601480546001600160a01b0319166001600160a01b0392909216919091179055565b60026001541415610bc3576040805162461bcd60e51b815260206004820152601f60248201526000805160206136f2833981519152604482015290519081900360640190fd5b60026001556402540be4008510610c15576040805162461bcd60e51b81526020600482015260116024820152701512535154d51053540812539590531251607a1b604482015290519081900360640190fd5b60008611610c59576040805162461bcd60e51b815260206004820152600c60248201526b125394d551919250d251539560a21b604482015290519081900360640190fd5b6000879050610cce816001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610c9a57600080fd5b505afa158015610cae573d6000803e3d6000fd5b505050506040513d6020811015610cc457600080fd5b5051600290612ddf565b610d1f576040805162461bcd60e51b815260206004820152601760248201527f494e56414c49445f554e49535741505f464143544f5259000000000000000000604482015290519081900360640190fd5b6000816001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d5a57600080fd5b505afa158015610d6e573d6000803e3d6000fd5b505050506040513d6020811015610d8457600080fd5b505160408051630dfe168160e01b815290516001600160a01b039283169263e6a439059290861691630dfe168191600480820192602092909190829003018186803b158015610dd257600080fd5b505afa158015610de6573d6000803e3d6000fd5b505050506040513d6020811015610dfc57600080fd5b50516040805163d21220a760e01b815290516001600160a01b0387169163d21220a7916004808301926020929190829003018186803b158015610e3e57600080fd5b505afa158015610e52573d6000803e3d6000fd5b505050506040513d6020811015610e6857600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b039384166004820152929091166024830152516044808301926020929190829003018186803b158015610eb857600080fd5b505afa158015610ecc573d6000803e3d6000fd5b505050506040513d6020811015610ee257600080fd5b505190506001600160a01b03808216908a1614610f32576040805162461bcd60e51b81526020600482015260096024820152682727aa102aa724ab1960b91b604482015290519081900360640190fd5b610f3e8933308b612df4565b6001600160a01b03861615801590610f605750600e546001600160a01b031615155b1561102957600f54600e54604080516370a0823160e01b81526001600160a01b038a81166004830152915191909216916370a08231916024808301926020929190829003018186803b158015610fb557600080fd5b505afa158015610fc9573d6000803e3d6000fd5b505050506040513d6020811015610fdf57600080fd5b50511015611029576040805162461bcd60e51b8152602060048201526012602482015271494e41444551554154452042414c414e434560701b604482015290519081900360640190fd5b611034601133612ddf565b6112a857841561117a576008546001600160a01b038716156110715760105461106e906103e8906110689084908303612f51565b90612faa565b90505b8034146110b3576040805162461bcd60e51b815260206004820152600b60248201526a119151481393d50813515560aa1b604482015290519081900360640190fd5b8080158015906110cb57506001600160a01b03881615155b156111385760006110f06103e861106860086005015485612f5190919063ffffffff16565b6040519091506001600160a01b038a169082156108fc029083906000818181858888f19350505050158015611129573d6000803e3d6000fd5b506111348282612fec565b9150505b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015611172573d6000803e3d6000fd5b5050506112a3565b600a546001600160a01b038716156111a7576010546111a4906103e8906110689084908303612f51565b90505b6009546111bf906001600160a01b0316333084612df4565b600d54158015906111d857506001600160a01b03871615155b1561123c5760006111fd6103e861106860086005015485612f5190919063ffffffff16565b600954909150611217906001600160a01b0316898361302e565b60095461122e906001600160a01b03168983613198565b6112388282612fec565b9150505b60095460408051630852cd8d60e31b81526004810184905290516001600160a01b03909216916342966c689160248082019260009290919082900301818387803b15801561128957600080fd5b505af115801561129d573d6000803e3d6000fd5b50505050505b6112dc565b34156112dc5760405133903480156108fc02916000818181858888f193505050501580156112da573d6000803e3d6000fd5b505b60006112fc6103e86110686008600401548c612f5190919063ffffffff16565b9050851580156113145750611312601133612ddf565b155b1561133457600b54611331906103e8906110689084908303612f51565b90505b60135461134c908b906001600160a01b031683613198565b60006113588a83612fec565b90506113626135f6565b42816000018181525050818160200181815250508181604001818152505089816060018181525050600760008d6001600160a01b03166001600160a01b0316815260200190815260200160002080549050816080018181525050868160a001906001600160a01b031690816001600160a01b031681525050858160c00181905250600760008d6001600160a01b03166001600160a01b03168152602001908152602001600020819080600181540180825580915050600190039060005260206000209060070201600090919091909150600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060c08201518160060190805190602001906114ad92919061363c565b506114bd9150600590508d612daf565b506001600160a01b03871660009081526004602052604090206114e0818e612daf565b506001600160a01b038d1660008181526002830160209081526040808320608080880151825460018101845583875295859020909501949094558683015187516060808a0151855198895233968901969096528785019290925290860152928401919091525190917f830357565da6ecfc26d8d9f69df488ed6f70361af9a07e570544aeb5c5e765e5919081900360a00190a1505060018055505050505050505050505050565b600260015414156115cd576040805162461bcd60e51b815260206004820152601f60248201526000805160206136f2833981519152604482015290519081900360640190fd5b600260015580611615576040805162461bcd60e51b815260206004820152600e60248201526d16915493c815d2551211149055d360921b604482015290519081900360640190fd5b3360009081526004602090815260408083206001600160a01b0388168452600201909152812080548590811061164757fe5b90600052602060002001549050600060076000876001600160a01b03166001600160a01b03168152602001908152602001600020828154811061168657fe5b9060005260206000209060070201905083821480156116b1575060058101546001600160a01b031633145b6116f2576040805162461bcd60e51b815260206004820152600d60248201526c0989e8696409a92a69a82a8869609b1b604482015290519081900360640190fd5b42816003015410611734576040805162461bcd60e51b81526020600482015260076024820152661393d50816515560ca1b604482015290519081900360640190fd5b60018101546117439084612fec565b600182018190556117f0573360009081526004602090815260408083206001600160a01b038a168452600201909152902080548190600019810190811061178657fe5b906000526020600020015481878154811061179d57fe5b9060005260206000200181905550808054806117b557fe5b60008281526020812082016000199081019190915501905580546117ee573360009081526004602052604090206117ec90886132fb565b505b505b6117fb863385613198565b604080516001600160a01b03881681526020810185905281517fccad973dcd043c7d680389db4378bd6b9775db7124092e9e0422c9e46d7985dc929181900390910190a150506001805550505050565b6000610ae36011612dd0565b61185f612ddb565b6000546001600160a01b039081169116146118af576040805162461bcd60e51b81526020600482018190526024820152600080516020613759833981519152604482015290519081900360640190fd5b60ff81166118c8576118c26002836132fb565b506118d5565b6118d3600283612daf565b505b5050565b6002600154141561191f576040805162461bcd60e51b815260206004820152601f60248201526000805160206136f2833981519152604482015290519081900360640190fd5b600260015580611964576040805162461bcd60e51b815260206004820152600b60248201526a16915493c8105353d5539560aa1b604482015290519081900360640190fd5b3360009081526004602090815260408083206001600160a01b0388168452600201909152812080548590811061199657fe5b90600052602060002001549050600060076000876001600160a01b03166001600160a01b0316815260200190815260200160002082815481106119d557fe5b906000526020600020906007020190508382148015611a00575060058101546001600160a01b031633145b611a41576040805162461bcd60e51b815260206004820152600d60248201526c0989e8696409a92a69a82a8869609b1b604482015290519081900360640190fd5b6008543414611a85576040805162461bcd60e51b815260206004820152600b60248201526a119151481393d50813515560aa1b604482015290519081900360640190fd5b6013546008546040516001600160a01b039092169181156108fc0291906000818181858888f19350505050158015611ac1573d6000803e3d6000fd5b506001810154611ad19084612fec565b6001820155611ade6135f6565b8154815260208082018581526040808401878152600380870154606087019081526001600160a01b038d811660009081526007808952958120805460808b018181523360a08d01908152898c5260018084018555938552938b90208c51929099029098019081559751908801559351600287015590519185019190915591516004840155516005830180546001600160a01b0319169190921617905560c083015180518493611b9492600685019291019061363c565b50503360009081526004602090815260408083206001600160a01b039b909b1683526002909a01815298812060809093015183546001818101865594835299909120909801979097558055505050505050565b60026001541415611c2d576040805162461bcd60e51b815260206004820152601f60248201526000805160206136f2833981519152604482015290519081900360640190fd5b60026001556402540be4008110611c7f576040805162461bcd60e51b81526020600482015260116024820152701512535154d51053540812539590531251607a1b604482015290519081900360640190fd5b3360009081526004602090815260408083206001600160a01b03881684526002019091528120805485908110611cb157fe5b90600052602060002001549050600060076000876001600160a01b03166001600160a01b031681526020019081526020016000208281548110611cf057fe5b906000526020600020906007020190508382148015611d1b575060058101546001600160a01b031633145b611d5c576040805162461bcd60e51b815260206004820152600d60248201526c0989e8696409a92a69a82a8869609b1b604482015290519081900360640190fd5b82816003015410611da4576040805162461bcd60e51b815260206004820152600d60248201526c554e4c4f434b204245464f524560981b604482015290519081900360640190fd5b6000611dc86103e86110686008600401548560010154612f5190919063ffffffff16565b90506000611de3828460010154612fec90919063ffffffff16565b6001840181905560038401869055601354909150611e0c9089906001600160a01b031684613198565b505060018055505050505050565b611e22612ddb565b6000546001600160a01b03908116911614611e72576040805162461bcd60e51b81526020600482018190526024820152600080516020613759833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610ae36005612dd0565b611ed0612ddb565b6000546001600160a01b03908116911614611f20576040805162461bcd60e51b81526020600482018190526024820152600080516020613759833981519152604482015290519081900360640190fd5b600d95909555601093909355600891909155600a55600b55600c55565b611f45612ddb565b6000546001600160a01b03908116911614611f95576040805162461bcd60e51b81526020600482018190526024820152600080516020613759833981519152604482015290519081900360640190fd5b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6000610ad1601183612dc4565b6000546001600160a01b031690565b6001600160a01b0382166000908152600460205260408120611ff58184612dc4565b949350505050565b600854600954600a54600b54600c54600d54600e54600f546010546001600160a01b03978816979092169189565b612033612ddb565b6000546001600160a01b03908116911614612083576040805162461bcd60e51b81526020600482018190526024820152600080516020613759833981519152604482015290519081900360640190fd5b8015612094576118c2601183612daf565b6118d36011836132fb565b600260015414156120e5576040805162461bcd60e51b815260206004820152601f60248201526000805160206136f2833981519152604482015290519081900360640190fd5b600260018190553360009081526004602090815260408083206001600160a01b0389168452909301905290812080548590811061211e57fe5b90600052602060002001549050600060076000876001600160a01b03166001600160a01b03168152602001908152602001600020828154811061215d57fe5b906000526020600020906007020190508382148015612188575060058101546001600160a01b031633145b6121c9576040805162461bcd60e51b815260206004820152600d60248201526c0989e8696409a92a69a82a8869609b1b604482015290519081900360640190fd5b82516121de906006830190602086019061363c565b5050600180555050505050565b6001600160a01b038116600090815260046020526040812061220c81612dd0565b9392505050565b6001600160a01b0391821660009081526004602090815260408083209390941682526002909201909152205490565b60026001541415612288576040805162461bcd60e51b815260206004820152601f60248201526000805160206136f2833981519152604482015290519081900360640190fd5b6002600155806122cd576040805162461bcd60e51b815260206004820152600b60248201526a16915493c8105353d5539560aa1b604482015290519081900360640190fd5b3360009081526004602090815260408083206001600160a01b038816845260020190915281208054859081106122ff57fe5b90600052602060002001549050600060076000876001600160a01b03166001600160a01b03168152602001908152602001600020828154811061233e57fe5b906000526020600020906007020190508382148015612369575060058101546001600160a01b031633145b6123aa576040805162461bcd60e51b815260206004820152600d60248201526c0989e8696409a92a69a82a8869609b1b604482015290519081900360640190fd5b6123b686333086612df4565b60006123d66103e861106860086004015487612f5190919063ffffffff16565b6013549091506123f19088906001600160a01b031683613198565b60006123fd8583612fec565b600184015490915061240f9082613310565b600184015582546003840154604080516001600160a01b038c16815233602082015280820185905260608101939093526080830191909152517f830357565da6ecfc26d8d9f69df488ed6f70361af9a07e570544aeb5c5e765e59181900360a00190a1505060018055505050505050565b6000610ad1601183612ddf565b336001600160a01b03821614156124d3576040805162461bcd60e51b815260206004820152600560248201526427aba722a960d91b604482015290519081900360640190fd5b3360009081526004602090815260408083206001600160a01b0388168452600201909152812080548590811061250557fe5b90600052602060002001549050600060076000876001600160a01b03166001600160a01b03168152602001908152602001600020828154811061254457fe5b90600052602060002090600702019050838214801561256f575060058101546001600160a01b031633145b6125b0576040805162461bcd60e51b815260206004820152600d60248201526c0989e8696409a92a69a82a8869609b1b604482015290519081900360640190fd5b6001600160a01b03831660009081526004602052604090206125d28188612daf565b506001600160a01b0387166000818152600280840160209081526040808420600480890154825460018101845583885285882001553386528352818520958552949092019052902080548190600019810190811061262c57fe5b906000526020600020015481898154811061264357fe5b90600052602060002001819055508080548061265b57fe5b600082815260208120820160001990810191909155019055805461269457336000908152600460205260409020612692908a6132fb565b505b50505060050180546001600160a01b0319166001600160a01b03939093169290921790915550505050565b600760205281600052604060002081815481106126d857fe5b6000918252602091829020600790910201805460018083015460028085015460038601546004870154600588015460068901805460408051601f6000199b841615610100029b909b01909216979097049889018c90048c0281018c01909652878652979b509499509197909691956001600160a01b0390941694919391908301828280156127a75780601f1061277c576101008083540402835291602001916127a7565b820191906000526020600020905b81548152906001019060200180831161278a57829003601f168201915b5050505050905087565b6127b9612ddb565b6000546001600160a01b03908116911614612809576040805162461bcd60e51b81526020600482018190526024820152600080516020613759833981519152604482015290519081900360640190fd5b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6000806000806000806000600460008b6001600160a01b03166001600160a01b0316815260200190815260200160002060020160008a6001600160a01b03166001600160a01b03168152602001908152602001600020888154811061288c57fe5b906000526020600020015490506000600760008b6001600160a01b03166001600160a01b0316815260200190815260200160002082815481106128cb57fe5b6000918252602090912060079091020180546001820154600283015460038401546004850154600590950154939c50919a50985096509094506001600160a01b03169250505093975093979195509350565b60026001541415612963576040805162461bcd60e51b815260206004820152601f60248201526000805160206136f2833981519152604482015290519081900360640190fd5b60026001556014546001600160a01b03166129af576040805162461bcd60e51b81526020600482015260076024820152661393d50814d15560ca1b604482015290519081900360640190fd5b600081116129f5576040805162461bcd60e51b815260206004820152600e60248201526d2d22a9279026a4a3a920aa24a7a760911b604482015290519081900360640190fd5b3360009081526004602090815260408083206001600160a01b03881684526002019091528120805485908110612a2757fe5b90600052602060002001549050600060076000876001600160a01b03166001600160a01b031681526020019081526020016000208281548110612a6657fe5b906000526020600020906007020190508382148015612a91575060058101546001600160a01b031633145b612ad2576040805162461bcd60e51b815260206004820152600d60248201526c0989e8696409a92a69a82a8869609b1b604482015290519081900360640190fd5b6001810154612ae19084612fec565b60018201819055612b8e573360009081526004602090815260408083206001600160a01b038a1684526002019091529020805481906000198101908110612b2457fe5b9060005260206000200154818781548110612b3b57fe5b906000526020600020018190555080805480612b5357fe5b6000828152602081208201600019908101919091550190558054612b8c57336000908152600460205260409020612b8a90886132fb565b505b505b601454612ba69087906001600160a01b03168561302e565b60145460038201546040805163db5ecd3f60e01b81526001600160a01b038a811660048301526024820188905260448201939093523360648201529051919092169163db5ecd3f9160848083019260209291908290030181600087803b158015612c0f57600080fd5b505af1158015612c23573d6000803e3d6000fd5b505050506040513d6020811015611e0c57600080fd5b612c41612ddb565b6000546001600160a01b03908116911614612c91576040805162461bcd60e51b81526020600482018190526024820152600080516020613759833981519152604482015290519081900360640190fd5b600e80546001600160a01b0319166001600160a01b039390931692909217909155600f55565b612cbf612ddb565b6000546001600160a01b03908116911614612d0f576040805162461bcd60e51b81526020600482018190526024820152600080516020613759833981519152604482015290519081900360640190fd5b6001600160a01b038116612d545760405162461bcd60e51b81526004018080602001828103825260268152602001806137126026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600061220c836001600160a01b03841661336a565b600061220c83836133b4565b6000610ad182613418565b3390565b600061220c836001600160a01b03841661341c565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b60208310612e795780518252601f199092019160209182019101612e5a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612edb576040519150601f19603f3d011682016040523d82523d6000602084013e612ee0565b606091505b5091509150818015612f0e575080511580612f0e5750808060200190516020811015612f0b57600080fd5b50515b612f495760405162461bcd60e51b81526004018080602001828103825260248152602001806137796024913960400191505060405180910390fd5b505050505050565b600082612f6057506000610ad1565b82820282848281612f6d57fe5b041461220c5760405162461bcd60e51b81526004018080602001828103825260218152602001806137386021913960400191505060405180910390fd5b600061220c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613434565b600061220c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506134d6565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b178152925182516000946060949389169392918291908083835b602083106130ab5780518252601f19909201916020918201910161308c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461310d576040519150601f19603f3d011682016040523d82523d6000602084013e613112565b606091505b5091509150818015613140575080511580613140575080806020019051602081101561313d57600080fd5b50515b613191576040805162461bcd60e51b815260206004820152601e60248201527f5472616e7366657248656c7065723a20415050524f56455f4641494c45440000604482015290519081900360640190fd5b5050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106132155780518252601f1990920191602091820191016131f6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613277576040519150601f19603f3d011682016040523d82523d6000602084013e61327c565b606091505b50915091508180156132aa5750805115806132aa57508080602001905160208110156132a757600080fd5b50515b613191576040805162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c454400604482015290519081900360640190fd5b600061220c836001600160a01b038416613530565b60008282018381101561220c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000613376838361341c565b6133ac57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610ad1565b506000610ad1565b815460009082106133f65760405162461bcd60e51b81526004018080602001828103825260228152602001806136d06022913960400191505060405180910390fd5b82600001828154811061340557fe5b9060005260206000200154905092915050565b5490565b60009081526001919091016020526040902054151590565b600081836134c05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561348557818101518382015260200161346d565b50505050905090810190601f1680156134b25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816134cc57fe5b0495945050505050565b600081848411156135285760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561348557818101518382015260200161346d565b505050900390565b600081815260018301602052604081205480156135ec578354600019808301919081019060009087908390811061356357fe5b906000526020600020015490508087600001848154811061358057fe5b6000918252602080832090910192909255828152600189810190925260409020908401905586548790806135b057fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610ad1565b6000915050610ad1565b6040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b03168152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061367d57805160ff19168380011785556136aa565b828001600101855582156136aa579182015b828111156136aa57825182559160200191906001019061368f565b506136b69291506136ba565b5090565b5b808211156136b657600081556001016136bb56fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64735265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725472616e7366657248656c7065723a205452414e534645525f46524f4d5f4641494c4544a264697066735822122046abf156914e6db45e93b5668582eb6a9435e7969d0ae54d78aebdf9b94a340064736f6c634300060c00330000000000000000000000004fd2c40c25dd40e9bf0ce8479ba384178b8671b5

Deployed ByteCode

0x6080604052600436106101d85760003560e01c80638da5cb5b11610102578063b9863a4411610095578063d4ff493f11610064578063d4ff493f14610994578063ee42427814610a13578063f02c264314610a58578063f2fde38b14610a91576101d8565b8063b9863a44146107ef578063bef497fd14610836578063ccebfa3f1461087d578063d477f05f14610961576101d8565b80639efc3142116100d15780639efc31421461066d578063a39698151461073c578063a69d9c4f1461076f578063a9b07cea146107aa576101d8565b80638da5cb5b1461056f578063903df8061461058457806390e1a003146105bd57806391ff1eb114610632576101d8565b80634fc7bcf51161017a578063783451e811610149578063783451e8146104b557806386f6c3c1146104ca5780638931a4be146105125780638c301df814610545576101d8565b80634fc7bcf5146103e7578063582d5adc1461042357806360491d241461045b578063715018a6146104a0576101d8565b806323cf3118116101b657806323cf31181461027d57806339e5ec2e146102b25780634532d7761461038d5780634bb18e3f146103d2576101d8565b806314dd79a3146101dd5780631541202a146102235780631f2a1d2f1461024a575b600080fd5b3480156101e957600080fd5b506102076004803603602081101561020057600080fd5b5035610ac4565b604080516001600160a01b039092168252519081900360200190f35b34801561022f57600080fd5b50610238610ad7565b60408051918252519081900360200190f35b34801561025657600080fd5b506102386004803603602081101561026d57600080fd5b50356001600160a01b0316610ae8565b34801561028957600080fd5b506102b0600480360360208110156102a057600080fd5b50356001600160a01b0316610b03565b005b6102b0600480360360e08110156102c857600080fd5b6001600160a01b0382358116926020810135926040820135926060830135811692608081013515159260a08201359092169181019060e0810160c082013564010000000081111561031857600080fd5b82018360208201111561032a57600080fd5b8035906020019184600183028401116401000000008311171561034c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610b7d945050505050565b34801561039957600080fd5b506102b0600480360360808110156103b057600080fd5b506001600160a01b038135169060208101359060408101359060600135611587565b3480156103de57600080fd5b5061023861184b565b3480156103f357600080fd5b506102b06004803603604081101561040a57600080fd5b5080356001600160a01b0316906020013560ff16611857565b6102b06004803603608081101561043957600080fd5b506001600160a01b0381351690602081013590604081013590606001356118d9565b34801561046757600080fd5b506102b06004803603608081101561047e57600080fd5b506001600160a01b038135169060208101359060408101359060600135611be7565b3480156104ac57600080fd5b506102b0611e1a565b3480156104c157600080fd5b50610238611ebc565b3480156104d657600080fd5b506102b0600480360360c08110156104ed57600080fd5b5080359060208101359060408101359060608101359060808101359060a00135611ec8565b34801561051e57600080fd5b506102b06004803603602081101561053557600080fd5b50356001600160a01b0316611f3d565b34801561055157600080fd5b506102076004803603602081101561056857600080fd5b5035611fb7565b34801561057b57600080fd5b50610207611fc4565b34801561059057600080fd5b50610207600480360360408110156105a757600080fd5b506001600160a01b038135169060200135611fd3565b3480156105c957600080fd5b506105d2611ffd565b604051808a8152602001896001600160a01b03168152602001888152602001878152602001868152602001858152602001846001600160a01b03168152602001838152602001828152602001995050505050505050505060405180910390f35b34801561063e57600080fd5b506102b06004803603604081101561065557600080fd5b506001600160a01b038135169060200135151561202b565b34801561067957600080fd5b506102b06004803603608081101561069057600080fd5b6001600160a01b0382351691602081013591604082013591908101906080810160608201356401000000008111156106c757600080fd5b8201836020820111156106d957600080fd5b803590602001918460018302840111640100000000831117156106fb57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061209f945050505050565b34801561074857600080fd5b506102386004803603602081101561075f57600080fd5b50356001600160a01b03166121eb565b34801561077b57600080fd5b506102386004803603604081101561079257600080fd5b506001600160a01b0381358116916020013516612213565b3480156107b657600080fd5b506102b0600480360360808110156107cd57600080fd5b506001600160a01b038135169060208101359060408101359060600135612242565b3480156107fb57600080fd5b506108226004803603602081101561081257600080fd5b50356001600160a01b0316612480565b604080519115158252519081900360200190f35b34801561084257600080fd5b506102b06004803603608081101561085957600080fd5b506001600160a01b038135811691602081013591604082013591606001351661248d565b34801561088957600080fd5b506108b6600480360360408110156108a057600080fd5b506001600160a01b0381351690602001356126bf565b60405180888152602001878152602001868152602001858152602001848152602001836001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610920578181015183820152602001610908565b50505050905090810190601f16801561094d5780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390f35b34801561096d57600080fd5b506102b06004803603602081101561098457600080fd5b50356001600160a01b03166127b1565b3480156109a057600080fd5b506109d7600480360360608110156109b757600080fd5b506001600160a01b0381358116916020810135909116906040013561282b565b60408051968752602087019590955285850193909352606085019190915260808401526001600160a01b031660a0830152519081900360c00190f35b348015610a1f57600080fd5b506102b060048036036080811015610a3657600080fd5b506001600160a01b03813516906020810135906040810135906060013561291d565b348015610a6457600080fd5b506102b060048036036040811015610a7b57600080fd5b506001600160a01b038135169060200135612c39565b348015610a9d57600080fd5b506102b060048036036020811015610ab457600080fd5b50356001600160a01b0316612cb7565b6000610ad1600583612dc4565b92915050565b6000610ae36002612dd0565b905090565b6001600160a01b031660009081526007602052604090205490565b610b0b612ddb565b6000546001600160a01b03908116911614610b5b576040805162461bcd60e51b81526020600482018190526024820152600080516020613759833981519152604482015290519081900360640190fd5b601480546001600160a01b0319166001600160a01b0392909216919091179055565b60026001541415610bc3576040805162461bcd60e51b815260206004820152601f60248201526000805160206136f2833981519152604482015290519081900360640190fd5b60026001556402540be4008510610c15576040805162461bcd60e51b81526020600482015260116024820152701512535154d51053540812539590531251607a1b604482015290519081900360640190fd5b60008611610c59576040805162461bcd60e51b815260206004820152600c60248201526b125394d551919250d251539560a21b604482015290519081900360640190fd5b6000879050610cce816001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610c9a57600080fd5b505afa158015610cae573d6000803e3d6000fd5b505050506040513d6020811015610cc457600080fd5b5051600290612ddf565b610d1f576040805162461bcd60e51b815260206004820152601760248201527f494e56414c49445f554e49535741505f464143544f5259000000000000000000604482015290519081900360640190fd5b6000816001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d5a57600080fd5b505afa158015610d6e573d6000803e3d6000fd5b505050506040513d6020811015610d8457600080fd5b505160408051630dfe168160e01b815290516001600160a01b039283169263e6a439059290861691630dfe168191600480820192602092909190829003018186803b158015610dd257600080fd5b505afa158015610de6573d6000803e3d6000fd5b505050506040513d6020811015610dfc57600080fd5b50516040805163d21220a760e01b815290516001600160a01b0387169163d21220a7916004808301926020929190829003018186803b158015610e3e57600080fd5b505afa158015610e52573d6000803e3d6000fd5b505050506040513d6020811015610e6857600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b039384166004820152929091166024830152516044808301926020929190829003018186803b158015610eb857600080fd5b505afa158015610ecc573d6000803e3d6000fd5b505050506040513d6020811015610ee257600080fd5b505190506001600160a01b03808216908a1614610f32576040805162461bcd60e51b81526020600482015260096024820152682727aa102aa724ab1960b91b604482015290519081900360640190fd5b610f3e8933308b612df4565b6001600160a01b03861615801590610f605750600e546001600160a01b031615155b1561102957600f54600e54604080516370a0823160e01b81526001600160a01b038a81166004830152915191909216916370a08231916024808301926020929190829003018186803b158015610fb557600080fd5b505afa158015610fc9573d6000803e3d6000fd5b505050506040513d6020811015610fdf57600080fd5b50511015611029576040805162461bcd60e51b8152602060048201526012602482015271494e41444551554154452042414c414e434560701b604482015290519081900360640190fd5b611034601133612ddf565b6112a857841561117a576008546001600160a01b038716156110715760105461106e906103e8906110689084908303612f51565b90612faa565b90505b8034146110b3576040805162461bcd60e51b815260206004820152600b60248201526a119151481393d50813515560aa1b604482015290519081900360640190fd5b8080158015906110cb57506001600160a01b03881615155b156111385760006110f06103e861106860086005015485612f5190919063ffffffff16565b6040519091506001600160a01b038a169082156108fc029083906000818181858888f19350505050158015611129573d6000803e3d6000fd5b506111348282612fec565b9150505b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015611172573d6000803e3d6000fd5b5050506112a3565b600a546001600160a01b038716156111a7576010546111a4906103e8906110689084908303612f51565b90505b6009546111bf906001600160a01b0316333084612df4565b600d54158015906111d857506001600160a01b03871615155b1561123c5760006111fd6103e861106860086005015485612f5190919063ffffffff16565b600954909150611217906001600160a01b0316898361302e565b60095461122e906001600160a01b03168983613198565b6112388282612fec565b9150505b60095460408051630852cd8d60e31b81526004810184905290516001600160a01b03909216916342966c689160248082019260009290919082900301818387803b15801561128957600080fd5b505af115801561129d573d6000803e3d6000fd5b50505050505b6112dc565b34156112dc5760405133903480156108fc02916000818181858888f193505050501580156112da573d6000803e3d6000fd5b505b60006112fc6103e86110686008600401548c612f5190919063ffffffff16565b9050851580156113145750611312601133612ddf565b155b1561133457600b54611331906103e8906110689084908303612f51565b90505b60135461134c908b906001600160a01b031683613198565b60006113588a83612fec565b90506113626135f6565b42816000018181525050818160200181815250508181604001818152505089816060018181525050600760008d6001600160a01b03166001600160a01b0316815260200190815260200160002080549050816080018181525050868160a001906001600160a01b031690816001600160a01b031681525050858160c00181905250600760008d6001600160a01b03166001600160a01b03168152602001908152602001600020819080600181540180825580915050600190039060005260206000209060070201600090919091909150600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060c08201518160060190805190602001906114ad92919061363c565b506114bd9150600590508d612daf565b506001600160a01b03871660009081526004602052604090206114e0818e612daf565b506001600160a01b038d1660008181526002830160209081526040808320608080880151825460018101845583875295859020909501949094558683015187516060808a0151855198895233968901969096528785019290925290860152928401919091525190917f830357565da6ecfc26d8d9f69df488ed6f70361af9a07e570544aeb5c5e765e5919081900360a00190a1505060018055505050505050505050505050565b600260015414156115cd576040805162461bcd60e51b815260206004820152601f60248201526000805160206136f2833981519152604482015290519081900360640190fd5b600260015580611615576040805162461bcd60e51b815260206004820152600e60248201526d16915493c815d2551211149055d360921b604482015290519081900360640190fd5b3360009081526004602090815260408083206001600160a01b0388168452600201909152812080548590811061164757fe5b90600052602060002001549050600060076000876001600160a01b03166001600160a01b03168152602001908152602001600020828154811061168657fe5b9060005260206000209060070201905083821480156116b1575060058101546001600160a01b031633145b6116f2576040805162461bcd60e51b815260206004820152600d60248201526c0989e8696409a92a69a82a8869609b1b604482015290519081900360640190fd5b42816003015410611734576040805162461bcd60e51b81526020600482015260076024820152661393d50816515560ca1b604482015290519081900360640190fd5b60018101546117439084612fec565b600182018190556117f0573360009081526004602090815260408083206001600160a01b038a168452600201909152902080548190600019810190811061178657fe5b906000526020600020015481878154811061179d57fe5b9060005260206000200181905550808054806117b557fe5b60008281526020812082016000199081019190915501905580546117ee573360009081526004602052604090206117ec90886132fb565b505b505b6117fb863385613198565b604080516001600160a01b03881681526020810185905281517fccad973dcd043c7d680389db4378bd6b9775db7124092e9e0422c9e46d7985dc929181900390910190a150506001805550505050565b6000610ae36011612dd0565b61185f612ddb565b6000546001600160a01b039081169116146118af576040805162461bcd60e51b81526020600482018190526024820152600080516020613759833981519152604482015290519081900360640190fd5b60ff81166118c8576118c26002836132fb565b506118d5565b6118d3600283612daf565b505b5050565b6002600154141561191f576040805162461bcd60e51b815260206004820152601f60248201526000805160206136f2833981519152604482015290519081900360640190fd5b600260015580611964576040805162461bcd60e51b815260206004820152600b60248201526a16915493c8105353d5539560aa1b604482015290519081900360640190fd5b3360009081526004602090815260408083206001600160a01b0388168452600201909152812080548590811061199657fe5b90600052602060002001549050600060076000876001600160a01b03166001600160a01b0316815260200190815260200160002082815481106119d557fe5b906000526020600020906007020190508382148015611a00575060058101546001600160a01b031633145b611a41576040805162461bcd60e51b815260206004820152600d60248201526c0989e8696409a92a69a82a8869609b1b604482015290519081900360640190fd5b6008543414611a85576040805162461bcd60e51b815260206004820152600b60248201526a119151481393d50813515560aa1b604482015290519081900360640190fd5b6013546008546040516001600160a01b039092169181156108fc0291906000818181858888f19350505050158015611ac1573d6000803e3d6000fd5b506001810154611ad19084612fec565b6001820155611ade6135f6565b8154815260208082018581526040808401878152600380870154606087019081526001600160a01b038d811660009081526007808952958120805460808b018181523360a08d01908152898c5260018084018555938552938b90208c51929099029098019081559751908801559351600287015590519185019190915591516004840155516005830180546001600160a01b0319169190921617905560c083015180518493611b9492600685019291019061363c565b50503360009081526004602090815260408083206001600160a01b039b909b1683526002909a01815298812060809093015183546001818101865594835299909120909801979097558055505050505050565b60026001541415611c2d576040805162461bcd60e51b815260206004820152601f60248201526000805160206136f2833981519152604482015290519081900360640190fd5b60026001556402540be4008110611c7f576040805162461bcd60e51b81526020600482015260116024820152701512535154d51053540812539590531251607a1b604482015290519081900360640190fd5b3360009081526004602090815260408083206001600160a01b03881684526002019091528120805485908110611cb157fe5b90600052602060002001549050600060076000876001600160a01b03166001600160a01b031681526020019081526020016000208281548110611cf057fe5b906000526020600020906007020190508382148015611d1b575060058101546001600160a01b031633145b611d5c576040805162461bcd60e51b815260206004820152600d60248201526c0989e8696409a92a69a82a8869609b1b604482015290519081900360640190fd5b82816003015410611da4576040805162461bcd60e51b815260206004820152600d60248201526c554e4c4f434b204245464f524560981b604482015290519081900360640190fd5b6000611dc86103e86110686008600401548560010154612f5190919063ffffffff16565b90506000611de3828460010154612fec90919063ffffffff16565b6001840181905560038401869055601354909150611e0c9089906001600160a01b031684613198565b505060018055505050505050565b611e22612ddb565b6000546001600160a01b03908116911614611e72576040805162461bcd60e51b81526020600482018190526024820152600080516020613759833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610ae36005612dd0565b611ed0612ddb565b6000546001600160a01b03908116911614611f20576040805162461bcd60e51b81526020600482018190526024820152600080516020613759833981519152604482015290519081900360640190fd5b600d95909555601093909355600891909155600a55600b55600c55565b611f45612ddb565b6000546001600160a01b03908116911614611f95576040805162461bcd60e51b81526020600482018190526024820152600080516020613759833981519152604482015290519081900360640190fd5b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6000610ad1601183612dc4565b6000546001600160a01b031690565b6001600160a01b0382166000908152600460205260408120611ff58184612dc4565b949350505050565b600854600954600a54600b54600c54600d54600e54600f546010546001600160a01b03978816979092169189565b612033612ddb565b6000546001600160a01b03908116911614612083576040805162461bcd60e51b81526020600482018190526024820152600080516020613759833981519152604482015290519081900360640190fd5b8015612094576118c2601183612daf565b6118d36011836132fb565b600260015414156120e5576040805162461bcd60e51b815260206004820152601f60248201526000805160206136f2833981519152604482015290519081900360640190fd5b600260018190553360009081526004602090815260408083206001600160a01b0389168452909301905290812080548590811061211e57fe5b90600052602060002001549050600060076000876001600160a01b03166001600160a01b03168152602001908152602001600020828154811061215d57fe5b906000526020600020906007020190508382148015612188575060058101546001600160a01b031633145b6121c9576040805162461bcd60e51b815260206004820152600d60248201526c0989e8696409a92a69a82a8869609b1b604482015290519081900360640190fd5b82516121de906006830190602086019061363c565b5050600180555050505050565b6001600160a01b038116600090815260046020526040812061220c81612dd0565b9392505050565b6001600160a01b0391821660009081526004602090815260408083209390941682526002909201909152205490565b60026001541415612288576040805162461bcd60e51b815260206004820152601f60248201526000805160206136f2833981519152604482015290519081900360640190fd5b6002600155806122cd576040805162461bcd60e51b815260206004820152600b60248201526a16915493c8105353d5539560aa1b604482015290519081900360640190fd5b3360009081526004602090815260408083206001600160a01b038816845260020190915281208054859081106122ff57fe5b90600052602060002001549050600060076000876001600160a01b03166001600160a01b03168152602001908152602001600020828154811061233e57fe5b906000526020600020906007020190508382148015612369575060058101546001600160a01b031633145b6123aa576040805162461bcd60e51b815260206004820152600d60248201526c0989e8696409a92a69a82a8869609b1b604482015290519081900360640190fd5b6123b686333086612df4565b60006123d66103e861106860086004015487612f5190919063ffffffff16565b6013549091506123f19088906001600160a01b031683613198565b60006123fd8583612fec565b600184015490915061240f9082613310565b600184015582546003840154604080516001600160a01b038c16815233602082015280820185905260608101939093526080830191909152517f830357565da6ecfc26d8d9f69df488ed6f70361af9a07e570544aeb5c5e765e59181900360a00190a1505060018055505050505050565b6000610ad1601183612ddf565b336001600160a01b03821614156124d3576040805162461bcd60e51b815260206004820152600560248201526427aba722a960d91b604482015290519081900360640190fd5b3360009081526004602090815260408083206001600160a01b0388168452600201909152812080548590811061250557fe5b90600052602060002001549050600060076000876001600160a01b03166001600160a01b03168152602001908152602001600020828154811061254457fe5b90600052602060002090600702019050838214801561256f575060058101546001600160a01b031633145b6125b0576040805162461bcd60e51b815260206004820152600d60248201526c0989e8696409a92a69a82a8869609b1b604482015290519081900360640190fd5b6001600160a01b03831660009081526004602052604090206125d28188612daf565b506001600160a01b0387166000818152600280840160209081526040808420600480890154825460018101845583885285882001553386528352818520958552949092019052902080548190600019810190811061262c57fe5b906000526020600020015481898154811061264357fe5b90600052602060002001819055508080548061265b57fe5b600082815260208120820160001990810191909155019055805461269457336000908152600460205260409020612692908a6132fb565b505b50505060050180546001600160a01b0319166001600160a01b03939093169290921790915550505050565b600760205281600052604060002081815481106126d857fe5b6000918252602091829020600790910201805460018083015460028085015460038601546004870154600588015460068901805460408051601f6000199b841615610100029b909b01909216979097049889018c90048c0281018c01909652878652979b509499509197909691956001600160a01b0390941694919391908301828280156127a75780601f1061277c576101008083540402835291602001916127a7565b820191906000526020600020905b81548152906001019060200180831161278a57829003601f168201915b5050505050905087565b6127b9612ddb565b6000546001600160a01b03908116911614612809576040805162461bcd60e51b81526020600482018190526024820152600080516020613759833981519152604482015290519081900360640190fd5b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6000806000806000806000600460008b6001600160a01b03166001600160a01b0316815260200190815260200160002060020160008a6001600160a01b03166001600160a01b03168152602001908152602001600020888154811061288c57fe5b906000526020600020015490506000600760008b6001600160a01b03166001600160a01b0316815260200190815260200160002082815481106128cb57fe5b6000918252602090912060079091020180546001820154600283015460038401546004850154600590950154939c50919a50985096509094506001600160a01b03169250505093975093979195509350565b60026001541415612963576040805162461bcd60e51b815260206004820152601f60248201526000805160206136f2833981519152604482015290519081900360640190fd5b60026001556014546001600160a01b03166129af576040805162461bcd60e51b81526020600482015260076024820152661393d50814d15560ca1b604482015290519081900360640190fd5b600081116129f5576040805162461bcd60e51b815260206004820152600e60248201526d2d22a9279026a4a3a920aa24a7a760911b604482015290519081900360640190fd5b3360009081526004602090815260408083206001600160a01b03881684526002019091528120805485908110612a2757fe5b90600052602060002001549050600060076000876001600160a01b03166001600160a01b031681526020019081526020016000208281548110612a6657fe5b906000526020600020906007020190508382148015612a91575060058101546001600160a01b031633145b612ad2576040805162461bcd60e51b815260206004820152600d60248201526c0989e8696409a92a69a82a8869609b1b604482015290519081900360640190fd5b6001810154612ae19084612fec565b60018201819055612b8e573360009081526004602090815260408083206001600160a01b038a1684526002019091529020805481906000198101908110612b2457fe5b9060005260206000200154818781548110612b3b57fe5b906000526020600020018190555080805480612b5357fe5b6000828152602081208201600019908101919091550190558054612b8c57336000908152600460205260409020612b8a90886132fb565b505b505b601454612ba69087906001600160a01b03168561302e565b60145460038201546040805163db5ecd3f60e01b81526001600160a01b038a811660048301526024820188905260448201939093523360648201529051919092169163db5ecd3f9160848083019260209291908290030181600087803b158015612c0f57600080fd5b505af1158015612c23573d6000803e3d6000fd5b505050506040513d6020811015611e0c57600080fd5b612c41612ddb565b6000546001600160a01b03908116911614612c91576040805162461bcd60e51b81526020600482018190526024820152600080516020613759833981519152604482015290519081900360640190fd5b600e80546001600160a01b0319166001600160a01b039390931692909217909155600f55565b612cbf612ddb565b6000546001600160a01b03908116911614612d0f576040805162461bcd60e51b81526020600482018190526024820152600080516020613759833981519152604482015290519081900360640190fd5b6001600160a01b038116612d545760405162461bcd60e51b81526004018080602001828103825260268152602001806137126026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600061220c836001600160a01b03841661336a565b600061220c83836133b4565b6000610ad182613418565b3390565b600061220c836001600160a01b03841661341c565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b60208310612e795780518252601f199092019160209182019101612e5a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612edb576040519150601f19603f3d011682016040523d82523d6000602084013e612ee0565b606091505b5091509150818015612f0e575080511580612f0e5750808060200190516020811015612f0b57600080fd5b50515b612f495760405162461bcd60e51b81526004018080602001828103825260248152602001806137796024913960400191505060405180910390fd5b505050505050565b600082612f6057506000610ad1565b82820282848281612f6d57fe5b041461220c5760405162461bcd60e51b81526004018080602001828103825260218152602001806137386021913960400191505060405180910390fd5b600061220c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613434565b600061220c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506134d6565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b178152925182516000946060949389169392918291908083835b602083106130ab5780518252601f19909201916020918201910161308c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461310d576040519150601f19603f3d011682016040523d82523d6000602084013e613112565b606091505b5091509150818015613140575080511580613140575080806020019051602081101561313d57600080fd5b50515b613191576040805162461bcd60e51b815260206004820152601e60248201527f5472616e7366657248656c7065723a20415050524f56455f4641494c45440000604482015290519081900360640190fd5b5050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106132155780518252601f1990920191602091820191016131f6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613277576040519150601f19603f3d011682016040523d82523d6000602084013e61327c565b606091505b50915091508180156132aa5750805115806132aa57508080602001905160208110156132a757600080fd5b50515b613191576040805162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c454400604482015290519081900360640190fd5b600061220c836001600160a01b038416613530565b60008282018381101561220c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000613376838361341c565b6133ac57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610ad1565b506000610ad1565b815460009082106133f65760405162461bcd60e51b81526004018080602001828103825260228152602001806136d06022913960400191505060405180910390fd5b82600001828154811061340557fe5b9060005260206000200154905092915050565b5490565b60009081526001919091016020526040902054151590565b600081836134c05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561348557818101518382015260200161346d565b50505050905090810190601f1680156134b25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816134cc57fe5b0495945050505050565b600081848411156135285760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561348557818101518382015260200161346d565b505050900390565b600081815260018301602052604081205480156135ec578354600019808301919081019060009087908390811061356357fe5b906000526020600020015490508087600001848154811061358057fe5b6000918252602080832090910192909255828152600189810190925260409020908401905586548790806135b057fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610ad1565b6000915050610ad1565b6040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b03168152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061367d57805160ff19168380011785556136aa565b828001600101855582156136aa579182015b828111156136aa57825182559160200191906001019061368f565b506136b69291506136ba565b5090565b5b808211156136b657600081556001016136bb56fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64735265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725472616e7366657248656c7065723a205452414e534645525f46524f4d5f4641494c4544a264697066735822122046abf156914e6db45e93b5668582eb6a9435e7969d0ae54d78aebdf9b94a340064736f6c634300060c0033