Contract 0xa82685520c463a752d5319e6616e4e5fd0215e33

 

Contract Overview

UNCX Network: Token Vesting
Balance:
0 ETH

EtherValue:
$0.00

Token:
Txn Hash Method
Block
From
To
Value
0x40fa468eed0bf8de0adc27e736ebd23823585a4a84ac21fdd0c18f04f15a1eebLock135095932024-04-22 17:55:3318 mins ago0xc525b174f5f457ae49bad48b4c4068bebd8e567c IN  UNCX Network: Token Vesting0 ETH0.0008202986141.707913368
0x8c1684feb6b458e29e63c0495c13f2e0cf1d03e367ef46f980cecec44b83ef4fLock134918792024-04-22 8:05:0510 hrs 9 mins ago0xbc82a93d6968a21f672e299bb9dd612ecb1e559e IN  UNCX Network: Token Vesting0 ETH0.0000335638360.069856924
0xf0fef0058c1d60a403e608069be13b8b8ac842d949615641179efb94789e8e37Lock134900812024-04-22 7:05:0911 hrs 9 mins ago0xec79b89d9ef0df36d574f7bccabed93bde1c7f00 IN  UNCX Network: Token Vesting0 ETH0.0000222129070.049797327
0x6f217fe4ed925ce99ef82941208550f0ca02420f541ea4aea9159d56791456a3Lock134866092024-04-22 5:09:2513 hrs 4 mins ago0x475ddbd0fbc60e6cb50ee0d2aaad474c3a4f4f98 IN  UNCX Network: Token Vesting0 ETH0.000016353940.032107075
0xfc3df73273fcdc5cb71fa8a522bb26cf64e36c88b7b3c85b35347bf1a25c0ff4Lock134696412024-04-21 19:43:4922 hrs 30 mins ago0x003a2f1467637ecf806f83fc1f9c470c839228d4 IN  UNCX Network: Token Vesting0 ETH0.0000238418970.042593972
0xe427f7f6f35099b71f26ea7f304636c36c149aa14634707b5f01d46c14923dc6Relock134303082024-04-20 21:52:431 day 20 hrs ago0x1512897c1b9f8f2a1e506823f15074f755b00488 IN  UNCX Network: Token Vesting0 ETH0.0000031448080.031772162
0x9d170f87365c46a93ef35041f3cb9b36c13117cb555b7e9659002d0aef83865fLock134302342024-04-20 21:50:151 day 20 hrs ago0x1512897c1b9f8f2a1e506823f15074f755b00488 IN  UNCX Network: Token Vesting0 ETH0.0000166774770.036949627
0xf151f32b8c2be15173a33087d416a0e09ba0ce833f1b20e8f38253deb2b29474Lock133816062024-04-19 18:49:192 days 23 hrs ago0xb084ded531b7ee81676eaf44e1d1074530ac909a IN  UNCX Network: Token Vesting0 ETH0.0000177232280.069440438
0x06ef742e6d062a83c9c6c92d2f6f8a259700f2d8fbe2c53d81a54db4fa290fcaLock133810252024-04-19 18:29:572 days 23 hrs ago0xb084ded531b7ee81676eaf44e1d1074530ac909a IN  UNCX Network: Token Vesting0 ETH0.0000340398440.074506413
0x71e57722668159adf0e4813295fb55313c4beb50202e22b9b77c843a8153e10bLock133644692024-04-19 9:18:053 days 8 hrs ago0xa7354a2273a2e2a3a9ea169874b4a423904b4a90 IN  UNCX Network: Token Vesting0 ETH0.0000224810530.04653449
0x5e8ba13d6769b14fd5630cbae343ecc8e99c7fff163acb323c49090e52d65640Lock132578892024-04-16 22:05:255 days 20 hrs ago0x7e9dff15dd9f6934cc71dea7b582a00501028acd IN  UNCX Network: Token Vesting0 ETH0.0000143592990.031378657
0x0c89e45571baae2d188a4405d063cc05d4898d6d03e4e9c0fde85f0cea635956Lock132274272024-04-16 5:10:016 days 13 hrs ago0x874d79288411c33e2241a67093ae204dd253fc8c IN  UNCX Network: Token Vesting0 ETH0.0000107897710.036804824
0x81fcdea83b221e02407ca524881f30de41bc566fd2b820d45501509afa0dca30Lock132179802024-04-15 23:55:076 days 18 hrs ago0xa048a7ee75416f641e1de41c43bc72c57c38b3f6 IN  UNCX Network: Token Vesting0 ETH0.0000059325820.015102899
0x88cd95f14d82a21dc7cad0a30ce44f26e3e47a2e1e360a035fc5b0b5f0a8414fLock132159572024-04-15 22:47:416 days 19 hrs ago0x2d2efa0f141e695d21d254a2295d30c27ae724d7 IN  UNCX Network: Token Vesting0 ETH0.0000099842410.019659156
0x8362687fadb1f961f68a97c073a09210eca85dceeab111d825c1192cc1e6ae3fLock131953422024-04-15 11:20:317 days 6 hrs ago0x874d79288411c33e2241a67093ae204dd253fc8c IN  UNCX Network: Token Vesting0 ETH0.0000254015060.081162169
0x8398a1d294b6a2974d1c711acb3479a0942c6c7836029bed12a25dfba4fe6387Lock131949972024-04-15 11:09:017 days 7 hrs ago0x874d79288411c33e2241a67093ae204dd253fc8c IN  UNCX Network: Token Vesting0 ETH0.0000326179520.06895404
0x043dc3ab34c6250b3ceb103fb64e75f4c52a52497f94f8f3667b765aafe00865Lock131744742024-04-14 23:44:557 days 18 hrs ago0x510b3b115f05073b97b3741fd64e901fa20abb2a IN  UNCX Network: Token Vesting0 ETH0.0000119526760.025742881
0xed32165efb662ba393d3a41a29b4caa2d5c81c76735a065b4593f9481d5e2fa1Lock131676842024-04-14 19:58:357 days 22 hrs ago0xc4d606667070a8944adea9b4059a3d9db591e5d6 IN  UNCX Network: Token Vesting0 ETH0.0000148734810.041754035
0x20fbcb51bbc3adb5163dae36a64c95deaafc79bddb230937f2f480e89f34bb08Lock131540202024-04-14 12:23:078 days 5 hrs ago0xc4d606667070a8944adea9b4059a3d9db591e5d6 IN  UNCX Network: Token Vesting0 ETH0.0000266369160.074854729
0xd62d6b689b8626e0602c99ccbb97e37f5ca6d80c144b20e2121664aee551c79eLock131531172024-04-14 11:53:018 days 6 hrs ago0xc4d606667070a8944adea9b4059a3d9db591e5d6 IN  UNCX Network: Token Vesting0 ETH0.0000258176270.072542326
0xd72b90f9556d424128e25a0646de323a60b945e9371144efe071f927fa930307Lock131517332024-04-14 11:06:538 days 7 hrs ago0xc4d606667070a8944adea9b4059a3d9db591e5d6 IN  UNCX Network: Token Vesting0 ETH0.0000247308020.055501462
0x665c7807278f795c27b87f5d208fbe627b2c1dcec8a90cfc370e4cc764918fa5Lock131516482024-04-14 11:04:038 days 7 hrs ago0xc4d606667070a8944adea9b4059a3d9db591e5d6 IN  UNCX Network: Token Vesting0 ETH0.000019586390.054997543
0xd3743098079931d16a1828afd648605e84bcfd990af61c3374cb75ed63c567f6Lock131505642024-04-14 10:27:558 days 7 hrs ago0xb195e2336952a177bc3c5543d4bd61d1c38cac2e IN  UNCX Network: Token Vesting0 ETH0.0000128311250.048230576
0x1ab3a8419525e2f510ef794afd459b812fe077640bd2932a0a4172b400171ec7Lock131505442024-04-14 10:27:158 days 7 hrs ago0xb195e2336952a177bc3c5543d4bd61d1c38cac2e IN  UNCX Network: Token Vesting0 ETH0.0000216709830.048600217
0xab1c891c97df3c4c09307be37b4a5fdd8e9562fd928c62ae129f4e61d51eef73Lock131310232024-04-13 23:36:338 days 18 hrs ago0xc4d606667070a8944adea9b4059a3d9db591e5d6 IN  UNCX Network: Token Vesting0 ETH0.0000220809740.046482891
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TokenVesting

Compiler Version
v0.8.3+commit.8d00100c

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 9 : Context.sol
// SPDX-License-Identifier: MIT

// File @openzeppelin/contracts/utils/[email protected]

pragma solidity ^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 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) {
        return msg.sender;
    }

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

File 2 of 9 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

// File @openzeppelin/contracts/utils/structs/[email protected]

pragma solidity ^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(uint160(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(uint160(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(uint160(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(uint160(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 3 of 9 : FullMath.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// Sourced from https://gist.github.com/paulrberg/439ebe860cd2f9893852e2cab5655b65, credits to Paulrberg for porting to solidity v0.8
/// @title Contains 512-bit math functions
/// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision
/// @dev Handles "phantom overflow" i.e., allows multiplication and division where an intermediate value overflows 256 bits
library FullMath {
    /// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
    /// @param a The multiplicand
    /// @param b The multiplier
    /// @param denominator The divisor
    /// @return result The 256-bit result
    /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv
    function mulDiv(
        uint256 a,
        uint256 b,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        // 512-bit multiply [prod1 prod0] = a * b
        // Compute the product mod 2**256 and mod 2**256 - 1
        // then use the Chinese Remainder Theorem to reconstruct
        // the 512 bit result. The result is stored in two 256
        // variables such that product = prod1 * 2**256 + prod0
        uint256 prod0; // Least significant 256 bits of the product
        uint256 prod1; // Most significant 256 bits of the product
        assembly {
            let mm := mulmod(a, b, not(0))
            prod0 := mul(a, b)
            prod1 := sub(sub(mm, prod0), lt(mm, prod0))
        }

        // Handle non-overflow cases, 256 by 256 division
        if (prod1 == 0) {
            require(denominator > 0);
            assembly {
                result := div(prod0, denominator)
            }
            return result;
        }

        // Make sure the result is less than 2**256.
        // Also prevents denominator == 0
        require(denominator > prod1);

        ///////////////////////////////////////////////
        // 512 by 256 division.
        ///////////////////////////////////////////////

        // Make division exact by subtracting the remainder from [prod1 prod0]
        // Compute remainder using mulmod
        uint256 remainder;
        assembly {
            remainder := mulmod(a, b, denominator)
        }
        // Subtract 256 bit number from 512 bit number
        assembly {
            prod1 := sub(prod1, gt(remainder, prod0))
            prod0 := sub(prod0, remainder)
        }

        // Factor powers of two out of denominator
        // Compute largest power of two divisor of denominator.
        // Always >= 1.
        unchecked {
            uint256 twos = (type(uint256).max - denominator + 1) & denominator;
            // Divide denominator by power of two
            assembly {
                denominator := div(denominator, twos)
            }

            // Divide [prod1 prod0] by the factors of two
            assembly {
                prod0 := div(prod0, twos)
            }
            // Shift in bits from prod1 into prod0. For this we need
            // to flip `twos` such that it is 2**256 / twos.
            // If twos is zero, then it becomes one
            assembly {
                twos := add(div(sub(0, twos), twos), 1)
            }
            prod0 |= prod1 * twos;

            // Invert denominator mod 2**256
            // Now that denominator is an odd number, it has an inverse
            // modulo 2**256 such that denominator * inv = 1 mod 2**256.
            // Compute the inverse by starting with a seed that is correct
            // correct for four bits. That is, denominator * inv = 1 mod 2**4
            uint256 inv = (3 * denominator) ^ 2;
            // Now use Newton-Raphson iteration to improve the precision.
            // Thanks to Hensel's lifting lemma, this also works in modular
            // arithmetic, doubling the correct bits in each step.
            inv *= 2 - denominator * inv; // inverse mod 2**8
            inv *= 2 - denominator * inv; // inverse mod 2**16
            inv *= 2 - denominator * inv; // inverse mod 2**32
            inv *= 2 - denominator * inv; // inverse mod 2**64
            inv *= 2 - denominator * inv; // inverse mod 2**128
            inv *= 2 - denominator * inv; // inverse mod 2**256

            // Because the division is now exact we can divide by multiplying
            // with the modular inverse of denominator. This will give us the
            // correct result modulo 2**256. Since the precoditions guarantee
            // that the outcome is less than 2**256, this is the final result.
            // We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inv;
            return result;
        }
    }
}

File 4 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT

// File @openzeppelin/contracts/token/ERC20/[email protected]

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 5 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT

// File @openzeppelin/contracts/access/[email protected]

pragma solidity ^0.8.0;

import "./Context.sol";
/**
 * @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 () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual 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 6 of 9 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

// File @openzeppelin/contracts/security/[email protected]

pragma solidity ^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 () {
        _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 7 of 9 : TokenVesting.sol
// SPDX-License-Identifier: UNLICENSED
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.

// This contract locks ERC20 tokens. This can be used for:
// - Token developers to prove they have locked tokens
// - Presale projects or investors to lock a portion of tokens for a vesting period
// - Farming platforms to lock a percentage of the farmed rewards for a period of time
// - To lock tokens until a specific unlock date.
// - To send tokens to someone under a time lock.

// This contract is for ERC20 tokens, and supports high deflationary and rebasing tokens by using a pooling and share issuing mechanism.
// This is NOT for AMM LP tokens (such as UNIV2), Please use our liquidity lockers for this.
// Locking LP tokens in this contract will not show in the Unicrypt browser.

// *** LOCK TYPES ***
// Lock Type 1: when startEmission == 0 the lock is considered lockType 1. This is a normal lock
// whereby tokens can be withdrawn on the due date (endEmission).

// Lock Type 2: when startEmission != 0. Lock tokens over a period, with an amount withdrawable every block. 
// This scales linearly over time from startEmission -> endEmission. 
// e.g. If the lock period is 100 seconds, 50 seconds after the startEmission you can withdraw 50% of the lock.
// Instead of making 10 locks for 10 months to withdraw tokens at the end of each month, you can now make 1 linear scaling lock with a period
// of 10 months and withdraw the relative share every block.

// *** CUSTOM PREMATURE UNLOCKING CONDITIONS ***
// All locks support premature unlocking conditions. A premature unlock condition can be anything that implements the IUnlockCondition interface
// If IUnlockCondition(address).unlockTokens() returns true, the lock withdraw date is overriden and the entire lock value can be withdrawn.
// The key here is this is for premature unlocks, locks always fall back to the endEmission date 
// even if unlockTokens() returns false, and are therefore always withdrawble in full by the unlockDate.
// Example use cases, Imagine a presale is 1 week long. Marketers tokens are locked for 1 week to prevent them initiating
// markets and setting initial prices on an AMM. The presale concludes within 5 minuites. Marketers now need to wait 1 week,
// to access their tokens. With conditional unlocks a condition can be set to return true once a presale has concluded
// and override the 1 week lock making their tokens instantly withdrawble post presale. 
// Another use case could be to allow token developers or investors to prematurely unlock their tokens
// if the price reaches a specified target, or for governance to vote for developers to unlock tokens prematurely 
// for development purposes met or raodmap goals met.
// Get creative!

// Please be aware if you are locking tokens to prove to your community you have locked tokens for long term you should not use a premature unlocking condition 
// as these types of locks will be shown differently in the browser to a normal lock with no unlocking condition.
// Unlocking conditions can always be revoked by the lock owner to give more credibility to the lock.

pragma solidity ^0.8.0;

import "./TransferHelper.sol";
import './VestingMathLibrary.sol';
import './FullMath.sol';

import "./EnumerableSet.sol";
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
import "./IERC20.sol";

interface IMigrator {
    function migrate(address token, uint256 sharesDeposited, uint256 sharesWithdrawn, uint256 startEmission, uint256 endEmission, uint256 lockID, address owner, address condition, uint256 amountInTokens, uint256 option) external returns (bool);
}

interface IUnicryptAdmin {
    function userIsAdmin(address _user) external view returns (bool);
}

interface ITokenBlacklist {
    function checkToken(address _token) external view;
}

contract TokenVesting is Ownable, ReentrancyGuard {
  using EnumerableSet for EnumerableSet.AddressSet;

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

  struct TokenLock {
    address tokenAddress; // The token address
    uint256 sharesDeposited; // the total amount of shares deposited
    uint256 sharesWithdrawn; // amount of shares withdrawn
    uint256 startEmission; // date token emission begins
    uint256 endEmission; // the date the tokens can be withdrawn
    uint256 lockID; // lock id per token lock
    address owner; // the owner who can edit or withdraw the lock
    address condition; // address(0) = no condition, otherwise the condition contract must implement IUnlockCondition
  }
  
  struct LockParams {
    address payable owner; // the user who can withdraw tokens once the lock expires.
    uint256 amount; // amount of tokens to lock
    uint256 startEmission; // 0 if lock type 1, else a unix timestamp
    uint256 endEmission; // the unlock date as a unix timestamp (in seconds)
    address condition; // address(0) = no condition, otherwise the condition must implement IUnlockCondition
  }

  EnumerableSet.AddressSet private TOKENS; // list of all unique tokens that have a lock
  mapping(uint256 => TokenLock) public LOCKS; // map lockID nonce to the lock
  uint256 public NONCE = 0; // incremental lock nonce counter, this is the unique ID for the next lock
  uint256 public MINIMUM_DEPOSIT = 100; // minimum divisibility per lock at time of locking
  
  mapping(address => uint256[]) private TOKEN_LOCKS; // map token address to array of lockIDs for that token
  mapping(address => UserInfo) private USERS;

  mapping(address => uint) public SHARES; // map token to number of shares per token, shares allow rebasing and deflationary tokens to compute correctly
  
  EnumerableSet.AddressSet private ZERO_FEE_WHITELIST; // Tokens that have been whitelisted to bypass all fees
  EnumerableSet.AddressSet private TOKEN_WHITELISTERS; // whitelisting contracts and users who can enable no fee for tokens.
  
  struct FeeStruct {
    uint256 tokenFee;
    uint256 freeLockingFee;
    address payable feeAddress;
    address freeLockingToken; // if this is address(0) then it is the gas token of the network (e.g ETH, BNB, Matic)
  }
  
  FeeStruct public FEES;
  
  IUnicryptAdmin UNCX_ADMINS;
  IMigrator public MIGRATOR;
  ITokenBlacklist public BLACKLIST; // prevent AMM tokens with a blacklisting contract

  event onLock(uint256 lockID, address token, address owner, uint256 amountInTokens, uint256 amountInShares, uint256 startEmission, uint256 endEmission, address unlockCondition);
  event onWithdraw(uint256 lockID, address lpToken, uint256 amountInTokens, uint256 amountInShares);
  event onRelock(uint256 lockID, address token, uint256 unlockDate);
  event onTransferLock(uint256 lockIDFrom, uint256 lockIDto, address oldOwner, address newOwner);
  event onSplitLock(uint256 fromLockID, uint256 toLockID, uint256 amountInTokens, uint256 amountInShares);
  event onMigrate(uint256 lockID, uint256 amountInTokens);
  event onConditionRevoke(uint256 lockID, address tokenAddress);

  constructor (IUnicryptAdmin _uncxAdmins) {
    UNCX_ADMINS = _uncxAdmins;
    FEES.tokenFee = 35;
    FEES.feeAddress = payable(0x04bDa42de3bc32Abb00df46004204424d4Cf8287);
    FEES.freeLockingFee = 10e18;
  }
  
  /**
   * @notice set the migrator contract which allows the lock to be migrated
   */
  function setMigrator(IMigrator _migrator) external onlyOwner {
    MIGRATOR = _migrator;
  }
  
  function setBlacklistContract(ITokenBlacklist _contract) external onlyOwner {
    BLACKLIST = _contract;
  }
  
  function setFees(uint256 _tokenFee, uint256 _freeLockingFee, address payable _feeAddress, address _freeLockingToken) external onlyOwner {
    FEES.tokenFee = _tokenFee;
    FEES.freeLockingFee = _freeLockingFee;
    FEES.feeAddress = _feeAddress;
    FEES.freeLockingToken = _freeLockingToken;
  }
  
  /**
   * @notice whitelisted accounts and contracts who can call the editZeroFeeWhitelist function
   */
  function adminSetWhitelister(address _user, bool _add) external onlyOwner {
    if (_add) {
      TOKEN_WHITELISTERS.add(_user);
    } else {
      TOKEN_WHITELISTERS.remove(_user);
    }
  }
  
  // Pay a once off fee to have free use of the lockers for the token
  function payForFreeTokenLocks (address _token) external payable {
      require(!ZERO_FEE_WHITELIST.contains(_token), 'PAID');
      // charge Fee
      if (FEES.freeLockingToken == address(0)) {
          require(msg.value == FEES.freeLockingFee, 'FEE NOT MET');
          FEES.feeAddress.transfer(FEES.freeLockingFee);
      } else {
          TransferHelper.safeTransferFrom(address(FEES.freeLockingToken), address(msg.sender), FEES.feeAddress, FEES.freeLockingFee);
      }
      ZERO_FEE_WHITELIST.add(_token);
  }
  
  // Callable by UNCX_ADMINS or whitelisted contracts (such as presale contracts)
  function editZeroFeeWhitelist (address _token, bool _add) external {
    require(UNCX_ADMINS.userIsAdmin(msg.sender) || TOKEN_WHITELISTERS.contains(msg.sender), 'ADMIN');
    if (_add) {
      ZERO_FEE_WHITELIST.add(_token);
    } else {
      ZERO_FEE_WHITELIST.remove(_token);
    }
  }

  /**
   * @notice Creates one or multiple locks for the specified token
   * @param _token the erc20 token address
   * @param _lock_params an array of locks with format: [LockParams[owner, amount, startEmission, endEmission, condition]]
   * owner: user or contract who can withdraw the tokens
   * amount: must be >= 100 units
   * startEmission = 0 : LockType 1
   * startEmission != 0 : LockType 2 (linear scaling lock)
   * use address(0) for no premature unlocking condition
   * Fails if startEmission is not less than EndEmission
   * Fails is amount < 100
   */
  function lock (address _token, LockParams[] calldata _lock_params) external nonReentrant {
    require(_lock_params.length > 0, 'NO PARAMS');
    if (address(BLACKLIST) != address(0)) {
        BLACKLIST.checkToken(_token);
    }
    uint256 totalAmount = 0;
    for (uint256 i = 0; i < _lock_params.length; i++) {
        totalAmount += _lock_params[i].amount;
    }

    uint256 balanceBefore = IERC20(_token).balanceOf(address(this));
    TransferHelper.safeTransferFrom(_token, address(msg.sender), address(this), totalAmount);
    uint256 amountIn = IERC20(_token).balanceOf(address(this)) - balanceBefore;

    // Fees
    if (!ZERO_FEE_WHITELIST.contains(_token)) {
      uint256 lockFee = FullMath.mulDiv(amountIn, FEES.tokenFee, 10000);
      TransferHelper.safeTransfer(_token, FEES.feeAddress, lockFee);
      amountIn -= lockFee;
    }
    
    uint256 shares = 0;
    for (uint256 i = 0; i < _lock_params.length; i++) {
        LockParams memory lock_param = _lock_params[i];
        require(lock_param.startEmission < lock_param.endEmission, 'PERIOD');
        require(lock_param.endEmission < 1e10, 'TIMESTAMP INVALID'); // prevents errors when timestamp entered in milliseconds
        require(lock_param.amount >= MINIMUM_DEPOSIT, 'MIN DEPOSIT');
        uint256 amountInTokens = FullMath.mulDiv(lock_param.amount, amountIn, totalAmount);

        if (SHARES[_token] == 0) {
          shares = amountInTokens;
        } else {
          shares = FullMath.mulDiv(amountInTokens, SHARES[_token], balanceBefore == 0 ? 1 : balanceBefore);
        }
        require(shares > 0, 'SHARES');
        SHARES[_token] += shares;
        balanceBefore += amountInTokens;

        TokenLock memory token_lock;
        token_lock.tokenAddress = _token;
        token_lock.sharesDeposited = shares;
        token_lock.startEmission = lock_param.startEmission;
        token_lock.endEmission = lock_param.endEmission;
        token_lock.lockID = NONCE;
        token_lock.owner = lock_param.owner;
        if (lock_param.condition != address(0)) {
            // if the condition contract does not implement the interface and return a bool
            // the below line will fail and revert the tx as the conditional contract is invalid
            IUnlockCondition(lock_param.condition).unlockTokens();
            token_lock.condition = lock_param.condition;
        }
    
        // record the lock globally
        LOCKS[NONCE] = token_lock;
        TOKENS.add(_token);
        TOKEN_LOCKS[_token].push(NONCE);
    
        // record the lock for the user
        UserInfo storage user = USERS[lock_param.owner];
        user.lockedTokens.add(_token);
        user.locksForToken[_token].push(NONCE);
        
        NONCE ++;
        emit onLock(token_lock.lockID, _token, token_lock.owner, amountInTokens, shares, token_lock.startEmission, token_lock.endEmission, token_lock.condition);
    }
  }
  
   /**
   * @notice withdraw a specified amount from a lock. _amount is the ideal amount to be withdrawn.
   * however, this amount might be slightly different in rebasing tokens due to the conversion to shares,
   * then back into an amount
   * @param _lockID the lockID of the lock to be withdrawn
   * @param _amount amount of tokens to withdraw
   */
  function withdraw (uint256 _lockID, uint256 _amount) external nonReentrant {
    TokenLock storage userLock = LOCKS[_lockID];
    require(userLock.owner == msg.sender, 'OWNER');
    // convert _amount to its representation in shares
    uint256 balance = IERC20(userLock.tokenAddress).balanceOf(address(this));
    uint256 shareDebit = FullMath.mulDiv(SHARES[userLock.tokenAddress], _amount, balance);
    // round _amount up to the nearest whole share if the amount of tokens specified does not translate to
    // at least 1 share.
    if (shareDebit == 0 && _amount > 0) {
      shareDebit ++;
    }
    require(shareDebit > 0, 'ZERO WITHDRAWL');
    uint256 withdrawableShares = getWithdrawableShares(userLock.lockID);
    // dust clearance block, as mulDiv rounds down leaving one share stuck, clear all shares for dust amounts
    if (shareDebit + 1 == withdrawableShares) {
      if (FullMath.mulDiv(SHARES[userLock.tokenAddress], balance / SHARES[userLock.tokenAddress], balance) == 0){
        shareDebit++;
      }
    }
    require(withdrawableShares >= shareDebit, 'AMOUNT');
    userLock.sharesWithdrawn += shareDebit;

    // now convert shares to the actual _amount it represents, this may differ slightly from the 
    // _amount supplied in this methods arguments.
    uint256 amountInTokens = FullMath.mulDiv(shareDebit, balance, SHARES[userLock.tokenAddress]);
    SHARES[userLock.tokenAddress] -= shareDebit;
    
    TransferHelper.safeTransfer(userLock.tokenAddress, msg.sender, amountInTokens);
    emit onWithdraw(_lockID, userLock.tokenAddress, amountInTokens, shareDebit);
  }
  
  /**
   * @notice extend a lock with a new unlock date, if lock is Type 2 it extends the emission end date
   */
  function relock (uint256 _lockID, uint256 _unlock_date) external nonReentrant {
    require(_unlock_date < 1e10, 'TIME'); // prevents errors when timestamp entered in milliseconds
    TokenLock storage userLock = LOCKS[_lockID];
    require(userLock.owner == msg.sender, 'OWNER');
    require(userLock.endEmission < _unlock_date, 'END');
    // percent fee
    if (!ZERO_FEE_WHITELIST.contains(userLock.tokenAddress)) {
        uint256 remainingShares = userLock.sharesDeposited - userLock.sharesWithdrawn;
        uint256 feeInShares = FullMath.mulDiv(remainingShares, FEES.tokenFee, 10000);
        uint256 balance = IERC20(userLock.tokenAddress).balanceOf(address(this));
        uint256 feeInTokens = FullMath.mulDiv(feeInShares, balance, SHARES[userLock.tokenAddress] == 0 ? 1 : SHARES[userLock.tokenAddress]);
        TransferHelper.safeTransfer(userLock.tokenAddress, FEES.feeAddress, feeInTokens);
        userLock.sharesWithdrawn += feeInShares;
        SHARES[userLock.tokenAddress] -= feeInShares;
    }
    userLock.endEmission = _unlock_date;
    emit onRelock(_lockID, userLock.tokenAddress, _unlock_date);
  }
  
  /**
   * @notice increase the amount of tokens per a specific lock, this is preferable to creating a new lock
   * Its possible to increase someone elses lock here it does not need to be your own, useful for contracts
   */
  function incrementLock (uint256 _lockID, uint256 _amount) external nonReentrant {
    TokenLock storage userLock = LOCKS[_lockID];
    require(_amount >= MINIMUM_DEPOSIT, 'MIN DEPOSIT');
    
    uint256 balanceBefore = IERC20(userLock.tokenAddress).balanceOf(address(this));
    TransferHelper.safeTransferFrom(userLock.tokenAddress, address(msg.sender), address(this), _amount);
    uint256 amountInTokens = IERC20(userLock.tokenAddress).balanceOf(address(this)) - balanceBefore;

    // percent fee
    if (!ZERO_FEE_WHITELIST.contains(userLock.tokenAddress)) {
        uint256 lockFee = FullMath.mulDiv(amountInTokens, FEES.tokenFee, 10000);
        TransferHelper.safeTransfer(userLock.tokenAddress, FEES.feeAddress, lockFee);
        amountInTokens -= lockFee;
    }
    uint256 shares;
    if (SHARES[userLock.tokenAddress] == 0) {
      shares = amountInTokens;
    } else {
      shares = FullMath.mulDiv(amountInTokens, SHARES[userLock.tokenAddress], balanceBefore);
    }
    require(shares > 0, 'SHARES');
    SHARES[userLock.tokenAddress] += shares;
    userLock.sharesDeposited += shares;
    emit onLock(userLock.lockID, userLock.tokenAddress, userLock.owner, amountInTokens, shares, userLock.startEmission, userLock.endEmission, userLock.condition);
  }
  
  /**
   * @notice transfer a lock to a new owner, e.g. presale project -> project owner
   * Please be aware this generates a new lock, and nulls the old lock, so a new ID is assigned to the new lock.
   */
  function transferLockOwnership (uint256 _lockID, address payable _newOwner) external nonReentrant {
    require(msg.sender != _newOwner, 'SELF');
    TokenLock storage transferredLock = LOCKS[_lockID];
    require(transferredLock.owner == msg.sender, 'OWNER');
    
    TokenLock memory token_lock;
    token_lock.tokenAddress = transferredLock.tokenAddress;
    token_lock.sharesDeposited = transferredLock.sharesDeposited;
    token_lock.sharesWithdrawn = transferredLock.sharesWithdrawn;
    token_lock.startEmission = transferredLock.startEmission;
    token_lock.endEmission = transferredLock.endEmission;
    token_lock.lockID = NONCE;
    token_lock.owner = _newOwner;
    token_lock.condition = transferredLock.condition;
    
    // record the lock globally
    LOCKS[NONCE] = token_lock;
    TOKEN_LOCKS[transferredLock.tokenAddress].push(NONCE);
    
    // record the lock for the new owner 
    UserInfo storage newOwner = USERS[_newOwner];
    newOwner.lockedTokens.add(transferredLock.tokenAddress);
    newOwner.locksForToken[transferredLock.tokenAddress].push(token_lock.lockID);
    NONCE ++;
    
    // zero the lock from the old owner
    transferredLock.sharesWithdrawn = transferredLock.sharesDeposited;
    emit onTransferLock(_lockID, token_lock.lockID, msg.sender, _newOwner);
  }
  
  /**
   * @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
   * Only works on lock type 1, this feature does not work with lock type 2
   * @param _amount the amount in tokens
   */
  function splitLock (uint256 _lockID, uint256 _amount) external nonReentrant {
    require(_amount > 0, 'ZERO AMOUNT');
    TokenLock storage userLock = LOCKS[_lockID];
    require(userLock.owner == msg.sender, 'OWNER');
    require(userLock.startEmission == 0, 'LOCK TYPE 2');

    // convert _amount to its representation in shares
    uint256 balance = IERC20(userLock.tokenAddress).balanceOf(address(this));
    uint256 amountInShares = FullMath.mulDiv(SHARES[userLock.tokenAddress], _amount, balance);

    require(userLock.sharesWithdrawn + amountInShares <= userLock.sharesDeposited);
    
    TokenLock memory token_lock;
    token_lock.tokenAddress = userLock.tokenAddress;
    token_lock.sharesDeposited = amountInShares;
    token_lock.endEmission = userLock.endEmission;
    token_lock.lockID = NONCE;
    token_lock.owner = msg.sender;
    token_lock.condition = userLock.condition;
    
    // debit previous lock
    userLock.sharesWithdrawn += amountInShares;
    
    // record the new lock globally
    LOCKS[NONCE] = token_lock;
    TOKEN_LOCKS[userLock.tokenAddress].push(NONCE);
    
    // record the new lock for the owner 
    USERS[msg.sender].locksForToken[userLock.tokenAddress].push(token_lock.lockID);
    NONCE ++;
    emit onSplitLock(_lockID, token_lock.lockID, _amount, amountInShares);
  }
  
  /**
   * @notice migrates to the next locker version, only callable by lock owners
   */
  function migrate (uint256 _lockID, uint256 _option) external nonReentrant {
    require(address(MIGRATOR) != address(0), "NOT SET");
    TokenLock storage userLock = LOCKS[_lockID];
    require(userLock.owner == msg.sender, 'OWNER');
    uint256 sharesAvailable = userLock.sharesDeposited - userLock.sharesWithdrawn;
    require(sharesAvailable > 0, 'AMOUNT');

    uint256 balance = IERC20(userLock.tokenAddress).balanceOf(address(this));
    uint256 amountInTokens = FullMath.mulDiv(sharesAvailable, balance, SHARES[userLock.tokenAddress]);
    
    TransferHelper.safeApprove(userLock.tokenAddress, address(MIGRATOR), amountInTokens);
    MIGRATOR.migrate(userLock.tokenAddress, userLock.sharesDeposited, userLock.sharesWithdrawn, userLock.startEmission,
    userLock.endEmission, userLock.lockID, userLock.owner, userLock.condition, amountInTokens, _option);
    
    userLock.sharesWithdrawn = userLock.sharesDeposited;
    SHARES[userLock.tokenAddress] -= sharesAvailable;
    emit onMigrate(_lockID, amountInTokens);
  }
  
  /**
   * @notice premature unlock conditions can be malicous (prevent withdrawls by failing to evalaute or return non bools)
   * or not give community enough insurance tokens will remain locked until the end date, in such a case, it can be revoked
   */
  function revokeCondition (uint256 _lockID) external nonReentrant {
    TokenLock storage userLock = LOCKS[_lockID];
    require(userLock.owner == msg.sender, 'OWNER');
    require(userLock.condition != address(0)); // already set to address(0)
    userLock.condition = address(0);
    emit onConditionRevoke(_lockID, userLock.tokenAddress);
  }
  
  // test a condition on front end, added here for convenience in UI, returns unlockTokens() bool, or fails
  function testCondition (address condition) external view returns (bool) {
      return (IUnlockCondition(condition).unlockTokens());
  }
  
  // returns withdrawable share amount from the lock, taking into consideration start and end emission
  function getWithdrawableShares (uint256 _lockID) public view returns (uint256) {
    TokenLock storage userLock = LOCKS[_lockID];
    uint8 lockType = userLock.startEmission == 0 ? 1 : 2;
    uint256 amount = lockType == 1 ? userLock.sharesDeposited - userLock.sharesWithdrawn : userLock.sharesDeposited;
    uint256 withdrawable;
    withdrawable = VestingMathLibrary.getWithdrawableAmount (
      userLock.startEmission, 
      userLock.endEmission, 
      amount, 
      block.timestamp, 
      userLock.condition
    );
    if (lockType == 2) {
      withdrawable -= userLock.sharesWithdrawn;
    }
    return withdrawable;
  }
  
  // convenience function for UI, converts shares to the current amount in tokens
  function getWithdrawableTokens (uint256 _lockID) external view returns (uint256) {
    TokenLock storage userLock = LOCKS[_lockID];
    uint256 withdrawableShares = getWithdrawableShares(userLock.lockID);
    uint256 balance = IERC20(userLock.tokenAddress).balanceOf(address(this));
    uint256 amountTokens = FullMath.mulDiv(withdrawableShares, balance, SHARES[userLock.tokenAddress] == 0 ? 1 : SHARES[userLock.tokenAddress]);
    return amountTokens;
  }

  // For UI use
  function convertSharesToTokens (address _token, uint256 _shares) external view returns (uint256) {
    uint256 balance = IERC20(_token).balanceOf(address(this));
    return FullMath.mulDiv(_shares, balance, SHARES[_token]);
  }

  function convertTokensToShares (address _token, uint256 _tokens) external view returns (uint256) {
    uint256 balance = IERC20(_token).balanceOf(address(this));
    return FullMath.mulDiv(SHARES[_token], _tokens, balance);
  }
  
  // For use in UI, returns more useful lock Data than just querying LOCKS,
  // such as the real-time token amount representation of a locks shares
  function getLock (uint256 _lockID) external view returns (uint256, address, uint256, uint256, uint256, uint256, uint256, uint256, address, address) {
      TokenLock memory tokenLock = LOCKS[_lockID];

      uint256 balance = IERC20(tokenLock.tokenAddress).balanceOf(address(this));
      uint256 totalSharesOr1 = SHARES[tokenLock.tokenAddress] == 0 ? 1 : SHARES[tokenLock.tokenAddress];
      // tokens deposited and tokens withdrawn is provided for convenience in UI, with rebasing these amounts will change
      uint256 tokensDeposited = FullMath.mulDiv(tokenLock.sharesDeposited, balance, totalSharesOr1);
      uint256 tokensWithdrawn = FullMath.mulDiv(tokenLock.sharesWithdrawn, balance, totalSharesOr1);
      return (tokenLock.lockID, tokenLock.tokenAddress, tokensDeposited, tokensWithdrawn, tokenLock.sharesDeposited, tokenLock.sharesWithdrawn, tokenLock.startEmission, tokenLock.endEmission, 
      tokenLock.owner, tokenLock.condition);
  }
  
  function getNumLockedTokens () external view returns (uint256) {
    return TOKENS.length();
  }
  
  function getTokenAtIndex (uint256 _index) external view returns (address) {
    return TOKENS.at(_index);
  }
  
  function getTokenLocksLength (address _token) external view returns (uint256) {
    return TOKEN_LOCKS[_token].length;
  }
  
  function getTokenLockIDAtIndex (address _token, uint256 _index) external view returns (uint256) {
    return TOKEN_LOCKS[_token][_index];
  }
  
  // user functions
  function getUserLockedTokensLength (address _user) external view returns (uint256) {
    return USERS[_user].lockedTokens.length();
  }
  
  function getUserLockedTokenAtIndex (address _user, uint256 _index) external view returns (address) {
    return USERS[_user].lockedTokens.at(_index);
  }
  
  function getUserLocksForTokenLength (address _user, address _token) external view returns (uint256) {
    return USERS[_user].locksForToken[_token].length;
  }
  
  function getUserLockIDForTokenAtIndex (address _user, address _token, uint256 _index) external view returns (uint256) {
    return USERS[_user].locksForToken[_token][_index];
  }
  
  // no Fee Tokens
  function getZeroFeeTokensLength () external view returns (uint256) {
    return ZERO_FEE_WHITELIST.length();
  }
  
  function getZeroFeeTokenAtIndex (uint256 _index) external view returns (address) {
    return ZERO_FEE_WHITELIST.at(_index);
  }
  
  function tokenOnZeroFeeWhitelist (address _token) external view returns (bool) {
    return ZERO_FEE_WHITELIST.contains(_token);
  }
  
  // whitelist
  function getTokenWhitelisterLength () external view returns (uint256) {
    return TOKEN_WHITELISTERS.length();
  }
  
  function getTokenWhitelisterAtIndex (uint256 _index) external view returns (address) {
    return TOKEN_WHITELISTERS.at(_index);
  }
  
  function getTokenWhitelisterStatus (address _user) external view returns (bool) {
    return TOKEN_WHITELISTERS.contains(_user);
  }
}

File 8 of 9 : TransferHelper.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.0;

// helper methods for interacting with ERC20 tokens that do not consistently return true/false
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');
    }

}

File 9 of 9 : VestingMathLibrary.sol
// SPDX-License-Identifier: UNLICENSED
// ALL RIGHTS RESERVED
// Unicrypt by SDDTech reserves all rights on this code. You may NOT copy these contracts.

pragma solidity ^0.8.0;

import './FullMath.sol';

// Allows a seperate contract with a unlockTokens() function to be used to override unlock dates
interface IUnlockCondition {
    function unlockTokens() external view returns (bool);
}

library VestingMathLibrary {

  // gets the withdrawable amount from a lock
  function getWithdrawableAmount (uint256 startEmission, uint256 endEmission, uint256 amount, uint256 timeStamp, address condition) internal view returns (uint256) {
    // It is possible in some cases IUnlockCondition(condition).unlockTokens() will fail (func changes state or does not return a bool)
    // for this reason we implemented revokeCondition per lock so funds are never stuck in the contract.
    
    // Prematurely release the lock if the condition is met
    if (condition != address(0) && IUnlockCondition(condition).unlockTokens()) {
      return amount;
    }
    // Lock type 1 logic block (Normal Unlock on due date)
    if (startEmission == 0 || startEmission == endEmission) {
        return endEmission < timeStamp ? amount : 0;
    }
    // Lock type 2 logic block (Linear scaling lock)
    uint256 timeClamp = timeStamp;
    if (timeClamp > endEmission) {
        timeClamp = endEmission;
    }
    if (timeClamp < startEmission) {
        timeClamp = startEmission;
    }
    uint256 elapsed = timeClamp - startEmission;
    uint256 fullPeriod = endEmission - startEmission;
    return FullMath.mulDiv(amount, elapsed, fullPeriod); // fullPeriod cannot equal zero due to earlier checks and restraints when locking tokens (startEmission < endEmission)
  }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IUnicryptAdmin","name":"_uncxAdmins","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lockID","type":"uint256"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"}],"name":"onConditionRevoke","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lockID","type":"uint256"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountInTokens","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountInShares","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startEmission","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endEmission","type":"uint256"},{"indexed":false,"internalType":"address","name":"unlockCondition","type":"address"}],"name":"onLock","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lockID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountInTokens","type":"uint256"}],"name":"onMigrate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lockID","type":"uint256"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"unlockDate","type":"uint256"}],"name":"onRelock","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fromLockID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toLockID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountInTokens","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountInShares","type":"uint256"}],"name":"onSplitLock","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lockIDFrom","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockIDto","type":"uint256"},{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"onTransferLock","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lockID","type":"uint256"},{"indexed":false,"internalType":"address","name":"lpToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountInTokens","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountInShares","type":"uint256"}],"name":"onWithdraw","type":"event"},{"inputs":[],"name":"BLACKLIST","outputs":[{"internalType":"contract ITokenBlacklist","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEES","outputs":[{"internalType":"uint256","name":"tokenFee","type":"uint256"},{"internalType":"uint256","name":"freeLockingFee","type":"uint256"},{"internalType":"address payable","name":"feeAddress","type":"address"},{"internalType":"address","name":"freeLockingToken","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"LOCKS","outputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"sharesDeposited","type":"uint256"},{"internalType":"uint256","name":"sharesWithdrawn","type":"uint256"},{"internalType":"uint256","name":"startEmission","type":"uint256"},{"internalType":"uint256","name":"endEmission","type":"uint256"},{"internalType":"uint256","name":"lockID","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"condition","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIGRATOR","outputs":[{"internalType":"contract IMigrator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINIMUM_DEPOSIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NONCE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"SHARES","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"bool","name":"_add","type":"bool"}],"name":"adminSetWhitelister","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"convertSharesToTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_tokens","type":"uint256"}],"name":"convertTokensToShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_add","type":"bool"}],"name":"editZeroFeeWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockID","type":"uint256"}],"name":"getLock","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNumLockedTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getTokenAtIndex","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getTokenLockIDAtIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"getTokenLocksLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getTokenWhitelisterAtIndex","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokenWhitelisterLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getTokenWhitelisterStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getUserLockIDForTokenAtIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getUserLockedTokenAtIndex","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getUserLockedTokensLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"address","name":"_token","type":"address"}],"name":"getUserLocksForTokenLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockID","type":"uint256"}],"name":"getWithdrawableShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockID","type":"uint256"}],"name":"getWithdrawableTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getZeroFeeTokenAtIndex","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getZeroFeeTokensLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockID","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"incrementLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"components":[{"internalType":"address payable","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"startEmission","type":"uint256"},{"internalType":"uint256","name":"endEmission","type":"uint256"},{"internalType":"address","name":"condition","type":"address"}],"internalType":"struct TokenVesting.LockParams[]","name":"_lock_params","type":"tuple[]"}],"name":"lock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockID","type":"uint256"},{"internalType":"uint256","name":"_option","type":"uint256"}],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"payForFreeTokenLocks","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockID","type":"uint256"},{"internalType":"uint256","name":"_unlock_date","type":"uint256"}],"name":"relock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockID","type":"uint256"}],"name":"revokeCondition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ITokenBlacklist","name":"_contract","type":"address"}],"name":"setBlacklistContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenFee","type":"uint256"},{"internalType":"uint256","name":"_freeLockingFee","type":"uint256"},{"internalType":"address payable","name":"_feeAddress","type":"address"},{"internalType":"address","name":"_freeLockingToken","type":"address"}],"name":"setFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IMigrator","name":"_migrator","type":"address"}],"name":"setMigrator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockID","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"splitLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"condition","type":"address"}],"name":"testCondition","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"tokenOnZeroFeeWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockID","type":"uint256"},{"internalType":"address payable","name":"_newOwner","type":"address"}],"name":"transferLockOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockID","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600060055560646006553480156200001b57600080fd5b5060405162003c9738038062003c978339810160408190526200003e91620000d7565b600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060018055601280546001600160a01b039092166001600160a01b03199283161790556023600e55601080549091167304bda42de3bc32abb00df46004204424d4cf8287179055678ac7230489e80000600f5562000107565b600060208284031215620000e9578081fd5b81516001600160a01b038116811462000100578182fd5b9392505050565b613b8080620001176000396000f3fe6080604052600436106102665760003560e01c806397988dce11610144578063cf0d5af3116100b6578063e04ab1391161007a578063e04ab139146108a4578063e091dd1a146108c4578063e52c4b7a146108da578063f19451d8146108fa578063f2fde38b14610910578063fc0633d01461093057610266565b8063cf0d5af3146106fe578063cf6dde4a146107b7578063d060e175146107d7578063d323cdbf1461080d578063d68f4dd11461082d57610266565b8063b2fb30cb11610108578063b2fb30cb14610607578063b4540fa714610627578063bb5ee00114610647578063c368803a14610691578063c8b0cf68146106be578063ca5cc0c2146106de57610266565b806397988dce146105745780639ecd747214610594578063a34df14f146105b4578063a6dcb8de146105c7578063b1d7655c146105e757610266565b80635a5b8d9e116101dd578063783451e8116101a1578063783451e81461046f57806386de2fcb146104845780638b7b23ee146104a45780638ba74f17146105025780638da5cb5b14610522578063903df8061461055457610266565b80635a5b8d9e146103da5780636588fc03146103fa578063675187a31461041a578063715018a61461043a578063741af17e1461044f57610266565b80631d7065db1161022f5780631d7065db1461030a57806323cf31181461033a5780633717dee71461035a5780633e54bacb1461037a578063441a3e701461039a5780635a04fb69146103ba57610266565b8062623ae31461026b57806303e1cdf4146102935780630cdebc9e146102a857806313ef2b1b146102c85780631c30ffb1146102ea575b600080fd5b34801561027757600080fd5b50610280610950565b6040519081526020015b60405180910390f35b34801561029f57600080fd5b50610280610961565b3480156102b457600080fd5b506102806102c336600461380f565b61096d565b3480156102d457600080fd5b506102e86102e336600461375f565b610a1c565b005b3480156102f657600080fd5b5061028061030536600461371f565b61112b565b34801561031657600080fd5b5061032a6103253660046136cb565b61118b565b604051901515815260200161028a565b34801561034657600080fd5b506102e86103553660046136cb565b611198565b34801561036657600080fd5b506102e8610375366004613934565b6111e4565b34801561038657600080fd5b506102e8610395366004613934565b611521565b3480156103a657600080fd5b506102e86103b5366004613934565b611836565b3480156103c657600080fd5b506102e86103d5366004613910565b611b24565b3480156103e657600080fd5b506102e86103f53660046138e0565b611ed7565b34801561040657600080fd5b506102e8610415366004613934565b611fae565b34801561042657600080fd5b5061032a6104353660046136cb565b6122eb565b34801561044657600080fd5b506102e861235e565b34801561045b57600080fd5b506102e861046a3660046136cb565b6123d2565b34801561047b57600080fd5b5061028061241e565b34801561049057600080fd5b506102e861049f3660046137e2565b61242a565b3480156104b057600080fd5b50600e54600f546010546011546104d39392916001600160a01b03908116911684565b6040805194855260208501939093526001600160a01b039182169284019290925216606082015260800161028a565b34801561050e57600080fd5b5061028061051d36600461380f565b61247c565b34801561052e57600080fd5b506000546001600160a01b03165b6040516001600160a01b03909116815260200161028a565b34801561056057600080fd5b5061053c61056f36600461380f565b6124c7565b34801561058057600080fd5b5061053c61058f3660046138e0565b6124e9565b3480156105a057600080fd5b5060135461053c906001600160a01b031681565b6102e86105c23660046136cb565b6124f6565b3480156105d357600080fd5b506102806105e23660046136cb565b6125f6565b3480156105f357600080fd5b5061053c6106023660046138e0565b612617565b34801561061357600080fd5b506102e8610622366004613934565b612624565b34801561063357600080fd5b506102e86106423660046137e2565b6128d3565b34801561065357600080fd5b506102806106623660046136e7565b6001600160a01b0391821660009081526008602090815260408083209390941682526002909201909152205490565b34801561069d57600080fd5b506102806106ac3660046136cb565b60096020526000908152604090205481565b3480156106ca57600080fd5b5060145461053c906001600160a01b031681565b3480156106ea57600080fd5b506102806106f936600461380f565b6129af565b34801561070a57600080fd5b5061076b6107193660046138e0565b6004602081905260009182526040909120805460018201546002830154600384015494840154600585015460068601546007909601546001600160a01b03958616979496939592939192918216911688565b604080516001600160a01b03998a16815260208101989098528701959095526060860193909352608085019190915260a0840152831660c083015290911660e08201526101000161028a565b3480156107c357600080fd5b5061032a6107d23660046136cb565b612a52565b3480156107e357600080fd5b506102806107f23660046136cb565b6001600160a01b031660009081526007602052604090205490565b34801561081957600080fd5b506102806108283660046138e0565b612a5f565b34801561083957600080fd5b5061084d6108483660046138e0565b612b51565b604080519a8b526001600160a01b03998a1660208c01528a01979097526060890195909552608088019390935260a087019190915260c086015260e08501528216610100840152166101208201526101400161028a565b3480156108b057600080fd5b506102806108bf3660046138e0565b612d07565b3480156108d057600080fd5b5061028060055481565b3480156108e657600080fd5b5061053c6108f53660046138e0565b612dae565b34801561090657600080fd5b5061028060065481565b34801561091c57600080fd5b506102e861092b3660046136cb565b612dbb565b34801561093c57600080fd5b506102e861094b366004613955565b612ea5565b600061095c600c612f09565b905090565b600061095c600a612f09565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a082319060240160206040518083038186803b1580156109b157600080fd5b505afa1580156109c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e991906138f8565b6001600160a01b038516600090815260096020526040902054909150610a129084908390612f13565b9150505b92915050565b60026001541415610a485760405162461bcd60e51b8152600401610a3f90613a2b565b60405180910390fd5b600260015580610a865760405162461bcd60e51b81526020600482015260096024820152684e4f20504152414d5360b81b6044820152606401610a3f565b6014546001600160a01b031615610af557601454604051633c6202c960e21b81526001600160a01b0385811660048301529091169063f1880b249060240160006040518083038186803b158015610adc57600080fd5b505afa158015610af0573d6000803e3d6000fd5b505050505b6000805b82811015610b4a57838382818110610b2157634e487b7160e01b600052603260045260246000fd5b905060a002016020013582610b369190613aa4565b915080610b4281613af3565b915050610af9565b506040516370a0823160e01b81523060048201526000906001600160a01b038616906370a082319060240160206040518083038186803b158015610b8d57600080fd5b505afa158015610ba1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc591906138f8565b9050610bd385333085612fc2565b6040516370a0823160e01b815230600482015260009082906001600160a01b038816906370a082319060240160206040518083038186803b158015610c1757600080fd5b505afa158015610c2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4f91906138f8565b610c599190613adc565b9050610c66600a876130f2565b610ca7576000610c7e82600e60000154612710612f13565b601054909150610c999088906001600160a01b031683613114565b610ca38183613adc565b9150505b6000805b8581101561111d576000878783818110610cd557634e487b7160e01b600052603260045260246000fd5b905060a00201803603810190610ceb9190613856565b90508060600151816040015110610d2d5760405162461bcd60e51b81526020600482015260066024820152651411549253d160d21b6044820152606401610a3f565b6402540be400816060015110610d795760405162461bcd60e51b81526020600482015260116024820152701512535154d51053540812539590531251607a1b6044820152606401610a3f565b60065481602001511015610dbd5760405162461bcd60e51b815260206004820152600b60248201526a1352538811115413d4d25560aa1b6044820152606401610a3f565b6000610dce82602001518689612f13565b6001600160a01b038b16600090815260096020526040902054909150610df657809350610e2c565b6001600160a01b038a16600090815260096020526040902054610e299082908815610e215788610e24565b60015b612f13565b93505b60008411610e655760405162461bcd60e51b815260206004820152600660248201526553484152455360d01b6044820152606401610a3f565b6001600160a01b038a1660009081526009602052604081208054869290610e8d908490613aa4565b90915550610e9d90508187613aa4565b9550610ea761366b565b6001600160a01b03808c16825260208201869052604084015160608084019190915284015160808084019190915260055460a08401528451821660c08401528401511615610f795782608001516001600160a01b031663f968f4936040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2c57600080fd5b505afa158015610f40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f64919061383a565b5060808301516001600160a01b031660e08201525b60058054600090815260046020818152604092839020855181546001600160a01b039182166001600160a01b0319918216178355928701516001830155938601516002808301919091556060870151600383015560808701519382019390935560a08601519481019490945560c085015160068501805491851691831691909117905560e08501516007909401805494909316931692909217905561101e908c61322f565b506001600160a01b03808c166000908152600760209081526040808320600554815460018101835591855283852090910155865190931682526008905220611066818d61322f565b506001600160a01b038c16600090815260028201602090815260408220600580548254600181018455928552928420909101919091558054916110a883613af3565b91905055507f29e0beffe541e7a2b3c0a266cdbb8aab3d87b04c88c0d4fc8775682b2f2a916a8260a001518d8460c00151868a876060015188608001518960e001516040516110fe989796959493929190613a62565b60405180910390a150505050808061111590613af3565b915050610cab565b505060018055505050505050565b6001600160a01b03808416600090815260086020908152604080832093861683526002909301905290812080548390811061117657634e487b7160e01b600052603260045260246000fd5b906000526020600020015490505b9392505050565b6000610a16600a836130f2565b6000546001600160a01b031633146111c25760405162461bcd60e51b8152600401610a3f906139f6565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b600260015414156112075760405162461bcd60e51b8152600401610a3f90613a2b565b6002600155600082815260046020526040902060065482101561125a5760405162461bcd60e51b815260206004820152600b60248201526a1352538811115413d4d25560aa1b6044820152606401610a3f565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561129d57600080fd5b505afa1580156112b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d591906138f8565b82549091506112ef906001600160a01b0316333086612fc2565b81546040516370a0823160e01b815230600482015260009183916001600160a01b03909116906370a082319060240160206040518083038186803b15801561133657600080fd5b505afa15801561134a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136e91906138f8565b6113789190613adc565b835490915061139290600a906001600160a01b03166130f2565b6113d75760006113aa82600e60000154612710612f13565b84546010549192506113c9916001600160a01b03918216911683613114565b6113d38183613adc565b9150505b82546001600160a01b03166000908152600960205260408120546113fc575080611425565b83546001600160a01b031660009081526009602052604090205461142290839085612f13565b90505b6000811161145e5760405162461bcd60e51b815260206004820152600660248201526553484152455360d01b6044820152606401610a3f565b83546001600160a01b031660009081526009602052604081208054839290611487908490613aa4565b92505081905550808460010160008282546114a29190613aa4565b90915550506005840154845460068601546003870154600488015460078901546040517f29e0beffe541e7a2b3c0a266cdbb8aab3d87b04c88c0d4fc8775682b2f2a916a9661150d9690956001600160a01b0391821695908216948b948b9492939192911690613a62565b60405180910390a150506001805550505050565b600260015414156115445760405162461bcd60e51b8152600401610a3f90613a2b565b60026001556013546001600160a01b031661158b5760405162461bcd60e51b81526020600482015260076024820152661393d50814d15560ca1b6044820152606401610a3f565b600082815260046020526040902060068101546001600160a01b031633146115c55760405162461bcd60e51b8152600401610a3f906139d7565b6000816002015482600101546115db9190613adc565b9050600081116116165760405162461bcd60e51b8152602060048201526006602482015265105353d5539560d21b6044820152606401610a3f565b81546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561165957600080fd5b505afa15801561166d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169191906138f8565b83546001600160a01b0316600090815260096020526040812054919250906116bc9084908490612f13565b84546013549192506116db916001600160a01b03918216911683613244565b60135484546001860154600287015460038801546004808a015460058b015460068c015460078d01546040516308a8f46960e21b81526001600160a01b03998a1695810195909552602485019790975260448401959095526064830193909352608482015260a481019190915290831660c482015290821660e4820152610104810184905261012481018890529116906322a3d1a49061014401602060405180830381600087803b15801561178f57600080fd5b505af11580156117a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117c7919061383a565b506001840154600285015583546001600160a01b0316600090815260096020526040812080548592906117fb908490613adc565b909155505060408051878152602081018390527f8b1497abd425402b9139208bcb7f83d61a7545712a632d73a1ae68039cd593ab910161150d565b600260015414156118595760405162461bcd60e51b8152600401610a3f90613a2b565b6002600155600082815260046020526040902060068101546001600160a01b031633146118985760405162461bcd60e51b8152600401610a3f906139d7565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156118db57600080fd5b505afa1580156118ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061191391906138f8565b82546001600160a01b03166000908152600960205260408120549192509061193c908584612f13565b90508015801561194c5750600084115b1561195f578061195b81613af3565b9150505b600081116119a05760405162461bcd60e51b815260206004820152600e60248201526d16915493c815d2551211149055d360921b6044820152606401610a3f565b60006119af8460050154612d07565b9050806119bd836001613aa4565b1415611a035783546001600160a01b03166000908152600960205260409020546119f1906119eb8186613abc565b85612f13565b611a0357816119ff81613af3565b9250505b81811015611a3c5760405162461bcd60e51b8152602060048201526006602482015265105353d5539560d21b6044820152606401610a3f565b81846002016000828254611a509190613aa4565b909155505083546001600160a01b0316600090815260096020526040812054611a7c9084908690612f13565b85546001600160a01b0316600090815260096020526040812080549293508592909190611aaa908490613adc565b90915550508454611ac5906001600160a01b03163383613114565b8454604080518981526001600160a01b0390921660208301528101829052606081018490527fee898eacf688f6932b2234d6e6467430ce81a75c69d0805ca79399e195cd66639060800160405180910390a15050600180555050505050565b60026001541415611b475760405162461bcd60e51b8152600401610a3f90613a2b565b6002600155336001600160a01b0382161415611b8e5760405162461bcd60e51b8152600401610a3f9060208082526004908201526329a2a62360e11b604082015260600190565b600082815260046020526040902060068101546001600160a01b03163314611bc85760405162461bcd60e51b8152600401610a3f906139d7565b611bd061366b565b8160000160009054906101000a90046001600160a01b031681600001906001600160a01b031690816001600160a01b03168152505081600101548160200181815250508160020154816040018181525050816003015481606001818152505081600401548160800181815250506005548160a0018181525050828160c001906001600160a01b031690816001600160a01b0316815250508160070160009054906101000a90046001600160a01b03168160e001906001600160a01b031690816001600160a01b0316815250508060046000600554815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060e08201518160070160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550905050600760008360000160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020016000206005549080600181540180825580915050600190039060005260206000200160009091909190915055600060086000856001600160a01b03166001600160a01b031681526020019081526020016000209050611e298360000160009054906101000a90046001600160a01b03168260000161322f90919063ffffffff16565b5082546001600160a01b031660009081526002820160209081526040822060a0850151815460018101835591845291832001556005805491611e6a83613af3565b90915550506001830154600284015560a082015160408051878152602081019290925233828201526001600160a01b0386166060830152517fc1329eea12893a6eff780df43cf4ec708fdc6ce7fbacf84ee8cf9355a9af1dd89181900360800190a1505060018055505050565b60026001541415611efa5760405162461bcd60e51b8152600401610a3f90613a2b565b6002600155600081815260046020526040902060068101546001600160a01b03163314611f395760405162461bcd60e51b8152600401610a3f906139d7565b60078101546001600160a01b0316611f5057600080fd5b6007810180546001600160a01b03191690558054604080518481526001600160a01b0390921660208301527fe3696364c3d5e7a3b84b4fb85a1d586dd2b595da2d145f2c03d566d3ceb9a61f910160405180910390a1505060018055565b60026001541415611fd15760405162461bcd60e51b8152600401610a3f90613a2b565b6002600155806120115760405162461bcd60e51b815260206004820152600b60248201526a16915493c8105353d5539560aa1b6044820152606401610a3f565b600082815260046020526040902060068101546001600160a01b0316331461204b5760405162461bcd60e51b8152600401610a3f906139d7565b60038101541561208b5760405162461bcd60e51b815260206004820152600b60248201526a2627a1a5902a2ca822901960a91b6044820152606401610a3f565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156120ce57600080fd5b505afa1580156120e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061210691906138f8565b82546001600160a01b03166000908152600960205260408120549192509061212f908584612f13565b905082600101548184600201546121469190613aa4565b111561215157600080fd5b61215961366b565b83546001600160a01b039081168252602082018390526004850154608083015260055460a08301523360c083015260078501541660e08201526002840180548391906000906121a9908490613aa4565b9091555050600580546000908152600460208181526040808420865181546001600160a01b03199081166001600160a01b03928316178355888501516001808501919091558985015160028086019190915560608b0151600386015560808b01519785019790975560a08a018051858b015560c08b0151600686018054851691861691909117905560e08b015160079586018054909416908516179092558c548316885292855283872088548154808601835591895286892090910155338752600885528387208c5490921687529401835290842092518354918201845592845290832001558154919061229c83613af3565b909155505060a08101516040805188815260208101929092528101869052606081018390527f6308a04528b5c71ccce0854c546bf8a16c8b05ed2265a400e03d12265e81d3499060800161150d565b6000816001600160a01b031663f968f4936040518163ffffffff1660e01b815260040160206040518083038186803b15801561232657600080fd5b505afa15801561233a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a16919061383a565b6000546001600160a01b031633146123885760405162461bcd60e51b8152600401610a3f906139f6565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146123fc5760405162461bcd60e51b8152600401610a3f906139f6565b601480546001600160a01b0319166001600160a01b0392909216919091179055565b600061095c6002612f09565b6000546001600160a01b031633146124545760405162461bcd60e51b8152600401610a3f906139f6565b801561246b57612465600c8361322f565b50612478565b612476600c83613358565b505b5050565b6001600160a01b03821660009081526007602052604081208054839081106124b457634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b6001600160a01b0382166000908152600860205260408120611184908361336d565b6000610a1660028361336d565b612501600a826130f2565b156125375760405162461bcd60e51b8152600401610a3f906020808252600490820152631410525160e21b604082015260600190565b6011546001600160a01b03166125c857600f5434146125865760405162461bcd60e51b815260206004820152600b60248201526a119151481393d50813515560aa1b6044820152606401610a3f565b601054600f546040516001600160a01b039092169181156108fc0291906000818181858888f193505050501580156125c2573d6000803e3d6000fd5b506125eb565b601154601054600f546125eb926001600160a01b03908116923392911690612fc2565b612478600a8261322f565b6001600160a01b0381166000908152600860205260408120610a1690612f09565b6000610a16600a8361336d565b600260015414156126475760405162461bcd60e51b8152600401610a3f90613a2b565b60026001556402540be40081106126895760405162461bcd60e51b8152600401610a3f9060208082526004908201526354494d4560e01b604082015260600190565b600082815260046020526040902060068101546001600160a01b031633146126c35760405162461bcd60e51b8152600401610a3f906139d7565b818160040154106126fc5760405162461bcd60e51b815260206004820152600360248201526211539160ea1b6044820152606401610a3f565b805461271390600a906001600160a01b03166130f2565b6128785760008160020154826001015461272d9190613adc565b9050600061274382600e60000154612710612f13565b83546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a082319060240160206040518083038186803b15801561278b57600080fd5b505afa15801561279f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127c391906138f8565b84546001600160a01b03166000908152600960205260408120549192509061280d908490849015610e215787546001600160a01b0316600090815260096020526040902054610e24565b855460105491925061282c916001600160a01b03918216911683613114565b828560020160008282546128409190613aa4565b909155505084546001600160a01b03166000908152600960205260408120805485929061286e908490613adc565b9091555050505050505b600481018290558054604080518581526001600160a01b03909216602083015281018390527fdb609b216f2e76380a286758a0db7c2007284471634b5d8014e1b379a2f660249060600160405180910390a150506001805550565b601254604051632a35efd360e21b81523360048201526001600160a01b039091169063a8d7bf4c9060240160206040518083038186803b15801561291657600080fd5b505afa15801561292a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061294e919061383a565b8061295f575061295f600c336130f2565b6129935760405162461bcd60e51b815260206004820152600560248201526420a226a4a760d91b6044820152606401610a3f565b80156129a457612465600a8361322f565b612476600a83613358565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a082319060240160206040518083038186803b1580156129f357600080fd5b505afa158015612a07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a2b91906138f8565b6001600160a01b038516600090815260096020526040902054909150610a12908483612f13565b6000610a16600c836130f2565b600081815260046020526040812060058101548290612a7d90612d07565b82546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a082319060240160206040518083038186803b158015612ac557600080fd5b505afa158015612ad9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612afd91906138f8565b83546001600160a01b031660009081526009602052604081205491925090612b47908490849015610e215786546001600160a01b0316600090815260096020526040902054610e24565b9695505050505050565b600081815260046020818152604080842081516101008101835281546001600160a01b0390811680835260018401549583019590955260028301548285015260038301546060830152828601546080830152600583015460a08301526006830154811660c083015260079092015490911660e082015290516370a0823160e01b81523093810193909352839283928392839283928392839283928392918391906370a082319060240160206040518083038186803b158015612c1257600080fd5b505afa158015612c26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c4a91906138f8565b82516001600160a01b03166000908152600960205260408120549192509015612c8c5782516001600160a01b0316600090815260096020526040902054612c8f565b60015b90506000612ca284602001518484612f13565b90506000612cb585604001518585612f13565b90508460a0015185600001518383886020015189604001518a606001518b608001518c60c001518d60e001519e509e509e509e509e509e509e509e509e509e5050505050509193959799509193959799565b60008181526004602052604081206003810154829015612d28576002612d2b565b60015b905060008160ff16600114612d44578260010154612d58565b82600201548360010154612d589190613adc565b90506000612d888460030154856004015484428860070160009054906101000a90046001600160a01b0316613379565b90508260ff1660021415612da5576002840154612b479082613adc565b95945050505050565b6000610a16600c8361336d565b6000546001600160a01b03163314612de55760405162461bcd60e51b8152600401610a3f906139f6565b6001600160a01b038116612e4a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a3f565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314612ecf5760405162461bcd60e51b8152600401610a3f906139f6565b600e93909355600f91909155601080546001600160a01b039283166001600160a01b03199182161790915560118054929093169116179055565b6000610a16825490565b600080806000198587098587029250828110838203039150508060001415612f4d5760008411612f4257600080fd5b508290049050611184565b808411612f5957600080fd5b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691613026919061399e565b6000604051808303816000865af19150503d8060008114613063576040519150601f19603f3d011682016040523d82523d6000602084013e613068565b606091505b5091509150818015613092575080511580613092575080806020019051810190613092919061383a565b6130ea5760405162461bcd60e51b8152602060048201526024808201527f5472616e7366657248656c7065723a205452414e534645525f46524f4d5f46416044820152631253115160e21b6064820152608401610a3f565b505050505050565b6001600160a01b03811660009081526001830160205260408120541515611184565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092839290871691613170919061399e565b6000604051808303816000865af19150503d80600081146131ad576040519150601f19603f3d011682016040523d82523d6000602084013e6131b2565b606091505b50915091508180156131dc5750805115806131dc5750808060200190518101906131dc919061383a565b6132285760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c4544006044820152606401610a3f565b5050505050565b6000611184836001600160a01b03841661347e565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b17905291516000928392908716916132a0919061399e565b6000604051808303816000865af19150503d80600081146132dd576040519150601f19603f3d011682016040523d82523d6000602084013e6132e2565b606091505b509150915081801561330c57508051158061330c57508080602001905181019061330c919061383a565b6132285760405162461bcd60e51b815260206004820152601e60248201527f5472616e7366657248656c7065723a20415050524f56455f4641494c454400006044820152606401610a3f565b6000611184836001600160a01b0384166134cd565b600061118483836135ea565b60006001600160a01b038216158015906133ff5750816001600160a01b031663f968f4936040518163ffffffff1660e01b815260040160206040518083038186803b1580156133c757600080fd5b505afa1580156133db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133ff919061383a565b1561340b575082612da5565b85158061341757508486145b156134335782851061342a57600061342c565b835b9050612da5565b828581111561343f5750845b8681101561344a5750855b60006134568883613adc565b905060006134648989613adc565b9050613471878383612f13565b9998505050505050505050565b60008181526001830160205260408120546134c557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a16565b506000610a16565b600081815260018301602052604081205480156135e05760006134f1600183613adc565b855490915060009061350590600190613adc565b9050600086600001828154811061352c57634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508087600001848154811061355d57634e487b7160e01b600052603260045260246000fd5b600091825260209091200155613574836001613aa4565b600082815260018901602052604090205586548790806135a457634e487b7160e01b600052603160045260246000fd5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610a16565b6000915050610a16565b815460009082106136485760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401610a3f565b8260000182815481106124b457634e487b7160e01b600052603260045260246000fd5b60405180610100016040528060006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b031681525090565b6000602082840312156136dc578081fd5b813561118481613b24565b600080604083850312156136f9578081fd5b823561370481613b24565b9150602083013561371481613b24565b809150509250929050565b600080600060608486031215613733578081fd5b833561373e81613b24565b9250602084013561374e81613b24565b929592945050506040919091013590565b600080600060408486031215613773578283fd5b833561377e81613b24565b9250602084013567ffffffffffffffff8082111561379a578384fd5b818601915086601f8301126137ad578384fd5b8135818111156137bb578485fd5b87602060a0830285010111156137cf578485fd5b6020830194508093505050509250925092565b600080604083850312156137f4578182fd5b82356137ff81613b24565b9150602083013561371481613b3c565b60008060408385031215613821578182fd5b823561382c81613b24565b946020939093013593505050565b60006020828403121561384b578081fd5b815161118481613b3c565b600060a08284031215613867578081fd5b60405160a0810181811067ffffffffffffffff8211171561389657634e487b7160e01b83526041600452602483fd5b60405282356138a481613b24565b8082525060208301356020820152604083013560408201526060830135606082015260808301356138d481613b24565b60808201529392505050565b6000602082840312156138f1578081fd5b5035919050565b600060208284031215613909578081fd5b5051919050565b60008060408385031215613922578182fd5b82359150602083013561371481613b24565b60008060408385031215613946578182fd5b50508035926020909101359150565b6000806000806080858703121561396a578182fd5b8435935060208501359250604085013561398381613b24565b9150606085013561399381613b24565b939692955090935050565b60008251815b818110156139be57602081860181015185830152016139a4565b818111156139cc5782828501525b509190910192915050565b60208082526005908201526427aba722a960d91b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b9788526001600160a01b03968716602089015294861660408801526060870193909352608086019190915260a085015260c08401521660e08201526101000190565b60008219821115613ab757613ab7613b0e565b500190565b600082613ad757634e487b7160e01b81526012600452602481fd5b500490565b600082821015613aee57613aee613b0e565b500390565b6000600019821415613b0757613b07613b0e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114613b3957600080fd5b50565b8015158114613b3957600080fdfea2646970667358221220a3a73ad734a9db90b25d1e53800a51143d98b0db961e7d6a7638a6e1484d849a64736f6c634300080300330000000000000000000000001fe6cc287feb08ce831df0cd114341480adcaa5a

Deployed Bytecode

0x6080604052600436106102665760003560e01c806397988dce11610144578063cf0d5af3116100b6578063e04ab1391161007a578063e04ab139146108a4578063e091dd1a146108c4578063e52c4b7a146108da578063f19451d8146108fa578063f2fde38b14610910578063fc0633d01461093057610266565b8063cf0d5af3146106fe578063cf6dde4a146107b7578063d060e175146107d7578063d323cdbf1461080d578063d68f4dd11461082d57610266565b8063b2fb30cb11610108578063b2fb30cb14610607578063b4540fa714610627578063bb5ee00114610647578063c368803a14610691578063c8b0cf68146106be578063ca5cc0c2146106de57610266565b806397988dce146105745780639ecd747214610594578063a34df14f146105b4578063a6dcb8de146105c7578063b1d7655c146105e757610266565b80635a5b8d9e116101dd578063783451e8116101a1578063783451e81461046f57806386de2fcb146104845780638b7b23ee146104a45780638ba74f17146105025780638da5cb5b14610522578063903df8061461055457610266565b80635a5b8d9e146103da5780636588fc03146103fa578063675187a31461041a578063715018a61461043a578063741af17e1461044f57610266565b80631d7065db1161022f5780631d7065db1461030a57806323cf31181461033a5780633717dee71461035a5780633e54bacb1461037a578063441a3e701461039a5780635a04fb69146103ba57610266565b8062623ae31461026b57806303e1cdf4146102935780630cdebc9e146102a857806313ef2b1b146102c85780631c30ffb1146102ea575b600080fd5b34801561027757600080fd5b50610280610950565b6040519081526020015b60405180910390f35b34801561029f57600080fd5b50610280610961565b3480156102b457600080fd5b506102806102c336600461380f565b61096d565b3480156102d457600080fd5b506102e86102e336600461375f565b610a1c565b005b3480156102f657600080fd5b5061028061030536600461371f565b61112b565b34801561031657600080fd5b5061032a6103253660046136cb565b61118b565b604051901515815260200161028a565b34801561034657600080fd5b506102e86103553660046136cb565b611198565b34801561036657600080fd5b506102e8610375366004613934565b6111e4565b34801561038657600080fd5b506102e8610395366004613934565b611521565b3480156103a657600080fd5b506102e86103b5366004613934565b611836565b3480156103c657600080fd5b506102e86103d5366004613910565b611b24565b3480156103e657600080fd5b506102e86103f53660046138e0565b611ed7565b34801561040657600080fd5b506102e8610415366004613934565b611fae565b34801561042657600080fd5b5061032a6104353660046136cb565b6122eb565b34801561044657600080fd5b506102e861235e565b34801561045b57600080fd5b506102e861046a3660046136cb565b6123d2565b34801561047b57600080fd5b5061028061241e565b34801561049057600080fd5b506102e861049f3660046137e2565b61242a565b3480156104b057600080fd5b50600e54600f546010546011546104d39392916001600160a01b03908116911684565b6040805194855260208501939093526001600160a01b039182169284019290925216606082015260800161028a565b34801561050e57600080fd5b5061028061051d36600461380f565b61247c565b34801561052e57600080fd5b506000546001600160a01b03165b6040516001600160a01b03909116815260200161028a565b34801561056057600080fd5b5061053c61056f36600461380f565b6124c7565b34801561058057600080fd5b5061053c61058f3660046138e0565b6124e9565b3480156105a057600080fd5b5060135461053c906001600160a01b031681565b6102e86105c23660046136cb565b6124f6565b3480156105d357600080fd5b506102806105e23660046136cb565b6125f6565b3480156105f357600080fd5b5061053c6106023660046138e0565b612617565b34801561061357600080fd5b506102e8610622366004613934565b612624565b34801561063357600080fd5b506102e86106423660046137e2565b6128d3565b34801561065357600080fd5b506102806106623660046136e7565b6001600160a01b0391821660009081526008602090815260408083209390941682526002909201909152205490565b34801561069d57600080fd5b506102806106ac3660046136cb565b60096020526000908152604090205481565b3480156106ca57600080fd5b5060145461053c906001600160a01b031681565b3480156106ea57600080fd5b506102806106f936600461380f565b6129af565b34801561070a57600080fd5b5061076b6107193660046138e0565b6004602081905260009182526040909120805460018201546002830154600384015494840154600585015460068601546007909601546001600160a01b03958616979496939592939192918216911688565b604080516001600160a01b03998a16815260208101989098528701959095526060860193909352608085019190915260a0840152831660c083015290911660e08201526101000161028a565b3480156107c357600080fd5b5061032a6107d23660046136cb565b612a52565b3480156107e357600080fd5b506102806107f23660046136cb565b6001600160a01b031660009081526007602052604090205490565b34801561081957600080fd5b506102806108283660046138e0565b612a5f565b34801561083957600080fd5b5061084d6108483660046138e0565b612b51565b604080519a8b526001600160a01b03998a1660208c01528a01979097526060890195909552608088019390935260a087019190915260c086015260e08501528216610100840152166101208201526101400161028a565b3480156108b057600080fd5b506102806108bf3660046138e0565b612d07565b3480156108d057600080fd5b5061028060055481565b3480156108e657600080fd5b5061053c6108f53660046138e0565b612dae565b34801561090657600080fd5b5061028060065481565b34801561091c57600080fd5b506102e861092b3660046136cb565b612dbb565b34801561093c57600080fd5b506102e861094b366004613955565b612ea5565b600061095c600c612f09565b905090565b600061095c600a612f09565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a082319060240160206040518083038186803b1580156109b157600080fd5b505afa1580156109c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e991906138f8565b6001600160a01b038516600090815260096020526040902054909150610a129084908390612f13565b9150505b92915050565b60026001541415610a485760405162461bcd60e51b8152600401610a3f90613a2b565b60405180910390fd5b600260015580610a865760405162461bcd60e51b81526020600482015260096024820152684e4f20504152414d5360b81b6044820152606401610a3f565b6014546001600160a01b031615610af557601454604051633c6202c960e21b81526001600160a01b0385811660048301529091169063f1880b249060240160006040518083038186803b158015610adc57600080fd5b505afa158015610af0573d6000803e3d6000fd5b505050505b6000805b82811015610b4a57838382818110610b2157634e487b7160e01b600052603260045260246000fd5b905060a002016020013582610b369190613aa4565b915080610b4281613af3565b915050610af9565b506040516370a0823160e01b81523060048201526000906001600160a01b038616906370a082319060240160206040518083038186803b158015610b8d57600080fd5b505afa158015610ba1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc591906138f8565b9050610bd385333085612fc2565b6040516370a0823160e01b815230600482015260009082906001600160a01b038816906370a082319060240160206040518083038186803b158015610c1757600080fd5b505afa158015610c2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4f91906138f8565b610c599190613adc565b9050610c66600a876130f2565b610ca7576000610c7e82600e60000154612710612f13565b601054909150610c999088906001600160a01b031683613114565b610ca38183613adc565b9150505b6000805b8581101561111d576000878783818110610cd557634e487b7160e01b600052603260045260246000fd5b905060a00201803603810190610ceb9190613856565b90508060600151816040015110610d2d5760405162461bcd60e51b81526020600482015260066024820152651411549253d160d21b6044820152606401610a3f565b6402540be400816060015110610d795760405162461bcd60e51b81526020600482015260116024820152701512535154d51053540812539590531251607a1b6044820152606401610a3f565b60065481602001511015610dbd5760405162461bcd60e51b815260206004820152600b60248201526a1352538811115413d4d25560aa1b6044820152606401610a3f565b6000610dce82602001518689612f13565b6001600160a01b038b16600090815260096020526040902054909150610df657809350610e2c565b6001600160a01b038a16600090815260096020526040902054610e299082908815610e215788610e24565b60015b612f13565b93505b60008411610e655760405162461bcd60e51b815260206004820152600660248201526553484152455360d01b6044820152606401610a3f565b6001600160a01b038a1660009081526009602052604081208054869290610e8d908490613aa4565b90915550610e9d90508187613aa4565b9550610ea761366b565b6001600160a01b03808c16825260208201869052604084015160608084019190915284015160808084019190915260055460a08401528451821660c08401528401511615610f795782608001516001600160a01b031663f968f4936040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2c57600080fd5b505afa158015610f40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f64919061383a565b5060808301516001600160a01b031660e08201525b60058054600090815260046020818152604092839020855181546001600160a01b039182166001600160a01b0319918216178355928701516001830155938601516002808301919091556060870151600383015560808701519382019390935560a08601519481019490945560c085015160068501805491851691831691909117905560e08501516007909401805494909316931692909217905561101e908c61322f565b506001600160a01b03808c166000908152600760209081526040808320600554815460018101835591855283852090910155865190931682526008905220611066818d61322f565b506001600160a01b038c16600090815260028201602090815260408220600580548254600181018455928552928420909101919091558054916110a883613af3565b91905055507f29e0beffe541e7a2b3c0a266cdbb8aab3d87b04c88c0d4fc8775682b2f2a916a8260a001518d8460c00151868a876060015188608001518960e001516040516110fe989796959493929190613a62565b60405180910390a150505050808061111590613af3565b915050610cab565b505060018055505050505050565b6001600160a01b03808416600090815260086020908152604080832093861683526002909301905290812080548390811061117657634e487b7160e01b600052603260045260246000fd5b906000526020600020015490505b9392505050565b6000610a16600a836130f2565b6000546001600160a01b031633146111c25760405162461bcd60e51b8152600401610a3f906139f6565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b600260015414156112075760405162461bcd60e51b8152600401610a3f90613a2b565b6002600155600082815260046020526040902060065482101561125a5760405162461bcd60e51b815260206004820152600b60248201526a1352538811115413d4d25560aa1b6044820152606401610a3f565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561129d57600080fd5b505afa1580156112b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d591906138f8565b82549091506112ef906001600160a01b0316333086612fc2565b81546040516370a0823160e01b815230600482015260009183916001600160a01b03909116906370a082319060240160206040518083038186803b15801561133657600080fd5b505afa15801561134a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136e91906138f8565b6113789190613adc565b835490915061139290600a906001600160a01b03166130f2565b6113d75760006113aa82600e60000154612710612f13565b84546010549192506113c9916001600160a01b03918216911683613114565b6113d38183613adc565b9150505b82546001600160a01b03166000908152600960205260408120546113fc575080611425565b83546001600160a01b031660009081526009602052604090205461142290839085612f13565b90505b6000811161145e5760405162461bcd60e51b815260206004820152600660248201526553484152455360d01b6044820152606401610a3f565b83546001600160a01b031660009081526009602052604081208054839290611487908490613aa4565b92505081905550808460010160008282546114a29190613aa4565b90915550506005840154845460068601546003870154600488015460078901546040517f29e0beffe541e7a2b3c0a266cdbb8aab3d87b04c88c0d4fc8775682b2f2a916a9661150d9690956001600160a01b0391821695908216948b948b9492939192911690613a62565b60405180910390a150506001805550505050565b600260015414156115445760405162461bcd60e51b8152600401610a3f90613a2b565b60026001556013546001600160a01b031661158b5760405162461bcd60e51b81526020600482015260076024820152661393d50814d15560ca1b6044820152606401610a3f565b600082815260046020526040902060068101546001600160a01b031633146115c55760405162461bcd60e51b8152600401610a3f906139d7565b6000816002015482600101546115db9190613adc565b9050600081116116165760405162461bcd60e51b8152602060048201526006602482015265105353d5539560d21b6044820152606401610a3f565b81546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561165957600080fd5b505afa15801561166d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169191906138f8565b83546001600160a01b0316600090815260096020526040812054919250906116bc9084908490612f13565b84546013549192506116db916001600160a01b03918216911683613244565b60135484546001860154600287015460038801546004808a015460058b015460068c015460078d01546040516308a8f46960e21b81526001600160a01b03998a1695810195909552602485019790975260448401959095526064830193909352608482015260a481019190915290831660c482015290821660e4820152610104810184905261012481018890529116906322a3d1a49061014401602060405180830381600087803b15801561178f57600080fd5b505af11580156117a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117c7919061383a565b506001840154600285015583546001600160a01b0316600090815260096020526040812080548592906117fb908490613adc565b909155505060408051878152602081018390527f8b1497abd425402b9139208bcb7f83d61a7545712a632d73a1ae68039cd593ab910161150d565b600260015414156118595760405162461bcd60e51b8152600401610a3f90613a2b565b6002600155600082815260046020526040902060068101546001600160a01b031633146118985760405162461bcd60e51b8152600401610a3f906139d7565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156118db57600080fd5b505afa1580156118ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061191391906138f8565b82546001600160a01b03166000908152600960205260408120549192509061193c908584612f13565b90508015801561194c5750600084115b1561195f578061195b81613af3565b9150505b600081116119a05760405162461bcd60e51b815260206004820152600e60248201526d16915493c815d2551211149055d360921b6044820152606401610a3f565b60006119af8460050154612d07565b9050806119bd836001613aa4565b1415611a035783546001600160a01b03166000908152600960205260409020546119f1906119eb8186613abc565b85612f13565b611a0357816119ff81613af3565b9250505b81811015611a3c5760405162461bcd60e51b8152602060048201526006602482015265105353d5539560d21b6044820152606401610a3f565b81846002016000828254611a509190613aa4565b909155505083546001600160a01b0316600090815260096020526040812054611a7c9084908690612f13565b85546001600160a01b0316600090815260096020526040812080549293508592909190611aaa908490613adc565b90915550508454611ac5906001600160a01b03163383613114565b8454604080518981526001600160a01b0390921660208301528101829052606081018490527fee898eacf688f6932b2234d6e6467430ce81a75c69d0805ca79399e195cd66639060800160405180910390a15050600180555050505050565b60026001541415611b475760405162461bcd60e51b8152600401610a3f90613a2b565b6002600155336001600160a01b0382161415611b8e5760405162461bcd60e51b8152600401610a3f9060208082526004908201526329a2a62360e11b604082015260600190565b600082815260046020526040902060068101546001600160a01b03163314611bc85760405162461bcd60e51b8152600401610a3f906139d7565b611bd061366b565b8160000160009054906101000a90046001600160a01b031681600001906001600160a01b031690816001600160a01b03168152505081600101548160200181815250508160020154816040018181525050816003015481606001818152505081600401548160800181815250506005548160a0018181525050828160c001906001600160a01b031690816001600160a01b0316815250508160070160009054906101000a90046001600160a01b03168160e001906001600160a01b031690816001600160a01b0316815250508060046000600554815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060e08201518160070160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550905050600760008360000160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020016000206005549080600181540180825580915050600190039060005260206000200160009091909190915055600060086000856001600160a01b03166001600160a01b031681526020019081526020016000209050611e298360000160009054906101000a90046001600160a01b03168260000161322f90919063ffffffff16565b5082546001600160a01b031660009081526002820160209081526040822060a0850151815460018101835591845291832001556005805491611e6a83613af3565b90915550506001830154600284015560a082015160408051878152602081019290925233828201526001600160a01b0386166060830152517fc1329eea12893a6eff780df43cf4ec708fdc6ce7fbacf84ee8cf9355a9af1dd89181900360800190a1505060018055505050565b60026001541415611efa5760405162461bcd60e51b8152600401610a3f90613a2b565b6002600155600081815260046020526040902060068101546001600160a01b03163314611f395760405162461bcd60e51b8152600401610a3f906139d7565b60078101546001600160a01b0316611f5057600080fd5b6007810180546001600160a01b03191690558054604080518481526001600160a01b0390921660208301527fe3696364c3d5e7a3b84b4fb85a1d586dd2b595da2d145f2c03d566d3ceb9a61f910160405180910390a1505060018055565b60026001541415611fd15760405162461bcd60e51b8152600401610a3f90613a2b565b6002600155806120115760405162461bcd60e51b815260206004820152600b60248201526a16915493c8105353d5539560aa1b6044820152606401610a3f565b600082815260046020526040902060068101546001600160a01b0316331461204b5760405162461bcd60e51b8152600401610a3f906139d7565b60038101541561208b5760405162461bcd60e51b815260206004820152600b60248201526a2627a1a5902a2ca822901960a91b6044820152606401610a3f565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156120ce57600080fd5b505afa1580156120e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061210691906138f8565b82546001600160a01b03166000908152600960205260408120549192509061212f908584612f13565b905082600101548184600201546121469190613aa4565b111561215157600080fd5b61215961366b565b83546001600160a01b039081168252602082018390526004850154608083015260055460a08301523360c083015260078501541660e08201526002840180548391906000906121a9908490613aa4565b9091555050600580546000908152600460208181526040808420865181546001600160a01b03199081166001600160a01b03928316178355888501516001808501919091558985015160028086019190915560608b0151600386015560808b01519785019790975560a08a018051858b015560c08b0151600686018054851691861691909117905560e08b015160079586018054909416908516179092558c548316885292855283872088548154808601835591895286892090910155338752600885528387208c5490921687529401835290842092518354918201845592845290832001558154919061229c83613af3565b909155505060a08101516040805188815260208101929092528101869052606081018390527f6308a04528b5c71ccce0854c546bf8a16c8b05ed2265a400e03d12265e81d3499060800161150d565b6000816001600160a01b031663f968f4936040518163ffffffff1660e01b815260040160206040518083038186803b15801561232657600080fd5b505afa15801561233a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a16919061383a565b6000546001600160a01b031633146123885760405162461bcd60e51b8152600401610a3f906139f6565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146123fc5760405162461bcd60e51b8152600401610a3f906139f6565b601480546001600160a01b0319166001600160a01b0392909216919091179055565b600061095c6002612f09565b6000546001600160a01b031633146124545760405162461bcd60e51b8152600401610a3f906139f6565b801561246b57612465600c8361322f565b50612478565b612476600c83613358565b505b5050565b6001600160a01b03821660009081526007602052604081208054839081106124b457634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b6001600160a01b0382166000908152600860205260408120611184908361336d565b6000610a1660028361336d565b612501600a826130f2565b156125375760405162461bcd60e51b8152600401610a3f906020808252600490820152631410525160e21b604082015260600190565b6011546001600160a01b03166125c857600f5434146125865760405162461bcd60e51b815260206004820152600b60248201526a119151481393d50813515560aa1b6044820152606401610a3f565b601054600f546040516001600160a01b039092169181156108fc0291906000818181858888f193505050501580156125c2573d6000803e3d6000fd5b506125eb565b601154601054600f546125eb926001600160a01b03908116923392911690612fc2565b612478600a8261322f565b6001600160a01b0381166000908152600860205260408120610a1690612f09565b6000610a16600a8361336d565b600260015414156126475760405162461bcd60e51b8152600401610a3f90613a2b565b60026001556402540be40081106126895760405162461bcd60e51b8152600401610a3f9060208082526004908201526354494d4560e01b604082015260600190565b600082815260046020526040902060068101546001600160a01b031633146126c35760405162461bcd60e51b8152600401610a3f906139d7565b818160040154106126fc5760405162461bcd60e51b815260206004820152600360248201526211539160ea1b6044820152606401610a3f565b805461271390600a906001600160a01b03166130f2565b6128785760008160020154826001015461272d9190613adc565b9050600061274382600e60000154612710612f13565b83546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a082319060240160206040518083038186803b15801561278b57600080fd5b505afa15801561279f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127c391906138f8565b84546001600160a01b03166000908152600960205260408120549192509061280d908490849015610e215787546001600160a01b0316600090815260096020526040902054610e24565b855460105491925061282c916001600160a01b03918216911683613114565b828560020160008282546128409190613aa4565b909155505084546001600160a01b03166000908152600960205260408120805485929061286e908490613adc565b9091555050505050505b600481018290558054604080518581526001600160a01b03909216602083015281018390527fdb609b216f2e76380a286758a0db7c2007284471634b5d8014e1b379a2f660249060600160405180910390a150506001805550565b601254604051632a35efd360e21b81523360048201526001600160a01b039091169063a8d7bf4c9060240160206040518083038186803b15801561291657600080fd5b505afa15801561292a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061294e919061383a565b8061295f575061295f600c336130f2565b6129935760405162461bcd60e51b815260206004820152600560248201526420a226a4a760d91b6044820152606401610a3f565b80156129a457612465600a8361322f565b612476600a83613358565b6040516370a0823160e01b815230600482015260009081906001600160a01b038516906370a082319060240160206040518083038186803b1580156129f357600080fd5b505afa158015612a07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a2b91906138f8565b6001600160a01b038516600090815260096020526040902054909150610a12908483612f13565b6000610a16600c836130f2565b600081815260046020526040812060058101548290612a7d90612d07565b82546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a082319060240160206040518083038186803b158015612ac557600080fd5b505afa158015612ad9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612afd91906138f8565b83546001600160a01b031660009081526009602052604081205491925090612b47908490849015610e215786546001600160a01b0316600090815260096020526040902054610e24565b9695505050505050565b600081815260046020818152604080842081516101008101835281546001600160a01b0390811680835260018401549583019590955260028301548285015260038301546060830152828601546080830152600583015460a08301526006830154811660c083015260079092015490911660e082015290516370a0823160e01b81523093810193909352839283928392839283928392839283928392918391906370a082319060240160206040518083038186803b158015612c1257600080fd5b505afa158015612c26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c4a91906138f8565b82516001600160a01b03166000908152600960205260408120549192509015612c8c5782516001600160a01b0316600090815260096020526040902054612c8f565b60015b90506000612ca284602001518484612f13565b90506000612cb585604001518585612f13565b90508460a0015185600001518383886020015189604001518a606001518b608001518c60c001518d60e001519e509e509e509e509e509e509e509e509e509e5050505050509193959799509193959799565b60008181526004602052604081206003810154829015612d28576002612d2b565b60015b905060008160ff16600114612d44578260010154612d58565b82600201548360010154612d589190613adc565b90506000612d888460030154856004015484428860070160009054906101000a90046001600160a01b0316613379565b90508260ff1660021415612da5576002840154612b479082613adc565b95945050505050565b6000610a16600c8361336d565b6000546001600160a01b03163314612de55760405162461bcd60e51b8152600401610a3f906139f6565b6001600160a01b038116612e4a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a3f565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314612ecf5760405162461bcd60e51b8152600401610a3f906139f6565b600e93909355600f91909155601080546001600160a01b039283166001600160a01b03199182161790915560118054929093169116179055565b6000610a16825490565b600080806000198587098587029250828110838203039150508060001415612f4d5760008411612f4257600080fd5b508290049050611184565b808411612f5957600080fd5b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691613026919061399e565b6000604051808303816000865af19150503d8060008114613063576040519150601f19603f3d011682016040523d82523d6000602084013e613068565b606091505b5091509150818015613092575080511580613092575080806020019051810190613092919061383a565b6130ea5760405162461bcd60e51b8152602060048201526024808201527f5472616e7366657248656c7065723a205452414e534645525f46524f4d5f46416044820152631253115160e21b6064820152608401610a3f565b505050505050565b6001600160a01b03811660009081526001830160205260408120541515611184565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092839290871691613170919061399e565b6000604051808303816000865af19150503d80600081146131ad576040519150601f19603f3d011682016040523d82523d6000602084013e6131b2565b606091505b50915091508180156131dc5750805115806131dc5750808060200190518101906131dc919061383a565b6132285760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c4544006044820152606401610a3f565b5050505050565b6000611184836001600160a01b03841661347e565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b17905291516000928392908716916132a0919061399e565b6000604051808303816000865af19150503d80600081146132dd576040519150601f19603f3d011682016040523d82523d6000602084013e6132e2565b606091505b509150915081801561330c57508051158061330c57508080602001905181019061330c919061383a565b6132285760405162461bcd60e51b815260206004820152601e60248201527f5472616e7366657248656c7065723a20415050524f56455f4641494c454400006044820152606401610a3f565b6000611184836001600160a01b0384166134cd565b600061118483836135ea565b60006001600160a01b038216158015906133ff5750816001600160a01b031663f968f4936040518163ffffffff1660e01b815260040160206040518083038186803b1580156133c757600080fd5b505afa1580156133db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133ff919061383a565b1561340b575082612da5565b85158061341757508486145b156134335782851061342a57600061342c565b835b9050612da5565b828581111561343f5750845b8681101561344a5750855b60006134568883613adc565b905060006134648989613adc565b9050613471878383612f13565b9998505050505050505050565b60008181526001830160205260408120546134c557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a16565b506000610a16565b600081815260018301602052604081205480156135e05760006134f1600183613adc565b855490915060009061350590600190613adc565b9050600086600001828154811061352c57634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508087600001848154811061355d57634e487b7160e01b600052603260045260246000fd5b600091825260209091200155613574836001613aa4565b600082815260018901602052604090205586548790806135a457634e487b7160e01b600052603160045260246000fd5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610a16565b6000915050610a16565b815460009082106136485760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401610a3f565b8260000182815481106124b457634e487b7160e01b600052603260045260246000fd5b60405180610100016040528060006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b031681525090565b6000602082840312156136dc578081fd5b813561118481613b24565b600080604083850312156136f9578081fd5b823561370481613b24565b9150602083013561371481613b24565b809150509250929050565b600080600060608486031215613733578081fd5b833561373e81613b24565b9250602084013561374e81613b24565b929592945050506040919091013590565b600080600060408486031215613773578283fd5b833561377e81613b24565b9250602084013567ffffffffffffffff8082111561379a578384fd5b818601915086601f8301126137ad578384fd5b8135818111156137bb578485fd5b87602060a0830285010111156137cf578485fd5b6020830194508093505050509250925092565b600080604083850312156137f4578182fd5b82356137ff81613b24565b9150602083013561371481613b3c565b60008060408385031215613821578182fd5b823561382c81613b24565b946020939093013593505050565b60006020828403121561384b578081fd5b815161118481613b3c565b600060a08284031215613867578081fd5b60405160a0810181811067ffffffffffffffff8211171561389657634e487b7160e01b83526041600452602483fd5b60405282356138a481613b24565b8082525060208301356020820152604083013560408201526060830135606082015260808301356138d481613b24565b60808201529392505050565b6000602082840312156138f1578081fd5b5035919050565b600060208284031215613909578081fd5b5051919050565b60008060408385031215613922578182fd5b82359150602083013561371481613b24565b60008060408385031215613946578182fd5b50508035926020909101359150565b6000806000806080858703121561396a578182fd5b8435935060208501359250604085013561398381613b24565b9150606085013561399381613b24565b939692955090935050565b60008251815b818110156139be57602081860181015185830152016139a4565b818111156139cc5782828501525b509190910192915050565b60208082526005908201526427aba722a960d91b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b9788526001600160a01b03968716602089015294861660408801526060870193909352608086019190915260a085015260c08401521660e08201526101000190565b60008219821115613ab757613ab7613b0e565b500190565b600082613ad757634e487b7160e01b81526012600452602481fd5b500490565b600082821015613aee57613aee613b0e565b500390565b6000600019821415613b0757613b07613b0e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114613b3957600080fd5b50565b8015158114613b3957600080fdfea2646970667358221220a3a73ad734a9db90b25d1e53800a51143d98b0db961e7d6a7638a6e1484d849a64736f6c63430008030033

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

0000000000000000000000001fe6cc287feb08ce831df0cd114341480adcaa5a

-----Decoded View---------------
Arg [0] : _uncxAdmins (address): 0x1fe6cC287feB08ce831dF0cd114341480ADCaA5A

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000001fe6cc287feb08ce831df0cd114341480adcaa5a


Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.