Contract Address Details

0x69D01f4A92749bEF33602241c5d0E6858bB5B848

Contract Name
MarketPlaceV1_1
Creator
0x50b78f–c6f0f2 at 0xddcfa5–9b8778
Balance
0 Doge
Tokens
Fetching tokens...
Transactions
16 Transactions
Transfers
0 Transfers
Gas Used
1,598,775
Last Balance Update
25393312
Contract name:
MarketPlaceV1_1




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




Optimization runs
9999999
EVM Version
default




Verified at
2022-12-19T15:59:39.830733Z

Constructor Arguments

00000000000000000000000000000000000000000000000000000000000000600000000000000000000000006e3e69a56e592f7f285b07bb277e8632b285aca7000000000000000000000000b7ddc6414bf4f5515b52d8bdd69973ae205ff1010000000000000000000000000000000000000000000000000000000000000012205265616c446f676550756e6b73586d61730000000000000000000000000000

Arg [0] (string) :  RealDogePunksXmas
Arg [1] (address) : 0x6e3e69a56e592f7f285b07bb277e8632b285aca7
Arg [2] (address) : 0xb7ddc6414bf4f5515b52d8bdd69973ae205ff101

              

Contract source code

// File: @openzeppelin/contracts/utils/Context.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

// File: @openzeppelin/contracts/access/Ownable.sol

pragma solidity >=0.6.0 <0.8.0;

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

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

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

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view 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: @openzeppelin/contracts/math/SafeMath.sol


pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

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

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

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

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

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

// File: @openzeppelin/contracts/utils/Address.sol


pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// File: @openzeppelin/contracts/utils/EnumerableSet.sol


pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

            bytes32 lastvalue = set._values[lastIndex];

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

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(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: @openzeppelin/contracts/utils/ReentrancyGuard.sol


pragma solidity >=0.6.0 <0.8.0;

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

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

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

// File: @openzeppelin/contracts/introspection/IERC165.sol


pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// File: @openzeppelin/contracts/token/ERC721/IERC721.sol


pragma solidity >=0.6.2 <0.8.0;


/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
      * @dev Safely transfers `tokenId` token from `from` to `to`.
      *
      * Requirements:
      *
      * - `from` cannot be the zero address.
      * - `to` cannot be the zero address.
      * - `tokenId` token must exist and be owned by `from`.
      * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
      * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
      *
      * Emits a {Transfer} event.
      */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
}

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol


pragma solidity >=0.6.0 <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: @openzeppelin/contracts/token/ERC20/SafeERC20.sol


pragma solidity >=0.6.0 <0.8.0;




/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// File: market/interface/IMarketPlaceV1.sol

pragma solidity =0.6.12;

interface IMarketPlaceV1 {
    struct Bid {
        uint256 tokenId;
        uint256 bidPrice;
        address bidder;
        uint256 expireTimestamp;
    }

    struct Listing {
        uint256 tokenId;
        uint256 listingPrice;
        address seller;
        uint256 expireTimestamp;
    }

    event TokenListed(uint256 indexed tokenId, address indexed fromAddress, uint256 minValue);
    event TokenDelisted(uint256 indexed tokenId, address indexed fromAddress);
    event TokenBidEntered(uint256 indexed tokenId, address indexed fromAddress, uint256 value);
    event TokenBidWithdrawn(uint256 indexed tokenId, address indexed fromAddress, uint256 value);
    event TokenBought(
        uint256 indexed tokenId,
        address indexed fromAddress,
        address indexed toAddress,
        uint256 total,
        uint256 value,
        uint256 fees
    );
    event TokenBidAccepted(
        uint256 indexed tokenId,
        address indexed owner,
        address indexed bidder,
        uint256 total,
        uint256 value,
        uint256 fees
    );

    /**
     * @dev surface the erc721 token contract address
     */
    function tokenAddress() external view returns (address);

    /**
     * @dev surface the erc20 payment token contract address
     */
    function paymentTokenAddress() external view returns (address);

    /**
     * @dev get current listing of a token
     * @param tokenId erc721 token Id
     * @return current valid listing or empty listing struct
     */
    function getTokenListing(uint256 tokenId) external view returns (Listing memory);

    /**
     * @dev get current valid listings by size
     * @param from index to start
     * @param size size to query
     * @return current valid listings
     * This to help batch query when list gets big
     */
    function getTokenListings(uint256 from, uint256 size) external view returns (Listing[] memory);

    /**
     * @dev get all current valid listings
     * @return current valid listings
     */
    function getAllTokenListings() external view returns (Listing[] memory);

    /**
     * @dev get bidder's bid on a token
     * @param tokenId erc721 token Id
     * @param bidder address of a bidder
     * @return Valid bid or empty bid
     */
    function getBidderTokenBid(uint256 tokenId, address bidder) external view returns (Bid memory);

    /**
     * @dev get all valid bids of a token
     * @param tokenId erc721 token Id
     * @return Valid bids of a token
     */
    function getTokenBids(uint256 tokenId) external view returns (Bid[] memory);

    /**
     * @dev get highest bid of a token
     * @param tokenId erc721 token Id
     * @return Valid highest bid or empty bid
     */
    function getTokenHighestBid(uint256 tokenId) external view returns (Bid memory);

    /**
     * @dev get current highest bids
     * @param from index to start
     * @param size size to query
     * @return current highest bids
     * This to help batch query when list gets big
     */
    function getTokenHighestBids(uint256 from, uint256 size) external view returns (Bid[] memory);

    /**
     * @dev get all highest bids
     * @return All valid highest bids
     */
    function getAllTokenHighestBids() external view returns (Bid[] memory);

    /**
     * @dev List token for sale
     * @param tokenId erc721 token Id
     * @param value min price to sell the token
     * @param expireTimestamp when would this listing expire
     */
    function listToken(
        uint256 tokenId,
        uint256 value,
        uint256 expireTimestamp
    ) external;

    /**
     * @dev Delist token for sale
     * @param tokenId erc721 token Id
     */
    function delistToken(uint256 tokenId) external;

    /**
     * @dev Buy token
     * @param tokenId erc721 token Id
     */
    function buyToken(uint256 tokenId) external payable;

    /**
     * @dev Enter bid for token
     * @param tokenId erc721 token Id
     * @param bidPrice price in payment token
     * @param expireTimestamp when would this bid expire
     */
    function enterBidForToken(
        uint256 tokenId,
        uint256 bidPrice,
        uint256 expireTimestamp
    ) external;

    /**
     * @dev Withdraw bid for token
     * @param tokenId erc721 token Id
     */
    function withdrawBidForToken(uint256 tokenId) external;

    /**
     * @dev Accept a bid of token from a bidder
     * @param tokenId erc721 token Id
     * @param bidder bidder address
     */
    function acceptBidForToken(uint256 tokenId, address bidder) external;

    /**
     * @dev Count how many listing records are invalid now
     * This is to help admin to decide to do a cleaning or not
     */
    function getInvalidListingCount() external view returns (uint256);

    /**
     * @dev Count how many bids records are invalid now
     * This is to help admin to decide to do a cleaning or not
     */
    function getInvalidBidCount() external view returns (uint256);

    /**
     * @dev Clean all invalid listings
     */
    function cleanAllInvalidListings() external;

    /**
     * @dev Clean all invalid bids
     */
    function cleanAllInvalidBids() external;

    /**
     * @dev Name of ERC721 token
     */
    function erc721Name() external view returns (string memory);

    /**
     * @dev Show if listing and bid are enabled
     */
    function isListingAndBidEnabled() external view returns (bool);

    /**
     * @dev Surface minimum listing and bid time range
     */
    function actionTimeOutRangeMin() external view returns (uint256);

    /**
     * @dev Surface maximum listing and bid time range
     */
    function actionTimeOutRangeMax() external view returns (uint256);

    /**
     * @dev Service fee
     * @return fee fraction and fee base
     */
    function serviceFee() external view returns (uint8, uint8);
}

// File: market/MarketPlaceV1_1.sol

pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;

/**
 * @title MarketPlace contract V1
 * Note: This marketplace contract is collection based. It serves one ERC721 contract only
 * Payment tokens usually is the chain native coin's wrapped token, e.g. WETH, WBNB
 */
contract MarketPlaceV1_1 is IMarketPlaceV1, Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    using Address for address;
    using EnumerableSet for EnumerableSet.UintSet;
    using EnumerableSet for EnumerableSet.AddressSet;

    struct TokenBid {
        EnumerableSet.AddressSet bidders;
        mapping(address => Bid) bids;
    }

    constructor(
        string memory erc721Name_,
        address _erc721Address,
        address _paymentTokenAddress
    ) public {
        _erc721Name = erc721Name_;
        _erc721 = IERC721(_erc721Address);
        _paymentToken = IERC20(_paymentTokenAddress);
    }

    string private _erc721Name;
    IERC721 private immutable _erc721;
    IERC20 private immutable _paymentToken;

    bool private _isListingAndBidEnabled = true;
    uint8 private _feeFraction = 1;
    uint8 private _feeBase = 100;
    uint256 private _actionTimeOutRangeMin = 86400; // 24 hours
    uint256 private _actionTimeOutRangeMax = 31536000; // One year - This can extend by owner is contract is working smoothly

    mapping(uint256 => Listing) private _tokenListings;
    EnumerableSet.UintSet private _tokenIdWithListing;

    mapping(uint256 => TokenBid) private _tokenBids;
    EnumerableSet.UintSet private _tokenIdWithBid;

    address public partnerAddress;
    uint8 public partnerSharePercentage = 0;
    bool public hasSharePercentageProposal;
    uint8 public partnerSharePercentageProposal;

    EnumerableSet.AddressSet private _emptyBidders; // Help initiate TokenBid struct
    uint256[] private _tempTokenIdStorage; // Storage to assist cleaning
    address[] private _tempBidderStorage; // Storage to assist cleaning bids

    /**
     * @dev only if listing and bid is enabled
     * This is to help contract migration in case of upgrade or bug
     */
    modifier onlyMarketplaceOpen() {
        require(_isListingAndBidEnabled, "Listing and bid are not enabled");
        _;
    }

    /**
     * @dev only if the entered timestamp is within the allowed range
     * This helps to not list or bid for too short or too long period of time
     */
    modifier onlyAllowedExpireTimestamp(uint256 expireTimestamp) {
        require(
            expireTimestamp.sub(block.timestamp) >= _actionTimeOutRangeMin,
            "Please enter a longer period of time"
        );
        require(
            expireTimestamp.sub(block.timestamp) <= _actionTimeOutRangeMax,
            "Please enter a shorter period of time"
        );
        _;
    }

    /**
     * @dev check if the account is the owner of this erc721 token
     */
    function _isTokenOwner(uint256 tokenId, address account) private view returns (bool) {
        try _erc721.ownerOf(tokenId) returns (address tokenOwner) {
            return tokenOwner == account;
        } catch {
            return false;
        }
    }

    /**
     * @dev check if this contract has approved to transfer this erc721 token
     */
    function _isTokenApproved(uint256 tokenId) private view returns (bool) {
        try _erc721.getApproved(tokenId) returns (address tokenOperator) {
            return tokenOperator == address(this);
        } catch {
            return false;
        }
    }

    /**
     * @dev check if this contract has approved to all of this owner's erc721 tokens
     */
    function _isAllTokenApproved(address owner) private view returns (bool) {
        return _erc721.isApprovedForAll(owner, address(this));
    }

    /**
     * @dev See {IMarketPlaceV1-tokenAddress}.
     */
    function tokenAddress() external view override returns (address) {
        return address(_erc721);
    }

    /**
     * @dev See {IMarketPlaceV1-paymentTokenAddress}.
     */
    function paymentTokenAddress() external view override returns (address) {
        return address(_paymentToken);
    }

    /**
     * @dev Check if a listing is valid or not
     * The seller must be the owner
     * The seller must have give this contract allowance
     * The sell price must be more than 0
     * The listing mustn't be expired
     */
    function _isListingValid(Listing memory listing) private view returns (bool) {
        if (
            _isTokenOwner(listing.tokenId, listing.seller) &&
            (_isTokenApproved(listing.tokenId) || _isAllTokenApproved(listing.seller)) &&
            listing.listingPrice > 0 &&
            listing.expireTimestamp > block.timestamp
        ) {
            return true;
        }
    }

    /**
     * @dev See {IMarketPlaceV1-getTokenListing}.
     */
    function getTokenListing(uint256 tokenId) public view override returns (Listing memory) {
        Listing memory listing = _tokenListings[tokenId];
        if (_isListingValid(listing)) {
            return listing;
        }
    }

    /**
     * @dev See {IMarketPlaceV1-getTokenListings}.
     */
    function getTokenListings(uint256 from, uint256 size)
        public
        view
        override
        returns (Listing[] memory)
    {
        if (from < _tokenIdWithListing.length() && size > 0) {
            uint256 querySize = size;
            if ((from + size) > _tokenIdWithListing.length()) {
                querySize = _tokenIdWithListing.length() - from;
            }
            Listing[] memory listings = new Listing[](querySize);
            for (uint256 i = 0; i < querySize; i++) {
                Listing memory listing = _tokenListings[_tokenIdWithListing.at(i + from)];
                if (_isListingValid(listing)) {
                    listings[i] = listing;
                }
            }
            return listings;
        }
    }

    /**
     * @dev See {IMarketPlaceV1-getAllTokenListings}.
     */
    function getAllTokenListings() external view override returns (Listing[] memory) {
        return getTokenListings(0, _tokenIdWithListing.length());
    }

    /**
     * @dev Check if an bid is valid or not
     * Bidder must not be the owner
     * Bidder must give the contract allowance same or more than bid price
     * Bid price must > 0
     * Bid mustn't been expired
     */
    function _isBidValid(Bid memory bid) private view returns (bool) {
        if (
            !_isTokenOwner(bid.tokenId, bid.bidder) &&
            _paymentToken.allowance(bid.bidder, address(this)) >= bid.bidPrice &&
            bid.bidPrice > 0 &&
            bid.expireTimestamp > block.timestamp
        ) {
            return true;
        }
    }

    /**
     * @dev See {IMarketPlaceV1-getBidderTokenBid}.
     */
    function getBidderTokenBid(uint256 tokenId, address bidder)
        public
        view
        override
        returns (Bid memory)
    {
        Bid memory bid = _tokenBids[tokenId].bids[bidder];
        if (_isBidValid(bid)) {
            return bid;
        }
    }

    /**
     * @dev See {IMarketPlaceV1-getTokenBids}.
     */
    function getTokenBids(uint256 tokenId) external view override returns (Bid[] memory) {
        Bid[] memory bids = new Bid[](_tokenBids[tokenId].bidders.length());
        for (uint256 i; i < _tokenBids[tokenId].bidders.length(); i++) {
            address bidder = _tokenBids[tokenId].bidders.at(i);
            Bid memory bid = _tokenBids[tokenId].bids[bidder];
            if (_isBidValid(bid)) {
                bids[i] = bid;
            }
        }
        return bids;
    }

    /**
     * @dev See {IMarketPlaceV1-getTokenHighestBid}.
     */
    function getTokenHighestBid(uint256 tokenId) public view override returns (Bid memory) {
        Bid memory highestBid = Bid(tokenId, 0, address(0), 0);
        for (uint256 i; i < _tokenBids[tokenId].bidders.length(); i++) {
            address bidder = _tokenBids[tokenId].bidders.at(i);
            Bid memory bid = _tokenBids[tokenId].bids[bidder];
            if (_isBidValid(bid) && bid.bidPrice > highestBid.bidPrice) {
                highestBid = bid;
            }
        }
        return highestBid;
    }

    /**
     * @dev See {IMarketPlaceV1-getTokenHighestBids}.
     */
    function getTokenHighestBids(uint256 from, uint256 size)
        public
        view
        override
        returns (Bid[] memory)
    {
        if (from < _tokenIdWithBid.length() && size > 0) {
            uint256 querySize = size;
            if ((from + size) > _tokenIdWithBid.length()) {
                querySize = _tokenIdWithBid.length() - from;
            }
            Bid[] memory highestBids = new Bid[](querySize);
            for (uint256 i = 0; i < querySize; i++) {
                highestBids[i] = getTokenHighestBid(_tokenIdWithBid.at(i + from));
            }
            return highestBids;
        }
    }

    /**
     * @dev See {IMarketPlaceV1-getAllTokenHighestBids}.
     */
    function getAllTokenHighestBids() external view override returns (Bid[] memory) {
        return getTokenHighestBids(0, _tokenIdWithBid.length());
    }

    /**
     * @dev delist a token - remove token id record and remove listing from mapping
     * @param tokenId erc721 token Id
     */
    function _delistToken(uint256 tokenId) private {
        if (_tokenIdWithListing.contains(tokenId)) {
            delete _tokenListings[tokenId];
            _tokenIdWithListing.remove(tokenId);
        }
    }

    /**
     * @dev remove a bid of a bidder
     * @param tokenId erc721 token Id
     * @param bidder bidder address
     */
    function _removeBidOfBidder(uint256 tokenId, address bidder) private {
        if (_tokenBids[tokenId].bidders.contains(bidder)) {
            // Step 1: delete the bid and the address
            delete _tokenBids[tokenId].bids[bidder];
            _tokenBids[tokenId].bidders.remove(bidder);

            // Step 2: if no bid left
            if (_tokenBids[tokenId].bidders.length() == 0) {
                _tokenIdWithBid.remove(tokenId);
            }
        }
    }

    /**
     * @dev See {IMarketPlaceV1-listToken}.
     * People can only list if listing is allowed
     * The timestamp set needs to be in the allowed range
     * Only token owner can list token
     * Price must be higher than 0
     * This contract must be approved to transfer this token
     */
    function listToken(
        uint256 tokenId,
        uint256 value,
        uint256 expireTimestamp
    ) external override onlyMarketplaceOpen onlyAllowedExpireTimestamp(expireTimestamp) {
        require(value > 0, "Please list for more than 0 or use the transfer function");
        require(_isTokenOwner(tokenId, msg.sender), "Only token owner can list token");
        require(
            _isTokenApproved(tokenId) || _isAllTokenApproved(msg.sender),
            "This token is not allowed to transfer by this contract"
        );

        _tokenListings[tokenId] = Listing(tokenId, value, msg.sender, expireTimestamp);
        _tokenIdWithListing.add(tokenId);

        emit TokenListed(tokenId, msg.sender, value);
    }

    /**
     * @dev See {IMarketPlaceV1-delistToken}.
     * msg.sender must be the seller of the listing record
     */
    function delistToken(uint256 tokenId) external override {
        require(_tokenListings[tokenId].seller == msg.sender, "Only token seller can delist token");
        emit TokenDelisted(tokenId, _tokenListings[tokenId].seller);
        _delistToken(tokenId);
    }

    /**
     * @dev See {IMarketPlaceV1-buyToken}.
     * Must have a valid listing
     * msg.sender must not the owner of token
     * msg.value must be at least sell price plus fees
     */
    function buyToken(uint256 tokenId) external payable override nonReentrant {
        Listing memory listing = getTokenListing(tokenId); // Get valid listing
        require(listing.seller != address(0), "Token is not for sale"); // Listing not valid
        require(!_isTokenOwner(tokenId, msg.sender), "Token owner can't buy their own token");

        uint256 fees = listing.listingPrice.mul(_feeFraction).div(_feeBase);
        require(
            msg.value >= listing.listingPrice + fees,
            "The value send is below sale price plus fees"
        );

        // Send value to token seller and fees to contract owner
        uint256 valueWithoutFees = msg.value.sub(fees);
        uint256 partnerFeesShare = fees.mul(partnerSharePercentage).div(100);
        Address.sendValue(payable(listing.seller), valueWithoutFees);
        Address.sendValue(payable(owner()), fees.sub(partnerFeesShare));
        if (partnerAddress != address(0) && partnerFeesShare > 0) {
            Address.sendValue(payable(partnerAddress), partnerFeesShare);
        }

        // Send token to buyer
        emit TokenBought(tokenId, listing.seller, msg.sender, msg.value, valueWithoutFees, fees);
        _erc721.safeTransferFrom(listing.seller, msg.sender, tokenId);

        // Remove token listing
        _delistToken(tokenId);
        _removeBidOfBidder(tokenId, msg.sender);
    }

    /**
     * @dev See {IMarketPlaceV1-enterBidForToken}.
     * People can only enter bid if bid is allowed
     * The timestamp set needs to be in the allowed range
     * bid price > 0
     * must not be token owner
     * must allow this contract to spend enough payment token
     */
    function enterBidForToken(
        uint256 tokenId,
        uint256 bidPrice,
        uint256 expireTimestamp
    ) external override onlyMarketplaceOpen onlyAllowedExpireTimestamp(expireTimestamp) {
        require(bidPrice > 0, "Please bid for more than 0");
        require(!_isTokenOwner(tokenId, msg.sender), "This Token belongs to this address");
        require(
            _paymentToken.allowance(msg.sender, address(this)) >= bidPrice,
            "Need to have enough token holding to bid on this token"
        );

        Bid memory bid = Bid(tokenId, bidPrice, msg.sender, expireTimestamp);

        // if no bids of this token add a entry to both records _tokenIdWithBid and _tokenBids
        if (!_tokenIdWithBid.contains(tokenId)) {
            _tokenIdWithBid.add(tokenId);
            _tokenBids[tokenId] = TokenBid(_emptyBidders);
        }

        _tokenBids[tokenId].bidders.add(msg.sender);
        _tokenBids[tokenId].bids[msg.sender] = bid;

        emit TokenBidEntered(tokenId, msg.sender, bidPrice);
    }

    /**
     * @dev See {IMarketPlaceV1-withdrawBidForToken}.
     * There must be a bid exists
     * remove this bid record
     */
    function withdrawBidForToken(uint256 tokenId) external override {
        Bid memory bid = _tokenBids[tokenId].bids[msg.sender];
        require(bid.bidder == msg.sender, "This address doesn't have bid on this token");

        emit TokenBidWithdrawn(tokenId, bid.bidder, bid.bidPrice);
        _removeBidOfBidder(tokenId, msg.sender);
    }

    /**
     * @dev See {IMarketPlaceV1-acceptBidForToken}.
     * Must be owner of this token
     * Must have approved this contract to transfer token
     * Must have a valid existing bid that matches the bidder address
     */
    function acceptBidForToken(uint256 tokenId, address bidder) external override nonReentrant {
        require(_isTokenOwner(tokenId, msg.sender), "Only token owner can accept bid of token");
        require(
            _isTokenApproved(tokenId) || _isAllTokenApproved(msg.sender),
            "The token is not approved to transfer by the contract"
        );

        Bid memory existingBid = getBidderTokenBid(tokenId, bidder);
        require(
            existingBid.bidPrice > 0 && existingBid.bidder == bidder,
            "This token doesn't have a matching bid"
        );

        uint256 fees = existingBid.bidPrice.mul(_feeFraction).div(_feeBase + _feeFraction);
        uint256 tokenValue = existingBid.bidPrice.sub(fees);
        uint256 partnerFeesShare = fees.mul(partnerSharePercentage).div(100);

        SafeERC20.safeTransferFrom(_paymentToken, existingBid.bidder, msg.sender, tokenValue);
        SafeERC20.safeTransferFrom(
            _paymentToken,
            existingBid.bidder,
            owner(),
            fees.sub(partnerFeesShare)
        );
        if (partnerAddress != address(0) && partnerFeesShare > 0) {
            SafeERC20.safeTransferFrom(
                _paymentToken,
                existingBid.bidder,
                partnerAddress,
                partnerFeesShare
            );
        }

        _erc721.safeTransferFrom(msg.sender, existingBid.bidder, tokenId);

        emit TokenBidAccepted(
            tokenId,
            msg.sender,
            existingBid.bidder,
            existingBid.bidPrice,
            tokenValue,
            fees
        );

        // Remove token listing
        _delistToken(tokenId);
        _removeBidOfBidder(tokenId, existingBid.bidder);
    }

    /**
     * @dev See {IMarketPlaceV1-getInvalidListingCount}.
     */
    function getInvalidListingCount() external view override returns (uint256) {
        uint256 count = 0;
        for (uint256 i = 0; i < _tokenIdWithListing.length(); i++) {
            if (!_isListingValid(_tokenListings[_tokenIdWithListing.at(i)])) {
                count = count.add(1);
            }
        }
        return count;
    }

    /**
     * @dev Count how many bid records of a token are invalid now
     */
    function _getInvalidBidOfTokenCount(uint256 tokenId) private view returns (uint256) {
        uint256 count = 0;
        for (uint256 i = 0; i < _tokenBids[tokenId].bidders.length(); i++) {
            address bidder = _tokenBids[tokenId].bidders.at(i);
            Bid memory bid = _tokenBids[tokenId].bids[bidder];
            if (!_isBidValid(bid)) {
                count = count.add(1);
            }
        }
        return count;
    }

    /**
     * @dev See {IMarketPlaceV1-getInvalidBidCount}.
     */
    function getInvalidBidCount() external view override returns (uint256) {
        uint256 count = 0;
        for (uint256 i = 0; i < _tokenIdWithBid.length(); i++) {
            count = count.add(_getInvalidBidOfTokenCount(_tokenIdWithBid.at(i)));
        }
        return count;
    }

    /**
     * @dev See {IMarketPlaceV1-cleanAllInvalidListings}.
     */
    function cleanAllInvalidListings() external override {
        for (uint256 i = 0; i < _tokenIdWithListing.length(); i++) {
            uint256 tokenId = _tokenIdWithListing.at(i);
            if (!_isListingValid(_tokenListings[tokenId])) {
                _tempTokenIdStorage.push(tokenId);
            }
        }
        for (uint256 i = 0; i < _tempTokenIdStorage.length; i++) {
            _delistToken(_tempTokenIdStorage[i]);
        }
        delete _tempTokenIdStorage;
    }

    /**
     * @dev remove invalid bids of a token
     * @param tokenId erc721 token Id
     */
    function _cleanInvalidBidsOfToken(uint256 tokenId) private {
        for (uint256 i = 0; i < _tokenBids[tokenId].bidders.length(); i++) {
            address bidder = _tokenBids[tokenId].bidders.at(i);
            Bid memory bid = _tokenBids[tokenId].bids[bidder];
            if (!_isBidValid(bid)) {
                _tempBidderStorage.push(_tokenBids[tokenId].bidders.at(i));
            }
        }
        for (uint256 i = 0; i < _tempBidderStorage.length; i++) {
            address bidder = _tempBidderStorage[i];
            _removeBidOfBidder(tokenId, bidder);
        }
        delete _tempBidderStorage;
    }

    /**
     * @dev See {IMarketPlaceV1-cleanAllInvalidBids}.
     */
    function cleanAllInvalidBids() external override {
        for (uint256 i = 0; i < _tokenIdWithBid.length(); i++) {
            uint256 tokenId = _tokenIdWithBid.at(i);
            uint256 invalidCount = _getInvalidBidOfTokenCount(tokenId);
            if (invalidCount > 0) {
                _tempTokenIdStorage.push(tokenId);
            }
        }
        for (uint256 i = 0; i < _tempTokenIdStorage.length; i++) {
            _cleanInvalidBidsOfToken(_tempTokenIdStorage[i]);
        }
        delete _tempTokenIdStorage;
    }

    /**
     * @dev See {IMarketPlaceV1-erc721Name}.
     */
    function erc721Name() external view override returns (string memory) {
        return _erc721Name;
    }

    /**
     * @dev See {IMarketPlaceV1-isListingAndBidEnabled}.
     */
    function isListingAndBidEnabled() external view override returns (bool) {
        return _isListingAndBidEnabled;
    }

    /**
     * @dev Enable to disable Bids and Listing
     */
    function changeMarketplaceStatus(bool enabled) external onlyOwner {
        _isListingAndBidEnabled = enabled;
    }

    /**
     * @dev See {IMarketPlaceV1-actionTimeOutRangeMin}.
     */
    function actionTimeOutRangeMin() external view override returns (uint256) {
        return _actionTimeOutRangeMin;
    }

    /**
     * @dev See {IMarketPlaceV1-actionTimeOutRangeMax}.
     */
    function actionTimeOutRangeMax() external view override returns (uint256) {
        return _actionTimeOutRangeMax;
    }

    /**
     * @dev Change minimum listing and bid time range
     */
    function changeMinActionTimeLimit(uint256 timeInSec) external onlyOwner {
        _actionTimeOutRangeMin = timeInSec;
    }

    /**
     * @dev Change maximum listing and bid time range
     */
    function changeMaxActionTimeLimit(uint256 timeInSec) external onlyOwner {
        _actionTimeOutRangeMax = timeInSec;
    }

    /**
     * @dev See {IMarketPlaceV1-serviceFee}.
     */
    function serviceFee() external view override returns (uint8, uint8) {
        return (_feeFraction, _feeBase);
    }

    /**
     * @dev Change withdrawal fee percentage.
     * If 1%, then input (1,100)
     * If 0.5%, then input (5,1000)
     * @param feeFraction_ Fraction of withdrawal fee based on feeBase_
     * @param feeBase_ Fraction of withdrawal fee base
     */
    function changeSeriveFee(uint8 feeFraction_, uint8 feeBase_) external onlyOwner {
        require(feeFraction_ <= feeBase_, "Fee fraction exceeded base.");
        uint256 percentage = (feeFraction_ * 1000) / feeBase_;

        _feeFraction = feeFraction_;
        _feeBase = feeBase_;
    }

    /**
     * @dev Set partner address and profit share
     * @param _partnerAddress Partner address
     * @param _partnerSharePercentage Fraction of withdrawal fee base
     */
    function setPartnerAddressAndProfitShare(address _partnerAddress, uint8 _partnerSharePercentage)
        external
        onlyOwner
    {
        require(partnerAddress == address(0), "Owner can't change partner address once it's set");
        require(_partnerAddress != address(0), "Can't set to address 0x0");
        require(
            _partnerSharePercentage > 0 && _partnerSharePercentage <= 100,
            "Allowed percentage range is 1 to 100"
        );

        partnerAddress = _partnerAddress;
        partnerSharePercentage = _partnerSharePercentage;
    }

    /**
     * @dev Change partner address
     * @param _partnerAddress Partner address
     * Only partner can change their share address
     */
    function changePartnerAddress(address _partnerAddress) external {
        require(msg.sender == partnerAddress, "Only partner can change partner address");

        partnerAddress = _partnerAddress;

        if (_partnerAddress == address(0)) {
            partnerSharePercentage = 0;
        }
    }

    /**
     * @dev Propose partner share percentage
     * @param _partnerSharePercentage Partner proposed new share percentage
     */
    function proposePartnerShareChange(uint8 _partnerSharePercentage) external {
        require(msg.sender == partnerAddress, "Only partner can propose share change");
        require(_partnerSharePercentage <= 100, "Allowed percentage range is 0 to 100");
        require(
            _partnerSharePercentage != partnerSharePercentage,
            "Attempting to set propose same value again"
        );

        hasSharePercentageProposal = true;
        partnerSharePercentageProposal = _partnerSharePercentage;
    }

    /**
     * @dev Accept partner share percentage proposal
     */
    function acceptPartnerShareChange() external onlyOwner {
        require(hasSharePercentageProposal, "There is no change share proposal");
        partnerSharePercentage = partnerSharePercentageProposal;
        hasSharePercentageProposal = false;
        partnerSharePercentageProposal = 0;
    }

    /**
     * @dev Reject partner share percentage proposal
     */
    function rejectPartnerShareChange() external onlyOwner {
        require(hasSharePercentageProposal, "There is no change share proposal");
        hasSharePercentageProposal = false;
        partnerSharePercentageProposal = 0;
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"string","name":"erc721Name_","internalType":"string"},{"type":"address","name":"_erc721Address","internalType":"address"},{"type":"address","name":"_paymentTokenAddress","internalType":"address"}]},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"TokenBidAccepted","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true},{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"bidder","internalType":"address","indexed":true},{"type":"uint256","name":"total","internalType":"uint256","indexed":false},{"type":"uint256","name":"value","internalType":"uint256","indexed":false},{"type":"uint256","name":"fees","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TokenBidEntered","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true},{"type":"address","name":"fromAddress","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TokenBidWithdrawn","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true},{"type":"address","name":"fromAddress","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TokenBought","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true},{"type":"address","name":"fromAddress","internalType":"address","indexed":true},{"type":"address","name":"toAddress","internalType":"address","indexed":true},{"type":"uint256","name":"total","internalType":"uint256","indexed":false},{"type":"uint256","name":"value","internalType":"uint256","indexed":false},{"type":"uint256","name":"fees","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TokenDelisted","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true},{"type":"address","name":"fromAddress","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"TokenListed","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true},{"type":"address","name":"fromAddress","internalType":"address","indexed":true},{"type":"uint256","name":"minValue","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"acceptBidForToken","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"address","name":"bidder","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"acceptPartnerShareChange","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"actionTimeOutRangeMax","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"actionTimeOutRangeMin","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"buyToken","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeMarketplaceStatus","inputs":[{"type":"bool","name":"enabled","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeMaxActionTimeLimit","inputs":[{"type":"uint256","name":"timeInSec","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeMinActionTimeLimit","inputs":[{"type":"uint256","name":"timeInSec","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changePartnerAddress","inputs":[{"type":"address","name":"_partnerAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeSeriveFee","inputs":[{"type":"uint8","name":"feeFraction_","internalType":"uint8"},{"type":"uint8","name":"feeBase_","internalType":"uint8"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"cleanAllInvalidBids","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"cleanAllInvalidListings","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"delistToken","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"enterBidForToken","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"bidPrice","internalType":"uint256"},{"type":"uint256","name":"expireTimestamp","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"erc721Name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct IMarketPlaceV1.Bid[]","components":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"bidPrice","internalType":"uint256"},{"type":"address","name":"bidder","internalType":"address"},{"type":"uint256","name":"expireTimestamp","internalType":"uint256"}]}],"name":"getAllTokenHighestBids","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct IMarketPlaceV1.Listing[]","components":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"listingPrice","internalType":"uint256"},{"type":"address","name":"seller","internalType":"address"},{"type":"uint256","name":"expireTimestamp","internalType":"uint256"}]}],"name":"getAllTokenListings","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"","internalType":"struct IMarketPlaceV1.Bid","components":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"bidPrice","internalType":"uint256"},{"type":"address","name":"bidder","internalType":"address"},{"type":"uint256","name":"expireTimestamp","internalType":"uint256"}]}],"name":"getBidderTokenBid","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"address","name":"bidder","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getInvalidBidCount","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getInvalidListingCount","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct IMarketPlaceV1.Bid[]","components":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"bidPrice","internalType":"uint256"},{"type":"address","name":"bidder","internalType":"address"},{"type":"uint256","name":"expireTimestamp","internalType":"uint256"}]}],"name":"getTokenBids","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"","internalType":"struct IMarketPlaceV1.Bid","components":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"bidPrice","internalType":"uint256"},{"type":"address","name":"bidder","internalType":"address"},{"type":"uint256","name":"expireTimestamp","internalType":"uint256"}]}],"name":"getTokenHighestBid","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct IMarketPlaceV1.Bid[]","components":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"bidPrice","internalType":"uint256"},{"type":"address","name":"bidder","internalType":"address"},{"type":"uint256","name":"expireTimestamp","internalType":"uint256"}]}],"name":"getTokenHighestBids","inputs":[{"type":"uint256","name":"from","internalType":"uint256"},{"type":"uint256","name":"size","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"","internalType":"struct IMarketPlaceV1.Listing","components":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"listingPrice","internalType":"uint256"},{"type":"address","name":"seller","internalType":"address"},{"type":"uint256","name":"expireTimestamp","internalType":"uint256"}]}],"name":"getTokenListing","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct IMarketPlaceV1.Listing[]","components":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"listingPrice","internalType":"uint256"},{"type":"address","name":"seller","internalType":"address"},{"type":"uint256","name":"expireTimestamp","internalType":"uint256"}]}],"name":"getTokenListings","inputs":[{"type":"uint256","name":"from","internalType":"uint256"},{"type":"uint256","name":"size","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hasSharePercentageProposal","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isListingAndBidEnabled","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"listToken","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"value","internalType":"uint256"},{"type":"uint256","name":"expireTimestamp","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"partnerAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"partnerSharePercentage","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"partnerSharePercentageProposal","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"paymentTokenAddress","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"proposePartnerShareChange","inputs":[{"type":"uint8","name":"_partnerSharePercentage","internalType":"uint8"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"rejectPartnerShareChange","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"},{"type":"uint8","name":"","internalType":"uint8"}],"name":"serviceFee","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPartnerAddressAndProfitShare","inputs":[{"type":"address","name":"_partnerAddress","internalType":"address"},{"type":"uint8","name":"_partnerSharePercentage","internalType":"uint8"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"tokenAddress","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawBidForToken","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]}]
            

Contract Creation Code

0x60c060405260038054610100600160ff199092169190911761ff0019161762ff0000191662640000179055620151806004556301e13380600555600c805460ff60a01b191690553480156200005357600080fd5b5060405162004ff838038062004ff88339810160408190526200007691620001a6565b60006200008262000106565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180558251620000e59060029060208601906200010a565b506001600160601b0319606092831b8116608052911b1660a05250620002db565b3390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200014d57805160ff19168380011785556200017d565b828001600101855582156200017d579182015b828111156200017d57825182559160200191906001019062000160565b506200018b9291506200018f565b5090565b5b808211156200018b576000815560010162000190565b600080600060608486031215620001bb578283fd5b83516001600160401b0380821115620001d2578485fd5b818601915086601f830112620001e6578485fd5b815181811115620001f5578586fd5b6200020a601f8201601f191660200162000268565b915080825287602082850101111562000221578586fd5b620002348160208401602086016200028f565b50809450505060208401516200024a81620002c2565b60408501519092506200025d81620002c2565b809150509250925092565b6040518181016001600160401b03811182821017156200028757600080fd5b604052919050565b60005b83811015620002ac57818101518382015260200162000292565b83811115620002bc576000848401525b50505050565b6001600160a01b0381168114620002d857600080fd5b50565b60805160601c60a05160601c614cc16200033760003980610e815280610eb15280610f265280611f0c52806124bf5280612d28525080610c0e5280610fa45280611dd35280612e215280613226528061332c5250614cc16000f3fe6080604052600436106102c65760003560e01c80637d7660e011610179578063b6be53ba116100d6578063e72448811161008a578063f2fde38b11610064578063f2fde38b14610723578063f7d7198f14610743578063f973e75514610758576102c6565b8063e7244881146106ce578063e7d585a8146106ee578063f0e6dcab1461070e576102c6565b8063bed659bc116100bb578063bed659bc14610677578063dc4094e114610697578063e1548702146106b9576102c6565b8063b6be53ba14610637578063bce64a7d14610657576102c6565b806398792eec1161012d578063a3c0b5f011610112578063a3c0b5f0146105ed578063a6a27f3a1461060d578063afb18fe714610622576102c6565b806398792eec146105b85780639d76ea58146105d8576102c6565b806385f5a92a1161015e57806385f5a92a146105605780638abdf5aa146105805780638da5cb5b146105a3576102c6565b80637d7660e0146105365780637f8baff81461054b576102c6565b8063576168fc116102275780636fcbb324116101db578063715018a6116101c0578063715018a6146104d257806373885b70146104e757806375ccb1f214610509576102c6565b80636fcbb3241461049257806370a3b390146104b2576102c6565b80635eef51ee1161020c5780635eef51ee1461043d57806365e4785f1461045d5780636adb83141461047d576102c6565b8063576168fc146103fb5780635cc2c66b1461041d576102c6565b8063336c16c61161027e57806340a979191161026357806340a97919146103af578063453dfc50146103c457806354b0de6a146103d9576102c6565b8063336c16c61461037a578063383fba251461039a576102c6565b80632426fc24116102af5780632426fc24146103235780632d296bf11461034557806333549d3d14610358576102c6565b80631e172891146102cb5780631e56afe9146102f6575b600080fd5b3480156102d757600080fd5b506102e0610778565b6040516102ed9190614c0d565b60405180910390f35b34801561030257600080fd5b50610316610311366004613d03565b61079b565b6040516102ed9190614be0565b34801561032f57600080fd5b5061034361033e366004613d03565b6108c7565b005b610343610353366004613d03565b610948565b34801561036457600080fd5b5061036d610c96565b6040516102ed9190614bee565b34801561038657600080fd5b50610343610395366004613d33565b610c9c565b3480156103a657600080fd5b506103436110a2565b3480156103bb57600080fd5b5061036d6111ae565b3480156103d057600080fd5b5061036d6111f1565b3480156103e557600080fd5b506103ee6111f7565b6040516102ed9190613eb9565b34801561040757600080fd5b5061041061120d565b6040516102ed9190613e40565b34801561042957600080fd5b506103ee610438366004613d62565b611229565b34801561044957600080fd5b50610343610458366004613dc9565b61130b565b34801561046957600080fd5b50610343610478366004613c96565b611440565b34801561048957600080fd5b506102e0611627565b34801561049e57600080fd5b506103436104ad366004613c5e565b611648565b3480156104be57600080fd5b506103166104cd366004613d33565b61170c565b3480156104de57600080fd5b5061034361179d565b3480156104f357600080fd5b506104fc61187f565b6040516102ed9190613f54565b34801561051557600080fd5b50610529610524366004613d62565b611930565b6040516102ed9190613f07565b34801561054257600080fd5b50610343611a74565b34801561055757600080fd5b50610343611b20565b34801561056c57600080fd5b5061034361057b366004613d03565b611c12565b34801561058c57600080fd5b50610595611d1a565b6040516102ed929190614c1b565b3480156105af57600080fd5b50610410611d32565b3480156105c457600080fd5b506103166105d3366004613d03565b611d4e565b3480156105e457600080fd5b50610410611dd1565b3480156105f957600080fd5b50610343610608366004613d03565b611df5565b34801561061957600080fd5b5061036d611e6d565b34801561062e57600080fd5b50610410611f0a565b34801561064357600080fd5b50610343610652366004613ccb565b611f2e565b34801561066357600080fd5b50610343610672366004613d83565b611fd2565b34801561068357600080fd5b50610343610692366004613d03565b61224d565b3480156106a357600080fd5b506106ac61230a565b6040516102ed9190613f49565b3480156106c557600080fd5b5061052961232c565b3480156106da57600080fd5b506103436106e9366004613d83565b61233d565b3480156106fa57600080fd5b506103ee610709366004613d03565b612749565b34801561071a57600080fd5b506106ac612891565b34801561072f57600080fd5b5061034361073e366004613c5e565b61289a565b34801561074f57600080fd5b506103436129e7565b34801561076457600080fd5b50610343610773366004613dae565b612b32565b600c54760100000000000000000000000000000000000000000000900460ff1681565b6107a3613b91565b6107ab613b91565b604051806080016040528084815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815250905060005b600084815260096020526040902061080190612ca7565b8110156108be5760008481526009602052604081206108209083612cb2565b905061082a613b91565b50600085815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff808616855260029182018452938290208251608081018452815481526001820154948101949094529081015490931690820152600390910154606082015261089881612cc5565b80156108ab575083602001518160200151115b156108b4578093505b50506001016107ea565b5090505b919050565b6108cf612ddd565b73ffffffffffffffffffffffffffffffffffffffff166108ed611d32565b73ffffffffffffffffffffffffffffffffffffffff1614610943576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061478a565b60405180910390fd5b600455565b60026001541415610985576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614a5b565b6002600155610992613b91565b61099b82611d4e565b604081015190915073ffffffffffffffffffffffffffffffffffffffff166109ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614753565b6109f98233612de1565b15610a30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614150565b6003546020820151600091610a619160ff620100008304811692610a5b929161010090910416612eff565b90612f53565b905080826020015101341015610aa3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061445a565b6000610aaf3483612f9f565b600c54909150600090610ae590606490610a5b90869074010000000000000000000000000000000000000000900460ff16612eff565b9050610af5846040015183612fe1565b610b0f610b00611d32565b610b0a8584612f9f565b612fe1565b600c5473ffffffffffffffffffffffffffffffffffffffff1615801590610b365750600081115b15610b5e57600c54610b5e9073ffffffffffffffffffffffffffffffffffffffff1682612fe1565b3373ffffffffffffffffffffffffffffffffffffffff16846040015173ffffffffffffffffffffffffffffffffffffffff16867f1d83c44501b48d5dc85fea9b94506cda160418d62c65b481199bdbec265df157348688604051610bc493929190614bf7565b60405180910390a460408085015190517f42842e0e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016916342842e0e91610c46919033908a90600401613e88565b600060405180830381600087803b158015610c6057600080fd5b505af1158015610c74573d6000803e3d6000fd5b50505050610c81856130c3565b610c8b8533613124565b505060018055505050565b60045490565b60026001541415610cd9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614a5b565b6002600155610ce88233612de1565b610d1e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614b26565b610d27826131e6565b80610d365750610d36336132ec565b610d6c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90613fa5565b610d74613b91565b610d7e838361170c565b905060008160200151118015610dc357508173ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff16145b610df9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614879565b6003546020820151600091610e2991610100820460ff90811662010000909304811683011691610a5b9190612eff565b90506000610e44828460200151612f9f90919063ffffffff16565b600c54909150600090610e7a90606490610a5b90869074010000000000000000000000000000000000000000900460ff16612eff565b9050610eac7f0000000000000000000000000000000000000000000000000000000000000000856040015133856133b3565b610eec7f00000000000000000000000000000000000000000000000000000000000000008560400151610edd611d32565b610ee78786612f9f565b6133b3565b600c5473ffffffffffffffffffffffffffffffffffffffff1615801590610f135750600081115b15610f62576040840151600c54610f62917f00000000000000000000000000000000000000000000000000000000000000009173ffffffffffffffffffffffffffffffffffffffff16846133b3565b60408085015190517f42842e0e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016916342842e0e91610fdb9133918b90600401613e88565b600060405180830381600087803b158015610ff557600080fd5b505af1158015611009573d6000803e3d6000fd5b50505050836040015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16877f2c907f0c6ace0ad59e44f69f6873314bb2b85cca7eeffb05ca93fa65326bfbb48760200151868860405161107793929190614bf7565b60405180910390a4611088866130c3565b611096868560400151613124565b50506001805550505050565b60005b6110af6007612ca7565b8110156111695760006110c3600783612cb2565b600081815260066020908152604091829020825160808101845281548152600182015492810192909252600281015473ffffffffffffffffffffffffffffffffffffffff169282019290925260039091015460608201529091506111269061345c565b61116057600f80546001810182556000919091527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802018190555b506001016110a5565b5060005b600f5481101561119f57611197600f828154811061118757fe5b90600052602060002001546130c3565b60010161116d565b506111ac600f6000613bcf565b565b600080805b6111bd600a612ca7565b8110156111eb576111e16111da6111d5600a84612cb2565b613495565b8390613564565b91506001016111b3565b50905090565b60055490565b60606112086000610438600a612ca7565b905090565b600c5473ffffffffffffffffffffffffffffffffffffffff1681565b6060611235600a612ca7565b831080156112435750600082115b156113055781611253600a612ca7565b838501111561126b5783611267600a612ca7565b0390505b60608167ffffffffffffffff8111801561128457600080fd5b506040519080825280602002602001820160405280156112be57816020015b6112ab613b91565b8152602001906001900390816112a35790505b50905060005b828110156112fb576112dc610311600a838901612cb2565b8282815181106112e857fe5b60209081029190910101526001016112c4565b5091506113059050565b92915050565b611313612ddd565b73ffffffffffffffffffffffffffffffffffffffff16611331611d32565b73ffffffffffffffffffffffffffffffffffffffff161461137e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061478a565b8060ff168260ff1611156113be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906149c7565b60008160ff168360ff166103e80261ffff16816113d757fe5b5050600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010060ff95861602177fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff1662010000939094169290920292909217905550565b611448612ddd565b73ffffffffffffffffffffffffffffffffffffffff16611466611d32565b73ffffffffffffffffffffffffffffffffffffffff16146114b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061478a565b600c5473ffffffffffffffffffffffffffffffffffffffff1615611503576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906147bf565b73ffffffffffffffffffffffffffffffffffffffff8216611550576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906140bc565b60008160ff16118015611567575060648160ff1611155b61159d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906142d5565b600c805460ff90921674010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff73ffffffffffffffffffffffffffffffffffffffff9094167fffffffffffffffffffffffff00000000000000000000000000000000000000009093169290921792909216179055565b600c5474010000000000000000000000000000000000000000900460ff1681565b600c5473ffffffffffffffffffffffffffffffffffffffff163314611699576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614332565b600c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff831690811790915561170957600c80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690555b50565b611714613b91565b61171c613b91565b50600083815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff808716855260029182018452938290208251608081018452815481526001820154948101949094529081015490931690820152600390910154606082015261178a81612cc5565b15611796579050611305565b5092915050565b6117a5612ddd565b73ffffffffffffffffffffffffffffffffffffffff166117c3611d32565b73ffffffffffffffffffffffffffffffffffffffff1614611810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061478a565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60028054604080516020601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61010060018716150201909416859004938401819004810282018101909252828152606093909290918301828280156119265780601f106118fb57610100808354040283529160200191611926565b820191906000526020600020905b81548152906001019060200180831161190957829003601f168201915b5050505050905090565b606061193c6007612ca7565b8310801561194a5750600082115b15611305578161195a6007612ca7565b8385011115611972578361196e6007612ca7565b0390505b60608167ffffffffffffffff8111801561198b57600080fd5b506040519080825280602002602001820160405280156119c557816020015b6119b2613b91565b8152602001906001900390816119aa5790505b50905060005b828110156112fb576119db613b91565b600660006119ec6007858b01612cb2565b81526020808201929092526040908101600020815160808101835281548152600182015493810193909352600281015473ffffffffffffffffffffffffffffffffffffffff16918301919091526003015460608201529050611a4d8161345c565b15611a6b5780838381518110611a5f57fe5b60200260200101819052505b506001016119cb565b60005b611a81600a612ca7565b811015611aea576000611a95600a83612cb2565b90506000611aa282613495565b90508015611ae057600f80546001810182556000919091527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802018290555b5050600101611a77565b5060005b600f5481101561119f57611b18600f8281548110611b0857fe5b90600052602060002001546135a3565b600101611aee565b611b28612ddd565b73ffffffffffffffffffffffffffffffffffffffff16611b46611d32565b73ffffffffffffffffffffffffffffffffffffffff1614611b93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061478a565b600c547501000000000000000000000000000000000000000000900460ff16611be8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614241565b600c80547fffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffffff169055565b611c1a613b91565b5060008181526009602090815260408083203380855260029182018452938290208251608081018452815481526001820154948101949094529081015473ffffffffffffffffffffffffffffffffffffffff16918301829052600301546060830152909114611cb5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614933565b806040015173ffffffffffffffffffffffffffffffffffffffff16827f4afa471ce7ab7fa67258e3afb1adf7e899e0495602eeb26d90d41e1b64dea5a68360200151604051611d049190614bee565b60405180910390a3611d168233613124565b5050565b60035460ff6101008204811691620100009004169091565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b611d56613b91565b611d5e613b91565b50600082815260066020908152604091829020825160808101845281548152600182015492810192909252600281015473ffffffffffffffffffffffffffffffffffffffff16928201929092526003909101546060820152611dbf8161345c565b15611dcb5790506108c2565b50919050565b7f000000000000000000000000000000000000000000000000000000000000000090565b611dfd612ddd565b73ffffffffffffffffffffffffffffffffffffffff16611e1b611d32565b73ffffffffffffffffffffffffffffffffffffffff1614611e68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061478a565b600555565b600080805b611e7c6007612ca7565b8110156111eb57611ef060066000611e95600785612cb2565b81526020808201929092526040908101600020815160808101835281548152600182015493810193909352600281015473ffffffffffffffffffffffffffffffffffffffff169183019190915260030154606082015261345c565b611f0257611eff826001613564565b91505b600101611e72565b7f000000000000000000000000000000000000000000000000000000000000000090565b611f36612ddd565b73ffffffffffffffffffffffffffffffffffffffff16611f54611d32565b73ffffffffffffffffffffffffffffffffffffffff1614611fa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061478a565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60035460ff1661200e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061429e565b600454819061201d8242612f9f565b1015612055576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614b83565b6005546120628242612f9f565b111561209a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061454b565b600083116120d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061463c565b6120de8433612de1565b612114576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614aef565b61211d846131e6565b8061212c575061212c336132ec565b612162576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061481c565b604080516080810182528581526020808201868152338385019081526060840187815260008a815260069094529490922092518355516001830155516002820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905590516003909101556121f7600785613736565b503373ffffffffffffffffffffffffffffffffffffffff16847f7765a1c07bdce3390c521eaeb86030b188b77cbaba2d76bd7c9c32d906bfbcba8560405161223f9190614bee565b60405180910390a350505050565b60008181526006602052604090206002015473ffffffffffffffffffffffffffffffffffffffff1633146122ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614a92565b60008181526006602052604080822060020154905173ffffffffffffffffffffffffffffffffffffffff9091169183917f70a382c18b6e794d86997f6e1f1efca577925cfa85c476a6ff7031f0a3dd6ed09190a3611709816130c3565b600c547501000000000000000000000000000000000000000000900460ff1681565b606061120860006105246007612ca7565b60035460ff16612379576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061429e565b60045481906123888242612f9f565b10156123c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614b83565b6005546123cd8242612f9f565b1115612405576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061454b565b6000831161243f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061438f565b6124498433612de1565b15612480576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906145df565b6040517fdd62ed3e000000000000000000000000000000000000000000000000000000008152839073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063dd62ed3e906124f69033903090600401613e61565b60206040518083038186803b15801561250e57600080fd5b505afa158015612522573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125469190613d1b565b101561257e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614699565b612586613b91565b5060408051608081018252858152602081018590523391810191909152606081018390526125b5600a86613742565b61266d576125c4600a86613736565b5060408051600d805460806020828102850182018652606085018381529495869591860194938593918701928592849284918a018282801561262557602002820191906000526020600020905b815481526020019060010190808311612611575b5050509190925250505090525090526000868152600960209081526040909120825180518051805193949293859384926126659284929190910190613bed565b505050505050505b6000858152600960205260409020612685903361374e565b506000858152600960209081526040808320338085526002918201845293829020855181559285015160018401558482015190830180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905560608401516003909201919091555186907f0ea16c10401e9d7c547471845914c4a904af6a01b9fa1e195eeecae9f78bcca19061273a908890614bee565b60405180910390a35050505050565b6000818152600960205260409020606090819061276590612ca7565b67ffffffffffffffff8111801561277b57600080fd5b506040519080825280602002602001820160405280156127b557816020015b6127a2613b91565b81526020019060019003908161279a5790505b50905060005b60008481526009602052604090206127d290612ca7565b8110156108be5760008481526009602052604081206127f19083612cb2565b90506127fb613b91565b50600085815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff808616855260029182018452938290208251608081018452815481526001820154948101949094529081015490931690820152600390910154606082015261286981612cc5565b15612887578084848151811061287b57fe5b60200260200101819052505b50506001016127bb565b60035460ff1690565b6128a2612ddd565b73ffffffffffffffffffffffffffffffffffffffff166128c0611d32565b73ffffffffffffffffffffffffffffffffffffffff161461290d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061478a565b73ffffffffffffffffffffffffffffffffffffffff811661295a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906140f3565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6129ef612ddd565b73ffffffffffffffffffffffffffffffffffffffff16612a0d611d32565b73ffffffffffffffffffffffffffffffffffffffff1614612a5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061478a565b600c547501000000000000000000000000000000000000000000900460ff16612aaf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614241565b600c80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff811676010000000000000000000000000000000000000000000090910460ff167401000000000000000000000000000000000000000002177fffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffffff169055565b600c5473ffffffffffffffffffffffffffffffffffffffff163314612b83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061405f565b60648160ff161115612bc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906148d6565b600c5460ff82811674010000000000000000000000000000000000000000909204161415612c1b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906141e4565b600c805460ff92909216760100000000000000000000000000000000000000000000027fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff90931675010000000000000000000000000000000000000000001792909216919091179055565b600061130582613770565b6000612cbe8383613774565b9392505050565b6000612cd982600001518360400151612de1565b158015612db15750602082015160408084015190517fdd62ed3e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169163dd62ed3e91612d5e91903090600401613e61565b60206040518083038186803b158015612d7657600080fd5b505afa158015612d8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dae9190613d1b565b10155b8015612dc1575060008260200151115b8015612dd05750428260600151115b156108c2575060016108c2565b3390565b6040517f6352211e00000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690636352211e90612e56908690600401614bee565b60206040518083038186803b158015612e6e57600080fd5b505afa925050508015612ebc575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612eb991810190613c7a565b60015b612ec857506000611305565b8273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614915050611305565b600082612f0e57506000611305565b82820282848281612f1b57fe5b0414612cbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906146f6565b6000808211612f8e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906145a8565b818381612f9757fe5b049392505050565b600082821115612fdb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906143c6565b50900390565b8047101561301b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906144b7565b60008273ffffffffffffffffffffffffffffffffffffffff168260405161304190613e3d565b60006040518083038185875af1925050503d806000811461307e576040519150601f19603f3d011682016040523d82523d6000602084013e613083565b606091505b50509050806130be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906143fd565b505050565b6130ce600782613742565b15611709576000818152600660205260408120818155600181018290556002810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905560030155611d166007826137d3565b600082815260096020526040902061313c90826137df565b15611d1657600082815260096020818152604080842073ffffffffffffffffffffffffffffffffffffffff86168552600280820184529185208581556001810186905591820180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055600390910184905592859052526131bf9082613801565b5060008281526009602052604090206131d790612ca7565b611d16576130be600a836137d3565b6040517f081812fc00000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063081812fc9061325b908590600401614bee565b60206040518083038186803b15801561327357600080fd5b505afa9250505080156132c1575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526132be91810190613c7a565b60015b6132cd575060006108c2565b73ffffffffffffffffffffffffffffffffffffffff16301490506108c2565b6040517fe985e9c500000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063e985e9c5906133639085903090600401613e61565b60206040518083038186803b15801561337b57600080fd5b505afa15801561338f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113059190613ce7565b613456846323b872dd60e01b8585856040516024016133d493929190613e88565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152613823565b50505050565b600061347082600001518360400151612de1565b8015612db157508151613482906131e6565b80612db15750612db182604001516132ec565b600080805b60008481526009602052604090206134b190612ca7565b8110156108be5760008481526009602052604081206134d09083612cb2565b90506134da613b91565b50600085815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff808616855260029182018452938290208251608081018452815481526001820154948101949094529081015490931690820152600390910154606082015261354881612cc5565b61355a57613557846001613564565b93505b505060010161349a565b600082820183811015612cbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906141ad565b60005b60008281526009602052604090206135bd90612ca7565b8110156136d55760008281526009602052604081206135dc9083612cb2565b90506135e6613b91565b50600083815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff808616855260029182018452938290208251608081018452815481526001820154948101949094529081015490931690820152600390910154606082015261365481612cc5565b6136cb5760008481526009602052604090206010906136739085612cb2565b81546001810183556000928352602090922090910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790555b50506001016135a6565b5060005b601054811015613729576000601082815481106136f257fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1690506137208382613124565b506001016136d9565b5061170960106000613bcf565b6000612cbe83836138d9565b6000612cbe8383613923565b6000612cbe8373ffffffffffffffffffffffffffffffffffffffff84166138d9565b5490565b815460009082106137b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614002565b8260000182815481106137c057fe5b9060005260206000200154905092915050565b6000612cbe838361393b565b6000612cbe8373ffffffffffffffffffffffffffffffffffffffff8416613923565b6000612cbe8373ffffffffffffffffffffffffffffffffffffffff841661393b565b6060613885826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16613a1f9092919063ffffffff16565b8051909150156130be57808060200190518101906138a39190613ce7565b6130be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906149fe565b60006138e58383613923565b61391b57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611305565b506000611305565b60009081526001919091016020526040902054151590565b60008181526001830160205260408120548015613a155783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808301919081019060009087908390811061398c57fe5b90600052602060002001549050808760000184815481106139a957fe5b6000918252602080832090910192909255828152600189810190925260409020908401905586548790806139d957fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050611305565b6000915050611305565b6060613a2e8484600085613a36565b949350505050565b606082471015613a72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906144ee565b613a7b85613b38565b613ab1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614990565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051613adb9190613e21565b60006040518083038185875af1925050503d8060008114613b18576040519150601f19603f3d011682016040523d82523d6000602084013e613b1d565b606091505b5091509150613b2d828286613b3e565b979650505050505050565b3b151590565b60608315613b4d575081612cbe565b825115613b5d5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9190613f54565b60405180608001604052806000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081525090565b50805460008255906000526020600020908101906117099190613c38565b828054828255906000526020600020908101928215613c28579160200282015b82811115613c28578251825591602001919060010190613c0d565b50613c34929150613c38565b5090565b5b80821115613c345760008155600101613c39565b803560ff8116811461130557600080fd5b600060208284031215613c6f578081fd5b8135612cbe81614c5b565b600060208284031215613c8b578081fd5b8151612cbe81614c5b565b60008060408385031215613ca8578081fd5b8235613cb381614c5b565b9150613cc28460208501613c4d565b90509250929050565b600060208284031215613cdc578081fd5b8135612cbe81614c7d565b600060208284031215613cf8578081fd5b8151612cbe81614c7d565b600060208284031215613d14578081fd5b5035919050565b600060208284031215613d2c578081fd5b5051919050565b60008060408385031215613d45578182fd5b823591506020830135613d5781614c5b565b809150509250929050565b60008060408385031215613d74578182fd5b50508035926020909101359150565b600080600060608486031215613d97578081fd5b505081359360208301359350604090920135919050565b600060208284031215613dbf578081fd5b612cbe8383613c4d565b60008060408385031215613ddb578182fd5b613cb38484613c4d565b805182526020810151602083015273ffffffffffffffffffffffffffffffffffffffff6040820151166040830152606081015160608301525050565b60008251613e33818460208701614c2f565b9190910192915050565b90565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b6020808252825182820181905260009190848201906040850190845b81811015613efb57613ee8838551613de5565b9284019260809290920191600101613ed5565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015613efb57613f36838551613de5565b9284019260809290920191600101613f23565b901515815260200190565b6000602082528251806020840152613f73816040850160208701614c2f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60208082526035908201527f54686520746f6b656e206973206e6f7420617070726f76656420746f2074726160408201527f6e736665722062792074686520636f6e74726163740000000000000000000000606082015260800190565b60208082526022908201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e60408201527f6473000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f4f6e6c7920706172746e65722063616e2070726f706f7365207368617265206360408201527f68616e6765000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526018908201527f43616e27742073657420746f2061646472657373203078300000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f546f6b656e206f776e65722063616e277420627579207468656972206f776e2060408201527f746f6b656e000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252602a908201527f417474656d7074696e6720746f207365742070726f706f73652073616d65207660408201527f616c756520616761696e00000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f5468657265206973206e6f206368616e67652073686172652070726f706f736160408201527f6c00000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f4c697374696e6720616e642062696420617265206e6f7420656e61626c656400604082015260600190565b60208082526024908201527f416c6c6f7765642070657263656e746167652072616e6765206973203120746f60408201527f2031303000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f4f6e6c7920706172746e65722063616e206368616e676520706172746e65722060408201527f6164647265737300000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f506c656173652062696420666f72206d6f7265207468616e2030000000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252603a908201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260408201527f6563697069656e74206d61792068617665207265766572746564000000000000606082015260800190565b6020808252602c908201527f5468652076616c75652073656e642069732062656c6f772073616c652070726960408201527f636520706c757320666565730000000000000000000000000000000000000000606082015260800190565b6020808252601d908201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f506c6561736520656e74657220612073686f7274657220706572696f64206f6660408201527f2074696d65000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526022908201527f5468697320546f6b656e2062656c6f6e677320746f207468697320616464726560408201527f7373000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526038908201527f506c65617365206c69737420666f72206d6f7265207468616e2030206f72207560408201527f736520746865207472616e736665722066756e6374696f6e0000000000000000606082015260800190565b60208082526036908201527f4e65656420746f206861766520656e6f75676820746f6b656e20686f6c64696e60408201527f6720746f20626964206f6e207468697320746f6b656e00000000000000000000606082015260800190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526015908201527f546f6b656e206973206e6f7420666f722073616c650000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526030908201527f4f776e65722063616e2774206368616e676520706172746e657220616464726560408201527f7373206f6e636520697427732073657400000000000000000000000000000000606082015260800190565b60208082526036908201527f5468697320746f6b656e206973206e6f7420616c6c6f77656420746f2074726160408201527f6e73666572206279207468697320636f6e747261637400000000000000000000606082015260800190565b60208082526026908201527f5468697320746f6b656e20646f65736e277420686176652061206d617463686960408201527f6e67206269640000000000000000000000000000000000000000000000000000606082015260800190565b60208082526024908201527f416c6c6f7765642070657263656e746167652072616e6765206973203020746f60408201527f2031303000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602b908201527f54686973206164647265737320646f65736e2774206861766520626964206f6e60408201527f207468697320746f6b656e000000000000000000000000000000000000000000606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252601b908201527f466565206672616374696f6e20657863656564656420626173652e0000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526022908201527f4f6e6c7920746f6b656e2073656c6c65722063616e2064656c69737420746f6b60408201527f656e000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f4f6e6c7920746f6b656e206f776e65722063616e206c69737420746f6b656e00604082015260600190565b60208082526028908201527f4f6e6c7920746f6b656e206f776e65722063616e20616363657074206269642060408201527f6f6620746f6b656e000000000000000000000000000000000000000000000000606082015260800190565b60208082526024908201527f506c6561736520656e7465722061206c6f6e67657220706572696f64206f662060408201527f74696d6500000000000000000000000000000000000000000000000000000000606082015260800190565b608081016113058284613de5565b90815260200190565b9283526020830191909152604082015260600190565b60ff91909116815260200190565b60ff92831681529116602082015260400190565b60005b83811015614c4a578181015183820152602001614c32565b838111156134565750506000910152565b73ffffffffffffffffffffffffffffffffffffffff8116811461170957600080fd5b801515811461170957600080fdfea264697066735822122098840a976f670d2d996cb632d150031c219404d755af850194775dc4993a7bb664736f6c634300060c003300000000000000000000000000000000000000000000000000000000000000600000000000000000000000006e3e69a56e592f7f285b07bb277e8632b285aca7000000000000000000000000b7ddc6414bf4f5515b52d8bdd69973ae205ff1010000000000000000000000000000000000000000000000000000000000000012205265616c446f676550756e6b73586d61730000000000000000000000000000

Deployed ByteCode

0x6080604052600436106102c65760003560e01c80637d7660e011610179578063b6be53ba116100d6578063e72448811161008a578063f2fde38b11610064578063f2fde38b14610723578063f7d7198f14610743578063f973e75514610758576102c6565b8063e7244881146106ce578063e7d585a8146106ee578063f0e6dcab1461070e576102c6565b8063bed659bc116100bb578063bed659bc14610677578063dc4094e114610697578063e1548702146106b9576102c6565b8063b6be53ba14610637578063bce64a7d14610657576102c6565b806398792eec1161012d578063a3c0b5f011610112578063a3c0b5f0146105ed578063a6a27f3a1461060d578063afb18fe714610622576102c6565b806398792eec146105b85780639d76ea58146105d8576102c6565b806385f5a92a1161015e57806385f5a92a146105605780638abdf5aa146105805780638da5cb5b146105a3576102c6565b80637d7660e0146105365780637f8baff81461054b576102c6565b8063576168fc116102275780636fcbb324116101db578063715018a6116101c0578063715018a6146104d257806373885b70146104e757806375ccb1f214610509576102c6565b80636fcbb3241461049257806370a3b390146104b2576102c6565b80635eef51ee1161020c5780635eef51ee1461043d57806365e4785f1461045d5780636adb83141461047d576102c6565b8063576168fc146103fb5780635cc2c66b1461041d576102c6565b8063336c16c61161027e57806340a979191161026357806340a97919146103af578063453dfc50146103c457806354b0de6a146103d9576102c6565b8063336c16c61461037a578063383fba251461039a576102c6565b80632426fc24116102af5780632426fc24146103235780632d296bf11461034557806333549d3d14610358576102c6565b80631e172891146102cb5780631e56afe9146102f6575b600080fd5b3480156102d757600080fd5b506102e0610778565b6040516102ed9190614c0d565b60405180910390f35b34801561030257600080fd5b50610316610311366004613d03565b61079b565b6040516102ed9190614be0565b34801561032f57600080fd5b5061034361033e366004613d03565b6108c7565b005b610343610353366004613d03565b610948565b34801561036457600080fd5b5061036d610c96565b6040516102ed9190614bee565b34801561038657600080fd5b50610343610395366004613d33565b610c9c565b3480156103a657600080fd5b506103436110a2565b3480156103bb57600080fd5b5061036d6111ae565b3480156103d057600080fd5b5061036d6111f1565b3480156103e557600080fd5b506103ee6111f7565b6040516102ed9190613eb9565b34801561040757600080fd5b5061041061120d565b6040516102ed9190613e40565b34801561042957600080fd5b506103ee610438366004613d62565b611229565b34801561044957600080fd5b50610343610458366004613dc9565b61130b565b34801561046957600080fd5b50610343610478366004613c96565b611440565b34801561048957600080fd5b506102e0611627565b34801561049e57600080fd5b506103436104ad366004613c5e565b611648565b3480156104be57600080fd5b506103166104cd366004613d33565b61170c565b3480156104de57600080fd5b5061034361179d565b3480156104f357600080fd5b506104fc61187f565b6040516102ed9190613f54565b34801561051557600080fd5b50610529610524366004613d62565b611930565b6040516102ed9190613f07565b34801561054257600080fd5b50610343611a74565b34801561055757600080fd5b50610343611b20565b34801561056c57600080fd5b5061034361057b366004613d03565b611c12565b34801561058c57600080fd5b50610595611d1a565b6040516102ed929190614c1b565b3480156105af57600080fd5b50610410611d32565b3480156105c457600080fd5b506103166105d3366004613d03565b611d4e565b3480156105e457600080fd5b50610410611dd1565b3480156105f957600080fd5b50610343610608366004613d03565b611df5565b34801561061957600080fd5b5061036d611e6d565b34801561062e57600080fd5b50610410611f0a565b34801561064357600080fd5b50610343610652366004613ccb565b611f2e565b34801561066357600080fd5b50610343610672366004613d83565b611fd2565b34801561068357600080fd5b50610343610692366004613d03565b61224d565b3480156106a357600080fd5b506106ac61230a565b6040516102ed9190613f49565b3480156106c557600080fd5b5061052961232c565b3480156106da57600080fd5b506103436106e9366004613d83565b61233d565b3480156106fa57600080fd5b506103ee610709366004613d03565b612749565b34801561071a57600080fd5b506106ac612891565b34801561072f57600080fd5b5061034361073e366004613c5e565b61289a565b34801561074f57600080fd5b506103436129e7565b34801561076457600080fd5b50610343610773366004613dae565b612b32565b600c54760100000000000000000000000000000000000000000000900460ff1681565b6107a3613b91565b6107ab613b91565b604051806080016040528084815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815250905060005b600084815260096020526040902061080190612ca7565b8110156108be5760008481526009602052604081206108209083612cb2565b905061082a613b91565b50600085815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff808616855260029182018452938290208251608081018452815481526001820154948101949094529081015490931690820152600390910154606082015261089881612cc5565b80156108ab575083602001518160200151115b156108b4578093505b50506001016107ea565b5090505b919050565b6108cf612ddd565b73ffffffffffffffffffffffffffffffffffffffff166108ed611d32565b73ffffffffffffffffffffffffffffffffffffffff1614610943576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061478a565b60405180910390fd5b600455565b60026001541415610985576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614a5b565b6002600155610992613b91565b61099b82611d4e565b604081015190915073ffffffffffffffffffffffffffffffffffffffff166109ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614753565b6109f98233612de1565b15610a30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614150565b6003546020820151600091610a619160ff620100008304811692610a5b929161010090910416612eff565b90612f53565b905080826020015101341015610aa3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061445a565b6000610aaf3483612f9f565b600c54909150600090610ae590606490610a5b90869074010000000000000000000000000000000000000000900460ff16612eff565b9050610af5846040015183612fe1565b610b0f610b00611d32565b610b0a8584612f9f565b612fe1565b600c5473ffffffffffffffffffffffffffffffffffffffff1615801590610b365750600081115b15610b5e57600c54610b5e9073ffffffffffffffffffffffffffffffffffffffff1682612fe1565b3373ffffffffffffffffffffffffffffffffffffffff16846040015173ffffffffffffffffffffffffffffffffffffffff16867f1d83c44501b48d5dc85fea9b94506cda160418d62c65b481199bdbec265df157348688604051610bc493929190614bf7565b60405180910390a460408085015190517f42842e0e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000006e3e69a56e592f7f285b07bb277e8632b285aca716916342842e0e91610c46919033908a90600401613e88565b600060405180830381600087803b158015610c6057600080fd5b505af1158015610c74573d6000803e3d6000fd5b50505050610c81856130c3565b610c8b8533613124565b505060018055505050565b60045490565b60026001541415610cd9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614a5b565b6002600155610ce88233612de1565b610d1e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614b26565b610d27826131e6565b80610d365750610d36336132ec565b610d6c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90613fa5565b610d74613b91565b610d7e838361170c565b905060008160200151118015610dc357508173ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff16145b610df9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614879565b6003546020820151600091610e2991610100820460ff90811662010000909304811683011691610a5b9190612eff565b90506000610e44828460200151612f9f90919063ffffffff16565b600c54909150600090610e7a90606490610a5b90869074010000000000000000000000000000000000000000900460ff16612eff565b9050610eac7f000000000000000000000000b7ddc6414bf4f5515b52d8bdd69973ae205ff101856040015133856133b3565b610eec7f000000000000000000000000b7ddc6414bf4f5515b52d8bdd69973ae205ff1018560400151610edd611d32565b610ee78786612f9f565b6133b3565b600c5473ffffffffffffffffffffffffffffffffffffffff1615801590610f135750600081115b15610f62576040840151600c54610f62917f000000000000000000000000b7ddc6414bf4f5515b52d8bdd69973ae205ff1019173ffffffffffffffffffffffffffffffffffffffff16846133b3565b60408085015190517f42842e0e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000006e3e69a56e592f7f285b07bb277e8632b285aca716916342842e0e91610fdb9133918b90600401613e88565b600060405180830381600087803b158015610ff557600080fd5b505af1158015611009573d6000803e3d6000fd5b50505050836040015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16877f2c907f0c6ace0ad59e44f69f6873314bb2b85cca7eeffb05ca93fa65326bfbb48760200151868860405161107793929190614bf7565b60405180910390a4611088866130c3565b611096868560400151613124565b50506001805550505050565b60005b6110af6007612ca7565b8110156111695760006110c3600783612cb2565b600081815260066020908152604091829020825160808101845281548152600182015492810192909252600281015473ffffffffffffffffffffffffffffffffffffffff169282019290925260039091015460608201529091506111269061345c565b61116057600f80546001810182556000919091527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802018190555b506001016110a5565b5060005b600f5481101561119f57611197600f828154811061118757fe5b90600052602060002001546130c3565b60010161116d565b506111ac600f6000613bcf565b565b600080805b6111bd600a612ca7565b8110156111eb576111e16111da6111d5600a84612cb2565b613495565b8390613564565b91506001016111b3565b50905090565b60055490565b60606112086000610438600a612ca7565b905090565b600c5473ffffffffffffffffffffffffffffffffffffffff1681565b6060611235600a612ca7565b831080156112435750600082115b156113055781611253600a612ca7565b838501111561126b5783611267600a612ca7565b0390505b60608167ffffffffffffffff8111801561128457600080fd5b506040519080825280602002602001820160405280156112be57816020015b6112ab613b91565b8152602001906001900390816112a35790505b50905060005b828110156112fb576112dc610311600a838901612cb2565b8282815181106112e857fe5b60209081029190910101526001016112c4565b5091506113059050565b92915050565b611313612ddd565b73ffffffffffffffffffffffffffffffffffffffff16611331611d32565b73ffffffffffffffffffffffffffffffffffffffff161461137e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061478a565b8060ff168260ff1611156113be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906149c7565b60008160ff168360ff166103e80261ffff16816113d757fe5b5050600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010060ff95861602177fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff1662010000939094169290920292909217905550565b611448612ddd565b73ffffffffffffffffffffffffffffffffffffffff16611466611d32565b73ffffffffffffffffffffffffffffffffffffffff16146114b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061478a565b600c5473ffffffffffffffffffffffffffffffffffffffff1615611503576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906147bf565b73ffffffffffffffffffffffffffffffffffffffff8216611550576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906140bc565b60008160ff16118015611567575060648160ff1611155b61159d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906142d5565b600c805460ff90921674010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff73ffffffffffffffffffffffffffffffffffffffff9094167fffffffffffffffffffffffff00000000000000000000000000000000000000009093169290921792909216179055565b600c5474010000000000000000000000000000000000000000900460ff1681565b600c5473ffffffffffffffffffffffffffffffffffffffff163314611699576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614332565b600c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff831690811790915561170957600c80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690555b50565b611714613b91565b61171c613b91565b50600083815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff808716855260029182018452938290208251608081018452815481526001820154948101949094529081015490931690820152600390910154606082015261178a81612cc5565b15611796579050611305565b5092915050565b6117a5612ddd565b73ffffffffffffffffffffffffffffffffffffffff166117c3611d32565b73ffffffffffffffffffffffffffffffffffffffff1614611810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061478a565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60028054604080516020601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61010060018716150201909416859004938401819004810282018101909252828152606093909290918301828280156119265780601f106118fb57610100808354040283529160200191611926565b820191906000526020600020905b81548152906001019060200180831161190957829003601f168201915b5050505050905090565b606061193c6007612ca7565b8310801561194a5750600082115b15611305578161195a6007612ca7565b8385011115611972578361196e6007612ca7565b0390505b60608167ffffffffffffffff8111801561198b57600080fd5b506040519080825280602002602001820160405280156119c557816020015b6119b2613b91565b8152602001906001900390816119aa5790505b50905060005b828110156112fb576119db613b91565b600660006119ec6007858b01612cb2565b81526020808201929092526040908101600020815160808101835281548152600182015493810193909352600281015473ffffffffffffffffffffffffffffffffffffffff16918301919091526003015460608201529050611a4d8161345c565b15611a6b5780838381518110611a5f57fe5b60200260200101819052505b506001016119cb565b60005b611a81600a612ca7565b811015611aea576000611a95600a83612cb2565b90506000611aa282613495565b90508015611ae057600f80546001810182556000919091527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802018290555b5050600101611a77565b5060005b600f5481101561119f57611b18600f8281548110611b0857fe5b90600052602060002001546135a3565b600101611aee565b611b28612ddd565b73ffffffffffffffffffffffffffffffffffffffff16611b46611d32565b73ffffffffffffffffffffffffffffffffffffffff1614611b93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061478a565b600c547501000000000000000000000000000000000000000000900460ff16611be8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614241565b600c80547fffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffffff169055565b611c1a613b91565b5060008181526009602090815260408083203380855260029182018452938290208251608081018452815481526001820154948101949094529081015473ffffffffffffffffffffffffffffffffffffffff16918301829052600301546060830152909114611cb5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614933565b806040015173ffffffffffffffffffffffffffffffffffffffff16827f4afa471ce7ab7fa67258e3afb1adf7e899e0495602eeb26d90d41e1b64dea5a68360200151604051611d049190614bee565b60405180910390a3611d168233613124565b5050565b60035460ff6101008204811691620100009004169091565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b611d56613b91565b611d5e613b91565b50600082815260066020908152604091829020825160808101845281548152600182015492810192909252600281015473ffffffffffffffffffffffffffffffffffffffff16928201929092526003909101546060820152611dbf8161345c565b15611dcb5790506108c2565b50919050565b7f0000000000000000000000006e3e69a56e592f7f285b07bb277e8632b285aca790565b611dfd612ddd565b73ffffffffffffffffffffffffffffffffffffffff16611e1b611d32565b73ffffffffffffffffffffffffffffffffffffffff1614611e68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061478a565b600555565b600080805b611e7c6007612ca7565b8110156111eb57611ef060066000611e95600785612cb2565b81526020808201929092526040908101600020815160808101835281548152600182015493810193909352600281015473ffffffffffffffffffffffffffffffffffffffff169183019190915260030154606082015261345c565b611f0257611eff826001613564565b91505b600101611e72565b7f000000000000000000000000b7ddc6414bf4f5515b52d8bdd69973ae205ff10190565b611f36612ddd565b73ffffffffffffffffffffffffffffffffffffffff16611f54611d32565b73ffffffffffffffffffffffffffffffffffffffff1614611fa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061478a565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60035460ff1661200e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061429e565b600454819061201d8242612f9f565b1015612055576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614b83565b6005546120628242612f9f565b111561209a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061454b565b600083116120d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061463c565b6120de8433612de1565b612114576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614aef565b61211d846131e6565b8061212c575061212c336132ec565b612162576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061481c565b604080516080810182528581526020808201868152338385019081526060840187815260008a815260069094529490922092518355516001830155516002820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905590516003909101556121f7600785613736565b503373ffffffffffffffffffffffffffffffffffffffff16847f7765a1c07bdce3390c521eaeb86030b188b77cbaba2d76bd7c9c32d906bfbcba8560405161223f9190614bee565b60405180910390a350505050565b60008181526006602052604090206002015473ffffffffffffffffffffffffffffffffffffffff1633146122ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614a92565b60008181526006602052604080822060020154905173ffffffffffffffffffffffffffffffffffffffff9091169183917f70a382c18b6e794d86997f6e1f1efca577925cfa85c476a6ff7031f0a3dd6ed09190a3611709816130c3565b600c547501000000000000000000000000000000000000000000900460ff1681565b606061120860006105246007612ca7565b60035460ff16612379576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061429e565b60045481906123888242612f9f565b10156123c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614b83565b6005546123cd8242612f9f565b1115612405576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061454b565b6000831161243f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061438f565b6124498433612de1565b15612480576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906145df565b6040517fdd62ed3e000000000000000000000000000000000000000000000000000000008152839073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000b7ddc6414bf4f5515b52d8bdd69973ae205ff101169063dd62ed3e906124f69033903090600401613e61565b60206040518083038186803b15801561250e57600080fd5b505afa158015612522573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125469190613d1b565b101561257e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614699565b612586613b91565b5060408051608081018252858152602081018590523391810191909152606081018390526125b5600a86613742565b61266d576125c4600a86613736565b5060408051600d805460806020828102850182018652606085018381529495869591860194938593918701928592849284918a018282801561262557602002820191906000526020600020905b815481526020019060010190808311612611575b5050509190925250505090525090526000868152600960209081526040909120825180518051805193949293859384926126659284929190910190613bed565b505050505050505b6000858152600960205260409020612685903361374e565b506000858152600960209081526040808320338085526002918201845293829020855181559285015160018401558482015190830180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905560608401516003909201919091555186907f0ea16c10401e9d7c547471845914c4a904af6a01b9fa1e195eeecae9f78bcca19061273a908890614bee565b60405180910390a35050505050565b6000818152600960205260409020606090819061276590612ca7565b67ffffffffffffffff8111801561277b57600080fd5b506040519080825280602002602001820160405280156127b557816020015b6127a2613b91565b81526020019060019003908161279a5790505b50905060005b60008481526009602052604090206127d290612ca7565b8110156108be5760008481526009602052604081206127f19083612cb2565b90506127fb613b91565b50600085815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff808616855260029182018452938290208251608081018452815481526001820154948101949094529081015490931690820152600390910154606082015261286981612cc5565b15612887578084848151811061287b57fe5b60200260200101819052505b50506001016127bb565b60035460ff1690565b6128a2612ddd565b73ffffffffffffffffffffffffffffffffffffffff166128c0611d32565b73ffffffffffffffffffffffffffffffffffffffff161461290d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061478a565b73ffffffffffffffffffffffffffffffffffffffff811661295a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906140f3565b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6129ef612ddd565b73ffffffffffffffffffffffffffffffffffffffff16612a0d611d32565b73ffffffffffffffffffffffffffffffffffffffff1614612a5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061478a565b600c547501000000000000000000000000000000000000000000900460ff16612aaf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614241565b600c80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff811676010000000000000000000000000000000000000000000090910460ff167401000000000000000000000000000000000000000002177fffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffffff169055565b600c5473ffffffffffffffffffffffffffffffffffffffff163314612b83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9061405f565b60648160ff161115612bc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906148d6565b600c5460ff82811674010000000000000000000000000000000000000000909204161415612c1b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906141e4565b600c805460ff92909216760100000000000000000000000000000000000000000000027fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff90931675010000000000000000000000000000000000000000001792909216919091179055565b600061130582613770565b6000612cbe8383613774565b9392505050565b6000612cd982600001518360400151612de1565b158015612db15750602082015160408084015190517fdd62ed3e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000b7ddc6414bf4f5515b52d8bdd69973ae205ff101169163dd62ed3e91612d5e91903090600401613e61565b60206040518083038186803b158015612d7657600080fd5b505afa158015612d8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dae9190613d1b565b10155b8015612dc1575060008260200151115b8015612dd05750428260600151115b156108c2575060016108c2565b3390565b6040517f6352211e00000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000006e3e69a56e592f7f285b07bb277e8632b285aca71690636352211e90612e56908690600401614bee565b60206040518083038186803b158015612e6e57600080fd5b505afa925050508015612ebc575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612eb991810190613c7a565b60015b612ec857506000611305565b8273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614915050611305565b600082612f0e57506000611305565b82820282848281612f1b57fe5b0414612cbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906146f6565b6000808211612f8e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906145a8565b818381612f9757fe5b049392505050565b600082821115612fdb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906143c6565b50900390565b8047101561301b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906144b7565b60008273ffffffffffffffffffffffffffffffffffffffff168260405161304190613e3d565b60006040518083038185875af1925050503d806000811461307e576040519150601f19603f3d011682016040523d82523d6000602084013e613083565b606091505b50509050806130be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906143fd565b505050565b6130ce600782613742565b15611709576000818152600660205260408120818155600181018290556002810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905560030155611d166007826137d3565b600082815260096020526040902061313c90826137df565b15611d1657600082815260096020818152604080842073ffffffffffffffffffffffffffffffffffffffff86168552600280820184529185208581556001810186905591820180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055600390910184905592859052526131bf9082613801565b5060008281526009602052604090206131d790612ca7565b611d16576130be600a836137d3565b6040517f081812fc00000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000006e3e69a56e592f7f285b07bb277e8632b285aca7169063081812fc9061325b908590600401614bee565b60206040518083038186803b15801561327357600080fd5b505afa9250505080156132c1575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526132be91810190613c7a565b60015b6132cd575060006108c2565b73ffffffffffffffffffffffffffffffffffffffff16301490506108c2565b6040517fe985e9c500000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000006e3e69a56e592f7f285b07bb277e8632b285aca7169063e985e9c5906133639085903090600401613e61565b60206040518083038186803b15801561337b57600080fd5b505afa15801561338f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113059190613ce7565b613456846323b872dd60e01b8585856040516024016133d493929190613e88565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152613823565b50505050565b600061347082600001518360400151612de1565b8015612db157508151613482906131e6565b80612db15750612db182604001516132ec565b600080805b60008481526009602052604090206134b190612ca7565b8110156108be5760008481526009602052604081206134d09083612cb2565b90506134da613b91565b50600085815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff808616855260029182018452938290208251608081018452815481526001820154948101949094529081015490931690820152600390910154606082015261354881612cc5565b61355a57613557846001613564565b93505b505060010161349a565b600082820183811015612cbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906141ad565b60005b60008281526009602052604090206135bd90612ca7565b8110156136d55760008281526009602052604081206135dc9083612cb2565b90506135e6613b91565b50600083815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff808616855260029182018452938290208251608081018452815481526001820154948101949094529081015490931690820152600390910154606082015261365481612cc5565b6136cb5760008481526009602052604090206010906136739085612cb2565b81546001810183556000928352602090922090910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790555b50506001016135a6565b5060005b601054811015613729576000601082815481106136f257fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1690506137208382613124565b506001016136d9565b5061170960106000613bcf565b6000612cbe83836138d9565b6000612cbe8383613923565b6000612cbe8373ffffffffffffffffffffffffffffffffffffffff84166138d9565b5490565b815460009082106137b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614002565b8260000182815481106137c057fe5b9060005260206000200154905092915050565b6000612cbe838361393b565b6000612cbe8373ffffffffffffffffffffffffffffffffffffffff8416613923565b6000612cbe8373ffffffffffffffffffffffffffffffffffffffff841661393b565b6060613885826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16613a1f9092919063ffffffff16565b8051909150156130be57808060200190518101906138a39190613ce7565b6130be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906149fe565b60006138e58383613923565b61391b57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611305565b506000611305565b60009081526001919091016020526040902054151590565b60008181526001830160205260408120548015613a155783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808301919081019060009087908390811061398c57fe5b90600052602060002001549050808760000184815481106139a957fe5b6000918252602080832090910192909255828152600189810190925260409020908401905586548790806139d957fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050611305565b6000915050611305565b6060613a2e8484600085613a36565b949350505050565b606082471015613a72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a906144ee565b613a7b85613b38565b613ab1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a90614990565b600060608673ffffffffffffffffffffffffffffffffffffffff168587604051613adb9190613e21565b60006040518083038185875af1925050503d8060008114613b18576040519150601f19603f3d011682016040523d82523d6000602084013e613b1d565b606091505b5091509150613b2d828286613b3e565b979650505050505050565b3b151590565b60608315613b4d575081612cbe565b825115613b5d5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093a9190613f54565b60405180608001604052806000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081525090565b50805460008255906000526020600020908101906117099190613c38565b828054828255906000526020600020908101928215613c28579160200282015b82811115613c28578251825591602001919060010190613c0d565b50613c34929150613c38565b5090565b5b80821115613c345760008155600101613c39565b803560ff8116811461130557600080fd5b600060208284031215613c6f578081fd5b8135612cbe81614c5b565b600060208284031215613c8b578081fd5b8151612cbe81614c5b565b60008060408385031215613ca8578081fd5b8235613cb381614c5b565b9150613cc28460208501613c4d565b90509250929050565b600060208284031215613cdc578081fd5b8135612cbe81614c7d565b600060208284031215613cf8578081fd5b8151612cbe81614c7d565b600060208284031215613d14578081fd5b5035919050565b600060208284031215613d2c578081fd5b5051919050565b60008060408385031215613d45578182fd5b823591506020830135613d5781614c5b565b809150509250929050565b60008060408385031215613d74578182fd5b50508035926020909101359150565b600080600060608486031215613d97578081fd5b505081359360208301359350604090920135919050565b600060208284031215613dbf578081fd5b612cbe8383613c4d565b60008060408385031215613ddb578182fd5b613cb38484613c4d565b805182526020810151602083015273ffffffffffffffffffffffffffffffffffffffff6040820151166040830152606081015160608301525050565b60008251613e33818460208701614c2f565b9190910192915050565b90565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b73ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff9384168152919092166020820152604081019190915260600190565b6020808252825182820181905260009190848201906040850190845b81811015613efb57613ee8838551613de5565b9284019260809290920191600101613ed5565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015613efb57613f36838551613de5565b9284019260809290920191600101613f23565b901515815260200190565b6000602082528251806020840152613f73816040850160208701614c2f565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60208082526035908201527f54686520746f6b656e206973206e6f7420617070726f76656420746f2074726160408201527f6e736665722062792074686520636f6e74726163740000000000000000000000606082015260800190565b60208082526022908201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e60408201527f6473000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f4f6e6c7920706172746e65722063616e2070726f706f7365207368617265206360408201527f68616e6765000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526018908201527f43616e27742073657420746f2061646472657373203078300000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f546f6b656e206f776e65722063616e277420627579207468656972206f776e2060408201527f746f6b656e000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252602a908201527f417474656d7074696e6720746f207365742070726f706f73652073616d65207660408201527f616c756520616761696e00000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f5468657265206973206e6f206368616e67652073686172652070726f706f736160408201527f6c00000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f4c697374696e6720616e642062696420617265206e6f7420656e61626c656400604082015260600190565b60208082526024908201527f416c6c6f7765642070657263656e746167652072616e6765206973203120746f60408201527f2031303000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f4f6e6c7920706172746e65722063616e206368616e676520706172746e65722060408201527f6164647265737300000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f506c656173652062696420666f72206d6f7265207468616e2030000000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252603a908201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260408201527f6563697069656e74206d61792068617665207265766572746564000000000000606082015260800190565b6020808252602c908201527f5468652076616c75652073656e642069732062656c6f772073616c652070726960408201527f636520706c757320666565730000000000000000000000000000000000000000606082015260800190565b6020808252601d908201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60408201527f722063616c6c0000000000000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f506c6561736520656e74657220612073686f7274657220706572696f64206f6660408201527f2074696d65000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526022908201527f5468697320546f6b656e2062656c6f6e677320746f207468697320616464726560408201527f7373000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526038908201527f506c65617365206c69737420666f72206d6f7265207468616e2030206f72207560408201527f736520746865207472616e736665722066756e6374696f6e0000000000000000606082015260800190565b60208082526036908201527f4e65656420746f206861766520656e6f75676820746f6b656e20686f6c64696e60408201527f6720746f20626964206f6e207468697320746f6b656e00000000000000000000606082015260800190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526015908201527f546f6b656e206973206e6f7420666f722073616c650000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526030908201527f4f776e65722063616e2774206368616e676520706172746e657220616464726560408201527f7373206f6e636520697427732073657400000000000000000000000000000000606082015260800190565b60208082526036908201527f5468697320746f6b656e206973206e6f7420616c6c6f77656420746f2074726160408201527f6e73666572206279207468697320636f6e747261637400000000000000000000606082015260800190565b60208082526026908201527f5468697320746f6b656e20646f65736e277420686176652061206d617463686960408201527f6e67206269640000000000000000000000000000000000000000000000000000606082015260800190565b60208082526024908201527f416c6c6f7765642070657263656e746167652072616e6765206973203020746f60408201527f2031303000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602b908201527f54686973206164647265737320646f65736e2774206861766520626964206f6e60408201527f207468697320746f6b656e000000000000000000000000000000000000000000606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252601b908201527f466565206672616374696f6e20657863656564656420626173652e0000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526022908201527f4f6e6c7920746f6b656e2073656c6c65722063616e2064656c69737420746f6b60408201527f656e000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601f908201527f4f6e6c7920746f6b656e206f776e65722063616e206c69737420746f6b656e00604082015260600190565b60208082526028908201527f4f6e6c7920746f6b656e206f776e65722063616e20616363657074206269642060408201527f6f6620746f6b656e000000000000000000000000000000000000000000000000606082015260800190565b60208082526024908201527f506c6561736520656e7465722061206c6f6e67657220706572696f64206f662060408201527f74696d6500000000000000000000000000000000000000000000000000000000606082015260800190565b608081016113058284613de5565b90815260200190565b9283526020830191909152604082015260600190565b60ff91909116815260200190565b60ff92831681529116602082015260400190565b60005b83811015614c4a578181015183820152602001614c32565b838111156134565750506000910152565b73ffffffffffffffffffffffffffffffffffffffff8116811461170957600080fd5b801515811461170957600080fdfea264697066735822122098840a976f670d2d996cb632d150031c219404d755af850194775dc4993a7bb664736f6c634300060c0033