{"sources":{"@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard ERC20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\n */\ninterface IERC20Errors {\n    /**\n     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param balance Current balance for the interacting account.\n     * @param needed Minimum amount required to perform a transfer.\n     */\n    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC20InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC20InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n     * @param spender Address that may be allowed to operate on tokens without being their owner.\n     * @param allowance Amount of tokens a `spender` is allowed to operate with.\n     * @param needed Minimum amount required to perform a transfer.\n     */\n    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC20InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n     * @param spender Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\n */\ninterface IERC721Errors {\n    /**\n     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\n     * Used in balance queries.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC721InvalidOwner(address owner);\n\n    /**\n     * @dev Indicates a `tokenId` whose `owner` is the zero address.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC721NonexistentToken(uint256 tokenId);\n\n    /**\n     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param tokenId Identifier number of a token.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC721InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC721InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC721InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\n */\ninterface IERC1155Errors {\n    /**\n     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param balance Current balance for the interacting account.\n     * @param needed Minimum amount required to perform a transfer.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC1155InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC1155InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC1155MissingApprovalForAll(address operator, address owner);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC1155InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC1155InvalidOperator(address operator);\n\n    /**\n     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n     * Used in batch transfers.\n     * @param idsLength Length of the array of token identifiers\n     * @param valuesLength Length of the array of token amounts\n     */\n    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n"},"@openzeppelin/contracts/token/ERC721/ERC721.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/ERC721.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC721} from \"./IERC721.sol\";\nimport {IERC721Receiver} from \"./IERC721Receiver.sol\";\nimport {IERC721Metadata} from \"./extensions/IERC721Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {Strings} from \"../../utils/Strings.sol\";\nimport {IERC165, ERC165} from \"../../utils/introspection/ERC165.sol\";\nimport {IERC721Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\n * {ERC721Enumerable}.\n */\nabstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Errors {\n    using Strings for uint256;\n\n    // Token name\n    string private _name;\n\n    // Token symbol\n    string private _symbol;\n\n    mapping(uint256 tokenId => address) private _owners;\n\n    mapping(address owner => uint256) private _balances;\n\n    mapping(uint256 tokenId => address) private _tokenApprovals;\n\n    mapping(address owner => mapping(address operator => bool)) private _operatorApprovals;\n\n    /**\n     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\n     */\n    constructor(string memory name_, string memory symbol_) {\n        _name = name_;\n        _symbol = symbol_;\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n        return\n            interfaceId == type(IERC721).interfaceId ||\n            interfaceId == type(IERC721Metadata).interfaceId ||\n            super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev See {IERC721-balanceOf}.\n     */\n    function balanceOf(address owner) public view virtual returns (uint256) {\n        if (owner == address(0)) {\n            revert ERC721InvalidOwner(address(0));\n        }\n        return _balances[owner];\n    }\n\n    /**\n     * @dev See {IERC721-ownerOf}.\n     */\n    function ownerOf(uint256 tokenId) public view virtual returns (address) {\n        return _requireOwned(tokenId);\n    }\n\n    /**\n     * @dev See {IERC721Metadata-name}.\n     */\n    function name() public view virtual returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev See {IERC721Metadata-symbol}.\n     */\n    function symbol() public view virtual returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev See {IERC721Metadata-tokenURI}.\n     */\n    function tokenURI(uint256 tokenId) public view virtual returns (string memory) {\n        _requireOwned(tokenId);\n\n        string memory baseURI = _baseURI();\n        return bytes(baseURI).length > 0 ? string.concat(baseURI, tokenId.toString()) : \"\";\n    }\n\n    /**\n     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n     * by default, can be overridden in child contracts.\n     */\n    function _baseURI() internal view virtual returns (string memory) {\n        return \"\";\n    }\n\n    /**\n     * @dev See {IERC721-approve}.\n     */\n    function approve(address to, uint256 tokenId) public virtual {\n        _approve(to, tokenId, _msgSender());\n    }\n\n    /**\n     * @dev See {IERC721-getApproved}.\n     */\n    function getApproved(uint256 tokenId) public view virtual returns (address) {\n        _requireOwned(tokenId);\n\n        return _getApproved(tokenId);\n    }\n\n    /**\n     * @dev See {IERC721-setApprovalForAll}.\n     */\n    function setApprovalForAll(address operator, bool approved) public virtual {\n        _setApprovalForAll(_msgSender(), operator, approved);\n    }\n\n    /**\n     * @dev See {IERC721-isApprovedForAll}.\n     */\n    function isApprovedForAll(address owner, address operator) public view virtual returns (bool) {\n        return _operatorApprovals[owner][operator];\n    }\n\n    /**\n     * @dev See {IERC721-transferFrom}.\n     */\n    function transferFrom(address from, address to, uint256 tokenId) public virtual {\n        if (to == address(0)) {\n            revert ERC721InvalidReceiver(address(0));\n        }\n        // Setting an \"auth\" arguments enables the `_isAuthorized` check which verifies that the token exists\n        // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.\n        address previousOwner = _update(to, tokenId, _msgSender());\n        if (previousOwner != from) {\n            revert ERC721IncorrectOwner(from, tokenId, previousOwner);\n        }\n    }\n\n    /**\n     * @dev See {IERC721-safeTransferFrom}.\n     */\n    function safeTransferFrom(address from, address to, uint256 tokenId) public {\n        safeTransferFrom(from, to, tokenId, \"\");\n    }\n\n    /**\n     * @dev See {IERC721-safeTransferFrom}.\n     */\n    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual {\n        transferFrom(from, to, tokenId);\n        _checkOnERC721Received(from, to, tokenId, data);\n    }\n\n    /**\n     * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist\n     *\n     * IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the\n     * core ERC721 logic MUST be matched with the use of {_increaseBalance} to keep balances\n     * consistent with ownership. The invariant to preserve is that for any address `a` the value returned by\n     * `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`.\n     */\n    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\n        return _owners[tokenId];\n    }\n\n    /**\n     * @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted.\n     */\n    function _getApproved(uint256 tokenId) internal view virtual returns (address) {\n        return _tokenApprovals[tokenId];\n    }\n\n    /**\n     * @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in\n     * particular (ignoring whether it is owned by `owner`).\n     *\n     * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this\n     * assumption.\n     */\n    function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) {\n        return\n            spender != address(0) &&\n            (owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender);\n    }\n\n    /**\n     * @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner.\n     * Reverts if `spender` does not have approval from the provided `owner` for the given token or for all its assets\n     * the `spender` for the specific `tokenId`.\n     *\n     * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this\n     * assumption.\n     */\n    function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual {\n        if (!_isAuthorized(owner, spender, tokenId)) {\n            if (owner == address(0)) {\n                revert ERC721NonexistentToken(tokenId);\n            } else {\n                revert ERC721InsufficientApproval(spender, tokenId);\n            }\n        }\n    }\n\n    /**\n     * @dev Unsafe write access to the balances, used by extensions that \"mint\" tokens using an {ownerOf} override.\n     *\n     * NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that\n     * a uint256 would ever overflow from increments when these increments are bounded to uint128 values.\n     *\n     * WARNING: Increasing an account's balance using this function tends to be paired with an override of the\n     * {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership\n     * remain consistent with one another.\n     */\n    function _increaseBalance(address account, uint128 value) internal virtual {\n        unchecked {\n            _balances[account] += value;\n        }\n    }\n\n    /**\n     * @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner\n     * (or `to`) is the zero address. Returns the owner of the `tokenId` before the update.\n     *\n     * The `auth` argument is optional. If the value passed is non 0, then this function will check that\n     * `auth` is either the owner of the token, or approved to operate on the token (by the owner).\n     *\n     * Emits a {Transfer} event.\n     *\n     * NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}.\n     */\n    function _update(address to, uint256 tokenId, address auth) internal virtual returns (address) {\n        address from = _ownerOf(tokenId);\n\n        // Perform (optional) operator check\n        if (auth != address(0)) {\n            _checkAuthorized(from, auth, tokenId);\n        }\n\n        // Execute the update\n        if (from != address(0)) {\n            // Clear approval. No need to re-authorize or emit the Approval event\n            _approve(address(0), tokenId, address(0), false);\n\n            unchecked {\n                _balances[from] -= 1;\n            }\n        }\n\n        if (to != address(0)) {\n            unchecked {\n                _balances[to] += 1;\n            }\n        }\n\n        _owners[tokenId] = to;\n\n        emit Transfer(from, to, tokenId);\n\n        return from;\n    }\n\n    /**\n     * @dev Mints `tokenId` and transfers it to `to`.\n     *\n     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\n     *\n     * Requirements:\n     *\n     * - `tokenId` must not exist.\n     * - `to` cannot be the zero address.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _mint(address to, uint256 tokenId) internal {\n        if (to == address(0)) {\n            revert ERC721InvalidReceiver(address(0));\n        }\n        address previousOwner = _update(to, tokenId, address(0));\n        if (previousOwner != address(0)) {\n            revert ERC721InvalidSender(address(0));\n        }\n    }\n\n    /**\n     * @dev Mints `tokenId`, transfers it to `to` and checks for `to` acceptance.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must not exist.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _safeMint(address to, uint256 tokenId) internal {\n        _safeMint(to, tokenId, \"\");\n    }\n\n    /**\n     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\n     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\n     */\n    function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {\n        _mint(to, tokenId);\n        _checkOnERC721Received(address(0), to, tokenId, data);\n    }\n\n    /**\n     * @dev Destroys `tokenId`.\n     * The approval is cleared when the token is burned.\n     * This is an internal function that does not check if the sender is authorized to operate on the token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _burn(uint256 tokenId) internal {\n        address previousOwner = _update(address(0), tokenId, address(0));\n        if (previousOwner == address(0)) {\n            revert ERC721NonexistentToken(tokenId);\n        }\n    }\n\n    /**\n     * @dev Transfers `tokenId` from `from` to `to`.\n     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must be owned by `from`.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _transfer(address from, address to, uint256 tokenId) internal {\n        if (to == address(0)) {\n            revert ERC721InvalidReceiver(address(0));\n        }\n        address previousOwner = _update(to, tokenId, address(0));\n        if (previousOwner == address(0)) {\n            revert ERC721NonexistentToken(tokenId);\n        } else if (previousOwner != from) {\n            revert ERC721IncorrectOwner(from, tokenId, previousOwner);\n        }\n    }\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients\n     * are aware of the ERC721 standard to prevent tokens from being forever locked.\n     *\n     * `data` is additional data, it has no specified format and it is sent in call to `to`.\n     *\n     * This internal function is like {safeTransferFrom} in the sense that it invokes\n     * {IERC721Receiver-onERC721Received} on the receiver, and can be used to e.g.\n     * implement alternative mechanisms to perform token transfer, such as signature-based.\n     *\n     * Requirements:\n     *\n     * - `tokenId` token must exist and be owned by `from`.\n     * - `to` cannot be the zero address.\n     * - `from` cannot be the zero address.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _safeTransfer(address from, address to, uint256 tokenId) internal {\n        _safeTransfer(from, to, tokenId, \"\");\n    }\n\n    /**\n     * @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is\n     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\n     */\n    function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {\n        _transfer(from, to, tokenId);\n        _checkOnERC721Received(from, to, tokenId, data);\n    }\n\n    /**\n     * @dev Approve `to` to operate on `tokenId`\n     *\n     * The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is\n     * either the owner of the token, or approved to operate on all tokens held by this owner.\n     *\n     * Emits an {Approval} event.\n     *\n     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n     */\n    function _approve(address to, uint256 tokenId, address auth) internal {\n        _approve(to, tokenId, auth, true);\n    }\n\n    /**\n     * @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not\n     * emitted in the context of transfers.\n     */\n    function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual {\n        // Avoid reading the owner unless necessary\n        if (emitEvent || auth != address(0)) {\n            address owner = _requireOwned(tokenId);\n\n            // We do not use _isAuthorized because single-token approvals should not be able to call approve\n            if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) {\n                revert ERC721InvalidApprover(auth);\n            }\n\n            if (emitEvent) {\n                emit Approval(owner, to, tokenId);\n            }\n        }\n\n        _tokenApprovals[tokenId] = to;\n    }\n\n    /**\n     * @dev Approve `operator` to operate on all of `owner` tokens\n     *\n     * Requirements:\n     * - operator can't be the address zero.\n     *\n     * Emits an {ApprovalForAll} event.\n     */\n    function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\n        if (operator == address(0)) {\n            revert ERC721InvalidOperator(operator);\n        }\n        _operatorApprovals[owner][operator] = approved;\n        emit ApprovalForAll(owner, operator, approved);\n    }\n\n    /**\n     * @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned).\n     * Returns the owner.\n     *\n     * Overrides to ownership logic should be done to {_ownerOf}.\n     */\n    function _requireOwned(uint256 tokenId) internal view returns (address) {\n        address owner = _ownerOf(tokenId);\n        if (owner == address(0)) {\n            revert ERC721NonexistentToken(tokenId);\n        }\n        return owner;\n    }\n\n    /**\n     * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target address. This will revert if the\n     * recipient doesn't accept the token transfer. The call is not executed if the target address is not a contract.\n     *\n     * @param from address representing the previous owner of the given token ID\n     * @param to target address that will receive the tokens\n     * @param tokenId uint256 ID of the token to be transferred\n     * @param data bytes optional data to send along with the call\n     */\n    function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory data) private {\n        if (to.code.length > 0) {\n            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\n                if (retval != IERC721Receiver.onERC721Received.selector) {\n                    revert ERC721InvalidReceiver(to);\n                }\n            } catch (bytes memory reason) {\n                if (reason.length == 0) {\n                    revert ERC721InvalidReceiver(to);\n                } else {\n                    /// @solidity memory-safe-assembly\n                    assembly {\n                        revert(add(32, reason), mload(reason))\n                    }\n                }\n            }\n        }\n    }\n}\n"},"@openzeppelin/contracts/token/ERC721/IERC721.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n    /**\n     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n     */\n    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n     */\n    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n    /**\n     * @dev Returns the number of tokens in ``owner``'s account.\n     */\n    function balanceOf(address owner) external view returns (uint256 balance);\n\n    /**\n     * @dev Returns the owner of the `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function ownerOf(uint256 tokenId) external view returns (address owner);\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon\n     *   a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n     * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or\n     *   {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon\n     *   a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(address from, address to, uint256 tokenId) external;\n\n    /**\n     * @dev Transfers `tokenId` token from `from` to `to`.\n     *\n     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\n     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\n     * understand this adds an external call which potentially creates a reentrancy vulnerability.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 tokenId) external;\n\n    /**\n     * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n     * The approval is cleared when the token is transferred.\n     *\n     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n     *\n     * Requirements:\n     *\n     * - The caller must own the token or be an approved operator.\n     * - `tokenId` must exist.\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address to, uint256 tokenId) external;\n\n    /**\n     * @dev Approve or remove `operator` as an operator for the caller.\n     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n     *\n     * Requirements:\n     *\n     * - The `operator` cannot be the address zero.\n     *\n     * Emits an {ApprovalForAll} event.\n     */\n    function setApprovalForAll(address operator, bool approved) external;\n\n    /**\n     * @dev Returns the account approved for `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function getApproved(uint256 tokenId) external view returns (address operator);\n\n    /**\n     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n     *\n     * See {setApprovalForAll}\n     */\n    function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n"},"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n    /**\n     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n     * by `operator` from `from`, this function is called.\n     *\n     * It must return its Solidity selector to confirm the token transfer.\n     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be\n     * reverted.\n     *\n     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\n     */\n    function onERC721Received(\n        address operator,\n        address from,\n        uint256 tokenId,\n        bytes calldata data\n    ) external returns (bytes4);\n}\n"},"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC721} from \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Metadata is IERC721 {\n    /**\n     * @dev Returns the token collection name.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the token collection symbol.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n     */\n    function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n"},"@openzeppelin/contracts/utils/Base64.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.2) (utils/Base64.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides a set of functions to operate with Base64 strings.\n */\nlibrary Base64 {\n    /**\n     * @dev Base64 Encoding/Decoding Table\n     */\n    string internal constant _TABLE = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\n    /**\n     * @dev Converts a `bytes` to its Bytes64 `string` representation.\n     */\n    function encode(bytes memory data) internal pure returns (string memory) {\n        /**\n         * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence\n         * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol\n         */\n        if (data.length == 0) return \"\";\n\n        // Loads the table into memory\n        string memory table = _TABLE;\n\n        // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter\n        // and split into 4 numbers of 6 bits.\n        // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up\n        // - `data.length + 2`  -> Round up\n        // - `/ 3`              -> Number of 3-bytes chunks\n        // - `4 *`              -> 4 characters for each chunk\n        string memory result = new string(4 * ((data.length + 2) / 3));\n\n        /// @solidity memory-safe-assembly\n        assembly {\n            // Prepare the lookup table (skip the first \"length\" byte)\n            let tablePtr := add(table, 1)\n\n            // Prepare result pointer, jump over length\n            let resultPtr := add(result, 0x20)\n            let dataPtr := data\n            let endPtr := add(data, mload(data))\n\n            // In some cases, the last iteration will read bytes after the end of the data. We cache the value, and\n            // set it to zero to make sure no dirty bytes are read in that section.\n            let afterPtr := add(endPtr, 0x20)\n            let afterCache := mload(afterPtr)\n            mstore(afterPtr, 0x00)\n\n            // Run over the input, 3 bytes at a time\n            for {\n\n            } lt(dataPtr, endPtr) {\n\n            } {\n                // Advance 3 bytes\n                dataPtr := add(dataPtr, 3)\n                let input := mload(dataPtr)\n\n                // To write each character, shift the 3 byte (24 bits) chunk\n                // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)\n                // and apply logical AND with 0x3F to bitmask the least significant 6 bits.\n                // Use this as an index into the lookup table, mload an entire word\n                // so the desired character is in the least significant byte, and\n                // mstore8 this least significant byte into the result and continue.\n\n                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))\n                resultPtr := add(resultPtr, 1) // Advance\n\n                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))\n                resultPtr := add(resultPtr, 1) // Advance\n\n                mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F))))\n                resultPtr := add(resultPtr, 1) // Advance\n\n                mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))\n                resultPtr := add(resultPtr, 1) // Advance\n            }\n\n            // Reset the value that was cached\n            mstore(afterPtr, afterCache)\n\n            // When data `bytes` is not exactly 3 bytes long\n            // it is padded with `=` characters at the end\n            switch mod(mload(data), 3)\n            case 1 {\n                mstore8(sub(resultPtr, 1), 0x3d)\n                mstore8(sub(resultPtr, 2), 0x3d)\n            }\n            case 2 {\n                mstore8(sub(resultPtr, 1), 0x3d)\n            }\n        }\n\n        return result;\n    }\n}\n"},"@openzeppelin/contracts/utils/Context.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    function _contextSuffixLength() internal view virtual returns (uint256) {\n        return 0;\n    }\n}\n"},"@openzeppelin/contracts/utils/Strings.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n    bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n    uint8 private constant ADDRESS_LENGTH = 20;\n\n    /**\n     * @dev The `value` string doesn't fit in the specified `length`.\n     */\n    error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n     */\n    function toString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            uint256 length = Math.log10(value) + 1;\n            string memory buffer = new string(length);\n            uint256 ptr;\n            /// @solidity memory-safe-assembly\n            assembly {\n                ptr := add(buffer, add(32, length))\n            }\n            while (true) {\n                ptr--;\n                /// @solidity memory-safe-assembly\n                assembly {\n                    mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n                }\n                value /= 10;\n                if (value == 0) break;\n            }\n            return buffer;\n        }\n    }\n\n    /**\n     * @dev Converts a `int256` to its ASCII `string` decimal representation.\n     */\n    function toStringSigned(int256 value) internal pure returns (string memory) {\n        return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n     */\n    function toHexString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            return toHexString(value, Math.log256(value) + 1);\n        }\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n     */\n    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n        uint256 localValue = value;\n        bytes memory buffer = new bytes(2 * length + 2);\n        buffer[0] = \"0\";\n        buffer[1] = \"x\";\n        for (uint256 i = 2 * length + 1; i > 1; --i) {\n            buffer[i] = HEX_DIGITS[localValue & 0xf];\n            localValue >>= 4;\n        }\n        if (localValue != 0) {\n            revert StringsInsufficientHexLength(value, length);\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n     * representation.\n     */\n    function toHexString(address addr) internal pure returns (string memory) {\n        return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n    }\n\n    /**\n     * @dev Returns true if the two strings are equal.\n     */\n    function equal(string memory a, string memory b) internal pure returns (bool) {\n        return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));\n    }\n}\n"},"@openzeppelin/contracts/utils/introspection/ERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n        return interfaceId == type(IERC165).interfaceId;\n    }\n}\n"},"@openzeppelin/contracts/utils/introspection/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"},"@openzeppelin/contracts/utils/math/Math.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n    /**\n     * @dev Muldiv operation overflow.\n     */\n    error MathOverflowedMulDiv();\n\n    enum Rounding {\n        Floor, // Toward negative infinity\n        Ceil, // Toward positive infinity\n        Trunc, // Toward zero\n        Expand // Away from zero\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, with an overflow flag.\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            uint256 c = a + b;\n            if (c < a) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b > a) return (false, 0);\n            return (true, a - b);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n            // benefit is lost if 'b' is also tested.\n            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n            if (a == 0) return (true, 0);\n            uint256 c = a * b;\n            if (c / a != b) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a division by zero flag.\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a / b);\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a % b);\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two numbers.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a > b ? a : b;\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a < b ? a : b;\n    }\n\n    /**\n     * @dev Returns the average of two numbers. The result is rounded towards\n     * zero.\n     */\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b) / 2 can overflow.\n        return (a & b) + (a ^ b) / 2;\n    }\n\n    /**\n     * @dev Returns the ceiling of the division of two numbers.\n     *\n     * This differs from standard division with `/` in that it rounds towards infinity instead\n     * of rounding towards zero.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (b == 0) {\n            // Guarantee the same behavior as in a regular Solidity division.\n            return a / b;\n        }\n\n        // (a + b - 1) / b can overflow on addition, so we distribute.\n        return a == 0 ? 0 : (a - 1) / b + 1;\n    }\n\n    /**\n     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n     * denominator == 0.\n     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n     * Uniswap Labs also under MIT license.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n            // variables such that product = prod1 * 2^256 + prod0.\n            uint256 prod0 = x * y; // Least significant 256 bits of the product\n            uint256 prod1; // Most significant 256 bits of the product\n            assembly {\n                let mm := mulmod(x, y, not(0))\n                prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n            }\n\n            // Handle non-overflow cases, 256 by 256 division.\n            if (prod1 == 0) {\n                // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n                // The surrounding unchecked block does not change this fact.\n                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n                return prod0 / denominator;\n            }\n\n            // Make sure the result is less than 2^256. Also prevents denominator == 0.\n            if (denominator <= prod1) {\n                revert MathOverflowedMulDiv();\n            }\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [prod1 prod0].\n            uint256 remainder;\n            assembly {\n                // Compute remainder using mulmod.\n                remainder := mulmod(x, y, denominator)\n\n                // Subtract 256 bit number from 512 bit number.\n                prod1 := sub(prod1, gt(remainder, prod0))\n                prod0 := sub(prod0, remainder)\n            }\n\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n            uint256 twos = denominator & (0 - denominator);\n            assembly {\n                // Divide denominator by twos.\n                denominator := div(denominator, twos)\n\n                // Divide [prod1 prod0] by twos.\n                prod0 := div(prod0, twos)\n\n                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n                twos := add(div(sub(0, twos), twos), 1)\n            }\n\n            // Shift in bits from prod1 into prod0.\n            prod0 |= prod1 * twos;\n\n            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n            // four bits. That is, denominator * inv = 1 mod 2^4.\n            uint256 inverse = (3 * denominator) ^ 2;\n\n            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n            // works in modular arithmetic, doubling the correct bits in each step.\n            inverse *= 2 - denominator * inverse; // inverse mod 2^8\n            inverse *= 2 - denominator * inverse; // inverse mod 2^16\n            inverse *= 2 - denominator * inverse; // inverse mod 2^32\n            inverse *= 2 - denominator * inverse; // inverse mod 2^64\n            inverse *= 2 - denominator * inverse; // inverse mod 2^128\n            inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n            // is no longer required.\n            result = prod0 * inverse;\n            return result;\n        }\n    }\n\n    /**\n     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n        uint256 result = mulDiv(x, y, denominator);\n        if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {\n            result += 1;\n        }\n        return result;\n    }\n\n    /**\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n     * towards zero.\n     *\n     * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n     */\n    function sqrt(uint256 a) internal pure returns (uint256) {\n        if (a == 0) {\n            return 0;\n        }\n\n        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n        //\n        // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n        //\n        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n        //\n        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n        uint256 result = 1 << (log2(a) >> 1);\n\n        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n        // into the expected uint128 result.\n        unchecked {\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            return min(result, a / result);\n        }\n    }\n\n    /**\n     * @notice Calculates sqrt(a), following the selected rounding direction.\n     */\n    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = sqrt(a);\n            return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >> 128 > 0) {\n                value >>= 128;\n                result += 128;\n            }\n            if (value >> 64 > 0) {\n                value >>= 64;\n                result += 64;\n            }\n            if (value >> 32 > 0) {\n                value >>= 32;\n                result += 32;\n            }\n            if (value >> 16 > 0) {\n                value >>= 16;\n                result += 16;\n            }\n            if (value >> 8 > 0) {\n                value >>= 8;\n                result += 8;\n            }\n            if (value >> 4 > 0) {\n                value >>= 4;\n                result += 4;\n            }\n            if (value >> 2 > 0) {\n                value >>= 2;\n                result += 2;\n            }\n            if (value >> 1 > 0) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log2(value);\n            return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 10 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >= 10 ** 64) {\n                value /= 10 ** 64;\n                result += 64;\n            }\n            if (value >= 10 ** 32) {\n                value /= 10 ** 32;\n                result += 32;\n            }\n            if (value >= 10 ** 16) {\n                value /= 10 ** 16;\n                result += 16;\n            }\n            if (value >= 10 ** 8) {\n                value /= 10 ** 8;\n                result += 8;\n            }\n            if (value >= 10 ** 4) {\n                value /= 10 ** 4;\n                result += 4;\n            }\n            if (value >= 10 ** 2) {\n                value /= 10 ** 2;\n                result += 2;\n            }\n            if (value >= 10 ** 1) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log10(value);\n            return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 256 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     *\n     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n     */\n    function log256(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >> 128 > 0) {\n                value >>= 128;\n                result += 16;\n            }\n            if (value >> 64 > 0) {\n                value >>= 64;\n                result += 8;\n            }\n            if (value >> 32 > 0) {\n                value >>= 32;\n                result += 4;\n            }\n            if (value >> 16 > 0) {\n                value >>= 16;\n                result += 2;\n            }\n            if (value >> 8 > 0) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log256(value);\n            return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n     */\n    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n        return uint8(rounding) % 2 == 1;\n    }\n}\n"},"@openzeppelin/contracts/utils/math/SignedMath.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n    /**\n     * @dev Returns the largest of two signed numbers.\n     */\n    function max(int256 a, int256 b) internal pure returns (int256) {\n        return a > b ? a : b;\n    }\n\n    /**\n     * @dev Returns the smallest of two signed numbers.\n     */\n    function min(int256 a, int256 b) internal pure returns (int256) {\n        return a < b ? a : b;\n    }\n\n    /**\n     * @dev Returns the average of two signed numbers without overflow.\n     * The result is rounded towards zero.\n     */\n    function average(int256 a, int256 b) internal pure returns (int256) {\n        // Formula from the book \"Hacker's Delight\"\n        int256 x = (a & b) + ((a ^ b) >> 1);\n        return x + (int256(uint256(x) >> 255) & (a ^ b));\n    }\n\n    /**\n     * @dev Returns the absolute unsigned value of a signed value.\n     */\n    function abs(int256 n) internal pure returns (uint256) {\n        unchecked {\n            // must be unchecked in order to support `n = type(int256).min`\n            return uint256(n >= 0 ? n : -n);\n        }\n    }\n}\n"},"HootCast.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.26;\n\nimport {ERC721} from \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\nimport {Base64} from \"@openzeppelin/contracts/utils/Base64.sol\";\nimport {Strings} from \"@openzeppelin/contracts/utils/Strings.sol\";\nimport {HootOracle} from \"./HootOracle.sol\";\n\ninterface IAgentReg { function balanceOf(address) external view returns (uint256); }\ninterface IHootGame { function stats(uint256 id) external view returns (uint256 wins, uint256 played, uint256 streak, uint256 best); }\n\n/// @title HOOTCAST — 8,888 seer owls on BNB Chain.\n/// Dutch-auction mint (1 free + 30% off for .ai Agent ID wallets), a built-in market,\n/// and fully on-chain SVG owls that evolve with their prediction record in HootOracle.\n/// 30% of mint revenue is reserved for the HootOracle prize pot; the owner can never withdraw it.\ncontract HootCast is ERC721 {\n    using Strings for uint256;\n\n    uint256 public constant MAX_SUPPLY = 8888;\n    uint256 public constant FREE_CAP = 8000;          // ~90% may go out free (1 per .ai Agent ID wallet)\n    uint256 public constant POT_BPS = 3000;           // 30% of mint revenue -> prize pot\n    uint256 public constant MAX_MARKET_FEE = 500;     // fee can never exceed 5%\n\n    address public owner;\n    IAgentReg public registry = IAgentReg(0x60B9262456dE011F7d15a54CdD8c48bAaa8B022F);\n    IHootGame public immutable game;                  // created in the constructor, can never change\n\n    // switches (all start OFF)\n    bool public freeMintOpen;\n    bool public auctionOpen;\n    bool public marketOpen;\n\n    // Dutch auction\n    uint256 public startPrice = 0.002 ether;\n    uint256 public floorPrice = 0.0005 ether;\n    uint256 public decayDuration = 12 hours;\n    uint256 public auctionStart;                      // set the first time the auction opens\n    uint256 public agentDiscountBps = 3000;           // .ai wallets pay 30% less\n    uint256 public maxPerWallet = 22;\n\n    uint256 public totalSupply;\n    uint256 public freeMinted;\n    mapping(address => bool) public claimedFree;\n    mapping(address => uint256) public mintedBy;\n    mapping(uint256 => bytes32) public seedOf;\n\n    // money\n    uint256 public ownerBalance;                      // only this is withdrawable by owner\n    uint256 public potReserved;                       // owed to the game pot, can only go to `game`\n    uint256 public marketFeeBps = 300;                // 3% to owner\n    uint256 public volume;\n    uint256 public sales;\n    mapping(address => uint256) public credit;        // failed payouts, pull with withdrawCredit()\n\n    struct Listing { address seller; uint96 price; }\n    mapping(uint256 => Listing) public listings;\n\n    bool private _lock;\n\n    event Switch(string what, bool on);\n    event Minted(address indexed to, uint256 firstId, uint256 qty, uint256 paid, bool free);\n    event Listed(uint256 indexed id, address indexed seller, uint256 price);\n    event Unlisted(uint256 indexed id);\n    event Sold(uint256 indexed id, address indexed seller, address indexed buyer, uint256 price);\n\n    modifier onlyOwner() { require(msg.sender == owner, \"not owner\"); _; }\n    modifier nonReentrant() { require(!_lock, \"reentry\"); _lock = true; _; _lock = false; }\n\n    constructor(address _owner, address _feed) ERC721(\"HOOTCAST\", \"HOOT\") {\n        owner = _owner;\n        game = IHootGame(address(new HootOracle(address(this), _feed, _owner)));\n    }\n\n    // ================= MINT =================\n    function isAgent(address a) public view returns (bool) {\n        try registry.balanceOf(a) returns (uint256 b) { return b > 0; } catch { return false; }\n    }\n\n    function auctionPrice() public view returns (uint256) {\n        if (auctionStart == 0) return startPrice;\n        uint256 t = block.timestamp - auctionStart;\n        if (t >= decayDuration) return floorPrice;\n        return startPrice - (startPrice - floorPrice) * t / decayDuration;\n    }\n\n    function priceFor(address a) public view returns (uint256) {\n        uint256 p = auctionPrice();\n        return isAgent(a) ? p * (10000 - agentDiscountBps) / 10000 : p;\n    }\n\n    function canClaimFree(address a) public view returns (bool) {\n        return freeMintOpen && !claimedFree[a] && freeMinted < FREE_CAP && totalSupply < MAX_SUPPLY && isAgent(a);\n    }\n\n    function mintFree() external nonReentrant {\n        require(freeMintOpen, \"free mint off\");\n        require(isAgent(msg.sender), \"no .ai Agent ID\");\n        require(!claimedFree[msg.sender], \"already claimed\");\n        require(freeMinted < FREE_CAP, \"free cap reached\");\n        claimedFree[msg.sender] = true;\n        freeMinted++;\n        uint256 id = _mintOne(msg.sender);\n        emit Minted(msg.sender, id, 1, 0, true);\n    }\n\n    function mint(uint256 qty) external payable nonReentrant {\n        require(auctionOpen, \"auction off\");\n        require(qty > 0, \"qty\");\n        require(mintedBy[msg.sender] + qty <= maxPerWallet, \"wallet cap\");\n        require(totalSupply + qty <= MAX_SUPPLY, \"sold out\");\n        uint256 cost = priceFor(msg.sender) * qty;\n        require(msg.value >= cost, \"underpaid\");\n        mintedBy[msg.sender] += qty;\n        uint256 first = totalSupply + 1;\n        for (uint256 i; i < qty; i++) _mintOne(msg.sender);\n        uint256 pot = cost * POT_BPS / 10000;\n        potReserved += pot;\n        ownerBalance += cost - pot;\n        if (msg.value > cost) _pay(msg.sender, msg.value - cost);\n        emit Minted(msg.sender, first, qty, cost, false);\n    }\n\n    function _mintOne(address to) private returns (uint256 id) {\n        id = ++totalSupply;\n        seedOf[id] = keccak256(abi.encode(id, to, block.prevrandao, block.number));\n        _mint(to, id);\n    }\n\n    // ================= MARKET =================\n    function list(uint256 id, uint256 price) external {\n        require(marketOpen, \"market off\");\n        require(ownerOf(id) == msg.sender, \"not yours\");\n        require(price > 0 && price < type(uint96).max, \"price\");\n        listings[id] = Listing(msg.sender, uint96(price));\n        emit Listed(id, msg.sender, price);\n    }\n\n    function unlist(uint256 id) external {\n        require(listings[id].seller == msg.sender, \"not seller\");\n        delete listings[id];\n        emit Unlisted(id);\n    }\n\n    function buy(uint256 id) external payable nonReentrant {\n        require(marketOpen, \"market off\");\n        Listing memory l = listings[id];\n        require(l.seller != address(0), \"not listed\");\n        require(ownerOf(id) == l.seller, \"stale listing\");\n        require(msg.value == l.price, \"wrong price\");\n        delete listings[id];\n        uint256 fee = uint256(l.price) * marketFeeBps / 10000;\n        ownerBalance += fee;\n        volume += l.price;\n        sales++;\n        _transfer(l.seller, msg.sender, id);\n        _pay(l.seller, uint256(l.price) - fee);\n        emit Sold(id, l.seller, msg.sender, l.price);\n    }\n\n    function _update(address to, uint256 id, address auth) internal override returns (address from) {\n        from = super._update(to, id, auth);\n        if (listings[id].seller != address(0)) { delete listings[id]; emit Unlisted(id); }\n    }\n\n    // ================= MONEY =================\n    function _pay(address to, uint256 amt) private {\n        (bool ok, ) = payable(to).call{value: amt, gas: 30000}(\"\");\n        if (!ok) credit[to] += amt;\n    }\n\n    function withdrawCredit() external nonReentrant {\n        uint256 a = credit[msg.sender];\n        require(a > 0, \"none\");\n        credit[msg.sender] = 0;\n        (bool ok, ) = payable(msg.sender).call{value: a}(\"\");\n        require(ok, \"send failed\");\n    }\n\n    /// Anyone can push the reserved pot into the game contract. It can go nowhere else.\n    function flushPot() external nonReentrant {\n        uint256 a = potReserved;\n        require(a > 0, \"empty\");\n        potReserved = 0;\n        (bool ok, ) = payable(address(game)).call{value: a}(\"\");\n        require(ok, \"pot send failed\");\n    }\n\n    function withdraw() external onlyOwner nonReentrant {\n        uint256 a = ownerBalance;\n        require(a > 0, \"none\");\n        ownerBalance = 0;\n        (bool ok, ) = payable(owner).call{value: a}(\"\");\n        require(ok, \"send failed\");\n    }\n\n    // ================= OWNER SWITCHES =================\n    function setFreeMint(bool on) external onlyOwner { freeMintOpen = on; emit Switch(\"freeMint\", on); }\n    function setAuction(bool on) external onlyOwner {\n        auctionOpen = on;\n        if (on && auctionStart == 0) auctionStart = block.timestamp;\n        emit Switch(\"auction\", on);\n    }\n    function setMarket(bool on) external onlyOwner { marketOpen = on; emit Switch(\"market\", on); }\n    function setAuctionParams(uint256 start_, uint256 floor_, uint256 duration_) external onlyOwner {\n        require(auctionStart == 0, \"already started\");\n        require(start_ >= floor_ && duration_ > 0, \"params\");\n        startPrice = start_; floorPrice = floor_; decayDuration = duration_;\n    }\n    function setFloorPrice(uint256 floor_) external onlyOwner { require(floor_ <= startPrice, \"floor\"); floorPrice = floor_; }\n    function setMaxPerWallet(uint256 m) external onlyOwner { maxPerWallet = m; }\n    function setAgentDiscount(uint256 bps) external onlyOwner { require(bps <= 10000, \"bps\"); agentDiscountBps = bps; }\n    function setMarketFee(uint256 bps) external onlyOwner { require(bps <= MAX_MARKET_FEE, \"fee cap\"); marketFeeBps = bps; }\n    function setRegistry(address r) external onlyOwner { registry = IAgentReg(r); }\n    function transferOwnership(address n) external onlyOwner { require(n != address(0), \"zero\"); owner = n; }\n\n    // ================= VIEWS =================\n    function stats() external view returns (uint256 minted, uint256 freeCount, uint256 price, uint256 pot, uint256 vol, uint256 sold, uint256 flags) {\n        flags = (freeMintOpen ? 1 : 0) | (auctionOpen ? 2 : 0) | (marketOpen ? 4 : 0);\n        return (totalSupply, freeMinted, auctionPrice(), potReserved, volume, sales, flags);\n    }\n\n    function royaltyInfo(uint256, uint256 salePrice) external view returns (address, uint256) {\n        return (owner, salePrice * marketFeeBps / 10000);\n    }\n\n    function supportsInterface(bytes4 i) public view override returns (bool) {\n        return i == 0x2a55205a || super.supportsInterface(i);\n    }\n\n    // ================= ART (fully on-chain, evolves with the game) =================\n    function traits(uint256 id) public view returns (uint256 plume, uint256 sky, uint256 eyes, uint256 moon, uint256 mark) {\n        uint256 h = uint256(seedOf[id]);\n        plume = h % 8; sky = (h >> 8) % 6; eyes = (h >> 16) % 5; moon = (h >> 24) % 4; mark = (h >> 32) % 6;\n    }\n\n    function rank(uint256 id) public view returns (uint256 r, uint256 wins, uint256 streak) {\n        if (address(game) != address(0)) {\n            try game.stats(id) returns (uint256 w, uint256, uint256 s, uint256) { wins = w; streak = s; } catch {}\n        }\n        r = wins >= 50 ? 3 : wins >= 20 ? 2 : wins >= 5 ? 1 : 0;\n    }\n\n    function _rankName(uint256 r) private pure returns (string memory) {\n        return [\"Owlet\", \"Watcher\", \"Seer\", \"Oracle\"][r];\n    }\n    function _plume(uint256 p) private pure returns (string memory) {\n        return [\"#8B5E3C\", \"#C9A27A\", \"#5B6770\", \"#E8E1D3\", \"#3B2F4A\", \"#A0522D\", \"#2F4F4F\", \"#D9B44A\"][p];\n    }\n    function _sky(uint256 s) private pure returns (string memory a, string memory b) {\n        string[6] memory A = [\"#0B1026\", \"#1A0B2E\", \"#06231F\", \"#2B0F0F\", \"#0F1B2B\", \"#14141A\"];\n        string[6] memory B = [\"#3A4A8C\", \"#7A3E9D\", \"#1F7A6A\", \"#B5543A\", \"#3C6E9E\", \"#5A5A72\"];\n        return (A[s], B[s]);\n    }\n    function _eye(uint256 e, uint256 r) private pure returns (string memory) {\n        if (r == 3) return \"#FFFFFF\";\n        return [\"#F5C542\", \"#FF7A1A\", \"#7CFFB2\", \"#5CC8FF\", \"#FF4FA3\"][e];\n    }\n\n    function _stars(uint256 id) private view returns (string memory st) {\n        uint256 h = uint256(keccak256(abi.encode(seedOf[id], \"s\")));\n        for (uint256 i; i < 7; i++) {\n            st = string.concat(st, '<circle cx=\"', ((h >> (i * 18)) % 400).toString(), '\" cy=\"', ((h >> (i * 18 + 9)) % 150).toString(),\n                '\" r=\"', (1 + (h >> (i * 3)) % 2).toString(), '\" fill=\"#FFF\" opacity=\".7\"/>');\n        }\n    }\n\n    function _svg(uint256 id) private view returns (string memory) {\n        (uint256 p, uint256 s, uint256 e, uint256 m, uint256 mk) = traits(id);\n        (uint256 r, uint256 wins, uint256 streak) = rank(id);\n        (string memory sa, string memory sb) = _sky(s);\n        string memory pl = _plume(p);\n        string memory ey = _eye(e, r);\n        string memory moonX = (60 + m * 90).toString();\n        string memory glow = (6 + r * 6 + (streak > 10 ? 10 : streak)).toString();\n        string memory head = string.concat(\n            '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 400 400\"><defs><linearGradient id=\"g\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0\" stop-color=\"', sa,\n            '\"/><stop offset=\"1\" stop-color=\"', sb, '\"/></linearGradient><filter id=\"f\"><feGaussianBlur stdDeviation=\"', glow, '\"/></filter></defs>',\n            '<rect width=\"400\" height=\"400\" fill=\"url(#g)\"/><circle cx=\"', moonX, '\" cy=\"70\" r=\"28\" fill=\"#FFF6D5\" opacity=\".85\"/>', _stars(id)\n        );\n        string memory body = string.concat(\n            '<rect x=\"40\" y=\"330\" width=\"320\" height=\"14\" rx=\"7\" fill=\"#2A1B0E\"/>',\n            '<ellipse cx=\"118\" cy=\"258\" rx=\"28\" ry=\"70\" fill=\"', pl, '\" transform=\"rotate(12 118 258)\"/><ellipse cx=\"282\" cy=\"258\" rx=\"28\" ry=\"70\" fill=\"', pl, '\" transform=\"rotate(-12 282 258)\"/>',\n            '<ellipse cx=\"200\" cy=\"245\" rx=\"92\" ry=\"100\" fill=\"', pl, '\"/><ellipse cx=\"200\" cy=\"245\" rx=\"92\" ry=\"100\" fill=\"#000\" opacity=\".12\"/>',\n            '<ellipse cx=\"200\" cy=\"270\" rx=\"56\" ry=\"66\" fill=\"#F3E9D2\" opacity=\".35\"/>',\n            '<polygon points=\"122,160 140,110 165,150\" fill=\"', pl, '\"/><polygon points=\"278,160 260,110 235,150\" fill=\"', pl, '\"/>',\n            r >= 2 ? string.concat('<circle cx=\"200\" cy=\"200\" r=\"120\" fill=\"none\" stroke=\"', ey, '\" stroke-opacity=\".35\" stroke-dasharray=\"3 9\"/>') : '',\n            mk == 1 ? '<path d=\"M150 300 q50 30 100 0\" stroke=\"#FFF\" stroke-opacity=\".4\" fill=\"none\" stroke-width=\"3\"/>' : ''\n        );\n        string memory face = string.concat(\n            '<circle cx=\"165\" cy=\"195\" r=\"30\" fill=\"#FFF8E7\"/><circle cx=\"235\" cy=\"195\" r=\"30\" fill=\"#FFF8E7\"/>',\n            '<circle cx=\"165\" cy=\"195\" r=\"16\" fill=\"', ey, '\" filter=\"url(#f)\"/><circle cx=\"235\" cy=\"195\" r=\"16\" fill=\"', ey, '\" filter=\"url(#f)\"/>',\n            '<circle cx=\"165\" cy=\"195\" r=\"12\" fill=\"', ey, '\"/><circle cx=\"235\" cy=\"195\" r=\"12\" fill=\"', ey, '\"/>',\n            '<circle cx=\"165\" cy=\"195\" r=\"5\" fill=\"#111\"/><circle cx=\"235\" cy=\"195\" r=\"5\" fill=\"#111\"/>',\n            '<polygon points=\"200,215 190,232 210,232\" fill=\"#E0A030\"/>'\n        );\n        string memory foot = string.concat(\n            '<text x=\"20\" y=\"385\" font-family=\"monospace\" font-size=\"15\" fill=\"#FFF6D5\">', _rankName(r), '</text>',\n            '<text x=\"380\" y=\"385\" font-family=\"monospace\" font-size=\"15\" fill=\"#FFF6D5\" text-anchor=\"end\">#', id.toString(), ' / W', wins.toString(), '</text></svg>'\n        );\n        return string.concat(head, body, face, foot);\n    }\n\n    function tokenURI(uint256 id) public view override returns (string memory) {\n        _requireOwned(id);\n        (uint256 p, uint256 s, uint256 e, uint256 m, uint256 mk) = traits(id);\n        (uint256 r, uint256 wins, uint256 streak) = rank(id);\n        string memory attrs = string.concat(\n            '[{\"trait_type\":\"Rank\",\"value\":\"', _rankName(r), '\"},{\"trait_type\":\"Plume\",\"value\":\"', p.toString(),\n            '\"},{\"trait_type\":\"Sky\",\"value\":\"', s.toString(), '\"},{\"trait_type\":\"Eyes\",\"value\":\"', e.toString(),\n            '\"},{\"trait_type\":\"Moon\",\"value\":\"', m.toString(), '\"},{\"trait_type\":\"Mark\",\"value\":\"', mk.toString(),\n            '\"},{\"display_type\":\"number\",\"trait_type\":\"Wins\",\"value\":', wins.toString(), '},{\"display_type\":\"number\",\"trait_type\":\"Streak\",\"value\":', streak.toString(), '}]'\n        );\n        return string.concat(\"data:application/json;base64,\", Base64.encode(bytes(string.concat(\n            '{\"name\":\"HOOTCAST #', id.toString(), '\",\"description\":\"A seer owl of HOOTCAST on BNB Chain. It evolves with its prediction record.\",\"image\":\"data:image/svg+xml;base64,',\n            Base64.encode(bytes(_svg(id))), '\",\"attributes\":', attrs, '}'))));\n    }\n}\n"},"HootOracle.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.26;\n\ninterface IHootNFT {\n    function ownerOf(uint256 id) external view returns (address);\n    function isAgent(address a) external view returns (bool);\n}\ninterface IFeed {\n    function latestRoundData() external view returns (uint80, int256 answer, uint256, uint256 updatedAt, uint80);\n}\n\n/// @title HootOracle — hourly BNB up/down calls for HOOTCAST owls. Free to play (gas only).\n/// Each hour (\"epoch\") the BNB/USD Chainlink price is recorded in the first 10 minutes.\n/// Owl holders call up or down until minute 45. Correct calls earn season points\n/// (+1, +1 more on a 3+ streak, +1 more if the holder wallet has a .ai Agent ID).\n/// Every 14-day season, 50% of the pot is shared by points. The owner can only open/close play;\n/// there is no function that sends the pot anywhere except to point holders.\ncontract HootOracle {\n    uint256 public constant EPOCH = 1 hours;\n    uint256 public constant POKE_WINDOW = 10 minutes;\n    uint256 public constant CALL_WINDOW = 45 minutes;\n    uint256 public constant SEASON_EPOCHS = 336;      // 14 days\n    uint256 public constant GRACE_EPOCHS = 24;        // 1 day to score the last rounds\n    uint256 public constant SEASON_SHARE_BPS = 5000;  // 50% of the free pot per season, rest rolls over\n\n    IHootNFT public immutable nft;\n    IFeed public feed;\n    address public owner;\n    bool public open;\n    uint256 public genesis;                           // set the first time play opens\n\n    mapping(uint256 => int256) public priceAt;        // epoch => BNB/USD at its start\n    mapping(uint256 => mapping(uint256 => uint8)) public pick; // epoch => id => 1 up, 2 down, +4 scored\n\n    struct Owl { uint32 wins; uint32 played; uint32 streak; uint32 best; }\n    mapping(uint256 => Owl) public owls;\n\n    mapping(uint256 => mapping(uint256 => uint256)) public seasonPts; // season => id => points\n    mapping(uint256 => uint256) public totalPts;\n    mapping(uint256 => uint256) public seasonPrize;\n    mapping(uint256 => bool) public finalized;\n    mapping(uint256 => mapping(uint256 => bool)) public claimed;\n    uint256 public allocated;                         // prizes set aside but not yet claimed\n    uint256 public totalCalls;\n\n    bool private _lock;\n\n    event Called(uint256 indexed epoch, uint256 indexed id, bool up);\n    event Price(uint256 indexed epoch, int256 price);\n    event Scored(uint256 indexed epoch, uint256 indexed id, bool won, uint256 pts);\n    event Finalized(uint256 indexed season, uint256 prize, uint256 points);\n    event Claimed(uint256 indexed season, uint256 indexed id, address to, uint256 amount);\n    event Switch(bool open);\n\n    modifier onlyOwner() { require(msg.sender == owner, \"not owner\"); _; }\n    modifier nonReentrant() { require(!_lock, \"reentry\"); _lock = true; _; _lock = false; }\n\n    constructor(address _nft, address _feed, address _owner) { nft = IHootNFT(_nft); feed = IFeed(_feed); owner = _owner; }\n\n    receive() external payable {}\n\n    // ================= TIME =================\n    function epochNow() public view returns (uint256) { return genesis == 0 ? 0 : (block.timestamp - genesis) / EPOCH; }\n    function epochStart(uint256 e) public view returns (uint256) { return genesis + e * EPOCH; }\n    function seasonOf(uint256 e) public pure returns (uint256) { return e / SEASON_EPOCHS; }\n\n    // ================= PLAY =================\n    /// Records this hour's start price. Anyone can call; only works in the first 10 minutes.\n    function poke() public {\n        require(genesis != 0, \"not started\");\n        uint256 e = epochNow();\n        if (priceAt[e] != 0 || block.timestamp >= epochStart(e) + POKE_WINDOW) return;\n        (, int256 a, , uint256 upd, ) = feed.latestRoundData();\n        require(a > 0 && upd + 3 hours >= block.timestamp, \"stale feed\");\n        priceAt[e] = a;\n        emit Price(e, a);\n    }\n\n    function hoot(uint256[] calldata ids, bool up) external {\n        require(open, \"closed\");\n        poke();\n        uint256 e = epochNow();\n        require(priceAt[e] != 0, \"round void, wait next hour\");\n        require(block.timestamp < epochStart(e) + CALL_WINDOW, \"calls locked\");\n        for (uint256 i; i < ids.length; i++) {\n            require(nft.ownerOf(ids[i]) == msg.sender, \"not your owl\");\n            require(pick[e][ids[i]] == 0, \"already called\");\n            pick[e][ids[i]] = up ? 1 : 2;\n            emit Called(e, ids[i], up);\n        }\n        totalCalls += ids.length;\n    }\n\n    /// Scores calls of a finished epoch. Anyone can call (points always go to the owl).\n    function score(uint256 e, uint256[] calldata ids) external { _score(e, ids); }\n\n    /// Scores the same owls across several finished epochs (skips epochs not settled yet).\n    function scoreBatch(uint256[] calldata es, uint256[] calldata ids) external {\n        for (uint256 j; j < es.length; j++) {\n            if (priceAt[es[j]] != 0 && priceAt[es[j] + 1] != 0 && !finalized[seasonOf(es[j])]) _score(es[j], ids);\n        }\n    }\n\n    function _score(uint256 e, uint256[] calldata ids) private {\n        int256 p0 = priceAt[e];\n        int256 p1 = priceAt[e + 1];\n        require(p0 != 0 && p1 != 0, \"not settled\");\n        uint256 s = seasonOf(e);\n        require(!finalized[s], \"season closed\");\n        for (uint256 i; i < ids.length; i++) {\n            uint256 id = ids[i];\n            uint8 pk = pick[e][id];\n            if (pk == 0 || pk & 4 != 0) continue;\n            pick[e][id] = pk | 4;\n            Owl storage o = owls[id];\n            if (p1 == p0) { emit Scored(e, id, false, 0); continue; } // flat = push\n            o.played++;\n            bool won = (pk == 1) == (p1 > p0);\n            uint256 pts;\n            if (won) {\n                o.wins++;\n                o.streak++;\n                if (o.streak > o.best) o.best = o.streak;\n                pts = 1 + (o.streak >= 3 ? 1 : 0);\n                try nft.ownerOf(id) returns (address h) { if (nft.isAgent(h)) pts++; } catch {}\n                seasonPts[s][id] += pts;\n                totalPts[s] += pts;\n            } else {\n                o.streak = 0;\n            }\n            emit Scored(e, id, won, pts);\n        }\n    }\n\n    // ================= PRIZES =================\n    function freePot() public view returns (uint256) { return address(this).balance - allocated; }\n\n    function finalize(uint256 s) external {\n        require(genesis != 0 && !finalized[s], \"done\");\n        require(epochNow() >= (s + 1) * SEASON_EPOCHS + GRACE_EPOCHS, \"season running\");\n        finalized[s] = true;\n        uint256 prize = totalPts[s] == 0 ? 0 : freePot() * SEASON_SHARE_BPS / 10000;\n        seasonPrize[s] = prize;\n        allocated += prize;\n        emit Finalized(s, prize, totalPts[s]);\n    }\n\n    function pendingPrize(uint256 s, uint256 id) public view returns (uint256) {\n        if (!finalized[s] || claimed[s][id] || totalPts[s] == 0) return 0;\n        return seasonPrize[s] * seasonPts[s][id] / totalPts[s];\n    }\n\n    function claim(uint256 s, uint256[] calldata ids) external nonReentrant {\n        uint256 sum;\n        for (uint256 i; i < ids.length; i++) {\n            require(nft.ownerOf(ids[i]) == msg.sender, \"not your owl\");\n            uint256 a = pendingPrize(s, ids[i]);\n            claimed[s][ids[i]] = true;\n            if (a > 0) { sum += a; emit Claimed(s, ids[i], msg.sender, a); }\n        }\n        require(sum > 0, \"nothing\");\n        allocated -= sum;\n        (bool ok, ) = payable(msg.sender).call{value: sum}(\"\");\n        require(ok, \"send failed\");\n    }\n\n    // ================= OWNER (no money access) =================\n    function setOpen(bool on) external onlyOwner {\n        if (on && genesis == 0) genesis = block.timestamp - (block.timestamp % EPOCH);\n        open = on;\n        emit Switch(on);\n    }\n    function setFeed(address f) external onlyOwner { require(genesis == 0, \"started\"); feed = IFeed(f); }\n    function transferOwnership(address n) external onlyOwner { require(n != address(0), \"zero\"); owner = n; }\n\n    // ================= VIEWS =================\n    function stats(uint256 id) external view returns (uint256 wins, uint256 played, uint256 streak, uint256 best) {\n        Owl memory o = owls[id];\n        return (o.wins, o.played, o.streak, o.best);\n    }\n\n    function state() external view returns (\n        bool isOpen, uint256 epoch, uint256 start, int256 startPrice, int256 prevPrice,\n        uint256 season, uint256 pot, uint256 seasonPoints, uint256 calls, int256 livePrice\n    ) {\n        uint256 e = epochNow();\n        (, int256 lp, , , ) = feed.latestRoundData();\n        return (open, e, genesis == 0 ? 0 : epochStart(e), priceAt[e], e > 0 ? priceAt[e - 1] : int256(0),\n            seasonOf(e), freePot(), totalPts[seasonOf(e)], totalCalls, lp);\n    }\n}\n"}},"abi":[{"type":"constructor","inputs":[{"name":"_owner","type":"address","internalType":"address"},{"name":"_feed","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"name":"ERC721IncorrectOwner","type":"error","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"},{"name":"owner","type":"address","internalType":"address"}]},{"name":"ERC721InsufficientApproval","type":"error","inputs":[{"name":"operator","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}]},{"name":"ERC721InvalidApprover","type":"error","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"name":"ERC721InvalidOperator","type":"error","inputs":[{"name":"operator","type":"address","internalType":"address"}]},{"name":"ERC721InvalidOwner","type":"error","inputs":[{"name":"owner","type":"address","internalType":"address"}]},{"name":"ERC721InvalidReceiver","type":"error","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"name":"ERC721InvalidSender","type":"error","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"name":"ERC721NonexistentToken","type":"error","inputs":[{"name":"tokenId","type":"uint256","internalType":"uint256"}]},{"name":"Approval","type":"event","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"approved","type":"address","indexed":true,"internalType":"address"},{"name":"tokenId","type":"uint256","indexed":true,"internalType":"uint256"}],"anonymous":false},{"name":"ApprovalForAll","type":"event","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"operator","type":"address","indexed":true,"internalType":"address"},{"name":"approved","type":"bool","indexed":false,"internalType":"bool"}],"anonymous":false},{"name":"Listed","type":"event","inputs":[{"name":"id","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"seller","type":"address","indexed":true,"internalType":"address"},{"name":"price","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"Minted","type":"event","inputs":[{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"firstId","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"qty","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"paid","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"free","type":"bool","indexed":false,"internalType":"bool"}],"anonymous":false},{"name":"Sold","type":"event","inputs":[{"name":"id","type":"uint256","indexed":true,"internalType":"uint256"},{"name":"seller","type":"address","indexed":true,"internalType":"address"},{"name":"buyer","type":"address","indexed":true,"internalType":"address"},{"name":"price","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"Switch","type":"event","inputs":[{"name":"what","type":"string","indexed":false,"internalType":"string"},{"name":"on","type":"bool","indexed":false,"internalType":"bool"}],"anonymous":false},{"name":"Transfer","type":"event","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"tokenId","type":"uint256","indexed":true,"internalType":"uint256"}],"anonymous":false},{"name":"Unlisted","type":"event","inputs":[{"name":"id","type":"uint256","indexed":true,"internalType":"uint256"}],"anonymous":false},{"name":"FREE_CAP","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"MAX_MARKET_FEE","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"MAX_SUPPLY","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"POT_BPS","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"agentDiscountBps","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"approve","type":"function","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"auctionOpen","type":"function","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"auctionPrice","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"auctionStart","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"balanceOf","type":"function","inputs":[{"name":"owner","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"buy","type":"function","inputs":[{"name":"id","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"payable"},{"name":"canClaimFree","type":"function","inputs":[{"name":"a","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"claimedFree","type":"function","inputs":[{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"credit","type":"function","inputs":[{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"decayDuration","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"floorPrice","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"flushPot","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"freeMintOpen","type":"function","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"freeMinted","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"game","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IHootGame"}],"stateMutability":"view"},{"name":"getApproved","type":"function","inputs":[{"name":"tokenId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"isAgent","type":"function","inputs":[{"name":"a","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"isApprovedForAll","type":"function","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"operator","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"list","type":"function","inputs":[{"name":"id","type":"uint256","internalType":"uint256"},{"name":"price","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"listings","type":"function","inputs":[{"name":"","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"seller","type":"address","internalType":"address"},{"name":"price","type":"uint96","internalType":"uint96"}],"stateMutability":"view"},{"name":"marketFeeBps","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"marketOpen","type":"function","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"maxPerWallet","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"mint","type":"function","inputs":[{"name":"qty","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"payable"},{"name":"mintFree","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"mintedBy","type":"function","inputs":[{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"name","type":"function","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"name":"owner","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"ownerBalance","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"ownerOf","type":"function","inputs":[{"name":"tokenId","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"potReserved","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"priceFor","type":"function","inputs":[{"name":"a","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"rank","type":"function","inputs":[{"name":"id","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"r","type":"uint256","internalType":"uint256"},{"name":"wins","type":"uint256","internalType":"uint256"},{"name":"streak","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"registry","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IAgentReg"}],"stateMutability":"view"},{"name":"royaltyInfo","type":"function","inputs":[{"name":"","type":"uint256","internalType":"uint256"},{"name":"salePrice","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"address","internalType":"address"},{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"safeTransferFrom","type":"function","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"safeTransferFrom","type":"function","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"},{"name":"data","type":"bytes","internalType":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"sales","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"seedOf","type":"function","inputs":[{"name":"","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"name":"setAgentDiscount","type":"function","inputs":[{"name":"bps","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setApprovalForAll","type":"function","inputs":[{"name":"operator","type":"address","internalType":"address"},{"name":"approved","type":"bool","internalType":"bool"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setAuction","type":"function","inputs":[{"name":"on","type":"bool","internalType":"bool"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setAuctionParams","type":"function","inputs":[{"name":"start_","type":"uint256","internalType":"uint256"},{"name":"floor_","type":"uint256","internalType":"uint256"},{"name":"duration_","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setFloorPrice","type":"function","inputs":[{"name":"floor_","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setFreeMint","type":"function","inputs":[{"name":"on","type":"bool","internalType":"bool"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setMarket","type":"function","inputs":[{"name":"on","type":"bool","internalType":"bool"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setMarketFee","type":"function","inputs":[{"name":"bps","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setMaxPerWallet","type":"function","inputs":[{"name":"m","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setRegistry","type":"function","inputs":[{"name":"r","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"startPrice","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"stats","type":"function","inputs":[],"outputs":[{"name":"minted","type":"uint256","internalType":"uint256"},{"name":"freeCount","type":"uint256","internalType":"uint256"},{"name":"price","type":"uint256","internalType":"uint256"},{"name":"pot","type":"uint256","internalType":"uint256"},{"name":"vol","type":"uint256","internalType":"uint256"},{"name":"sold","type":"uint256","internalType":"uint256"},{"name":"flags","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"supportsInterface","type":"function","inputs":[{"name":"i","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"symbol","type":"function","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"name":"tokenURI","type":"function","inputs":[{"name":"id","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"name":"totalSupply","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"traits","type":"function","inputs":[{"name":"id","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"plume","type":"uint256","internalType":"uint256"},{"name":"sky","type":"uint256","internalType":"uint256"},{"name":"eyes","type":"uint256","internalType":"uint256"},{"name":"moon","type":"uint256","internalType":"uint256"},{"name":"mark","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"transferFrom","type":"function","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"tokenId","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"transferOwnership","type":"function","inputs":[{"name":"n","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"unlist","type":"function","inputs":[{"name":"id","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"volume","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"withdraw","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"withdrawCredit","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"}],"matchId":"57682888","creationMatch":"exact_match","runtimeMatch":"exact_match","verifiedAt":"2026-10-30T13:38:52Z","match":"exact_match","chainId":"56","address":"0xbFccd7dE6eF1B3D81632412600a933CD6De14B77"}