ETH Price: $3,424.42 (+3.13%)

Token

Thug Pugs (THUGPUGS)
 

Overview

Max Total Supply

1,250 THUGPUGS

Holders

652

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Balance
1 THUGPUGS
0x92448e128010f55662c42bc2f549482964575acc
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

1250 Genesis Thug Pugs. Hand-drawn and randomly generated collection of unique Pop Art creatures. They gang up for fun and fame, throw t-bones at their human and are eager to breed. They also own .eth addresses.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
ThugPugs

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 20 runs

Other Settings:
default evmVersion
File 1 of 1 : ThugPugs.sol
/*
TTTTTTTTTTTTTTTTTTTTTTTHHHHHHHHH     HHHHHHHHHUUUUUUUU     UUUUUUUU       GGGGGGGGGGGGG     PPPPPPPPPPPPPPPPP   UUUUUUUU     UUUUUUUU       GGGGGGGGGGGGG   SSSSSSSSSSSSSSS
T:::::::::::::::::::::TH:::::::H     H:::::::HU::::::U     U::::::U    GGG::::::::::::G     P::::::::::::::::P  U::::::U     U::::::U    GGG::::::::::::G SS:::::::::::::::S
T:::::::::::::::::::::TH:::::::H     H:::::::HU::::::U     U::::::U  GG:::::::::::::::G     P::::::PPPPPP:::::P U::::::U     U::::::U  GG:::::::::::::::GS:::::SSSSSS::::::S
T:::::TT:::::::TT:::::THH::::::H     H::::::HHUU:::::U     U:::::UU G:::::GGGGGGGG::::G     PP:::::P     P:::::PUU:::::U     U:::::UU G:::::GGGGGGGG::::GS:::::S     SSSSSSS
TTTTTT  T:::::T  TTTTTT  H:::::H     H:::::H   U:::::U     U:::::U G:::::G       GGGGGG       P::::P     P:::::P U:::::U     U:::::U G:::::G       GGGGGGS:::::S
        T:::::T          H:::::H     H:::::H   U:::::D     D:::::UG:::::G                     P::::P     P:::::P U:::::D     D:::::UG:::::G              S:::::S
        T:::::T          H::::::HHHHH::::::H   U:::::D     D:::::UG:::::G                     P::::PPPPPP:::::P  U:::::D     D:::::UG:::::G               S::::SSSS
        T:::::T          H:::::::::::::::::H   U:::::D     D:::::UG:::::G    GGGGGGGGGG       P:::::::::::::PP   U:::::D     D:::::UG:::::G    GGGGGGGGGG  SS::::::SSSSS
        T:::::T          H:::::::::::::::::H   U:::::D     D:::::UG:::::G    G::::::::G       P::::PPPPPPPPP     U:::::D     D:::::UG:::::G    G::::::::G    SSS::::::::SS
        T:::::T          H::::::HHHHH::::::H   U:::::D     D:::::UG:::::G    GGGGG::::G       P::::P             U:::::D     D:::::UG:::::G    GGGGG::::G       SSSSSS::::S
        T:::::T          H:::::H     H:::::H   U:::::D     D:::::UG:::::G        G::::G       P::::P             U:::::D     D:::::UG:::::G        G::::G            S:::::S
        T:::::T          H:::::H     H:::::H   U::::::U   U::::::U G:::::G       G::::G       P::::P             U::::::U   U::::::U G:::::G       G::::G            S:::::S
      TT:::::::TT      HH::::::H     H::::::HH U:::::::UUU:::::::U  G:::::GGGGGGGG::::G     PP::::::PP           U:::::::UUU:::::::U  G:::::GGGGGGGG::::GSSSSSSS     S:::::S
      T:::::::::T      H:::::::H     H:::::::H  UU:::::::::::::UU    GG:::::::::::::::G     P::::::::P            UU:::::::::::::UU    GG:::::::::::::::GS::::::SSSSSS:::::S
      T:::::::::T      H:::::::H     H:::::::H    UU:::::::::UU        GGG::::::GGG:::G     P::::::::P              UU:::::::::UU        GGG::::::GGG:::GS:::::::::::::::SS
      TTTTTTTTTTT      HHHHHHHHH     HHHHHHHHH      UUUUUUUUU             GGGGGG   GGGG     PPPPPPPPPP                UUUUUUUUU             GGGGGG   GGGG SSSSSSSSSSSSSSS
*/

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
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) {
        unchecked {
            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) {
        unchecked {
            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) {
        unchecked {
            // 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) {
        unchecked {
            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) {
        unchecked {
            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) {
        return a + b;
    }

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

    /**
     * @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.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        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) {
        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) {
        unchecked {
            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.
     *
     * 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).
     *
     * 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) {
        unchecked {
            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) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}


pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant alphabet = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = alphabet[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

}

pragma solidity ^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);
            }
        }
    }
}

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);
}

pragma solidity ^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);
}


pragma solidity ^0.8.0;

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}


pragma solidity ^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;
}

pragma solidity ^0.8.0;

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

pragma solidity ^0.8.0;

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {

    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}




pragma solidity ^0.8.0;

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

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

pragma solidity ^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 () {
        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;
    }
}


pragma solidity ^0.8.0;

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping (uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping (address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping (uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping (address => mapping (address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor (string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IERC721).interfaceId
            || interfaceId == type(IERC721Metadata).interfaceId
            || super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0
            ? string(abi.encodePacked(baseURI, tokenId.toString()))
            : '';
    }

    /**
     * @dev Base URI for computing {tokenURI}. Empty by default, can be overriden
     * in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(address from, address to, uint256 tokenId) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @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.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual {
        _mint(to, tokenId);
        require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(address from, address to, uint256 tokenId) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)
        private returns (bool)
    {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver(to).onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    // solhint-disable-next-line no-inline-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { }
}

pragma solidity ^0.8.0;

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
        return interfaceId == type(IERC721Enumerable).interfaceId
            || super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

pragma solidity ^0.8.0;


contract ThugPugs is ERC721Enumerable, Ownable {
    using SafeMath for uint256;
    using Address for address;
    using Strings for uint256;

    // The price of the NFT
    uint256 public constant NFT_PRICE = 70000000000000000; // 0.07 ETH

    // Maximum amount per transaction to be minted
    uint public constant MAX_NFT_PURCHASE = 5;

    // Maximum number of tokens that can be minted in presale / address
    uint public constant MAX_NFT_PURCHASE_PRESALE = 2;

    // Maximum tokens supply
    uint256 public MAX_SUPPLY = 7777;

    // Is sale active
    bool public saleIsActive = false;

    // Is presale active
    bool public presaleIsActive = false;

    // Number of tokens reserved for the team
    uint256 public teamReserve = 111;

    // Faciliating the needed functionality for the presale
    mapping(address => bool) _allowList;
    mapping(address => uint256) _allowListToClaim;
    mapping(address => uint256) _allowListClaimed;

    bool public isMetadataLocked = false;

    string private _baseURIExtended;
    mapping (uint256 => string) _tokenURIs;

    constructor() ERC721("Thug Pugs", "THUGPUGS") {}

    // Presale functions
    function addSilverTierToWhitelist(address[] memory addresses) public onlyOwner {
        for (uint256 i = 0; i < addresses.length; i++) {
          require(addresses[i] != address(0), "Can't add the null address");

          _allowList[addresses[i]] = true;
          _allowListToClaim[addresses[i]] = 1;
        }
    }

    function addGoldTierToWhitelist(address[] memory addresses) public onlyOwner {
        for (uint256 i = 0; i < addresses.length; i++) {
          require(addresses[i] != address(0), "Can't add the null address");

          _allowList[addresses[i]] = true;
          _allowListToClaim[addresses[i]] = 2;
        }
    }

    function isWhitelisted (address addr) public view returns (bool) {
        return _allowList[addr];
    }

    function removeFromWhitelist(address[] calldata addresses) external onlyOwner {
        for (uint256 i = 0; i < addresses.length; i++) {
          require(addresses[i] != address(0), "Can't add the null address");
          _allowList[addresses[i]] = false;
          _allowListToClaim[addresses[i]] = 0;
        }
    }

    function whitelistToClaimBy(address owner) external view returns (uint256){
        require(owner != address(0), 'Zero address not on Allow List');

        return _allowListToClaim[owner];
    }

    function whitelistClaimedBy(address owner) external view returns (uint256){
        require(owner != address(0), 'Zero address not on Allow List');

        return _allowListClaimed[owner];
    }

    function flipSaleState() public onlyOwner {
        saleIsActive = !saleIsActive;
    }

    function lockMetadata() public onlyOwner {
        isMetadataLocked = true;
    }

    function flipPresaleState() public onlyOwner {
        presaleIsActive = !presaleIsActive;
    }

    // Withdraw the contract $ in the deployer
    function withdraw() public onlyOwner {
        uint balance = address(this).balance;
        payable(msg.sender).transfer(balance);
    }

    // Reserve for the team
    function reserve(address _to, uint256 _reserveAmount)
        public
        onlyOwner
    {
        uint256 supply = totalSupply();
        require(
            _reserveAmount > 0 && _reserveAmount <= teamReserve,
            "Not enough reserve left for team"
        );
        for (uint256 i = 0; i < _reserveAmount; i++) {
            _safeMint(_to, supply + i);
        }
        teamReserve = teamReserve.sub(_reserveAmount);
    }

    function mint(uint numberOfTokens) public payable {
        require(saleIsActive, "Sale is not active at the moment");
        require(numberOfTokens > 0, "Number of tokens can not be less than or equal to 0");
        require(totalSupply().add(numberOfTokens) <= MAX_SUPPLY.sub(teamReserve), "Purchase would exceed max supply");
        require(numberOfTokens <= MAX_NFT_PURCHASE, "Can only mint up to 5 per purchase");
        require(NFT_PRICE.mul(numberOfTokens) <= msg.value, "Sent ether value is incorrect");

        for (uint i = 0; i < numberOfTokens; i++) {
            _safeMint(msg.sender, totalSupply());
        }
    }

    function mintPresale(uint numberOfTokens) public payable {
        require(presaleIsActive, "Presale is not active at the moment");
        require(_allowList[msg.sender] == true, "This address is not whitelisted for the presale.");
        require(_allowListClaimed[msg.sender] + numberOfTokens <= MAX_NFT_PURCHASE_PRESALE, "Exceeds supply of presale you can mint.");
        require(_allowListClaimed[msg.sender] + numberOfTokens <= _allowListToClaim[msg.sender], "Exceeds supply of presale you can mint.");
        require(numberOfTokens > 0, "Number of tokens can not be less than or equal to 0");
        require(NFT_PRICE.mul(numberOfTokens) <= msg.value, "Sent ether value is incorrect");

        for (uint i = 0; i < numberOfTokens; i++) {
            _safeMint(msg.sender,  totalSupply());
        }


        _allowListClaimed[msg.sender] += numberOfTokens;
    }

    function _baseURI() internal view virtual override returns (string memory) {
        return _baseURIExtended;
    }

    function setBaseURI(string memory baseURI_) external onlyOwner {
        require(!isMetadataLocked,"Metadata is locked");
        _baseURIExtended = baseURI_;
    }

    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory _tokenURI = _tokenURIs[tokenId];
        string memory base = _baseURI();

        // If there is no base URI, return the token URI.
        if (bytes(base).length == 0) {
            return _tokenURI;
        }
        // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
        if (bytes(_tokenURI).length > 0) {
            return string(abi.encodePacked(base, _tokenURI));
        }
        // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.
        return string(abi.encodePacked(base, tokenId.toString()));
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MAX_NFT_PURCHASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_NFT_PURCHASE_PRESALE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NFT_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"addGoldTierToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"addSilverTierToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flipPresaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMetadataLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"mintPresale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"removeFromWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_reserveAmount","type":"uint256"}],"name":"reserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"teamReserve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"whitelistClaimedBy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"whitelistToClaimBy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052611e61600b55600c805461ffff19169055606f600d556011805460ff191690553480156200003157600080fd5b50604080518082018252600981526854687567205075677360b81b602080830191825283518085019094526008845267544855475055475360c01b908401528151919291620000839160009162000106565b5080516200009990600190602084019062000106565b5050506000620000ae6200010260201b60201c565b600a80546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350620001e9565b3390565b8280546200011490620001ac565b90600052602060002090601f01602090048101928262000138576000855562000183565b82601f106200015357805160ff191683800117855562000183565b8280016001018555821562000183579182015b828111156200018357825182559160200191906001019062000166565b506200019192915062000195565b5090565b5b8082111562000191576000815560010162000196565b600181811c90821680620001c157607f821691505b60208210811415620001e357634e487b7160e01b600052602260045260246000fd5b50919050565b612c7180620001f96000396000f3fe6080604052600436106101e65760003560e01c80636352211e116101095780636352211e14610482578063676dd563146104a257806370a08231146104bd578063715018a6146104dd578063725336ae146104f25780638da5cb5b1461051257806395d89b4114610527578063989bdbb61461053c578063a06a513f14610551578063a0712d6814610566578063a22cb46514610579578063b88d4fde14610599578063c87b56dd146105b9578063cc47a40b146105d9578063cfcea6b9146105f9578063d7e45cd714610619578063e985e9c514610633578063eb8d244414610653578063f2fde38b1461066d578063f759867a1461068d578063f81227d4146106a057600080fd5b806301ffc9a7146101eb578063020b39cc1461022057806306fdde0314610243578063081812fc14610265578063095ea7b31461029d57806318160ddd146102bf57806323b872dd146102d45780632f745c59146102f457806330f72cd41461031457806332cb6b0c14610333578063340ee37c1461034957806334918dfd1461036957806334a24ea11461037e5780633af32abf1461039e5780633ccfd60b146103d757806342842e0e146103ec5780634287f14a1461040c5780634f6ccce714610422578063548db1741461044257806355f804b314610462575b600080fd5b3480156101f757600080fd5b5061020b61020636600461244d565b6106b5565b60405190151581526020015b60405180910390f35b34801561022c57600080fd5b50610235600581565b604051908152602001610217565b34801561024f57600080fd5b506102586106e0565b60405161021791906124c2565b34801561027157600080fd5b506102856102803660046124d5565b610772565b6040516001600160a01b039091168152602001610217565b3480156102a957600080fd5b506102bd6102b836600461250a565b6107ff565b005b3480156102cb57600080fd5b50600854610235565b3480156102e057600080fd5b506102bd6102ef366004612534565b610910565b34801561030057600080fd5b5061023561030f36600461250a565b610941565b34801561032057600080fd5b50600c5461020b90610100900460ff1681565b34801561033f57600080fd5b50610235600b5481565b34801561035557600080fd5b50610235610364366004612570565b6109d7565b34801561037557600080fd5b506102bd610a1b565b34801561038a57600080fd5b506102bd6103993660046125d1565b610a5e565b3480156103aa57600080fd5b5061020b6103b9366004612570565b6001600160a01b03166000908152600e602052604090205460ff1690565b3480156103e357600080fd5b506102bd610b97565b3480156103f857600080fd5b506102bd610407366004612534565b610bf5565b34801561041857600080fd5b50610235600d5481565b34801561042e57600080fd5b5061023561043d3660046124d5565b610c10565b34801561044e57600080fd5b506102bd61045d36600461267d565b610ca3565b34801561046e57600080fd5b506102bd61047d366004612748565b610ddb565b34801561048e57600080fd5b5061028561049d3660046124d5565b610e65565b3480156104ae57600080fd5b5061023566f8b0a10e47000081565b3480156104c957600080fd5b506102356104d8366004612570565b610edc565b3480156104e957600080fd5b506102bd610f63565b3480156104fe57600080fd5b506102bd61050d3660046125d1565b610fdc565b34801561051e57600080fd5b50610285611111565b34801561053357600080fd5b50610258611120565b34801561054857600080fd5b506102bd61112f565b34801561055d57600080fd5b50610235600281565b6102bd6105743660046124d5565b61116d565b34801561058557600080fd5b506102bd610594366004612790565b61130a565b3480156105a557600080fd5b506102bd6105b43660046127cc565b6113cb565b3480156105c557600080fd5b506102586105d43660046124d5565b611403565b3480156105e557600080fd5b506102bd6105f436600461250a565b611575565b34801561060557600080fd5b50610235610614366004612570565b611650565b34801561062557600080fd5b5060115461020b9060ff1681565b34801561063f57600080fd5b5061020b61064e366004612847565b611694565b34801561065f57600080fd5b50600c5461020b9060ff1681565b34801561067957600080fd5b506102bd610688366004612570565b6116c2565b6102bd61069b3660046124d5565b6117b2565b3480156106ac57600080fd5b506102bd6119b5565b60006001600160e01b0319821663780e9d6360e01b14806106da57506106da82611a01565b92915050565b6060600080546106ef9061287a565b80601f016020809104026020016040519081016040528092919081815260200182805461071b9061287a565b80156107685780601f1061073d57610100808354040283529160200191610768565b820191906000526020600020905b81548152906001019060200180831161074b57829003601f168201915b5050505050905090565b600061077d82611a51565b6107e35760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061080a82610e65565b9050806001600160a01b0316836001600160a01b031614156108785760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016107da565b336001600160a01b038216148061089457506108948133611694565b6109015760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b60648201526084016107da565b61090b8383611a6e565b505050565b61091a3382611adc565b6109365760405162461bcd60e51b81526004016107da906128b5565b61090b838383611ba6565b600061094c83610edc565b82106109ae5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016107da565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b60006001600160a01b0382166109ff5760405162461bcd60e51b81526004016107da90612906565b506001600160a01b031660009081526010602052604090205490565b33610a24611111565b6001600160a01b031614610a4a5760405162461bcd60e51b81526004016107da9061293d565b600c805460ff19811660ff90911615179055565b33610a67611111565b6001600160a01b031614610a8d5760405162461bcd60e51b81526004016107da9061293d565b60005b8151811015610b935760006001600160a01b0316828281518110610ab657610ab6612972565b60200260200101516001600160a01b03161415610ae55760405162461bcd60e51b81526004016107da90612988565b6001600e6000848481518110610afd57610afd612972565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055506002600f6000848481518110610b5457610b54612972565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055508080610b8b906129d2565b915050610a90565b5050565b33610ba0611111565b6001600160a01b031614610bc65760405162461bcd60e51b81526004016107da9061293d565b6040514790339082156108fc029083906000818181858888f19350505050158015610b93573d6000803e3d6000fd5b61090b838383604051806020016040528060008152506113cb565b6000610c1b60085490565b8210610c7e5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016107da565b60088281548110610c9157610c91612972565b90600052602060002001549050919050565b33610cac611111565b6001600160a01b031614610cd25760405162461bcd60e51b81526004016107da9061293d565b60005b8181101561090b576000838383818110610cf157610cf1612972565b9050602002016020810190610d069190612570565b6001600160a01b03161415610d2d5760405162461bcd60e51b81526004016107da90612988565b6000600e6000858585818110610d4557610d45612972565b9050602002016020810190610d5a9190612570565b6001600160a01b0316815260208101919091526040016000908120805460ff191692151592909217909155600f81858585818110610d9a57610d9a612972565b9050602002016020810190610daf9190612570565b6001600160a01b0316815260208101919091526040016000205580610dd3816129d2565b915050610cd5565b33610de4611111565b6001600160a01b031614610e0a5760405162461bcd60e51b81526004016107da9061293d565b60115460ff1615610e525760405162461bcd60e51b815260206004820152601260248201527113595d1859185d18481a5cc81b1bd8dad95960721b60448201526064016107da565b8051610b9390601290602084019061239b565b6000818152600260205260408120546001600160a01b0316806106da5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016107da565b60006001600160a01b038216610f475760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016107da565b506001600160a01b031660009081526003602052604090205490565b33610f6c611111565b6001600160a01b031614610f925760405162461bcd60e51b81526004016107da9061293d565b600a546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600a80546001600160a01b0319169055565b33610fe5611111565b6001600160a01b03161461100b5760405162461bcd60e51b81526004016107da9061293d565b60005b8151811015610b935760006001600160a01b031682828151811061103457611034612972565b60200260200101516001600160a01b031614156110635760405162461bcd60e51b81526004016107da90612988565b6001600e600084848151811061107b5761107b612972565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600f60008484815181106110d2576110d2612972565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055508080611109906129d2565b91505061100e565b600a546001600160a01b031690565b6060600180546106ef9061287a565b33611138611111565b6001600160a01b03161461115e5760405162461bcd60e51b81526004016107da9061293d565b6011805460ff19166001179055565b600c5460ff166111bf5760405162461bcd60e51b815260206004820181905260248201527f53616c65206973206e6f742061637469766520617420746865206d6f6d656e7460448201526064016107da565b600081116111df5760405162461bcd60e51b81526004016107da906129ed565b600d54600b546111ee91611d51565b611201826111fb60085490565b90611d64565b111561124f5760405162461bcd60e51b815260206004820181905260248201527f507572636861736520776f756c6420657863656564206d617820737570706c7960448201526064016107da565b60058111156112ab5760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c79206d696e7420757020746f20352070657220707572636861604482015261736560f01b60648201526084016107da565b346112bd66f8b0a10e47000083611d70565b11156112db5760405162461bcd60e51b81526004016107da90612a40565b60005b81811015610b93576112f8336112f360085490565b611d7c565b80611302816129d2565b9150506112de565b6001600160a01b03821633141561135f5760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b60448201526064016107da565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6113d53383611adc565b6113f15760405162461bcd60e51b81526004016107da906128b5565b6113fd84848484611d96565b50505050565b606061140e82611a51565b6114725760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016107da565b6000828152601360205260408120805461148b9061287a565b80601f01602080910402602001604051908101604052809291908181526020018280546114b79061287a565b80156115045780601f106114d957610100808354040283529160200191611504565b820191906000526020600020905b8154815290600101906020018083116114e757829003601f168201915b505050505090506000611515611dc9565b9050805160001415611528575092915050565b81511561155a578082604051602001611542929190612a77565b60405160208183030381529060405292505050919050565b8061156485611dd8565b604051602001611542929190612a77565b3361157e611111565b6001600160a01b0316146115a45760405162461bcd60e51b81526004016107da9061293d565b60006115af60085490565b90506000821180156115c35750600d548211155b61160f5760405162461bcd60e51b815260206004820181905260248201527f4e6f7420656e6f7567682072657365727665206c65667420666f72207465616d60448201526064016107da565b60005b8281101561163a57611628846112f38385612aa6565b80611632816129d2565b915050611612565b50600d546116489083611d51565b600d55505050565b60006001600160a01b0382166116785760405162461bcd60e51b81526004016107da90612906565b506001600160a01b03166000908152600f602052604090205490565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b336116cb611111565b6001600160a01b0316146116f15760405162461bcd60e51b81526004016107da9061293d565b6001600160a01b0381166117565760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107da565b600a546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600a80546001600160a01b0319166001600160a01b0392909216919091179055565b600c54610100900460ff166118155760405162461bcd60e51b815260206004820152602360248201527f50726573616c65206973206e6f742061637469766520617420746865206d6f6d604482015262195b9d60ea1b60648201526084016107da565b336000908152600e602052604090205460ff1615156001146118925760405162461bcd60e51b815260206004820152603060248201527f546869732061646472657373206973206e6f742077686974656c69737465642060448201526f3337b9103a343290383932b9b0b6329760811b60648201526084016107da565b336000908152601060205260409020546002906118b0908390612aa6565b11156118ce5760405162461bcd60e51b81526004016107da90612abe565b336000908152600f60209081526040808320546010909252909120546118f5908390612aa6565b11156119135760405162461bcd60e51b81526004016107da90612abe565b600081116119335760405162461bcd60e51b81526004016107da906129ed565b3461194566f8b0a10e47000083611d70565b11156119635760405162461bcd60e51b81526004016107da90612a40565b60005b8181101561198d5761197b336112f360085490565b80611985816129d2565b915050611966565b5033600090815260106020526040812080548392906119ad908490612aa6565b909155505050565b336119be611111565b6001600160a01b0316146119e45760405162461bcd60e51b81526004016107da9061293d565b600c805461ff001981166101009182900460ff1615909102179055565b60006001600160e01b031982166380ac58cd60e01b1480611a3257506001600160e01b03198216635b5e139f60e01b145b806106da57506301ffc9a760e01b6001600160e01b03198316146106da565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611aa382610e65565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611ae782611a51565b611b485760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016107da565b6000611b5383610e65565b9050806001600160a01b0316846001600160a01b03161480611b8e5750836001600160a01b0316611b8384610772565b6001600160a01b0316145b80611b9e5750611b9e8185611694565b949350505050565b826001600160a01b0316611bb982610e65565b6001600160a01b031614611c215760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016107da565b6001600160a01b038216611c835760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016107da565b611c8e838383611ed5565b611c99600082611a6e565b6001600160a01b0383166000908152600360205260408120805460019290611cc2908490612b05565b90915550506001600160a01b0382166000908152600360205260408120805460019290611cf0908490612aa6565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000611d5d8284612b05565b9392505050565b6000611d5d8284612aa6565b6000611d5d8284612b1c565b610b93828260405180602001604052806000815250611f8d565b611da1848484611ba6565b611dad84848484611fc0565b6113fd5760405162461bcd60e51b81526004016107da90612b3b565b6060601280546106ef9061287a565b606081611dfc5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611e265780611e10816129d2565b9150611e1f9050600a83612ba3565b9150611e00565b6000816001600160401b03811115611e4057611e4061258b565b6040519080825280601f01601f191660200182016040528015611e6a576020820181803683370190505b5090505b8415611b9e57611e7f600183612b05565b9150611e8c600a86612bb7565b611e97906030612aa6565b60f81b818381518110611eac57611eac612972565b60200101906001600160f81b031916908160001a905350611ece600a86612ba3565b9450611e6e565b6001600160a01b038316611f3057611f2b81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b611f53565b816001600160a01b0316836001600160a01b031614611f5357611f5383826120cd565b6001600160a01b038216611f6a5761090b8161216a565b826001600160a01b0316826001600160a01b03161461090b5761090b8282612219565b611f97838361225d565b611fa46000848484611fc0565b61090b5760405162461bcd60e51b81526004016107da90612b3b565b60006001600160a01b0384163b156120c257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612004903390899088908890600401612bcb565b602060405180830381600087803b15801561201e57600080fd5b505af192505050801561204e575060408051601f3d908101601f1916820190925261204b91810190612c08565b60015b6120a8573d80801561207c576040519150601f19603f3d011682016040523d82523d6000602084013e612081565b606091505b5080516120a05760405162461bcd60e51b81526004016107da90612b3b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611b9e565b506001949350505050565b600060016120da84610edc565b6120e49190612b05565b600083815260076020526040902054909150808214612137576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061217c90600190612b05565b600083815260096020526040812054600880549394509092849081106121a4576121a4612972565b9060005260206000200154905080600883815481106121c5576121c5612972565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806121fd576121fd612c25565b6001900381819060005260206000200160009055905550505050565b600061222483610edc565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b0382166122b35760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016107da565b6122bc81611a51565b156123085760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b60448201526064016107da565b61231460008383611ed5565b6001600160a01b038216600090815260036020526040812080546001929061233d908490612aa6565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546123a79061287a565b90600052602060002090601f0160209004810192826123c9576000855561240f565b82601f106123e257805160ff191683800117855561240f565b8280016001018555821561240f579182015b8281111561240f5782518255916020019190600101906123f4565b5061241b92915061241f565b5090565b5b8082111561241b5760008155600101612420565b6001600160e01b03198116811461244a57600080fd5b50565b60006020828403121561245f57600080fd5b8135611d5d81612434565b60005b8381101561248557818101518382015260200161246d565b838111156113fd5750506000910152565b600081518084526124ae81602086016020860161246a565b601f01601f19169290920160200192915050565b602081526000611d5d6020830184612496565b6000602082840312156124e757600080fd5b5035919050565b80356001600160a01b038116811461250557600080fd5b919050565b6000806040838503121561251d57600080fd5b612526836124ee565b946020939093013593505050565b60008060006060848603121561254957600080fd5b612552846124ee565b9250612560602085016124ee565b9150604084013590509250925092565b60006020828403121561258257600080fd5b611d5d826124ee565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156125c9576125c961258b565b604052919050565b600060208083850312156125e457600080fd5b82356001600160401b03808211156125fb57600080fd5b818501915085601f83011261260f57600080fd5b8135818111156126215761262161258b565b8060051b91506126328483016125a1565b818152918301840191848101908884111561264c57600080fd5b938501935b8385101561267157612662856124ee565b82529385019390850190612651565b98975050505050505050565b6000806020838503121561269057600080fd5b82356001600160401b03808211156126a757600080fd5b818501915085601f8301126126bb57600080fd5b8135818111156126ca57600080fd5b8660208260051b85010111156126df57600080fd5b60209290920196919550909350505050565b60006001600160401b0383111561270a5761270a61258b565b61271d601f8401601f19166020016125a1565b905082815283838301111561273157600080fd5b828260208301376000602084830101529392505050565b60006020828403121561275a57600080fd5b81356001600160401b0381111561277057600080fd5b8201601f8101841361278157600080fd5b611b9e848235602084016126f1565b600080604083850312156127a357600080fd5b6127ac836124ee565b9150602083013580151581146127c157600080fd5b809150509250929050565b600080600080608085870312156127e257600080fd5b6127eb856124ee565b93506127f9602086016124ee565b92506040850135915060608501356001600160401b0381111561281b57600080fd5b8501601f8101871361282c57600080fd5b61283b878235602084016126f1565b91505092959194509250565b6000806040838503121561285a57600080fd5b612863836124ee565b9150612871602084016124ee565b90509250929050565b600181811c9082168061288e57607f821691505b602082108114156128af57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252601e908201527f5a65726f2061646472657373206e6f74206f6e20416c6c6f77204c6973740000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6020808252601a908201527943616e27742061646420746865206e756c6c206164647265737360301b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006000198214156129e6576129e66129bc565b5060010190565b60208082526033908201527f4e756d626572206f6620746f6b656e732063616e206e6f74206265206c6573736040820152720207468616e206f7220657175616c20746f203606c1b606082015260800190565b6020808252601d908201527f53656e742065746865722076616c756520697320696e636f7272656374000000604082015260600190565b60008351612a8981846020880161246a565b835190830190612a9d81836020880161246a565b01949350505050565b60008219821115612ab957612ab96129bc565b500190565b60208082526027908201527f4578636565647320737570706c79206f662070726573616c6520796f75206361604082015266371036b4b73a1760c91b606082015260800190565b600082821015612b1757612b176129bc565b500390565b6000816000190483118215151615612b3657612b366129bc565b500290565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612bb257612bb2612b8d565b500490565b600082612bc657612bc6612b8d565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612bfe90830184612496565b9695505050505050565b600060208284031215612c1a57600080fd5b8151611d5d81612434565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220c64f90c9f75472a433bc2a435bfe5a49fd1139d7b152481f9cfd17e24c6d4bb564736f6c63430008090033

Deployed Bytecode

0x6080604052600436106101e65760003560e01c80636352211e116101095780636352211e14610482578063676dd563146104a257806370a08231146104bd578063715018a6146104dd578063725336ae146104f25780638da5cb5b1461051257806395d89b4114610527578063989bdbb61461053c578063a06a513f14610551578063a0712d6814610566578063a22cb46514610579578063b88d4fde14610599578063c87b56dd146105b9578063cc47a40b146105d9578063cfcea6b9146105f9578063d7e45cd714610619578063e985e9c514610633578063eb8d244414610653578063f2fde38b1461066d578063f759867a1461068d578063f81227d4146106a057600080fd5b806301ffc9a7146101eb578063020b39cc1461022057806306fdde0314610243578063081812fc14610265578063095ea7b31461029d57806318160ddd146102bf57806323b872dd146102d45780632f745c59146102f457806330f72cd41461031457806332cb6b0c14610333578063340ee37c1461034957806334918dfd1461036957806334a24ea11461037e5780633af32abf1461039e5780633ccfd60b146103d757806342842e0e146103ec5780634287f14a1461040c5780634f6ccce714610422578063548db1741461044257806355f804b314610462575b600080fd5b3480156101f757600080fd5b5061020b61020636600461244d565b6106b5565b60405190151581526020015b60405180910390f35b34801561022c57600080fd5b50610235600581565b604051908152602001610217565b34801561024f57600080fd5b506102586106e0565b60405161021791906124c2565b34801561027157600080fd5b506102856102803660046124d5565b610772565b6040516001600160a01b039091168152602001610217565b3480156102a957600080fd5b506102bd6102b836600461250a565b6107ff565b005b3480156102cb57600080fd5b50600854610235565b3480156102e057600080fd5b506102bd6102ef366004612534565b610910565b34801561030057600080fd5b5061023561030f36600461250a565b610941565b34801561032057600080fd5b50600c5461020b90610100900460ff1681565b34801561033f57600080fd5b50610235600b5481565b34801561035557600080fd5b50610235610364366004612570565b6109d7565b34801561037557600080fd5b506102bd610a1b565b34801561038a57600080fd5b506102bd6103993660046125d1565b610a5e565b3480156103aa57600080fd5b5061020b6103b9366004612570565b6001600160a01b03166000908152600e602052604090205460ff1690565b3480156103e357600080fd5b506102bd610b97565b3480156103f857600080fd5b506102bd610407366004612534565b610bf5565b34801561041857600080fd5b50610235600d5481565b34801561042e57600080fd5b5061023561043d3660046124d5565b610c10565b34801561044e57600080fd5b506102bd61045d36600461267d565b610ca3565b34801561046e57600080fd5b506102bd61047d366004612748565b610ddb565b34801561048e57600080fd5b5061028561049d3660046124d5565b610e65565b3480156104ae57600080fd5b5061023566f8b0a10e47000081565b3480156104c957600080fd5b506102356104d8366004612570565b610edc565b3480156104e957600080fd5b506102bd610f63565b3480156104fe57600080fd5b506102bd61050d3660046125d1565b610fdc565b34801561051e57600080fd5b50610285611111565b34801561053357600080fd5b50610258611120565b34801561054857600080fd5b506102bd61112f565b34801561055d57600080fd5b50610235600281565b6102bd6105743660046124d5565b61116d565b34801561058557600080fd5b506102bd610594366004612790565b61130a565b3480156105a557600080fd5b506102bd6105b43660046127cc565b6113cb565b3480156105c557600080fd5b506102586105d43660046124d5565b611403565b3480156105e557600080fd5b506102bd6105f436600461250a565b611575565b34801561060557600080fd5b50610235610614366004612570565b611650565b34801561062557600080fd5b5060115461020b9060ff1681565b34801561063f57600080fd5b5061020b61064e366004612847565b611694565b34801561065f57600080fd5b50600c5461020b9060ff1681565b34801561067957600080fd5b506102bd610688366004612570565b6116c2565b6102bd61069b3660046124d5565b6117b2565b3480156106ac57600080fd5b506102bd6119b5565b60006001600160e01b0319821663780e9d6360e01b14806106da57506106da82611a01565b92915050565b6060600080546106ef9061287a565b80601f016020809104026020016040519081016040528092919081815260200182805461071b9061287a565b80156107685780601f1061073d57610100808354040283529160200191610768565b820191906000526020600020905b81548152906001019060200180831161074b57829003601f168201915b5050505050905090565b600061077d82611a51565b6107e35760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061080a82610e65565b9050806001600160a01b0316836001600160a01b031614156108785760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016107da565b336001600160a01b038216148061089457506108948133611694565b6109015760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b60648201526084016107da565b61090b8383611a6e565b505050565b61091a3382611adc565b6109365760405162461bcd60e51b81526004016107da906128b5565b61090b838383611ba6565b600061094c83610edc565b82106109ae5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016107da565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b60006001600160a01b0382166109ff5760405162461bcd60e51b81526004016107da90612906565b506001600160a01b031660009081526010602052604090205490565b33610a24611111565b6001600160a01b031614610a4a5760405162461bcd60e51b81526004016107da9061293d565b600c805460ff19811660ff90911615179055565b33610a67611111565b6001600160a01b031614610a8d5760405162461bcd60e51b81526004016107da9061293d565b60005b8151811015610b935760006001600160a01b0316828281518110610ab657610ab6612972565b60200260200101516001600160a01b03161415610ae55760405162461bcd60e51b81526004016107da90612988565b6001600e6000848481518110610afd57610afd612972565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055506002600f6000848481518110610b5457610b54612972565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055508080610b8b906129d2565b915050610a90565b5050565b33610ba0611111565b6001600160a01b031614610bc65760405162461bcd60e51b81526004016107da9061293d565b6040514790339082156108fc029083906000818181858888f19350505050158015610b93573d6000803e3d6000fd5b61090b838383604051806020016040528060008152506113cb565b6000610c1b60085490565b8210610c7e5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016107da565b60088281548110610c9157610c91612972565b90600052602060002001549050919050565b33610cac611111565b6001600160a01b031614610cd25760405162461bcd60e51b81526004016107da9061293d565b60005b8181101561090b576000838383818110610cf157610cf1612972565b9050602002016020810190610d069190612570565b6001600160a01b03161415610d2d5760405162461bcd60e51b81526004016107da90612988565b6000600e6000858585818110610d4557610d45612972565b9050602002016020810190610d5a9190612570565b6001600160a01b0316815260208101919091526040016000908120805460ff191692151592909217909155600f81858585818110610d9a57610d9a612972565b9050602002016020810190610daf9190612570565b6001600160a01b0316815260208101919091526040016000205580610dd3816129d2565b915050610cd5565b33610de4611111565b6001600160a01b031614610e0a5760405162461bcd60e51b81526004016107da9061293d565b60115460ff1615610e525760405162461bcd60e51b815260206004820152601260248201527113595d1859185d18481a5cc81b1bd8dad95960721b60448201526064016107da565b8051610b9390601290602084019061239b565b6000818152600260205260408120546001600160a01b0316806106da5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016107da565b60006001600160a01b038216610f475760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016107da565b506001600160a01b031660009081526003602052604090205490565b33610f6c611111565b6001600160a01b031614610f925760405162461bcd60e51b81526004016107da9061293d565b600a546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600a80546001600160a01b0319169055565b33610fe5611111565b6001600160a01b03161461100b5760405162461bcd60e51b81526004016107da9061293d565b60005b8151811015610b935760006001600160a01b031682828151811061103457611034612972565b60200260200101516001600160a01b031614156110635760405162461bcd60e51b81526004016107da90612988565b6001600e600084848151811061107b5761107b612972565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600f60008484815181106110d2576110d2612972565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055508080611109906129d2565b91505061100e565b600a546001600160a01b031690565b6060600180546106ef9061287a565b33611138611111565b6001600160a01b03161461115e5760405162461bcd60e51b81526004016107da9061293d565b6011805460ff19166001179055565b600c5460ff166111bf5760405162461bcd60e51b815260206004820181905260248201527f53616c65206973206e6f742061637469766520617420746865206d6f6d656e7460448201526064016107da565b600081116111df5760405162461bcd60e51b81526004016107da906129ed565b600d54600b546111ee91611d51565b611201826111fb60085490565b90611d64565b111561124f5760405162461bcd60e51b815260206004820181905260248201527f507572636861736520776f756c6420657863656564206d617820737570706c7960448201526064016107da565b60058111156112ab5760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c79206d696e7420757020746f20352070657220707572636861604482015261736560f01b60648201526084016107da565b346112bd66f8b0a10e47000083611d70565b11156112db5760405162461bcd60e51b81526004016107da90612a40565b60005b81811015610b93576112f8336112f360085490565b611d7c565b80611302816129d2565b9150506112de565b6001600160a01b03821633141561135f5760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b60448201526064016107da565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6113d53383611adc565b6113f15760405162461bcd60e51b81526004016107da906128b5565b6113fd84848484611d96565b50505050565b606061140e82611a51565b6114725760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016107da565b6000828152601360205260408120805461148b9061287a565b80601f01602080910402602001604051908101604052809291908181526020018280546114b79061287a565b80156115045780601f106114d957610100808354040283529160200191611504565b820191906000526020600020905b8154815290600101906020018083116114e757829003601f168201915b505050505090506000611515611dc9565b9050805160001415611528575092915050565b81511561155a578082604051602001611542929190612a77565b60405160208183030381529060405292505050919050565b8061156485611dd8565b604051602001611542929190612a77565b3361157e611111565b6001600160a01b0316146115a45760405162461bcd60e51b81526004016107da9061293d565b60006115af60085490565b90506000821180156115c35750600d548211155b61160f5760405162461bcd60e51b815260206004820181905260248201527f4e6f7420656e6f7567682072657365727665206c65667420666f72207465616d60448201526064016107da565b60005b8281101561163a57611628846112f38385612aa6565b80611632816129d2565b915050611612565b50600d546116489083611d51565b600d55505050565b60006001600160a01b0382166116785760405162461bcd60e51b81526004016107da90612906565b506001600160a01b03166000908152600f602052604090205490565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b336116cb611111565b6001600160a01b0316146116f15760405162461bcd60e51b81526004016107da9061293d565b6001600160a01b0381166117565760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107da565b600a546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600a80546001600160a01b0319166001600160a01b0392909216919091179055565b600c54610100900460ff166118155760405162461bcd60e51b815260206004820152602360248201527f50726573616c65206973206e6f742061637469766520617420746865206d6f6d604482015262195b9d60ea1b60648201526084016107da565b336000908152600e602052604090205460ff1615156001146118925760405162461bcd60e51b815260206004820152603060248201527f546869732061646472657373206973206e6f742077686974656c69737465642060448201526f3337b9103a343290383932b9b0b6329760811b60648201526084016107da565b336000908152601060205260409020546002906118b0908390612aa6565b11156118ce5760405162461bcd60e51b81526004016107da90612abe565b336000908152600f60209081526040808320546010909252909120546118f5908390612aa6565b11156119135760405162461bcd60e51b81526004016107da90612abe565b600081116119335760405162461bcd60e51b81526004016107da906129ed565b3461194566f8b0a10e47000083611d70565b11156119635760405162461bcd60e51b81526004016107da90612a40565b60005b8181101561198d5761197b336112f360085490565b80611985816129d2565b915050611966565b5033600090815260106020526040812080548392906119ad908490612aa6565b909155505050565b336119be611111565b6001600160a01b0316146119e45760405162461bcd60e51b81526004016107da9061293d565b600c805461ff001981166101009182900460ff1615909102179055565b60006001600160e01b031982166380ac58cd60e01b1480611a3257506001600160e01b03198216635b5e139f60e01b145b806106da57506301ffc9a760e01b6001600160e01b03198316146106da565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611aa382610e65565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611ae782611a51565b611b485760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016107da565b6000611b5383610e65565b9050806001600160a01b0316846001600160a01b03161480611b8e5750836001600160a01b0316611b8384610772565b6001600160a01b0316145b80611b9e5750611b9e8185611694565b949350505050565b826001600160a01b0316611bb982610e65565b6001600160a01b031614611c215760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016107da565b6001600160a01b038216611c835760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016107da565b611c8e838383611ed5565b611c99600082611a6e565b6001600160a01b0383166000908152600360205260408120805460019290611cc2908490612b05565b90915550506001600160a01b0382166000908152600360205260408120805460019290611cf0908490612aa6565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000611d5d8284612b05565b9392505050565b6000611d5d8284612aa6565b6000611d5d8284612b1c565b610b93828260405180602001604052806000815250611f8d565b611da1848484611ba6565b611dad84848484611fc0565b6113fd5760405162461bcd60e51b81526004016107da90612b3b565b6060601280546106ef9061287a565b606081611dfc5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611e265780611e10816129d2565b9150611e1f9050600a83612ba3565b9150611e00565b6000816001600160401b03811115611e4057611e4061258b565b6040519080825280601f01601f191660200182016040528015611e6a576020820181803683370190505b5090505b8415611b9e57611e7f600183612b05565b9150611e8c600a86612bb7565b611e97906030612aa6565b60f81b818381518110611eac57611eac612972565b60200101906001600160f81b031916908160001a905350611ece600a86612ba3565b9450611e6e565b6001600160a01b038316611f3057611f2b81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b611f53565b816001600160a01b0316836001600160a01b031614611f5357611f5383826120cd565b6001600160a01b038216611f6a5761090b8161216a565b826001600160a01b0316826001600160a01b03161461090b5761090b8282612219565b611f97838361225d565b611fa46000848484611fc0565b61090b5760405162461bcd60e51b81526004016107da90612b3b565b60006001600160a01b0384163b156120c257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612004903390899088908890600401612bcb565b602060405180830381600087803b15801561201e57600080fd5b505af192505050801561204e575060408051601f3d908101601f1916820190925261204b91810190612c08565b60015b6120a8573d80801561207c576040519150601f19603f3d011682016040523d82523d6000602084013e612081565b606091505b5080516120a05760405162461bcd60e51b81526004016107da90612b3b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611b9e565b506001949350505050565b600060016120da84610edc565b6120e49190612b05565b600083815260076020526040902054909150808214612137576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061217c90600190612b05565b600083815260096020526040812054600880549394509092849081106121a4576121a4612972565b9060005260206000200154905080600883815481106121c5576121c5612972565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806121fd576121fd612c25565b6001900381819060005260206000200160009055905550505050565b600061222483610edc565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b0382166122b35760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016107da565b6122bc81611a51565b156123085760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b60448201526064016107da565b61231460008383611ed5565b6001600160a01b038216600090815260036020526040812080546001929061233d908490612aa6565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546123a79061287a565b90600052602060002090601f0160209004810192826123c9576000855561240f565b82601f106123e257805160ff191683800117855561240f565b8280016001018555821561240f579182015b8281111561240f5782518255916020019190600101906123f4565b5061241b92915061241f565b5090565b5b8082111561241b5760008155600101612420565b6001600160e01b03198116811461244a57600080fd5b50565b60006020828403121561245f57600080fd5b8135611d5d81612434565b60005b8381101561248557818101518382015260200161246d565b838111156113fd5750506000910152565b600081518084526124ae81602086016020860161246a565b601f01601f19169290920160200192915050565b602081526000611d5d6020830184612496565b6000602082840312156124e757600080fd5b5035919050565b80356001600160a01b038116811461250557600080fd5b919050565b6000806040838503121561251d57600080fd5b612526836124ee565b946020939093013593505050565b60008060006060848603121561254957600080fd5b612552846124ee565b9250612560602085016124ee565b9150604084013590509250925092565b60006020828403121561258257600080fd5b611d5d826124ee565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156125c9576125c961258b565b604052919050565b600060208083850312156125e457600080fd5b82356001600160401b03808211156125fb57600080fd5b818501915085601f83011261260f57600080fd5b8135818111156126215761262161258b565b8060051b91506126328483016125a1565b818152918301840191848101908884111561264c57600080fd5b938501935b8385101561267157612662856124ee565b82529385019390850190612651565b98975050505050505050565b6000806020838503121561269057600080fd5b82356001600160401b03808211156126a757600080fd5b818501915085601f8301126126bb57600080fd5b8135818111156126ca57600080fd5b8660208260051b85010111156126df57600080fd5b60209290920196919550909350505050565b60006001600160401b0383111561270a5761270a61258b565b61271d601f8401601f19166020016125a1565b905082815283838301111561273157600080fd5b828260208301376000602084830101529392505050565b60006020828403121561275a57600080fd5b81356001600160401b0381111561277057600080fd5b8201601f8101841361278157600080fd5b611b9e848235602084016126f1565b600080604083850312156127a357600080fd5b6127ac836124ee565b9150602083013580151581146127c157600080fd5b809150509250929050565b600080600080608085870312156127e257600080fd5b6127eb856124ee565b93506127f9602086016124ee565b92506040850135915060608501356001600160401b0381111561281b57600080fd5b8501601f8101871361282c57600080fd5b61283b878235602084016126f1565b91505092959194509250565b6000806040838503121561285a57600080fd5b612863836124ee565b9150612871602084016124ee565b90509250929050565b600181811c9082168061288e57607f821691505b602082108114156128af57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252601e908201527f5a65726f2061646472657373206e6f74206f6e20416c6c6f77204c6973740000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6020808252601a908201527943616e27742061646420746865206e756c6c206164647265737360301b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60006000198214156129e6576129e66129bc565b5060010190565b60208082526033908201527f4e756d626572206f6620746f6b656e732063616e206e6f74206265206c6573736040820152720207468616e206f7220657175616c20746f203606c1b606082015260800190565b6020808252601d908201527f53656e742065746865722076616c756520697320696e636f7272656374000000604082015260600190565b60008351612a8981846020880161246a565b835190830190612a9d81836020880161246a565b01949350505050565b60008219821115612ab957612ab96129bc565b500190565b60208082526027908201527f4578636565647320737570706c79206f662070726573616c6520796f75206361604082015266371036b4b73a1760c91b606082015260800190565b600082821015612b1757612b176129bc565b500390565b6000816000190483118215151615612b3657612b366129bc565b500290565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612bb257612bb2612b8d565b500490565b600082612bc657612bc6612b8d565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612bfe90830184612496565b9695505050505050565b600060208284031215612c1a57600080fd5b8151611d5d81612434565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220c64f90c9f75472a433bc2a435bfe5a49fd1139d7b152481f9cfd17e24c6d4bb564736f6c63430008090033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.