ETH Price: $3,442.28 (+3.38%)

Token

Wassieverse (WASSIE)
 

Overview

Max Total Supply

1,579 WASSIE

Holders

703

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
awp.eth
Balance
1 WASSIE
0xff3acf547e9d955494903ffe4f18921b43b63203
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Wassieverse mission is to bring the wassie lore and rich wassie culture to life with an NFT omnibus of 3D experiences, high-fidelity adventures, and entertaining mini-games.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
WassieverseNFT

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 300 runs

Other Settings:
default evmVersion, MIT license
File 1 of 23 : WassieverseNFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;

import {ERC721A} from "erc721a/contracts/ERC721A.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {IERC2981} from "@openzeppelin/contracts/interfaces/IERC2981.sol";
import {ERC2981} from "@openzeppelin/contracts/token/common/ERC2981.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

import {NFTSale} from "./NFTSale.sol";
import {RandomnessBatches} from "./RandomnessBatches.sol";
import {TokenURI} from "./TokenURI.sol";

/// The main Wassieverse contract
///
/// Besides the top level logic, we rely on several inherited contracts:
///   - {ERC721A} - The underlying NFT implementation
///   - {NFTSale} - Details of the token sale (whitelist and public) are in {NFTSale}
///   - {TokenURI} - Deals with the ability to futurely add updated metadata,
///     and allow users to flip their items between the two
///   - {RandomnessBatches} deal with batch reveals in a pseudo-random way
///
/// @dev Unfortunately, we need both AccessControl and Ownable. The first
///   because of our internal logic, the later because OpenSea wants us to
contract WassieverseNFT is
    NFTSale,
    TokenURI,
    RandomnessBatches,
    ERC721A,
    ERC2981,
    Ownable
{
    using Strings for uint256;
    using SafeERC20 for IERC20;

    bytes32 public constant ROYALTIES_ROLE = keccak256("ROYALTIES_ROLE");
    bytes32 public constant REVEAL_ROLE = keccak256("REVEAL_ROLE");

    error NotAuthorized();

    /// @param _startWhitelist start of whitelisted sale
    /// @param _startPublic start of public sale
    /// @param _priceWhitelist item price for whitelist sale
    /// @param _pricePub item price for public sale
    /// @param _supply Max total supply
    /// @param _whitelistMax max whitelist minting allowance
    /// @param _publicMax max public minting allowance
    /// @param _whitelistMerkleRoot merkle root used to authenticate whitelisted mints
    /// @param _revealBatchSize Size of each reveal batch
    /// @param _baseURI base URI for revealed items
    /// @param _unrevealedURI full URI for all items while unrevealed
    constructor(
        uint64 _startWhitelist,
        uint64 _startPublic,
        uint256 _priceWhitelist,
        uint256 _pricePub,
        uint16 _supply,
        uint16 _whitelistMax,
        uint16 _publicMax,
        bytes32 _whitelistMerkleRoot,
        uint16 _revealBatchSize,
        string memory _baseURI,
        string memory _unrevealedURI
    )
        NFTSale(
            _startWhitelist,
            _startPublic,
            _priceWhitelist,
            _pricePub,
            _supply,
            _whitelistMax,
            _publicMax,
            _whitelistMerkleRoot
        )
        RandomnessBatches(_supply, _revealBatchSize, _startWhitelist)
        ERC721A("Wassieverse", "WASSIE")
    {
        _updateRegularBaseURI(_baseURI);
        _updateUnrevealedURI(_unrevealedURI);

        _grantRole(ROYALTIES_ROLE, msg.sender);
        _grantRole(REVEAL_ROLE, msg.sender);
    }

    /// Sets a new regularBaseURI
    /// Can only be called until sales actually start
    /// @dev To minimize human-error, it checks that the URI ends with `/`
    ///   (since without `/` URI would still be valid, but wouldn't concat
    ///   properly with tokenId)
    /// @param _newRegularBaseURI new URI to use
    function updateRegularBaseURI(string memory _newRegularBaseURI)
        external
        onlyRole(SALE_ROLE)
        onlyUntilImmutable
    {
        _updateRegularBaseURI(_newRegularBaseURI);
    }

    /// Sets a new unrevealedURI
    /// Can only be called until sales actually start
    /// @param _newUnrevealedURI new URI to use
    function updateUnrevealedURI(string memory _newUnrevealedURI)
        external
        onlyOwner
        onlyUntilImmutable
    {
        _updateUnrevealedURI(_newUnrevealedURI);
    }

    //
    // ERC721A
    //

    /// @dev See {IERC721Metadata-tokenURI}.
    function tokenURI(uint256 id)
        public
        view
        override(ERC721A)
        returns (string memory)
    {
        uint256 shuffledID = shuffleID(id);
        if (shuffledID == 0) {
            return unrevealedURI;
        } else {
            return
                string(
                    abi.encodePacked(
                        baseURIFor(id),
                        shuffledID.toString(),
                        ".json"
                    )
                );
        }
    }

    //
    // ERC165
    //

    /// @dev See {IERC165-supportsInterface}
    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(ERC2981, ERC721A, NFTSale, AccessControl)
        returns (bool)
    {
        return
            ERC2981.supportsInterface(interfaceId) ||
            ERC721A.supportsInterface(interfaceId) ||
            NFTSale.supportsInterface(interfaceId);
    }

    //
    // ERC2981
    //

    /// Sets the royalty information that all ids in this contract will default to.
    ///
    /// @param _receiver cannot be the zero address.
    /// @param _feeNumerator cannot be greater than the fee denominator.
    function setDefaultRoyalty(address _receiver, uint96 _feeNumerator)
        external
        onlyRole(ROYALTIES_ROLE)
    {
        _setDefaultRoyalty(_receiver, _feeNumerator);
    }

    /// Removes default royalty information
    function deleteDefaultRoyalty() external onlyRole(ROYALTIES_ROLE) {
        _deleteDefaultRoyalty();
    }

    //
    // Public API
    //

    /// Withdraws any ERC20 tokens sent to the contract by mistake
    /// @dev only callable by the admin role
    ///
    /// @param token The ERC20 token to withdraw
    /// @param amount The amount to withdraw
    function withdrawERC20(IERC20 token, uint256 amount)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        token.safeTransfer(msg.sender, amount);
    }

    /// Allows holders to flip an item between old and new metadata
    /// Only works after new metadata is set and commited by the team
    ///
    /// @notice After triggering this, a metadata refresh may be needed on frontends to reflect changes
    /// @notice The token ID required is *not* the one shown on the JSON, which is a randomized one, but rather the on-chain one. See `{unshuffleID}`
    ///
    /// @param _id the internal ID of the item
    /// @param _v the new value. `true` means new metadata will be used
    function flipURI(uint256 _id, bool _v) external {
        if (ownerOf(_id) != msg.sender) {
            revert NotAuthorized();
        }

        _flipURI(_id, _v);
    }

    /// Reveals a single batch
    /// @notice Can only be called by the allowed role
    function forceReveal(uint256 _batchIdx)
        external
        onlyRole(REVEAL_ROLE)
        rngContribute
    {
        _rngReveal(_batchIdx);
    }

    /// Reveals a single batch
    /// Can be called by anyone, but only works under two conditions:
    ///   - The batch has been fully minted (e.g.: batch 0: items 0..249)
    ///   - A grace period of two weeks has passed since mintint started
    function publicReveal(uint256 _batchIdx) external rngContribute {
        _rngTryReveal(_batchIdx, totalSupply());
    }

    //
    // Internal
    //

    /// @inheritdoc NFTSale
    function _mintFromSale(address _to, uint256 _quantity)
        internal
        override(NFTSale)
        rngContribute
    {
        _mint(_to, _quantity);
    }
}

File 2 of 23 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 23 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 4 of 23 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 5 of 23 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

import "../utils/introspection/IERC165.sol";

File 6 of 23 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be payed in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 7 of 23 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 8 of 23 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

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

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

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

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

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

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

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

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

File 9 of 23 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

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

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

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

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

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

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

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

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

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

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

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

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

File 10 of 23 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

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);
}

File 11 of 23 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @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);
}

File 12 of 23 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

import "../../interfaces/IERC2981.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
 *
 * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
 * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
 * fee is specified in basis points by default.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 *
 * _Available since v4.5._
 */
abstract contract ERC2981 is IERC2981, ERC165 {
    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

    RoyaltyInfo private _defaultRoyaltyInfo;
    mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;

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

    /**
     * @inheritdoc IERC2981
     */
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice)
        external
        view
        virtual
        override
        returns (address, uint256)
    {
        RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];

        if (royalty.receiver == address(0)) {
            royalty = _defaultRoyaltyInfo;
        }

        uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();

        return (royalty.receiver, royaltyAmount);
    }

    /**
     * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
     * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
     * override.
     */
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: invalid receiver");

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Removes default royalty information.
     */
    function _deleteDefaultRoyalty() internal virtual {
        delete _defaultRoyaltyInfo;
    }

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `tokenId` must be already minted.
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: Invalid parameters");

        _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Resets royalty information for the token id back to the global default.
     */
    function _resetTokenRoyalty(uint256 tokenId) internal virtual {
        delete _tokenRoyaltyInfo[tokenId];
    }
}

File 13 of 23 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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");

        (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");

        (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");

        (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");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 14 of 23 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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) {
        return msg.data;
    }
}

File 15 of 23 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "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] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 16 of 23 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = _efficientHash(computedHash, proofElement);
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = _efficientHash(proofElement, computedHash);
            }
        }
        return computedHash;
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 17 of 23 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @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;
    }
}

File 18 of 23 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

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);
}

File 19 of 23 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is Context, ERC165, IERC721A {
    using Address for address;
    using Strings for uint256;

    // The tokenId of the next token to be minted.
    uint256 internal _currentIndex;

    // The number of tokens burned.
    uint256 internal _burnCounter;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details.
    mapping(uint256 => TokenOwnership) internal _ownerships;

    // Mapping owner address to address data
    mapping(address => AddressData) private _addressData;

    // 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;

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _currentIndex = _startTokenId();
    }

    /**
     * To change the starting tokenId, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
     */
    function totalSupply() public view override returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than _currentIndex - _startTokenId() times
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

    /**
     * Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view returns (uint256) {
        // Counter underflow is impossible as _currentIndex does not decrement,
        // and it is initialized to _startTokenId()
        unchecked {
            return _currentIndex - _startTokenId();
        }
    }

    /**
     * @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 override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return uint256(_addressData[owner].balance);
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberMinted);
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberBurned);
    }

    /**
     * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return _addressData[owner].aux;
    }

    /**
     * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal {
        _addressData[owner].aux = aux;
    }

    /**
     * Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around in the collection over time.
     */
    function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr) if (curr < _currentIndex) {
                TokenOwnership memory ownership = _ownerships[curr];
                if (!ownership.burned) {
                    if (ownership.addr != address(0)) {
                        return ownership;
                    }
                    // Invariant:
                    // There will always be an ownership that has an address and is not burned
                    // before an ownership that does not have an address and is not burned.
                    // Hence, curr will not underflow.
                    while (true) {
                        curr--;
                        ownership = _ownerships[curr];
                        if (ownership.addr != address(0)) {
                            return ownership;
                        }
                    }
                }
            }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return _ownershipOf(tokenId).addr;
    }

    /**
     * @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) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

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

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. 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 override {
        address owner = ERC721A.ownerOf(tokenId);
        if (to == owner) revert ApprovalToCurrentOwner();

        if (_msgSender() != owner) if(!isApprovedForAll(owner, _msgSender())) {
            revert ApprovalCallerNotOwnerNorApproved();
        }

        _approve(to, tokenId, owner);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        if (operator == _msgSender()) revert ApproveToCaller();

        _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 {
        _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 {
        _transfer(from, to, tokenId);
        if (to.isContract()) if(!_checkContractOnERC721Received(from, to, tokenId, _data)) {
            revert TransferToNonERC721ReceiverImplementer();
        }
    }

    /**
     * @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`),
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned;
    }

    /**
     * @dev Equivalent to `_safeMint(to, quantity, '')`.
     */
    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, quantity, '');
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement
     *   {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            if (to.isContract()) {
                do {
                    emit Transfer(address(0), to, updatedIndex);
                    if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (updatedIndex < end);
                // Reentrancy protection
                if (_currentIndex != startTokenId) revert();
            } else {
                do {
                    emit Transfer(address(0), to, updatedIndex++);
                } while (updatedIndex < end);
            }
            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 quantity) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            do {
                emit Transfer(address(0), to, updatedIndex++);
            } while (updatedIndex < end);

            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * 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
    ) private {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();

        bool isApprovedOrOwner = (_msgSender() == from ||
            isApprovedForAll(from, _msgSender()) ||
            getApproved(tokenId) == _msgSender());

        if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

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

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            _addressData[from].balance -= 1;
            _addressData[to].balance += 1;

            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = to;
            currSlot.startTimestamp = uint64(block.timestamp);

            // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
     * @dev Equivalent to `_burn(tokenId, false)`.
     */
    function _burn(uint256 tokenId) internal virtual {
        _burn(tokenId, false);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        address from = prevOwnership.addr;

        if (approvalCheck) {
            bool isApprovedOrOwner = (_msgSender() == from ||
                isApprovedForAll(from, _msgSender()) ||
                getApproved(tokenId) == _msgSender());

            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        }

        _beforeTokenTransfers(from, address(0), tokenId, 1);

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

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            AddressData storage addressData = _addressData[from];
            addressData.balance -= 1;
            addressData.numberBurned += 1;

            // Keep track of who burned the token, and the timestamp of burning.
            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = from;
            currSlot.startTimestamp = uint64(block.timestamp);
            currSlot.burned = true;

            // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(from, address(0), tokenId);
        _afterTokenTransfers(from, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            _burnCounter++;
        }
    }

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

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target 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 _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        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 TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
     * And also called before burning one token.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * 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, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
     * minting.
     * And also called after one token has been burned.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
     * transferred to `to`.
     * - When `from` is zero, `tokenId` has been minted for `to`.
     * - When `to` is zero, `tokenId` has been burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}
}

File 20 of 23 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v3.3.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';

/**
 * @dev Interface of an ERC721A compliant contract.
 */
interface IERC721A is IERC721, IERC721Metadata {
    /**
     * The caller must own the token or be an approved operator.
     */
    error ApprovalCallerNotOwnerNorApproved();

    /**
     * The token does not exist.
     */
    error ApprovalQueryForNonexistentToken();

    /**
     * The caller cannot approve to their own address.
     */
    error ApproveToCaller();

    /**
     * The caller cannot approve to the current owner.
     */
    error ApprovalToCurrentOwner();

    /**
     * Cannot query the balance for the zero address.
     */
    error BalanceQueryForZeroAddress();

    /**
     * Cannot mint to the zero address.
     */
    error MintToZeroAddress();

    /**
     * The quantity of tokens minted must be more than zero.
     */
    error MintZeroQuantity();

    /**
     * The token does not exist.
     */
    error OwnerQueryForNonexistentToken();

    /**
     * The caller must own the token or be an approved operator.
     */
    error TransferCallerNotOwnerNorApproved();

    /**
     * The token must be owned by `from`.
     */
    error TransferFromIncorrectOwner();

    /**
     * Cannot safely transfer to a contract that does not implement the ERC721Receiver interface.
     */
    error TransferToNonERC721ReceiverImplementer();

    /**
     * Cannot transfer to the zero address.
     */
    error TransferToZeroAddress();

    /**
     * The token does not exist.
     */
    error URIQueryForNonexistentToken();

    // Compiler will pack this into a single 256bit word.
    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
    }

    // Compiler will pack this into a single 256bit word.
    struct AddressData {
        // Realistically, 2**64-1 is more than enough.
        uint64 balance;
        // Keeps track of mint count with minimal overhead for tokenomics.
        uint64 numberMinted;
        // Keeps track of burn count with minimal overhead for tokenomics.
        uint64 numberBurned;
        // For miscellaneous variable(s) pertaining to the address
        // (e.g. number of whitelist mint slots used).
        // If there are multiple variables, please pack them into a uint64.
        uint64 aux;
    }

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     * 
     * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens.
     */
    function totalSupply() external view returns (uint256);
}

File 21 of 23 : NFTSale.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.14;

import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";

/// The wassieverse NFT
///
/// Contains 4 different stages to a sale:
///   - stage 1: whitelisted sale, based on a merkle tree. also fixed price, but a different one
///   - stage 2: public sale, permissionless, at a fixed price, predetermined supply, and with a per-account cap
///   - stage 3: after a grace period, public sale still works, but the contract owner has the right to freely mint any remaining supply
abstract contract NFTSale is AccessControl {
    //
    // Constants
    //

    bytes32 public constant SALE_ROLE = keccak256("SALE_ROLE");

    //
    // Errors
    //

    error InvalidArguments();
    error WhitelistSaleClosed();
    error PublicSaleClosed();
    error SalesNotOverYet();
    error UnexpectedETHAmount(uint256 given, uint256 expected);
    error AccountMaxExceeded();
    error NotEnoughSupplyLeft();
    error NotWhitelisted();
    error SettingsNowImmutable();

    //
    // Events
    //

    /// Emitted on a withdrawal by the owner
    event Withdrawn(address indexed to, uint256 amount);

    //
    // Structs
    //

    //
    // State
    //

    // prices
    uint256 public immutable pricePub;
    uint256 public immutable priceWhitelist;

    // max individual mints
    uint16 public immutable whitelistMax;
    uint16 public immutable publicMax;

    // timestamps for all stages
    uint64 public startPublic;
    uint64 public startWhitelist;

    // remaining supply
    uint16 public remainingSupply;

    /// address => # of public mints made
    mapping(address => uint16) public publicMints;
    mapping(address => uint16) public whitelistMints;

    /// merkle root
    bytes32 immutable whitelistMerkleRoot;

    //
    // Constructor
    //

    /// @param _startWhitelist start of whitelisted sale
    /// @param _startPublic start of public sale
    /// @param _priceWhitelist item price for whitelist sale
    /// @param _pricePub item price for public sale
    /// @param _supply Max total supply
    /// @param _publicMax max whitelist minting allowance per account
    /// @param _whitelistMax max public minting allowance per account
    /// @param _whitelistMerkleRoot merkle root used to authenticate whitelisted mints
    ///
    /// @dev The supplies are given as a 3-elem array purely to get around the
    /// 16 variable limit of solidity
    constructor(
        uint64 _startWhitelist,
        uint64 _startPublic,
        uint256 _priceWhitelist,
        uint256 _pricePub,
        uint16 _supply,
        uint16 _whitelistMax,
        uint16 _publicMax,
        bytes32 _whitelistMerkleRoot
    ) {
        if (
            _startWhitelist == 0 ||
            _startPublic <= _startWhitelist ||
            _priceWhitelist == 0 ||
            _pricePub == 0 ||
            _supply == 0 ||
            _whitelistMax == 0 ||
            _publicMax == 0 ||
            _whitelistMerkleRoot == 0
        ) {
            revert InvalidArguments();
        }

        _setNewDates(_startWhitelist, _startPublic);
        startWhitelist = _startWhitelist;
        startPublic = _startPublic;
        whitelistMax = _whitelistMax;
        publicMax = _publicMax;
        remainingSupply = _supply;
        whitelistMerkleRoot = _whitelistMerkleRoot;

        priceWhitelist = _priceWhitelist;
        pricePub = _pricePub;

        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _grantRole(SALE_ROLE, msg.sender);
    }

    //
    // Modifiers
    //

    modifier onlyUntilImmutable() {
        if (block.timestamp >= startWhitelist) {
            revert SettingsNowImmutable();
        }
        _;
    }

    modifier onlyDuringWhitelistSale() {
        if (
            remainingSupply == 0 ||
            _outsideBounds(startWhitelist, startPublic - 1)
        ) {
            revert WhitelistSaleClosed();
        }
        _;
    }

    modifier onlyDuringPublicSale() {
        if ((remainingSupply == 0) || startPublic > block.timestamp) {
            revert PublicSaleClosed();
        }
        _;
    }

    /// Ensures that the given ETH amount matches the expected value
    modifier ensureETHAmount(uint256 _price, uint16 _quantity) {
        uint256 expected = _price * _quantity;
        if (msg.value != expected) {
            revert UnexpectedETHAmount(msg.value, expected);
        }
        _;
    }

    /// check per-account minting limit
    modifier ensureAccountLimit(uint16 _quantity, uint16 _max) {
        uint16 newQuantity = publicMints[msg.sender] + _quantity;
        if (newQuantity > _max) {
            revert AccountMaxExceeded();
        }
        publicMints[msg.sender] = newQuantity;
        _;
    }

    modifier useWhitelist(bytes32[] calldata _proof, uint16 _quantity) {
        bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
        uint16 prevQuantity = whitelistMints[msg.sender];
        uint16 newQuantity = prevQuantity + _quantity;

        if (newQuantity > whitelistMax) {
            revert AccountMaxExceeded();
        }

        if (!MerkleProof.verify(_proof, whitelistMerkleRoot, leaf)) {
            revert NotWhitelisted();
        }

        whitelistMints[msg.sender] = newQuantity;
        _;
    }

    //
    // Admin API
    //

    /// Sets new dates
    /// Can only be called until sales actually start
    /// @dev In case we need to postpone a couple of hours
    /// @dev enforces that both times are in the future, and that whitelist is
    ///   before public
    /// @param _whitelistStart new start date for whitelist sale
    /// @param _publicStart new start date for public sale
    function setNewDates(uint64 _whitelistStart, uint64 _publicStart)
        external
        onlyRole(SALE_ROLE)
        onlyUntilImmutable
    {
        _setNewDates(_whitelistStart, _publicStart);
    }

    //
    // Public API
    //

    /// Mints a single item to a whitelisted account
    /// Only callable during the whitelist sale period [startWhitelist, startLeftover]
    /// @dev The exact amount of ETH must be sent in the transaction
    /// @param _proof The merkle proof to be used alongside {msg.sender} to prove whitelist registration
    function mintWhitelist(bytes32[] calldata _proof, uint16 _quantity)
        external
        payable
        onlyDuringWhitelistSale
        ensureETHAmount(priceWhitelist, _quantity)
        useWhitelist(_proof, _quantity)
    {
        remainingSupply -= _quantity;
        _mintFromSale(msg.sender, _quantity);
    }

    /// Mints a given quantity
    /// Only callable during the public sale period [startPublic, startWhitelist]
    /// @dev The exact amount of ETH must be sent in the transaction
    /// @param _quantity How many items to mint (capped by {publicAccountMax})
    function mintPublic(uint16 _quantity)
        external
        payable
        onlyDuringPublicSale
        ensureETHAmount(pricePub, _quantity)
        ensureAccountLimit(_quantity, publicMax)
    {
        remainingSupply -= _quantity;
        _mintFromSale(msg.sender, _quantity);
    }

    /// Withdraws all ETH in the contract to the owner wallet
    /// @dev only callable by an authorized role
    function withdraw() external onlyRole(SALE_ROLE) {
        uint256 balance = address(this).balance;
        address _owner = msg.sender;

        emit Withdrawn(_owner, balance);

        // slither-disable-next-line low-level-calls
        (bool success, ) = _owner.call{value: balance}("");
        require(success);
    }

    /// @dev See {IERC165-supportsInterface}
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(AccessControl)
        returns (bool)
    {
        return AccessControl.supportsInterface(interfaceId);
    }

    //
    // Internal API
    //

    /// Checks whether the current block timestamp falls outside of an (inclusive) range
    /// @param from range start
    /// @param to range end
    /// @return true if block.timestamp is outside the given range
    function _outsideBounds(uint64 from, uint64 to)
        internal
        view
        returns (bool)
    {
        uint64 _now = uint64(block.timestamp);
        return _now < from || _now > to;
    }

    function _setNewDates(uint64 _whitelist, uint64 _public) internal {
        if (_whitelist >= _public) {
            revert InvalidArguments();
        }

        startWhitelist = _whitelist;
        startPublic = _public;
    }

    /// Needs to be implemented by a subclass, and delegate to a specific implementation of minting
    /// @dev Allows this contract to be inherited from an ERC721-type contract, instead of having to inherit from one itself,
    ///   for better separation-of-concerns
    /// @dev Implementation should only need to delegate to {_mint(address,uint256)} from the chosen ERC721 impl
    // slither-disable-next-line dead-code
    function _mintFromSale(address _to, uint256 _quantity) internal virtual;
}

File 22 of 23 : RandomnessBatches.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;

/// Keeps a list of rng batches
/// After n new items minted, where n == batchSize, a new rng value is commited
/// This allows an NFT to use randomness on a per-batch basis, where every new n items are revealed
/// and shuffled within the batch bounds, while keeping future items still unrevealed
abstract contract RandomnessBatches {
    uint256 public constant REVEAL_GRACE_PERIOD = 2 weeks;

    error BatchAlreadyRevealed();
    error RNGInvalidArgs();
    error GracePeriodNotOverYet();
    error BatchNotFullYet();

    uint128 immutable maxSupply;
    uint128 immutable batchSize;
    uint256 public immutable revealGracePeriodEnd;

    uint256 xyz;
    uint256[] public randomness;
    bytes32 public rng;

    /// @param _maxSupply Max supply of items to be expected
    /// @param _batchSize Size of each batch
    /// @param _revealGracePeriodStart the point from which REVEAL_GRACE_PERIOD starts counting for anyone to be able to reveal fully minted batches
    constructor(
        uint128 _maxSupply,
        uint128 _batchSize,
        uint256 _revealGracePeriodStart
    ) {
        maxSupply = _maxSupply;
        batchSize = _batchSize;
        uint256 batches = ceilDiv(_maxSupply, _batchSize);
        randomness = new uint256[](batches);
        rng = keccak256(abi.encodePacked(msg.sender, block.timestamp));
        revealGracePeriodEnd = _revealGracePeriodStart + REVEAL_GRACE_PERIOD;
    }

    /// Plug to incrementaly build randomness on every new mint
    modifier rngContribute() {
        rng ^= keccak256(abi.encodePacked(msg.sender, block.timestamp, rng));
        _;
    }

    //
    // Public API
    //

    /// For a given id bound between [0, maxSupply],
    /// check if its batch has been revealed.
    /// If so, return the final shuffled ID,  otherwise 0
    ///
    /// @param _id The original sequencial id to shuffle
    function shuffleID(uint256 _id) public view returns (uint256) {
        uint256 localBatchSize = batchSize;

        // slither-disable-next-line divide-before-multiply
        uint256 idx = (uint128(_id) / localBatchSize);
        uint256 rand = uint256(randomness[idx]);

        // the last batch may have less than `batchSize` elements
        // so computations are slightly different
        bool isLastBatch = idx == getBatchCount() - 1;
        uint256 currentBatchSize = isLastBatch
            ? (maxSupply % localBatchSize)
            : localBatchSize;

        // slither-disable-next-line incorrect-equality
        if (rand == 0) {
            return 0;
        } else {
            uint256 batchOffset = idx * localBatchSize;
            uint256 shuffled = ((_id + rand) % currentBatchSize);

            // we want IDs to have the range 1..maxSupply, not 0..(maxSupply-1),
            // so we add one more
            return batchOffset + shuffled + 1;
        }
    }

    /// For a given shuffled id bound between [0, maxSupply],
    /// computes the corresponding on-chain ID.
    ///
    /// @param _shuffledId The shuffled ID, from off-chain metadata
    /// @return id The original on-chain ID
    function unshuffleId(uint256 _shuffledId)
        external
        view
        returns (uint256 id)
    {
        uint256 localBatchSize = batchSize;
        uint256 batch = (_shuffledId - 1) / localBatchSize;
        uint256 rand = uint256(randomness[batch]);

        if (rand == 0) {
            // batch not revealed yet
            return 0;
        }

        bool isLastBatch = batch == getBatchCount() - 1;
        uint256 currentBatchSize = isLastBatch
            ? (maxSupply % localBatchSize)
            : localBatchSize;

        uint256 offset = (currentBatchSize - rand) % currentBatchSize;
        return
            (batch * localBatchSize) +
            ((_shuffledId - 1 + offset) % currentBatchSize);
    }

    function getBatchCount() public view returns (uint256) {
        return randomness.length;
    }

    //
    // Internal API
    //

    /// Internal function to reveal a batch, either once its filled,
    /// or by force from a role-only call
    function _rngReveal(uint256 _batchIdx) internal {
        // slither-disable-next-line incorrect-equality
        if (randomness[_batchIdx] == 0) {
            randomness[_batchIdx] = (uint256(rng) % batchSize) + 1;
        }
    }

    /// Check if a new batch has been filled.
    /// If so, we commit its randomness, revealing it
    function _rngTryReveal(uint256 _batchIdx, uint256 _totalSupply) internal {
        if (block.timestamp < revealGracePeriodEnd) {
            revert GracePeriodNotOverYet();
        }

        if (_totalSupply == maxSupply) {
            _rngReveal(_batchIdx);
            return;
        }

        uint256 minSupply = (_batchIdx + 1) * batchSize;

        if (_totalSupply < minSupply) {
            revert BatchNotFullYet();
        }

        _rngReveal(_batchIdx);
    }

    function ceilDiv(uint256 a, uint256 m) internal pure returns (uint256) {
        // slither-disable-next-line divide-before-multiply
        uint256 result = a / m;
        if (result * m < a) {
            return result + 1;
        } else {
            return result;
        }
    }
}

File 23 of 23 : TokenURI.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;

import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";

abstract contract TokenURI is AccessControl {
    //
    // Constants
    //

    bytes32 public constant METADATA_ROLE = keccak256("METADATA_ROLE");

    //
    // Errors
    //

    error AnimatedURINotYetCommited();
    error CannotChangeURI();
    error InvalidURI();

    //
    // State
    //

    string public regularBaseURI;
    string public animatedBaseURI;
    string public unrevealedURI;
    bool public animatedURICommited;

    mapping(uint256 => bool) flippedURI;

    constructor() {
        _grantRole(METADATA_ROLE, msg.sender);
    }

    /// Allows the metadata role to set a new URI for metadata containing animated assets
    /// After setting this, `commitAnimateURI` still must be called for the value to take any effect
    /// @param _animatedBaseURI The new animatedBaseURI to use
    function setAnimatedURI(string memory _animatedBaseURI)
        external
        onlyRole(METADATA_ROLE)
    {
        if (animatedURICommited) {
            revert CannotChangeURI();
        }

        bytes memory b = bytes(_animatedBaseURI);
        if (b[b.length - 1] != bytes1("/")) {
            revert InvalidURI();
        }

        animatedBaseURI = _animatedBaseURI;
    }

    /// Commits a previously set animatedBaseURI
    /// @dev This is the point of no return. After this, animatedBaseURI becomes immutable
    function commitAnimatedURI() external onlyRole(METADATA_ROLE) {
        if (bytes(animatedBaseURI).length == 0) {
            revert InvalidURI();
        }

        animatedURICommited = true;
    }

    /// Opt-in function for holders to switch to/from animated metadata for their NFT
    /// @param _id The id of the token to flip
    /// @param _v The new value. `true` means the animatedURI will be used instead
    /// @dev Can only be called once animatedBaseURI has been commited
    function _flipURI(uint256 _id, bool _v) internal {
        if (!animatedURICommited) {
            revert AnimatedURINotYetCommited();
        }

        flippedURI[_id] = _v;
    }

    function baseURIFor(uint256 _id) public view returns (string memory) {
        if (flippedURI[_id]) {
            return animatedBaseURI;
        } else {
            return regularBaseURI;
        }
    }

    function _updateRegularBaseURI(string memory _newRegularBaseURI) internal {
        bytes memory b = bytes(_newRegularBaseURI);

        if (b[b.length - 1] != bytes1("/")) {
            revert InvalidURI();
        }

        regularBaseURI = _newRegularBaseURI;
    }

    function _updateUnrevealedURI(string memory _newUnrevealedURI) internal {
        unrevealedURI = _newUnrevealedURI;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint64","name":"_startWhitelist","type":"uint64"},{"internalType":"uint64","name":"_startPublic","type":"uint64"},{"internalType":"uint256","name":"_priceWhitelist","type":"uint256"},{"internalType":"uint256","name":"_pricePub","type":"uint256"},{"internalType":"uint16","name":"_supply","type":"uint16"},{"internalType":"uint16","name":"_whitelistMax","type":"uint16"},{"internalType":"uint16","name":"_publicMax","type":"uint16"},{"internalType":"bytes32","name":"_whitelistMerkleRoot","type":"bytes32"},{"internalType":"uint16","name":"_revealBatchSize","type":"uint16"},{"internalType":"string","name":"_baseURI","type":"string"},{"internalType":"string","name":"_unrevealedURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccountMaxExceeded","type":"error"},{"inputs":[],"name":"AnimatedURINotYetCommited","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"BatchAlreadyRevealed","type":"error"},{"inputs":[],"name":"BatchNotFullYet","type":"error"},{"inputs":[],"name":"CannotChangeURI","type":"error"},{"inputs":[],"name":"GracePeriodNotOverYet","type":"error"},{"inputs":[],"name":"InvalidArguments","type":"error"},{"inputs":[],"name":"InvalidURI","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NotAuthorized","type":"error"},{"inputs":[],"name":"NotEnoughSupplyLeft","type":"error"},{"inputs":[],"name":"NotWhitelisted","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"PublicSaleClosed","type":"error"},{"inputs":[],"name":"RNGInvalidArgs","type":"error"},{"inputs":[],"name":"SalesNotOverYet","type":"error"},{"inputs":[],"name":"SettingsNowImmutable","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"inputs":[{"internalType":"uint256","name":"given","type":"uint256"},{"internalType":"uint256","name":"expected","type":"uint256"}],"name":"UnexpectedETHAmount","type":"error"},{"inputs":[],"name":"WhitelistSaleClosed","type":"error"},{"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":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"METADATA_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REVEAL_GRACE_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REVEAL_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROYALTIES_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SALE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"animatedBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"animatedURICommited","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"baseURIFor","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"commitAnimatedURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deleteDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"bool","name":"_v","type":"bool"}],"name":"flipURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_batchIdx","type":"uint256"}],"name":"forceReveal","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":[],"name":"getBatchCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[{"internalType":"uint16","name":"_quantity","type":"uint16"}],"name":"mintPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"},{"internalType":"uint16","name":"_quantity","type":"uint16"}],"name":"mintWhitelist","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":"pricePub","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceWhitelist","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicMax","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"publicMints","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_batchIdx","type":"uint256"}],"name":"publicReveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"randomness","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"regularBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"remainingSupply","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealGracePeriodEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rng","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"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":[{"internalType":"string","name":"_animatedBaseURI","type":"string"}],"name":"setAnimatedURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint96","name":"_feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_whitelistStart","type":"uint64"},{"internalType":"uint64","name":"_publicStart","type":"uint64"}],"name":"setNewDates","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"shuffleID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startPublic","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startWhitelist","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","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":[{"internalType":"uint256","name":"id","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":[],"name":"unrevealedURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shuffledId","type":"uint256"}],"name":"unshuffleId","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_newRegularBaseURI","type":"string"}],"name":"updateRegularBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newUnrevealedURI","type":"string"}],"name":"updateUnrevealedURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"whitelistMax","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistMints","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101806040523480156200001257600080fd5b506040516200445a3803806200445a8339810160408190526200003591620007cc565b6040518060400160405280600b81526020016a576173736965766572736560a81b8152506040518060400160405280600681526020016557415353494560d01b8152508861ffff168561ffff168e6001600160401b03168f8f8f8f8f8f8f8f876001600160401b031660001480620000bf5750876001600160401b0316876001600160401b031611155b80620000c9575085155b80620000d3575084155b80620000e1575061ffff8416155b80620000ef575061ffff8316155b80620000fd575061ffff8216155b8062000107575080155b1562000126576040516317dbc4cb60e21b815260040160405180910390fd5b620001328888620003a8565b6001805461ffff80861660c05284811660e0528616600160801b026001600160401b0361ffff60801b01196001600160401b03808d166801000000000000000002919091166001600160901b031990931692909217918a169190911717905561010081905260a08690526080859052620001ae60003362000413565b620001da7f4913d4da5605218c48834fed44bccb6bdddd90d4fdf48923cf059a07f6fe4a773362000413565b5050505050505050620002147f6bd6b5318a46e5fff572d5e4258a20774aab40cc35ac7680654b9081fcc82f80336200041360201b60201c565b6001600160801b038084166101208190529083166101408190526000916200023c91620004b4565b9050806001600160401b03811115620002595762000259620006ff565b60405190808252806020026020018201604052801562000283578160200160208202803683370190505b5080516200029a91600a91602090910190620005ec565b506040516001600160601b03193360601b16602082015242603482015260540160408051601f198184030181529190528051602090910120600b55620002e46212750083620008e3565b6101605250508351620003019250600e915060208501906200063c565b5080516200031790600f9060208401906200063c565b50506000600c55506200032a33620004f8565b62000335826200054a565b6200034081620005d7565b6200036c7fc1548a18d6737e6c2687f3c32faa16a7b067bcc7ff7bfb5eb1bf50f8977c0de33362000413565b620003977e6b97d3b00e0cfa27932db8d8710f84e2b8d72f339a1e910bf97a09597e99d63362000413565b5050505050505050505050620009af565b806001600160401b0316826001600160401b031610620003db576040516317dbc4cb60e21b815260040160405180910390fd5b600180546001600160801b031916680100000000000000006001600160401b03948516026001600160401b0319161791909216179055565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620004b0576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200046f3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600080620004c38385620008fe565b905083620004d2848362000921565b1015620004ef57620004e6816001620008e3565b915050620004f2565b90505b92915050565b601680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80518190602f60f81b908290620005649060019062000943565b815181106200057757620005776200095d565b01602001517fff000000000000000000000000000000000000000000000000000000000000001614620005bd57604051633ba0191160e01b815260040160405180910390fd5b8151620005d29060049060208501906200063c565b505050565b8051620004b09060069060208401906200063c565b8280548282559060005260206000209081019282156200062a579160200282015b828111156200062a5782518255916020019190600101906200060d565b5062000638929150620006b8565b5090565b8280546200064a9062000973565b90600052602060002090601f0160209004810192826200066e57600085556200062a565b82601f106200068957805160ff19168380011785556200062a565b828001600101855582156200062a57918201828111156200062a5782518255916020019190600101906200060d565b5b80821115620006385760008155600101620006b9565b80516001600160401b0381168114620006e757600080fd5b919050565b805161ffff81168114620006e757600080fd5b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200072757600080fd5b81516001600160401b0380821115620007445762000744620006ff565b604051601f8301601f19908116603f011681019082821181831017156200076f576200076f620006ff565b816040528381526020925086838588010111156200078c57600080fd5b600091505b83821015620007b0578582018301518183018401529082019062000791565b83821115620007c25760008385830101525b9695505050505050565b60008060008060008060008060008060006101608c8e031215620007ef57600080fd5b620007fa8c620006cf565b9a506200080a60208d01620006cf565b995060408c0151985060608c015197506200082860808d01620006ec565b96506200083860a08d01620006ec565b95506200084860c08d01620006ec565b945060e08c01519350620008606101008d01620006ec565b6101208d01519093506001600160401b038111156200087e57600080fd5b6200088c8e828f0162000715565b6101408e015190935090506001600160401b03811115620008ac57600080fd5b620008ba8e828f0162000715565b9150509295989b509295989b9093969950565b634e487b7160e01b600052601160045260246000fd5b60008219821115620008f957620008f9620008cd565b500190565b6000826200091c57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156200093e576200093e620008cd565b500290565b600082821015620009585762000958620008cd565b500390565b634e487b7160e01b600052603260045260246000fd5b600181811c908216806200098857607f821691505b602082108103620009a957634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e051610100516101205161014051610160516139ff62000a5b6000396000818161069f015261289b01526000818161179a01528181611c490152818161254e015261291f01526000818161182501528181611ced01526128dc015260006110cd015260008181610bd7015261127e015260008181610aeb01526110510152600081816106f30152610f92015260008181610516015261120f01526139ff6000f3fe6080604052600436106103b75760003560e01c806367ba440a116101f2578063ab80daed1161010d578063d547741f116100a0578063e5ef873d1161006f578063e5ef873d14610bf9578063e8f6061814610c19578063e985e9c514610c4d578063f2fde38b14610c9657600080fd5b8063d547741f14610b6d578063d605787b14610b8d578063da0239a614610ba3578063e527c6dd14610bc557600080fd5b8063bc629bf5116100dc578063bc629bf514610ad9578063bd99119914610b0d578063c11442f814610b2d578063c87b56dd14610b4d57600080fd5b8063ab80daed14610a45578063ae581f3614610a65578063b2252c4214610a99578063b88d4fde14610ab957600080fd5b806391d1485411610185578063a217fddf11610154578063a217fddf146109e6578063a22cb465146109fb578063a8fabfa514610a1b578063aa1b103f14610a3057600080fd5b806391d148541461095857806395d89b411461099c5780639b70c86a146109b1578063a1db9782146109c657600080fd5b8063715018a6116101c1578063715018a6146108c65780637c1754e8146108db5780637f19c412146108fb5780638da5cb5b1461093a57600080fd5b806367ba440a146108515780636f8c1988146108715780637035bf181461089157806370a08231146108a657600080fd5b8063248a9ca3116102e25780633884178211610275578063446b45d611610244578063446b45d6146107cf5780635d8ab1d2146107e45780635f1770a2146107fe5780636352211e1461083157600080fd5b806338841782146107355780633add14c8146107695780633ccfd60b1461079a57806342842e0e146107af57600080fd5b80632dde5b5e116102b15780632dde5b5e1461068d5780632f2ff15d146106c15780632fff1796146106e157806336568abe1461071557600080fd5b8063248a9ca3146105e7578063265ab6761461061757806328879b11146106375780632a55205a1461064e57600080fd5b8063135696c71161035a57806318160ddd1161032957806318160ddd146105795780631b1d5b27146105925780631c4f9c66146105b257806323b872dd146105c757600080fd5b8063135696c7146104f1578063152f7b2514610504578063159a182b1461054657806316755b571461056657600080fd5b806306fdde031161039657806306fdde0314610457578063081812fc14610479578063095ea7b3146104b15780630f0d335e146104d157600080fd5b80628af2e6146103bc57806301ffc9a71461040557806304634d8d14610435575b600080fd5b3480156103c857600080fd5b506103ed6103d7366004613256565b60036020526000908152604090205461ffff1681565b60405161ffff90911681526020015b60405180910390f35b34801561041157600080fd5b50610425610420366004613289565b610cb6565b60405190151581526020016103fc565b34801561044157600080fd5b506104556104503660046132a6565b610ce5565b005b34801561046357600080fd5b5061046c610d1f565b6040516103fc9190613343565b34801561048557600080fd5b50610499610494366004613356565b610db1565b6040516001600160a01b0390911681526020016103fc565b3480156104bd57600080fd5b506104556104cc36600461336f565b610df5565b3480156104dd57600080fd5b506104556104ec366004613426565b610e76565b6104556104ff366004613480565b610f33565b34801561051057600080fd5b506105387f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016103fc565b34801561055257600080fd5b50610455610561366004613511565b61118a565b610455610574366004613536565b6111c9565b34801561058557600080fd5b50600d54600c5403610538565b34801561059e57600080fd5b506105386105ad366004613356565b611348565b3480156105be57600080fd5b50610455611369565b3480156105d357600080fd5b506104556105e2366004613551565b6113d3565b3480156105f357600080fd5b50610538610602366004613356565b60009081526020819052604090206001015490565b34801561062357600080fd5b50610455610632366004613356565b6113de565b34801561064357600080fd5b506105386212750081565b34801561065a57600080fd5b5061066e610669366004613592565b61145c565b604080516001600160a01b0390931683526020830191909152016103fc565b34801561069957600080fd5b506105387f000000000000000000000000000000000000000000000000000000000000000081565b3480156106cd57600080fd5b506104556106dc3660046135b4565b611508565b3480156106ed57600080fd5b506105387f000000000000000000000000000000000000000000000000000000000000000081565b34801561072157600080fd5b506104556107303660046135b4565b61152e565b34801561074157600080fd5b506105387f6bd6b5318a46e5fff572d5e4258a20774aab40cc35ac7680654b9081fcc82f8081565b34801561077557600080fd5b506103ed610784366004613256565b60026020526000908152604090205461ffff1681565b3480156107a657600080fd5b506104556115a8565b3480156107bb57600080fd5b506104556107ca366004613551565b61166c565b3480156107db57600080fd5b5061046c611687565b3480156107f057600080fd5b506007546104259060ff1681565b34801561080a57600080fd5b506105387e6b97d3b00e0cfa27932db8d8710f84e2b8d72f339a1e910bf97a09597e99d681565b34801561083d57600080fd5b5061049961084c366004613356565b611715565b34801561085d57600080fd5b5061045561086c3660046135f0565b611727565b34801561087d57600080fd5b5061053861088c366004613356565b61178e565b34801561089d57600080fd5b5061046c6118aa565b3480156108b257600080fd5b506105386108c1366004613256565b6118b7565b3480156108d257600080fd5b50610455611905565b3480156108e757600080fd5b506104556108f6366004613356565b61196b565b34801561090757600080fd5b5060015461092290600160401b90046001600160401b031681565b6040516001600160401b0390911681526020016103fc565b34801561094657600080fd5b506016546001600160a01b0316610499565b34801561096457600080fd5b506104256109733660046135b4565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156109a857600080fd5b5061046c6119cf565b3480156109bd57600080fd5b5061046c6119de565b3480156109d257600080fd5b506104556109e136600461336f565b6119eb565b3480156109f257600080fd5b50610538600081565b348015610a0757600080fd5b50610455610a16366004613623565b611a0b565b348015610a2757600080fd5b50600a54610538565b348015610a3c57600080fd5b50610455611aa0565b348015610a5157600080fd5b5061046c610a60366004613356565b611ad5565b348015610a7157600080fd5b506105387fc1548a18d6737e6c2687f3c32faa16a7b067bcc7ff7bfb5eb1bf50f8977c0de381565b348015610aa557600080fd5b50610455610ab4366004613426565b611b93565b348015610ac557600080fd5b50610455610ad4366004613651565b611bf9565b348015610ae557600080fd5b506103ed7f000000000000000000000000000000000000000000000000000000000000000081565b348015610b1957600080fd5b50610538610b28366004613356565b611c3d565b348015610b3957600080fd5b50600154610922906001600160401b031681565b348015610b5957600080fd5b5061046c610b68366004613356565b611d6e565b348015610b7957600080fd5b50610455610b883660046135b4565b611e58565b348015610b9957600080fd5b50610538600b5481565b348015610baf57600080fd5b506001546103ed90600160801b900461ffff1681565b348015610bd157600080fd5b506103ed7f000000000000000000000000000000000000000000000000000000000000000081565b348015610c0557600080fd5b50610455610c14366004613426565b611e7e565b348015610c2557600080fd5b506105387f4913d4da5605218c48834fed44bccb6bdddd90d4fdf48923cf059a07f6fe4a7781565b348015610c5957600080fd5b50610425610c683660046136d0565b6001600160a01b03918216600090815260136020908152604080832093909416825291909152205460ff1690565b348015610ca257600080fd5b50610455610cb1366004613256565b611f13565b6000610cc182611fdb565b80610cd05750610cd082611ffc565b80610cdf5750610cdf82612037565b92915050565b7fc1548a18d6737e6c2687f3c32faa16a7b067bcc7ff7bfb5eb1bf50f8977c0de3610d108133612042565b610d1a83836120c0565b505050565b6060600e8054610d2e906136fe565b80601f0160208091040260200160405190810160405280929190818152602001828054610d5a906136fe565b8015610da75780601f10610d7c57610100808354040283529160200191610da7565b820191906000526020600020905b815481529060010190602001808311610d8a57829003601f168201915b5050505050905090565b6000610dbc826121bd565b610dd9576040516333d1c03960e21b815260040160405180910390fd5b506000908152601260205260409020546001600160a01b031690565b6000610e0082611715565b9050806001600160a01b0316836001600160a01b031603610e345760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614610e6b57610e4e8133610c68565b610e6b576040516367d9dca160e11b815260040160405180910390fd5b610d1a8383836121e9565b7f6bd6b5318a46e5fff572d5e4258a20774aab40cc35ac7680654b9081fcc82f80610ea18133612042565b60075460ff1615610ec55760405163adc10ab560e01b815260040160405180910390fd5b81518290602f60f81b908290610edd90600190613748565b81518110610eed57610eed61375f565b01602001516001600160f81b03191614610f1a57604051633ba0191160e01b815260040160405180910390fd5b8251610f2d9060059060208601906131a8565b50505050565b600154600160801b900461ffff161580610f72575060018054610f72916001600160401b03600160401b8304811692610f6d929116613775565b612245565b15610f9057604051634ff4ea8360e11b815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000816000610fc261ffff83168461379d565b9050803414610ff25760405163e7cbe38160e01b8152346004820152602481018290526044015b60405180910390fd5b6040516001600160601b03193360601b16602082015286908690869060009060340160408051601f19818403018152918152815160209283012033600090815260039093529082205490925061ffff169061104d84836137bc565b90507f000000000000000000000000000000000000000000000000000000000000000061ffff168161ffff161115611098576040516307bcecd960e41b815260040160405180910390fd5b6110f88686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507f0000000000000000000000000000000000000000000000000000000000000000925087915061227b9050565b61111557604051630b094f2760e31b815260040160405180910390fd5b336000908152600360205260409020805461ffff191661ffff83811691909117909155600180548c92601091611154918591600160801b9004166137e2565b92506101000a81548161ffff021916908361ffff16021790555061117c338b61ffff16612293565b505050505050505050505050565b3361119483611715565b6001600160a01b0316146111bb5760405163ea8e4eb560e01b815260040160405180910390fd5b6111c582826122e8565b5050565b600154600160801b900461ffff1615806111ef5750600154426001600160401b03909116115b1561120d57604051636ea7008360e11b815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000081600061123f61ffff83168461379d565b905080341461126a5760405163e7cbe38160e01b815234600482015260248101829052604401610fe9565b3360009081526002602052604081205485917f0000000000000000000000000000000000000000000000000000000000000000916112ad90849061ffff166137bc565b90508161ffff168161ffff1611156112d8576040516307bcecd960e41b815260040160405180910390fd5b336000908152600260205260409020805461ffff191661ffff83811691909117909155600180548992601091611317918591600160801b9004166137e2565b92506101000a81548161ffff021916908361ffff16021790555061133f338861ffff16612293565b50505050505050565b600a818154811061135857600080fd5b600091825260209091200154905081565b7f6bd6b5318a46e5fff572d5e4258a20774aab40cc35ac7680654b9081fcc82f806113948133612042565b600580546113a1906136fe565b90506000036113c357604051633ba0191160e01b815260040160405180910390fd5b506007805460ff19166001179055565b610d1a83838361232b565b7e6b97d3b00e0cfa27932db8d8710f84e2b8d72f339a1e910bf97a09597e99d66114088133612042565b600b546040516001600160601b03193360601b166020820152426034820152605481019190915260740160408051601f198184030181529190528051602090910120600b805490911890556111c582612518565b60008281526015602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916114d15750604080518082019091526014546001600160a01b0381168252600160a01b90046001600160601b031660208201525b6020810151600090612710906114f0906001600160601b03168761379d565b6114fa9190613813565b915196919550909350505050565b6000828152602081905260409020600101546115248133612042565b610d1a83836125a1565b6001600160a01b038116331461159e5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610fe9565b6111c5828261263f565b7f4913d4da5605218c48834fed44bccb6bdddd90d4fdf48923cf059a07f6fe4a776115d38133612042565b6040514780825290339081907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59060200160405180910390a26000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114611659576040519150601f19603f3d011682016040523d82523d6000602084013e61165e565b606091505b5050905080610f2d57600080fd5b610d1a83838360405180602001604052806000815250611bf9565b60048054611694906136fe565b80601f01602080910402602001604051908101604052809291908181526020018280546116c0906136fe565b801561170d5780601f106116e25761010080835404028352916020019161170d565b820191906000526020600020905b8154815290600101906020018083116116f057829003601f168201915b505050505081565b6000611720826126be565b5192915050565b7f4913d4da5605218c48834fed44bccb6bdddd90d4fdf48923cf059a07f6fe4a776117528133612042565b600154600160401b90046001600160401b031642106117845760405163fec8c82160e01b815260040160405180910390fd5b610d1a83836127d8565b60006001600160801b037f000000000000000000000000000000000000000000000000000000000000000081169082906117cb9083908616613813565b90506000600a82815481106117e2576117e261375f565b90600052602060002001549050600060016117fc600a5490565b6118069190613748565b83149050600081611817578461184a565b61184a856001600160801b037f000000000000000000000000000000000000000000000000000000000000000016613827565b905082600003611861575060009695505050505050565b600061186d868661379d565b905060008261187c868b61383b565b6118869190613827565b9050611892818361383b565b61189d90600161383b565b9998505050505050505050565b60068054611694906136fe565b60006001600160a01b0382166118e0576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152601160205260409020546001600160401b031690565b6016546001600160a01b0316331461195f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610fe9565b6119696000612847565b565b600b546040516001600160601b03193360601b166020820152426034820152605481019190915260740160408051601f198184030181529190528051602090910120600b805490911890556119cc816119c7600d54600c540390565b612899565b50565b6060600f8054610d2e906136fe565b60058054611694906136fe565b60006119f78133612042565b610d1a6001600160a01b0384163384612999565b336001600160a01b03831603611a345760405163b06307db60e01b815260040160405180910390fd5b3360008181526013602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b7fc1548a18d6737e6c2687f3c32faa16a7b067bcc7ff7bfb5eb1bf50f8977c0de3611acb8133612042565b6119cc6000601455565b60008181526008602052604090205460609060ff1615611b815760058054611afc906136fe565b80601f0160208091040260200160405190810160405280929190818152602001828054611b28906136fe565b8015611b755780601f10611b4a57610100808354040283529160200191611b75565b820191906000526020600020905b815481529060010190602001808311611b5857829003601f168201915b50505050509050919050565b60048054611afc906136fe565b919050565b7f4913d4da5605218c48834fed44bccb6bdddd90d4fdf48923cf059a07f6fe4a77611bbe8133612042565b600154600160401b90046001600160401b03164210611bf05760405163fec8c82160e01b815260040160405180910390fd5b6111c5826129eb565b611c0484848461232b565b6001600160a01b0383163b15610f2d57611c2084848484612a53565b610f2d576040516368d2bf6b60e11b815260040160405180910390fd5b60006001600160801b037f0000000000000000000000000000000000000000000000000000000000000000168181611c76600186613748565b611c809190613813565b90506000600a8281548110611c9757611c9761375f565b9060005260206000200154905080600003611cb757506000949350505050565b60006001611cc4600a5490565b611cce9190613748565b83149050600081611cdf5784611d12565b611d12856001600160801b037f000000000000000000000000000000000000000000000000000000000000000016613827565b9050600081611d218582613748565b611d2b9190613827565b90508181611d3a60018b613748565b611d44919061383b565b611d4e9190613827565b611d58878761379d565b611d62919061383b565b98975050505050505050565b60606000611d7b8361178e565b905080600003611e185760068054611d92906136fe565b80601f0160208091040260200160405190810160405280929190818152602001828054611dbe906136fe565b8015611e0b5780601f10611de057610100808354040283529160200191611e0b565b820191906000526020600020905b815481529060010190602001808311611dee57829003601f168201915b5050505050915050919050565b611e2183611ad5565b611e2a82612b3e565b604051602001611e3b929190613853565b604051602081830303815290604052915050919050565b50919050565b600082815260208190526040902060010154611e748133612042565b610d1a838361263f565b6016546001600160a01b03163314611ed85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610fe9565b600154600160401b90046001600160401b03164210611f0a5760405163fec8c82160e01b815260040160405180910390fd5b6119cc81612c3e565b6016546001600160a01b03163314611f6d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610fe9565b6001600160a01b038116611fd25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610fe9565b6119cc81612847565b60006001600160e01b0319821663152a902d60e11b1480610cdf5750610cdf825b60006001600160e01b031982166380ac58cd60e01b1480610cd057506001600160e01b03198216635b5e139f60e01b1480610cdf5750610cdf825b6000610cdf82612c51565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166111c55761207e816001600160a01b03166014612c86565b612089836020612c86565b60405160200161209a929190613892565b60408051601f198184030181529082905262461bcd60e51b8252610fe991600401613343565b6127106001600160601b038216111561212e5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610fe9565b6001600160a01b0382166121845760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610fe9565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217601455565b6000600c5482108015610cdf575050600090815260106020526040902054600160e01b900460ff161590565b60008281526012602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000426001600160401b0380851690821610806122735750826001600160401b0316816001600160401b0316115b949350505050565b6000826122888584612e21565b1490505b9392505050565b600b546040516001600160601b03193360601b166020820152426034820152605481019190915260740160408051601f198184030181529190528051602090910120600b805490911890556111c58282612e95565b60075460ff1661230b57604051633c1f541560e21b815260040160405180910390fd5b600091825260086020526040909120805460ff1916911515919091179055565b6000612336826126be565b9050836001600160a01b031681600001516001600160a01b03161461236d5760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b038616148061238b575061238b8533610c68565b806123a657503361239b84610db1565b6001600160a01b0316145b9050806123c657604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0384166123ed57604051633a954ecd60e21b815260040160405180910390fd5b6123f9600084876121e9565b6001600160a01b038581166000908152601160209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652601090945282852080546001600160e01b031916909417600160a01b429092169190910217835587018084529220805491939091166124cd57600c5482146124cd57805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050505050565b600a818154811061252b5761252b61375f565b90600052602060002001546000036119cc57600b54612574906001600160801b037f00000000000000000000000000000000000000000000000000000000000000001690613827565b61257f90600161383b565b600a82815481106125925761259261375f565b60009182526020909120015550565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166111c5576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556125fb3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16156111c5576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b604080516060810182526000808252602082018190529181019190915281600c548110156127bf57600081815260106020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906127bd5780516001600160a01b031615612754579392505050565b5060001901600081815260106020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff16151592810192909252156127b8579392505050565b612754565b505b604051636f96cda160e11b815260040160405180910390fd5b806001600160401b0316826001600160401b03161061280a576040516317dbc4cb60e21b815260040160405180910390fd5b600180546fffffffffffffffffffffffffffffffff1916600160401b6001600160401b039485160267ffffffffffffffff19161791909216179055565b601680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b7f00000000000000000000000000000000000000000000000000000000000000004210156128da57604051635974967560e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160801b03168103612913576111c582612518565b60006001600160801b037f00000000000000000000000000000000000000000000000000000000000000001661294a84600161383b565b612954919061379d565b905080821015612990576040517fffb7c53700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d1a83612518565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610d1a908490612fc2565b80518190602f60f81b908290612a0390600190613748565b81518110612a1357612a1361375f565b01602001516001600160f81b03191614612a4057604051633ba0191160e01b815260040160405180910390fd5b8151610d1a9060049060208501906131a8565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612a88903390899088908890600401613907565b6020604051808303816000875af1925050508015612ac3575060408051601f3d908101601f19168201909252612ac091810190613943565b60015b612b21573d808015612af1576040519150601f19603f3d011682016040523d82523d6000602084013e612af6565b606091505b508051600003612b19576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606081600003612b655750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612b8f5780612b7981613960565b9150612b889050600a83613813565b9150612b69565b6000816001600160401b03811115612ba957612ba961339b565b6040519080825280601f01601f191660200182016040528015612bd3576020820181803683370190505b5090505b841561227357612be8600183613748565b9150612bf5600a86613827565b612c0090603061383b565b60f81b818381518110612c1557612c1561375f565b60200101906001600160f81b031916908160001a905350612c37600a86613813565b9450612bd7565b80516111c59060069060208401906131a8565b60006001600160e01b03198216637965db0b60e01b1480610cdf57506301ffc9a760e01b6001600160e01b0319831614610cdf565b60606000612c9583600261379d565b612ca090600261383b565b6001600160401b03811115612cb757612cb761339b565b6040519080825280601f01601f191660200182016040528015612ce1576020820181803683370190505b509050600360fc1b81600081518110612cfc57612cfc61375f565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612d2b57612d2b61375f565b60200101906001600160f81b031916908160001a9053506000612d4f84600261379d565b612d5a90600161383b565b90505b6001811115612dd2576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612d8e57612d8e61375f565b1a60f81b828281518110612da457612da461375f565b60200101906001600160f81b031916908160001a90535060049490941c93612dcb81613979565b9050612d5d565b50831561228c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610fe9565b600081815b8451811015612e8d576000858281518110612e4357612e4361375f565b60200260200101519050808311612e695760008381526020829052604090209250612e7a565b600081815260208490526040902092505b5080612e8581613960565b915050612e26565b509392505050565b600c546001600160a01b038316612ebe57604051622e076360e81b815260040160405180910390fd5b81600003612edf5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038316600081815260116020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168a018116918217600160401b67ffffffffffffffff1990941690921783900481168a01811690920217909155858452601090925290912080546001600160e01b031916909217600160a01b4290921691909102179055808083015b6040516001830192906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210612f765750600c55505050565b6000613017826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166130949092919063ffffffff16565b805190915015610d1a57808060200190518101906130359190613990565b610d1a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610fe9565b60606122738484600085856001600160a01b0385163b6130f65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610fe9565b600080866001600160a01b0316858760405161311291906139ad565b60006040518083038185875af1925050503d806000811461314f576040519150601f19603f3d011682016040523d82523d6000602084013e613154565b606091505b509150915061316482828661316f565b979650505050505050565b6060831561317e57508161228c565b82511561318e5782518084602001fd5b8160405162461bcd60e51b8152600401610fe99190613343565b8280546131b4906136fe565b90600052602060002090601f0160209004810192826131d6576000855561321c565b82601f106131ef57805160ff191683800117855561321c565b8280016001018555821561321c579182015b8281111561321c578251825591602001919060010190613201565b5061322892915061322c565b5090565b5b80821115613228576000815560010161322d565b6001600160a01b03811681146119cc57600080fd5b60006020828403121561326857600080fd5b813561228c81613241565b6001600160e01b0319811681146119cc57600080fd5b60006020828403121561329b57600080fd5b813561228c81613273565b600080604083850312156132b957600080fd5b82356132c481613241565b915060208301356001600160601b03811681146132e057600080fd5b809150509250929050565b60005b838110156133065781810151838201526020016132ee565b83811115610f2d5750506000910152565b6000815180845261332f8160208601602086016132eb565b601f01601f19169290920160200192915050565b60208152600061228c6020830184613317565b60006020828403121561336857600080fd5b5035919050565b6000806040838503121561338257600080fd5b823561338d81613241565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b03808411156133cb576133cb61339b565b604051601f8501601f19908116603f011681019082821181831017156133f3576133f361339b565b8160405280935085815286868601111561340c57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561343857600080fd5b81356001600160401b0381111561344e57600080fd5b8201601f8101841361345f57600080fd5b612273848235602084016133b1565b803561ffff81168114611b8e57600080fd5b60008060006040848603121561349557600080fd5b83356001600160401b03808211156134ac57600080fd5b818601915086601f8301126134c057600080fd5b8135818111156134cf57600080fd5b8760208260051b85010111156134e457600080fd5b6020928301955093506134fa918601905061346e565b90509250925092565b80151581146119cc57600080fd5b6000806040838503121561352457600080fd5b8235915060208301356132e081613503565b60006020828403121561354857600080fd5b61228c8261346e565b60008060006060848603121561356657600080fd5b833561357181613241565b9250602084013561358181613241565b929592945050506040919091013590565b600080604083850312156135a557600080fd5b50508035926020909101359150565b600080604083850312156135c757600080fd5b8235915060208301356132e081613241565b80356001600160401b0381168114611b8e57600080fd5b6000806040838503121561360357600080fd5b61360c836135d9565b915061361a602084016135d9565b90509250929050565b6000806040838503121561363657600080fd5b823561364181613241565b915060208301356132e081613503565b6000806000806080858703121561366757600080fd5b843561367281613241565b9350602085013561368281613241565b92506040850135915060608501356001600160401b038111156136a457600080fd5b8501601f810187136136b557600080fd5b6136c4878235602084016133b1565b91505092959194509250565b600080604083850312156136e357600080fd5b82356136ee81613241565b915060208301356132e081613241565b600181811c9082168061371257607f821691505b602082108103611e5257634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008282101561375a5761375a613732565b500390565b634e487b7160e01b600052603260045260246000fd5b60006001600160401b038381169083168181101561379557613795613732565b039392505050565b60008160001904831182151516156137b7576137b7613732565b500290565b600061ffff8083168185168083038211156137d9576137d9613732565b01949350505050565b600061ffff8381169083168181101561379557613795613732565b634e487b7160e01b600052601260045260246000fd5b600082613822576138226137fd565b500490565b600082613836576138366137fd565b500690565b6000821982111561384e5761384e613732565b500190565b600083516138658184602088016132eb565b8351908301906138798183602088016132eb565b64173539b7b760d91b9101908152600501949350505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516138ca8160178501602088016132eb565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516138fb8160288401602088016132eb565b01602801949350505050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526139396080830184613317565b9695505050505050565b60006020828403121561395557600080fd5b815161228c81613273565b60006001820161397257613972613732565b5060010190565b60008161398857613988613732565b506000190190565b6000602082840312156139a257600080fd5b815161228c81613503565b600082516139bf8184602087016132eb565b919091019291505056fea26469706673582212202850cc297e4d8c23826269b0520cc1c7dcc683d515ad8eb384b73b37a988ae0f64736f6c634300080e00330000000000000000000000000000000000000000000000000000000062e404000000000000000000000000000000000000000000000000000000000062e6a7000000000000000000000000000000000000000000000000000429d069189e00000000000000000000000000000000000000000000000000000494654067e10000000000000000000000000000000000000000000000000000000000000000343a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004ddea848d2899f6c8958864be9bb51c60692922861dd8a28e1540548d7bfb074b00000000000000000000000000000000000000000000000000000000000000fa000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d544b6565755a525436583645504d627743384a6f343877674866686a674d6178514c4d643245354b45437a4b2f000000000000000000000000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d567171747850697646525a5944567372766f5748454b534e59326745574b6f45314b4d7147595074573350710000000000000000000000

Deployed Bytecode

0x6080604052600436106103b75760003560e01c806367ba440a116101f2578063ab80daed1161010d578063d547741f116100a0578063e5ef873d1161006f578063e5ef873d14610bf9578063e8f6061814610c19578063e985e9c514610c4d578063f2fde38b14610c9657600080fd5b8063d547741f14610b6d578063d605787b14610b8d578063da0239a614610ba3578063e527c6dd14610bc557600080fd5b8063bc629bf5116100dc578063bc629bf514610ad9578063bd99119914610b0d578063c11442f814610b2d578063c87b56dd14610b4d57600080fd5b8063ab80daed14610a45578063ae581f3614610a65578063b2252c4214610a99578063b88d4fde14610ab957600080fd5b806391d1485411610185578063a217fddf11610154578063a217fddf146109e6578063a22cb465146109fb578063a8fabfa514610a1b578063aa1b103f14610a3057600080fd5b806391d148541461095857806395d89b411461099c5780639b70c86a146109b1578063a1db9782146109c657600080fd5b8063715018a6116101c1578063715018a6146108c65780637c1754e8146108db5780637f19c412146108fb5780638da5cb5b1461093a57600080fd5b806367ba440a146108515780636f8c1988146108715780637035bf181461089157806370a08231146108a657600080fd5b8063248a9ca3116102e25780633884178211610275578063446b45d611610244578063446b45d6146107cf5780635d8ab1d2146107e45780635f1770a2146107fe5780636352211e1461083157600080fd5b806338841782146107355780633add14c8146107695780633ccfd60b1461079a57806342842e0e146107af57600080fd5b80632dde5b5e116102b15780632dde5b5e1461068d5780632f2ff15d146106c15780632fff1796146106e157806336568abe1461071557600080fd5b8063248a9ca3146105e7578063265ab6761461061757806328879b11146106375780632a55205a1461064e57600080fd5b8063135696c71161035a57806318160ddd1161032957806318160ddd146105795780631b1d5b27146105925780631c4f9c66146105b257806323b872dd146105c757600080fd5b8063135696c7146104f1578063152f7b2514610504578063159a182b1461054657806316755b571461056657600080fd5b806306fdde031161039657806306fdde0314610457578063081812fc14610479578063095ea7b3146104b15780630f0d335e146104d157600080fd5b80628af2e6146103bc57806301ffc9a71461040557806304634d8d14610435575b600080fd5b3480156103c857600080fd5b506103ed6103d7366004613256565b60036020526000908152604090205461ffff1681565b60405161ffff90911681526020015b60405180910390f35b34801561041157600080fd5b50610425610420366004613289565b610cb6565b60405190151581526020016103fc565b34801561044157600080fd5b506104556104503660046132a6565b610ce5565b005b34801561046357600080fd5b5061046c610d1f565b6040516103fc9190613343565b34801561048557600080fd5b50610499610494366004613356565b610db1565b6040516001600160a01b0390911681526020016103fc565b3480156104bd57600080fd5b506104556104cc36600461336f565b610df5565b3480156104dd57600080fd5b506104556104ec366004613426565b610e76565b6104556104ff366004613480565b610f33565b34801561051057600080fd5b506105387f0000000000000000000000000000000000000000000000000494654067e1000081565b6040519081526020016103fc565b34801561055257600080fd5b50610455610561366004613511565b61118a565b610455610574366004613536565b6111c9565b34801561058557600080fd5b50600d54600c5403610538565b34801561059e57600080fd5b506105386105ad366004613356565b611348565b3480156105be57600080fd5b50610455611369565b3480156105d357600080fd5b506104556105e2366004613551565b6113d3565b3480156105f357600080fd5b50610538610602366004613356565b60009081526020819052604090206001015490565b34801561062357600080fd5b50610455610632366004613356565b6113de565b34801561064357600080fd5b506105386212750081565b34801561065a57600080fd5b5061066e610669366004613592565b61145c565b604080516001600160a01b0390931683526020830191909152016103fc565b34801561069957600080fd5b506105387f0000000000000000000000000000000000000000000000000000000062f6790081565b3480156106cd57600080fd5b506104556106dc3660046135b4565b611508565b3480156106ed57600080fd5b506105387f0000000000000000000000000000000000000000000000000429d069189e000081565b34801561072157600080fd5b506104556107303660046135b4565b61152e565b34801561074157600080fd5b506105387f6bd6b5318a46e5fff572d5e4258a20774aab40cc35ac7680654b9081fcc82f8081565b34801561077557600080fd5b506103ed610784366004613256565b60026020526000908152604090205461ffff1681565b3480156107a657600080fd5b506104556115a8565b3480156107bb57600080fd5b506104556107ca366004613551565b61166c565b3480156107db57600080fd5b5061046c611687565b3480156107f057600080fd5b506007546104259060ff1681565b34801561080a57600080fd5b506105387e6b97d3b00e0cfa27932db8d8710f84e2b8d72f339a1e910bf97a09597e99d681565b34801561083d57600080fd5b5061049961084c366004613356565b611715565b34801561085d57600080fd5b5061045561086c3660046135f0565b611727565b34801561087d57600080fd5b5061053861088c366004613356565b61178e565b34801561089d57600080fd5b5061046c6118aa565b3480156108b257600080fd5b506105386108c1366004613256565b6118b7565b3480156108d257600080fd5b50610455611905565b3480156108e757600080fd5b506104556108f6366004613356565b61196b565b34801561090757600080fd5b5060015461092290600160401b90046001600160401b031681565b6040516001600160401b0390911681526020016103fc565b34801561094657600080fd5b506016546001600160a01b0316610499565b34801561096457600080fd5b506104256109733660046135b4565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156109a857600080fd5b5061046c6119cf565b3480156109bd57600080fd5b5061046c6119de565b3480156109d257600080fd5b506104556109e136600461336f565b6119eb565b3480156109f257600080fd5b50610538600081565b348015610a0757600080fd5b50610455610a16366004613623565b611a0b565b348015610a2757600080fd5b50600a54610538565b348015610a3c57600080fd5b50610455611aa0565b348015610a5157600080fd5b5061046c610a60366004613356565b611ad5565b348015610a7157600080fd5b506105387fc1548a18d6737e6c2687f3c32faa16a7b067bcc7ff7bfb5eb1bf50f8977c0de381565b348015610aa557600080fd5b50610455610ab4366004613426565b611b93565b348015610ac557600080fd5b50610455610ad4366004613651565b611bf9565b348015610ae557600080fd5b506103ed7f000000000000000000000000000000000000000000000000000000000000000281565b348015610b1957600080fd5b50610538610b28366004613356565b611c3d565b348015610b3957600080fd5b50600154610922906001600160401b031681565b348015610b5957600080fd5b5061046c610b68366004613356565b611d6e565b348015610b7957600080fd5b50610455610b883660046135b4565b611e58565b348015610b9957600080fd5b50610538600b5481565b348015610baf57600080fd5b506001546103ed90600160801b900461ffff1681565b348015610bd157600080fd5b506103ed7f000000000000000000000000000000000000000000000000000000000000000481565b348015610c0557600080fd5b50610455610c14366004613426565b611e7e565b348015610c2557600080fd5b506105387f4913d4da5605218c48834fed44bccb6bdddd90d4fdf48923cf059a07f6fe4a7781565b348015610c5957600080fd5b50610425610c683660046136d0565b6001600160a01b03918216600090815260136020908152604080832093909416825291909152205460ff1690565b348015610ca257600080fd5b50610455610cb1366004613256565b611f13565b6000610cc182611fdb565b80610cd05750610cd082611ffc565b80610cdf5750610cdf82612037565b92915050565b7fc1548a18d6737e6c2687f3c32faa16a7b067bcc7ff7bfb5eb1bf50f8977c0de3610d108133612042565b610d1a83836120c0565b505050565b6060600e8054610d2e906136fe565b80601f0160208091040260200160405190810160405280929190818152602001828054610d5a906136fe565b8015610da75780601f10610d7c57610100808354040283529160200191610da7565b820191906000526020600020905b815481529060010190602001808311610d8a57829003601f168201915b5050505050905090565b6000610dbc826121bd565b610dd9576040516333d1c03960e21b815260040160405180910390fd5b506000908152601260205260409020546001600160a01b031690565b6000610e0082611715565b9050806001600160a01b0316836001600160a01b031603610e345760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614610e6b57610e4e8133610c68565b610e6b576040516367d9dca160e11b815260040160405180910390fd5b610d1a8383836121e9565b7f6bd6b5318a46e5fff572d5e4258a20774aab40cc35ac7680654b9081fcc82f80610ea18133612042565b60075460ff1615610ec55760405163adc10ab560e01b815260040160405180910390fd5b81518290602f60f81b908290610edd90600190613748565b81518110610eed57610eed61375f565b01602001516001600160f81b03191614610f1a57604051633ba0191160e01b815260040160405180910390fd5b8251610f2d9060059060208601906131a8565b50505050565b600154600160801b900461ffff161580610f72575060018054610f72916001600160401b03600160401b8304811692610f6d929116613775565b612245565b15610f9057604051634ff4ea8360e11b815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000429d069189e0000816000610fc261ffff83168461379d565b9050803414610ff25760405163e7cbe38160e01b8152346004820152602481018290526044015b60405180910390fd5b6040516001600160601b03193360601b16602082015286908690869060009060340160408051601f19818403018152918152815160209283012033600090815260039093529082205490925061ffff169061104d84836137bc565b90507f000000000000000000000000000000000000000000000000000000000000000261ffff168161ffff161115611098576040516307bcecd960e41b815260040160405180910390fd5b6110f88686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507fddea848d2899f6c8958864be9bb51c60692922861dd8a28e1540548d7bfb074b925087915061227b9050565b61111557604051630b094f2760e31b815260040160405180910390fd5b336000908152600360205260409020805461ffff191661ffff83811691909117909155600180548c92601091611154918591600160801b9004166137e2565b92506101000a81548161ffff021916908361ffff16021790555061117c338b61ffff16612293565b505050505050505050505050565b3361119483611715565b6001600160a01b0316146111bb5760405163ea8e4eb560e01b815260040160405180910390fd5b6111c582826122e8565b5050565b600154600160801b900461ffff1615806111ef5750600154426001600160401b03909116115b1561120d57604051636ea7008360e11b815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000494654067e1000081600061123f61ffff83168461379d565b905080341461126a5760405163e7cbe38160e01b815234600482015260248101829052604401610fe9565b3360009081526002602052604081205485917f0000000000000000000000000000000000000000000000000000000000000004916112ad90849061ffff166137bc565b90508161ffff168161ffff1611156112d8576040516307bcecd960e41b815260040160405180910390fd5b336000908152600260205260409020805461ffff191661ffff83811691909117909155600180548992601091611317918591600160801b9004166137e2565b92506101000a81548161ffff021916908361ffff16021790555061133f338861ffff16612293565b50505050505050565b600a818154811061135857600080fd5b600091825260209091200154905081565b7f6bd6b5318a46e5fff572d5e4258a20774aab40cc35ac7680654b9081fcc82f806113948133612042565b600580546113a1906136fe565b90506000036113c357604051633ba0191160e01b815260040160405180910390fd5b506007805460ff19166001179055565b610d1a83838361232b565b7e6b97d3b00e0cfa27932db8d8710f84e2b8d72f339a1e910bf97a09597e99d66114088133612042565b600b546040516001600160601b03193360601b166020820152426034820152605481019190915260740160408051601f198184030181529190528051602090910120600b805490911890556111c582612518565b60008281526015602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916114d15750604080518082019091526014546001600160a01b0381168252600160a01b90046001600160601b031660208201525b6020810151600090612710906114f0906001600160601b03168761379d565b6114fa9190613813565b915196919550909350505050565b6000828152602081905260409020600101546115248133612042565b610d1a83836125a1565b6001600160a01b038116331461159e5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610fe9565b6111c5828261263f565b7f4913d4da5605218c48834fed44bccb6bdddd90d4fdf48923cf059a07f6fe4a776115d38133612042565b6040514780825290339081907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59060200160405180910390a26000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114611659576040519150601f19603f3d011682016040523d82523d6000602084013e61165e565b606091505b5050905080610f2d57600080fd5b610d1a83838360405180602001604052806000815250611bf9565b60048054611694906136fe565b80601f01602080910402602001604051908101604052809291908181526020018280546116c0906136fe565b801561170d5780601f106116e25761010080835404028352916020019161170d565b820191906000526020600020905b8154815290600101906020018083116116f057829003601f168201915b505050505081565b6000611720826126be565b5192915050565b7f4913d4da5605218c48834fed44bccb6bdddd90d4fdf48923cf059a07f6fe4a776117528133612042565b600154600160401b90046001600160401b031642106117845760405163fec8c82160e01b815260040160405180910390fd5b610d1a83836127d8565b60006001600160801b037f00000000000000000000000000000000000000000000000000000000000000fa81169082906117cb9083908616613813565b90506000600a82815481106117e2576117e261375f565b90600052602060002001549050600060016117fc600a5490565b6118069190613748565b83149050600081611817578461184a565b61184a856001600160801b037f000000000000000000000000000000000000000000000000000000000000343a16613827565b905082600003611861575060009695505050505050565b600061186d868661379d565b905060008261187c868b61383b565b6118869190613827565b9050611892818361383b565b61189d90600161383b565b9998505050505050505050565b60068054611694906136fe565b60006001600160a01b0382166118e0576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152601160205260409020546001600160401b031690565b6016546001600160a01b0316331461195f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610fe9565b6119696000612847565b565b600b546040516001600160601b03193360601b166020820152426034820152605481019190915260740160408051601f198184030181529190528051602090910120600b805490911890556119cc816119c7600d54600c540390565b612899565b50565b6060600f8054610d2e906136fe565b60058054611694906136fe565b60006119f78133612042565b610d1a6001600160a01b0384163384612999565b336001600160a01b03831603611a345760405163b06307db60e01b815260040160405180910390fd5b3360008181526013602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b7fc1548a18d6737e6c2687f3c32faa16a7b067bcc7ff7bfb5eb1bf50f8977c0de3611acb8133612042565b6119cc6000601455565b60008181526008602052604090205460609060ff1615611b815760058054611afc906136fe565b80601f0160208091040260200160405190810160405280929190818152602001828054611b28906136fe565b8015611b755780601f10611b4a57610100808354040283529160200191611b75565b820191906000526020600020905b815481529060010190602001808311611b5857829003601f168201915b50505050509050919050565b60048054611afc906136fe565b919050565b7f4913d4da5605218c48834fed44bccb6bdddd90d4fdf48923cf059a07f6fe4a77611bbe8133612042565b600154600160401b90046001600160401b03164210611bf05760405163fec8c82160e01b815260040160405180910390fd5b6111c5826129eb565b611c0484848461232b565b6001600160a01b0383163b15610f2d57611c2084848484612a53565b610f2d576040516368d2bf6b60e11b815260040160405180910390fd5b60006001600160801b037f00000000000000000000000000000000000000000000000000000000000000fa168181611c76600186613748565b611c809190613813565b90506000600a8281548110611c9757611c9761375f565b9060005260206000200154905080600003611cb757506000949350505050565b60006001611cc4600a5490565b611cce9190613748565b83149050600081611cdf5784611d12565b611d12856001600160801b037f000000000000000000000000000000000000000000000000000000000000343a16613827565b9050600081611d218582613748565b611d2b9190613827565b90508181611d3a60018b613748565b611d44919061383b565b611d4e9190613827565b611d58878761379d565b611d62919061383b565b98975050505050505050565b60606000611d7b8361178e565b905080600003611e185760068054611d92906136fe565b80601f0160208091040260200160405190810160405280929190818152602001828054611dbe906136fe565b8015611e0b5780601f10611de057610100808354040283529160200191611e0b565b820191906000526020600020905b815481529060010190602001808311611dee57829003601f168201915b5050505050915050919050565b611e2183611ad5565b611e2a82612b3e565b604051602001611e3b929190613853565b604051602081830303815290604052915050919050565b50919050565b600082815260208190526040902060010154611e748133612042565b610d1a838361263f565b6016546001600160a01b03163314611ed85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610fe9565b600154600160401b90046001600160401b03164210611f0a5760405163fec8c82160e01b815260040160405180910390fd5b6119cc81612c3e565b6016546001600160a01b03163314611f6d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610fe9565b6001600160a01b038116611fd25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610fe9565b6119cc81612847565b60006001600160e01b0319821663152a902d60e11b1480610cdf5750610cdf825b60006001600160e01b031982166380ac58cd60e01b1480610cd057506001600160e01b03198216635b5e139f60e01b1480610cdf5750610cdf825b6000610cdf82612c51565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166111c55761207e816001600160a01b03166014612c86565b612089836020612c86565b60405160200161209a929190613892565b60408051601f198184030181529082905262461bcd60e51b8252610fe991600401613343565b6127106001600160601b038216111561212e5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610fe9565b6001600160a01b0382166121845760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610fe9565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217601455565b6000600c5482108015610cdf575050600090815260106020526040902054600160e01b900460ff161590565b60008281526012602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000426001600160401b0380851690821610806122735750826001600160401b0316816001600160401b0316115b949350505050565b6000826122888584612e21565b1490505b9392505050565b600b546040516001600160601b03193360601b166020820152426034820152605481019190915260740160408051601f198184030181529190528051602090910120600b805490911890556111c58282612e95565b60075460ff1661230b57604051633c1f541560e21b815260040160405180910390fd5b600091825260086020526040909120805460ff1916911515919091179055565b6000612336826126be565b9050836001600160a01b031681600001516001600160a01b03161461236d5760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b038616148061238b575061238b8533610c68565b806123a657503361239b84610db1565b6001600160a01b0316145b9050806123c657604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0384166123ed57604051633a954ecd60e21b815260040160405180910390fd5b6123f9600084876121e9565b6001600160a01b038581166000908152601160209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652601090945282852080546001600160e01b031916909417600160a01b429092169190910217835587018084529220805491939091166124cd57600c5482146124cd57805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050505050565b600a818154811061252b5761252b61375f565b90600052602060002001546000036119cc57600b54612574906001600160801b037f00000000000000000000000000000000000000000000000000000000000000fa1690613827565b61257f90600161383b565b600a82815481106125925761259261375f565b60009182526020909120015550565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166111c5576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556125fb3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16156111c5576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b604080516060810182526000808252602082018190529181019190915281600c548110156127bf57600081815260106020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906127bd5780516001600160a01b031615612754579392505050565b5060001901600081815260106020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff16151592810192909252156127b8579392505050565b612754565b505b604051636f96cda160e11b815260040160405180910390fd5b806001600160401b0316826001600160401b03161061280a576040516317dbc4cb60e21b815260040160405180910390fd5b600180546fffffffffffffffffffffffffffffffff1916600160401b6001600160401b039485160267ffffffffffffffff19161791909216179055565b601680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b7f0000000000000000000000000000000000000000000000000000000062f679004210156128da57604051635974967560e01b815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000343a6001600160801b03168103612913576111c582612518565b60006001600160801b037f00000000000000000000000000000000000000000000000000000000000000fa1661294a84600161383b565b612954919061379d565b905080821015612990576040517fffb7c53700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d1a83612518565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610d1a908490612fc2565b80518190602f60f81b908290612a0390600190613748565b81518110612a1357612a1361375f565b01602001516001600160f81b03191614612a4057604051633ba0191160e01b815260040160405180910390fd5b8151610d1a9060049060208501906131a8565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612a88903390899088908890600401613907565b6020604051808303816000875af1925050508015612ac3575060408051601f3d908101601f19168201909252612ac091810190613943565b60015b612b21573d808015612af1576040519150601f19603f3d011682016040523d82523d6000602084013e612af6565b606091505b508051600003612b19576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606081600003612b655750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612b8f5780612b7981613960565b9150612b889050600a83613813565b9150612b69565b6000816001600160401b03811115612ba957612ba961339b565b6040519080825280601f01601f191660200182016040528015612bd3576020820181803683370190505b5090505b841561227357612be8600183613748565b9150612bf5600a86613827565b612c0090603061383b565b60f81b818381518110612c1557612c1561375f565b60200101906001600160f81b031916908160001a905350612c37600a86613813565b9450612bd7565b80516111c59060069060208401906131a8565b60006001600160e01b03198216637965db0b60e01b1480610cdf57506301ffc9a760e01b6001600160e01b0319831614610cdf565b60606000612c9583600261379d565b612ca090600261383b565b6001600160401b03811115612cb757612cb761339b565b6040519080825280601f01601f191660200182016040528015612ce1576020820181803683370190505b509050600360fc1b81600081518110612cfc57612cfc61375f565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612d2b57612d2b61375f565b60200101906001600160f81b031916908160001a9053506000612d4f84600261379d565b612d5a90600161383b565b90505b6001811115612dd2576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612d8e57612d8e61375f565b1a60f81b828281518110612da457612da461375f565b60200101906001600160f81b031916908160001a90535060049490941c93612dcb81613979565b9050612d5d565b50831561228c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610fe9565b600081815b8451811015612e8d576000858281518110612e4357612e4361375f565b60200260200101519050808311612e695760008381526020829052604090209250612e7a565b600081815260208490526040902092505b5080612e8581613960565b915050612e26565b509392505050565b600c546001600160a01b038316612ebe57604051622e076360e81b815260040160405180910390fd5b81600003612edf5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038316600081815260116020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168a018116918217600160401b67ffffffffffffffff1990941690921783900481168a01811690920217909155858452601090925290912080546001600160e01b031916909217600160a01b4290921691909102179055808083015b6040516001830192906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210612f765750600c55505050565b6000613017826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166130949092919063ffffffff16565b805190915015610d1a57808060200190518101906130359190613990565b610d1a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610fe9565b60606122738484600085856001600160a01b0385163b6130f65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610fe9565b600080866001600160a01b0316858760405161311291906139ad565b60006040518083038185875af1925050503d806000811461314f576040519150601f19603f3d011682016040523d82523d6000602084013e613154565b606091505b509150915061316482828661316f565b979650505050505050565b6060831561317e57508161228c565b82511561318e5782518084602001fd5b8160405162461bcd60e51b8152600401610fe99190613343565b8280546131b4906136fe565b90600052602060002090601f0160209004810192826131d6576000855561321c565b82601f106131ef57805160ff191683800117855561321c565b8280016001018555821561321c579182015b8281111561321c578251825591602001919060010190613201565b5061322892915061322c565b5090565b5b80821115613228576000815560010161322d565b6001600160a01b03811681146119cc57600080fd5b60006020828403121561326857600080fd5b813561228c81613241565b6001600160e01b0319811681146119cc57600080fd5b60006020828403121561329b57600080fd5b813561228c81613273565b600080604083850312156132b957600080fd5b82356132c481613241565b915060208301356001600160601b03811681146132e057600080fd5b809150509250929050565b60005b838110156133065781810151838201526020016132ee565b83811115610f2d5750506000910152565b6000815180845261332f8160208601602086016132eb565b601f01601f19169290920160200192915050565b60208152600061228c6020830184613317565b60006020828403121561336857600080fd5b5035919050565b6000806040838503121561338257600080fd5b823561338d81613241565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b03808411156133cb576133cb61339b565b604051601f8501601f19908116603f011681019082821181831017156133f3576133f361339b565b8160405280935085815286868601111561340c57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561343857600080fd5b81356001600160401b0381111561344e57600080fd5b8201601f8101841361345f57600080fd5b612273848235602084016133b1565b803561ffff81168114611b8e57600080fd5b60008060006040848603121561349557600080fd5b83356001600160401b03808211156134ac57600080fd5b818601915086601f8301126134c057600080fd5b8135818111156134cf57600080fd5b8760208260051b85010111156134e457600080fd5b6020928301955093506134fa918601905061346e565b90509250925092565b80151581146119cc57600080fd5b6000806040838503121561352457600080fd5b8235915060208301356132e081613503565b60006020828403121561354857600080fd5b61228c8261346e565b60008060006060848603121561356657600080fd5b833561357181613241565b9250602084013561358181613241565b929592945050506040919091013590565b600080604083850312156135a557600080fd5b50508035926020909101359150565b600080604083850312156135c757600080fd5b8235915060208301356132e081613241565b80356001600160401b0381168114611b8e57600080fd5b6000806040838503121561360357600080fd5b61360c836135d9565b915061361a602084016135d9565b90509250929050565b6000806040838503121561363657600080fd5b823561364181613241565b915060208301356132e081613503565b6000806000806080858703121561366757600080fd5b843561367281613241565b9350602085013561368281613241565b92506040850135915060608501356001600160401b038111156136a457600080fd5b8501601f810187136136b557600080fd5b6136c4878235602084016133b1565b91505092959194509250565b600080604083850312156136e357600080fd5b82356136ee81613241565b915060208301356132e081613241565b600181811c9082168061371257607f821691505b602082108103611e5257634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008282101561375a5761375a613732565b500390565b634e487b7160e01b600052603260045260246000fd5b60006001600160401b038381169083168181101561379557613795613732565b039392505050565b60008160001904831182151516156137b7576137b7613732565b500290565b600061ffff8083168185168083038211156137d9576137d9613732565b01949350505050565b600061ffff8381169083168181101561379557613795613732565b634e487b7160e01b600052601260045260246000fd5b600082613822576138226137fd565b500490565b600082613836576138366137fd565b500690565b6000821982111561384e5761384e613732565b500190565b600083516138658184602088016132eb565b8351908301906138798183602088016132eb565b64173539b7b760d91b9101908152600501949350505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516138ca8160178501602088016132eb565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516138fb8160288401602088016132eb565b01602801949350505050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526139396080830184613317565b9695505050505050565b60006020828403121561395557600080fd5b815161228c81613273565b60006001820161397257613972613732565b5060010190565b60008161398857613988613732565b506000190190565b6000602082840312156139a257600080fd5b815161228c81613503565b600082516139bf8184602087016132eb565b919091019291505056fea26469706673582212202850cc297e4d8c23826269b0520cc1c7dcc683d515ad8eb384b73b37a988ae0f64736f6c634300080e0033

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

0000000000000000000000000000000000000000000000000000000062e404000000000000000000000000000000000000000000000000000000000062e6a7000000000000000000000000000000000000000000000000000429d069189e00000000000000000000000000000000000000000000000000000494654067e10000000000000000000000000000000000000000000000000000000000000000343a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004ddea848d2899f6c8958864be9bb51c60692922861dd8a28e1540548d7bfb074b00000000000000000000000000000000000000000000000000000000000000fa000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d544b6565755a525436583645504d627743384a6f343877674866686a674d6178514c4d643245354b45437a4b2f000000000000000000000000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d567171747850697646525a5944567372766f5748454b534e59326745574b6f45314b4d7147595074573350710000000000000000000000

-----Decoded View---------------
Arg [0] : _startWhitelist (uint64): 1659110400
Arg [1] : _startPublic (uint64): 1659283200
Arg [2] : _priceWhitelist (uint256): 300000000000000000
Arg [3] : _pricePub (uint256): 330000000000000000
Arg [4] : _supply (uint16): 13370
Arg [5] : _whitelistMax (uint16): 2
Arg [6] : _publicMax (uint16): 4
Arg [7] : _whitelistMerkleRoot (bytes32): 0xddea848d2899f6c8958864be9bb51c60692922861dd8a28e1540548d7bfb074b
Arg [8] : _revealBatchSize (uint16): 250
Arg [9] : _baseURI (string): ipfs://QmTKeeuZRT6X6EPMbwC8Jo48wgHfhjgMaxQLMd2E5KECzK/
Arg [10] : _unrevealedURI (string): ipfs://QmVqqtxPivFRZYDVsrvoWHEKSNY2gEWKoE1KMqGYPtW3Pq

-----Encoded View---------------
17 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000062e40400
Arg [1] : 0000000000000000000000000000000000000000000000000000000062e6a700
Arg [2] : 0000000000000000000000000000000000000000000000000429d069189e0000
Arg [3] : 0000000000000000000000000000000000000000000000000494654067e10000
Arg [4] : 000000000000000000000000000000000000000000000000000000000000343a
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [7] : ddea848d2899f6c8958864be9bb51c60692922861dd8a28e1540548d7bfb074b
Arg [8] : 00000000000000000000000000000000000000000000000000000000000000fa
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [10] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000036
Arg [12] : 697066733a2f2f516d544b6565755a525436583645504d627743384a6f343877
Arg [13] : 674866686a674d6178514c4d643245354b45437a4b2f00000000000000000000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000035
Arg [15] : 697066733a2f2f516d567171747850697646525a5944567372766f5748454b53
Arg [16] : 4e59326745574b6f45314b4d7147595074573350710000000000000000000000


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.