ETH Price: $3,308.21 (-3.43%)

Token

ALTS by adidas (ALT)
 

Overview

Max Total Supply

20,066 ALT

Holders

10,200

Market

Volume (24H)

0.6259 ETH

Min Price (24H)

$137.62 @ 0.041600 ETH

Max Price (24H)

$178.63 @ 0.053997 ETH
Filtered by Token Holder
swopes.eth
Balance
1 ALT
0x18C5eA5B6441D99d621cEC21e9c034d97124d267
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Embarking on a fresh chapter in the adidas web3 journey, we transcend the realms of Into the Metaverse towards Phase 3: ALTS by adidas. Episode 1: coming April 2023. You may not come back the same...

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
AdidasAlts

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 24 : AdidasAlts.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./TokenHierarchy.sol";

interface IERC1155Migration {
    function burn(address account, uint256 id, uint256 value) external;

    function balanceOf(
        address account,
        uint256 id
    ) external view returns (uint256);
}

contract AdidasAlts is TokenHierarchy {
    string public baseUri;
    string public uriSuffix;
    /// @dev Token name
    string private _name;
    /// @dev Token symbol
    string private _symbol;
    /// @dev Token reveal
    bool private _reveal;
    /// @dev max supply
    uint256 private _maxSupply;
    /// @dev 1155 contract
    IERC1155Migration private _src;
    bool public mintLocked = true;
    string private _contractURI;

    constructor(
        string memory __name,
        string memory __symbol,
        /// @dev AltsTokenOperatorFilter contract address
        address _filterAddress,
        /// @dev ERC1155 used for burnToMint function
        address _ERC1155address,
        string memory _baseUri,
        string memory _uriSuffix,
        string memory _uri,
        address _royaltyReceipient,
        uint96 _royaltyValue,
        uint256 _waitTimelapse,
        uint256 __maxSupply
    ) ERC721A(__name, __symbol) {
        _registerForOperatorFiltering();
        operatorFilteringEnabled = true;
        _setDefaultRoyalty(_royaltyReceipient, _royaltyValue);
        setAltsTokenOperatorFilter(_filterAddress);
        setWaitDuration(_waitTimelapse);
        _contractURI = _uri;
        _name = __name;
        _symbol = __symbol;
        baseUri = _baseUri;
        uriSuffix = _uriSuffix;
        _maxSupply = __maxSupply;
        _src = IERC1155Migration(_ERC1155address);
    }

    /// @dev Max Amount of Token that can ever be minted
    function maxSupply() public view returns (uint256) {
        return _maxSupply;
    }

    function name() public view override returns (string memory) {
        return _name;
    }

    function symbol() public view override returns (string memory) {
        return _symbol;
    }

    function setNameAndSymbol(
        string calldata __name,
        string calldata __symbol
    ) public onlyOwner {
        _name = __name;
        _symbol = __symbol;
    }

    /**
     * @param status sets minting state
     */
    function setMintLocked(bool status) public onlyOwner {
        mintLocked = status;
    }

    function setContractURI(string calldata _uri) public onlyOwner {
        _contractURI = _uri;
    }

    function contractURI() public view returns (string memory) {
        return _contractURI;
    }

    /**
     * @param reveal sets reveal state
     * @param _baseUri sets baseUri string
     */
    function setReveal(bool reveal, string calldata _baseUri) public onlyOwner {
        _reveal = reveal;
        baseUri = _baseUri;
    }

    function tokenURI(
        uint256 _tokenId
    ) public view override returns (string memory) {
        require(_exists(_tokenId), "URI query for nonexistent token");
        string memory currentBaseURI = _baseURI();
        if (_reveal == true) {
            return
                string(
                    abi.encodePacked(
                        currentBaseURI,
                        _toString(_tokenId),
                        uriSuffix
                    )
                );
        } else {
            return currentBaseURI;
        }
    }

    /**
     * @param _tokenIds burns an array of tokens
     */
    function burn(uint256[] calldata _tokenIds) public {
        require(_tokenIds.length > 0, "Missing tokenIds");
        unchecked {
            for (uint256 i = 1; i < _tokenIds.length; i++) {
                require(
                    ownerOf(_tokenIds[i]) == msg.sender,
                    "Must own token to burn"
                );
                require(
                    !tokenHasChildren(_tokenIds[i]),
                    "Cannot burn token with children"
                );
                _burn(_tokenIds[i]);
            }
        }
    }

    /**
     * @param ids Token id contract has Id's = 0,1
     * @param values the amount of tokens to burn and minted
     */
    function burnAndMint(
        uint256[] calldata ids,
        uint256[] calldata values
    ) external {
        require(ids.length == values.length, "Bad data");
        require(!contractLocked, "Contract is locked");
        require(!mintLocked, "Mint is disabled");

        uint256 count = ids.length;
        for (uint256 i = 0; i < count; ) {
            uint256 newMax = _totalMinted() + values[i];
            require(_maxSupply >= newMax, "Max Supply limit reached");

            // 1155 Burn value of Token id
            _src.burn(msg.sender, ids[i], values[i]);

            // mint's to msg.sender 721 of value amount
            _mint(msg.sender, values[i]);
            unchecked {
                i++;
            }
        }
    }

    /**
     * @param to array of destination addresses
     * @param value the amount of tokens to minted
     */
    function mintMany(
        address[] calldata to,
        uint256[] calldata value
    ) external onlyOwner {
        require(to.length == value.length, "Mismatched lengths");
        uint256 count = to.length;
        unchecked {
            for (uint256 i = 0; i < count; i++) {
                // mint value amount for to address
                uint256 newMax = _totalMinted() + value[i];
                require(_maxSupply >= newMax, "Max Supply limit reached");

                _mint(to[i], value[i]);
            }
        }
    }

    // URI methods
    function _baseURI() internal view override returns (string memory) {
        return baseUri;
    }

    /**
     * @param _baseUri new baseURI value to be used in tokenURI
     */
    function setBaseUri(string calldata _baseUri) public onlyOwner {
        baseUri = _baseUri;
    }

    /**
     * @param _uriSuffix new suffix value to be used in tokenURI
     */
    function setUriSuffix(string calldata _uriSuffix) public onlyOwner {
        uriSuffix = _uriSuffix;
    }
}

File 2 of 24 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

File 3 of 24 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

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

File 4 of 24 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

        return (royalty.receiver, royaltyAmount);
    }

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

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

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

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

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

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

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

File 5 of 24 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 6 of 24 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 7 of 24 : ERC1155Holder.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol)

pragma solidity ^0.8.0;

import "./ERC1155Receiver.sol";

/**
 * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens.
 *
 * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be
 * stuck.
 *
 * @dev _Available since v3.1._
 */
contract ERC1155Holder is ERC1155Receiver {
    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address,
        address,
        uint256[] memory,
        uint256[] memory,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155BatchReceived.selector;
    }
}

File 8 of 24 : ERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)

pragma solidity ^0.8.0;

import "../IERC1155Receiver.sol";
import "../../../utils/introspection/ERC165.sol";

/**
 * @dev _Available since v3.1._
 */
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);
    }
}

File 9 of 24 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 10 of 24 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

File 11 of 24 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

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

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

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

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

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

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

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

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

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

File 12 of 24 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

File 13 of 24 : ERC721Holder.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol)

pragma solidity ^0.8.0;

import "../IERC721Receiver.sol";

/**
 * @dev Implementation of the {IERC721Receiver} interface.
 *
 * Accepts all token transfers.
 * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.
 */
contract ERC721Holder is IERC721Receiver {
    /**
     * @dev See {IERC721Receiver-onERC721Received}.
     *
     * Always returns `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address,
        address,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC721Received.selector;
    }
}

File 14 of 24 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

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

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 16 of 24 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 19 of 24 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

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

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

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

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

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

            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 20 of 24 : AltsTokenOperatorFilter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

contract AltsTokenOperatorFilter is Ownable {
    using EnumerableSet for EnumerableSet.AddressSet;

    mapping(address => bool) private approvedContracts;

    mapping(uint256 => EnumerableSet.AddressSet) private contractsAddresses;

    uint256 public globalERC721ChildrenLimit = 9;

    mapping(address => uint256) private childTokenLimits;

    /// @dev contract => tokenId => limit
    mapping(address => mapping(uint256 => uint256))
        private child1155TokenLimits;

    uint256 public contractCount = 0;

    uint256 public constant TOTAL_TOKEN_TYPES = 3;

    constructor() {}

    function changeERC721AndERC20Limit(
        address _childContract,
        uint256 _limit
    ) public onlyOwner {
        childTokenLimits[_childContract] = _limit;
    }

    function changeERC1155Limit(
        address _childContract,
        uint256 _tokenId,
        uint256 _limit
    ) public onlyOwner {
        child1155TokenLimits[_childContract][_tokenId] = _limit;
    }

    function changeGlobalERC721ChildrenLimit(uint256 _value) public onlyOwner {
        globalERC721ChildrenLimit = _value;
    }

    /**
     * @dev function adds new contracts to list of approved contracts
     * @param _tokenType support 3 types, Type 0 = ERC20, 1 = ERC721, 2 = ERC1155
     * @param _childContract child token contract address
     * @param _tokenId tokenId is used for 1155 contracts
     * @param _limit limit is used for ERC20 and 1155 contracts which have a balance.
     */
    function addContract(
        uint256 _tokenType,
        address _childContract,
        uint256 _tokenId,
        uint256 _limit
    ) public onlyOwner {
        require(_tokenType < TOTAL_TOKEN_TYPES, "Not a valid supported type.");
        require(!approvedContracts[_childContract], "Contract already exist");
        approvedContracts[_childContract] = true;
        unchecked {
            contractCount++;
        }
        if (_tokenType == 2) {
            child1155TokenLimits[_childContract][_tokenId] = _limit;
        } else {
            childTokenLimits[_childContract] = _limit;
        }
        contractsAddresses[_tokenType].add(_childContract);
    }

    /**
     * @dev function removes a contract from list of approved contracts
     * @param _tokenType support 3 types, Type 0 = ERC20, 1 = ERC721, 2 = ERC1155
     * @param _childContract child token contract address
     */
    function removeContract(
        uint256 _tokenType,
        address _childContract
    ) public onlyOwner {
        require(_tokenType < TOTAL_TOKEN_TYPES, "Not a valid supported type.");
        require(approvedContracts[_childContract], "Contract doesn't exist");
        approvedContracts[_childContract] = false;
        unchecked {
            contractCount--;
        }
        contractsAddresses[_tokenType].remove(_childContract);
    }

    /**
     * @dev function returns the contract limit
     * @param _childContract child token contract address
     */
    function getContractLimit(
        address _childContract
    ) public view returns (uint256) {
        return childTokenLimits[_childContract];
    }

    /**
     * @dev function returns the 1155 contract limit
     * @param _childContract child token contract address
     * @param _tokenId child token id
     */
    function get1155ContractLimit(
        address _childContract,
        uint256 _tokenId
    ) public view returns (uint256) {
        return child1155TokenLimits[_childContract][_tokenId];
    }

    /**
     * @dev function returns whether contract is on approved list
     * @param _childContract child token contract address
     */
    function isContractApproved(
        address _childContract
    ) public view returns (bool) {
        //If the contract is present/added then it is an approved contract
        return approvedContracts[_childContract];
    }

    /**
     * @dev function returns a list of all approved child contract addresses this is a very small list so gas should not be an issue.
     */
    function getAllChildContracts() public view returns (address[] memory) {
        address[] memory contractList = new address[](contractCount);
        uint256 index;
        unchecked {
            for (uint256 i = 0; i < TOTAL_TOKEN_TYPES; i++) {
                for (uint j = 0; j < contractsAddresses[i].length(); j++) {
                    contractList[index] = contractsAddresses[i].at(j);
                    index++;
                }
            }
        }
        return contractList;
    }

    /**
     * @dev function returns a list of type approved child contract addresses
     */
    function getTypeChildContracts(
        uint256 _type
    ) public view returns (address[] memory) {
        return contractsAddresses[_type].values();
    }
}

File 21 of 24 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

/**
 * @dev Interface of ERC721 token receiver.
 */
interface ERC721A__IERC721Receiver {
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

/**
 * @title ERC721A
 *
 * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
 * Non-Fungible Token Standard, including the Metadata extension.
 * Optimized for lower gas during batch mints.
 *
 * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
 * starting from `_startTokenId()`.
 *
 * Assumptions:
 *
 * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
    // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
    struct TokenApprovalRef {
        address value;
    }

    // =============================================================
    //                           CONSTANTS
    // =============================================================

    // Mask of an entry in packed address data.
    uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;

    // The bit position of `numberMinted` in packed address data.
    uint256 private constant _BITPOS_NUMBER_MINTED = 64;

    // The bit position of `numberBurned` in packed address data.
    uint256 private constant _BITPOS_NUMBER_BURNED = 128;

    // The bit position of `aux` in packed address data.
    uint256 private constant _BITPOS_AUX = 192;

    // Mask of all 256 bits in packed address data except the 64 bits for `aux`.
    uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;

    // The bit position of `startTimestamp` in packed ownership.
    uint256 private constant _BITPOS_START_TIMESTAMP = 160;

    // The bit mask of the `burned` bit in packed ownership.
    uint256 private constant _BITMASK_BURNED = 1 << 224;

    // The bit position of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;

    // The bit mask of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;

    // The bit position of `extraData` in packed ownership.
    uint256 private constant _BITPOS_EXTRA_DATA = 232;

    // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
    uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;

    // The mask of the lower 160 bits for addresses.
    uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;

    // The maximum `quantity` that can be minted with {_mintERC2309}.
    // This limit is to prevent overflows on the address data entries.
    // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
    // is required to cause an overflow, which is unrealistic.
    uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;

    // The `Transfer` event signature is given by:
    // `keccak256(bytes("Transfer(address,address,uint256)"))`.
    bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
        0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;

    // =============================================================
    //                            STORAGE
    // =============================================================

    // The next token ID to be minted.
    uint256 private _currentIndex;

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned.
    // See {_packedOwnershipOf} implementation for details.
    //
    // Bits Layout:
    // - [0..159]   `addr`
    // - [160..223] `startTimestamp`
    // - [224]      `burned`
    // - [225]      `nextInitialized`
    // - [232..255] `extraData`
    mapping(uint256 => uint256) private _packedOwnerships;

    // Mapping owner address to address data.
    //
    // Bits Layout:
    // - [0..63]    `balance`
    // - [64..127]  `numberMinted`
    // - [128..191] `numberBurned`
    // - [192..255] `aux`
    mapping(address => uint256) private _packedAddressData;

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

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

    // =============================================================
    //                          CONSTRUCTOR
    // =============================================================

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

    // =============================================================
    //                   TOKEN COUNTING OPERATIONS
    // =============================================================

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

    /**
     * @dev Returns the next token ID to be minted.
     */
    function _nextTokenId() internal view virtual returns (uint256) {
        return _currentIndex;
    }

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than `_currentIndex - _startTokenId()` times.
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

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

    /**
     * @dev Returns the total number of tokens burned.
     */
    function _totalBurned() internal view virtual returns (uint256) {
        return _burnCounter;
    }

    // =============================================================
    //                    ADDRESS DATA OPERATIONS
    // =============================================================

    /**
     * @dev Returns the number of tokens in `owner`'s account.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

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

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

    /**
     * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal virtual {
        uint256 packed = _packedAddressData[owner];
        uint256 auxCasted;
        // Cast `aux` with assembly to avoid redundant masking.
        assembly {
            auxCasted := aux
        }
        packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
        _packedAddressData[owner] = packed;
    }

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        // The interface IDs are constants representing the first 4 bytes
        // of the XOR of all function selectors in the interface.
        // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
        // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
        return
            interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
            interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
    }

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

    /**
     * @dev Returns the token collection name.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

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

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, it can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

    // =============================================================
    //                     OWNERSHIPS OPERATIONS
    // =============================================================

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        return address(uint160(_packedOwnershipOf(tokenId)));
    }

    /**
     * @dev Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around over time.
     */
    function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnershipOf(tokenId));
    }

    /**
     * @dev Returns the unpacked `TokenOwnership` struct at `index`.
     */
    function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnerships[index]);
    }

    /**
     * @dev Initializes the ownership slot minted at `index` for efficiency purposes.
     */
    function _initializeOwnershipAt(uint256 index) internal virtual {
        if (_packedOwnerships[index] == 0) {
            _packedOwnerships[index] = _packedOwnershipOf(index);
        }
    }

    /**
     * Returns the packed ownership data of `tokenId`.
     */
    function _packedOwnershipOf(uint256 tokenId) private view returns (uint256 packed) {
        if (_startTokenId() <= tokenId) {
            packed = _packedOwnerships[tokenId];
            // If not burned.
            if (packed & _BITMASK_BURNED == 0) {
                // If the data at the starting slot does not exist, start the scan.
                if (packed == 0) {
                    if (tokenId >= _currentIndex) revert OwnerQueryForNonexistentToken();
                    // Invariant:
                    // There will always be an initialized ownership slot
                    // (i.e. `ownership.addr != address(0) && ownership.burned == false`)
                    // before an unintialized ownership slot
                    // (i.e. `ownership.addr == address(0) && ownership.burned == false`)
                    // Hence, `tokenId` will not underflow.
                    //
                    // We can directly compare the packed value.
                    // If the address is zero, packed will be zero.
                    for (;;) {
                        unchecked {
                            packed = _packedOwnerships[--tokenId];
                        }
                        if (packed == 0) continue;
                        return packed;
                    }
                }
                // Otherwise, the data exists and is not burned. We can skip the scan.
                // This is possible because we have already achieved the target condition.
                // This saves 2143 gas on transfers of initialized tokens.
                return packed;
            }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev Returns the unpacked `TokenOwnership` struct from `packed`.
     */
    function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
        ownership.addr = address(uint160(packed));
        ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);
        ownership.burned = packed & _BITMASK_BURNED != 0;
        ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);
    }

    /**
     * @dev Packs ownership data into a single uint256.
     */
    function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`.
            result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))
        }
    }

    /**
     * @dev Returns the `nextInitialized` flag set if `quantity` equals 1.
     */
    function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
        // For branchless setting of the `nextInitialized` flag.
        assembly {
            // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`.
            result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
        }
    }

    // =============================================================
    //                      APPROVAL OPERATIONS
    // =============================================================

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account. See {ERC721A-_approve}.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     */
    function approve(address to, uint256 tokenId) public payable virtual override {
        _approve(to, tokenId, true);
    }

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId].value;
    }

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom}
     * for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _operatorApprovals[_msgSenderERC721A()][operator] = approved;
        emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
    }

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

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted. See {_mint}.
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return
            _startTokenId() <= tokenId &&
            tokenId < _currentIndex && // If within bounds,
            _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned.
    }

    /**
     * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.
     */
    function _isSenderApprovedOrOwner(
        address approvedAddress,
        address owner,
        address msgSender
    ) private pure returns (bool result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.
            msgSender := and(msgSender, _BITMASK_ADDRESS)
            // `msgSender == owner || msgSender == approvedAddress`.
            result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))
        }
    }

    /**
     * @dev Returns the storage slot and value for the approved address of `tokenId`.
     */
    function _getApprovedSlotAndAddress(uint256 tokenId)
        private
        view
        returns (uint256 approvedAddressSlot, address approvedAddress)
    {
        TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];
        // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`.
        assembly {
            approvedAddressSlot := tokenApproval.slot
            approvedAddress := sload(approvedAddressSlot)
        }
    }

    // =============================================================
    //                      TRANSFER OPERATIONS
    // =============================================================

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token
     * by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable virtual override {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        // The nested ifs save around 20+ gas over a compound boolean condition.
        if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
            if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();

        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

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

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                to,
                _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

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

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable virtual override {
        safeTransferFrom(from, to, tokenId, '');
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token
     * by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement
     * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public payable virtual override {
        transferFrom(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

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

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

    /**
     * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * `from` - Previous owner of the given token ID.
     * `to` - Target address that will receive the token.
     * `tokenId` - Token ID to be transferred.
     * `_data` - Optional data to send along with the call.
     *
     * Returns whether the call correctly returned the expected magic value.
     */
    function _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (
            bytes4 retval
        ) {
            return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    // =============================================================
    //                        MINT OPERATIONS
    // =============================================================

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

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

        // Overflows are incredibly unrealistic.
        // `balance` and `numberMinted` have a maximum limit of 2**64.
        // `tokenId` has a maximum limit of 2**256.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            uint256 toMasked;
            uint256 end = startTokenId + quantity;

            // Use assembly to loop and emit the `Transfer` event for gas savings.
            // The duplicated `log4` removes an extra check and reduces stack juggling.
            // The assembly, together with the surrounding Solidity code, have been
            // delicately arranged to nudge the compiler into producing optimized opcodes.
            assembly {
                // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
                toMasked := and(to, _BITMASK_ADDRESS)
                // Emit the `Transfer` event.
                log4(
                    0, // Start of data (0, since no data).
                    0, // End of data (0, since no data).
                    _TRANSFER_EVENT_SIGNATURE, // Signature.
                    0, // `address(0)`.
                    toMasked, // `to`.
                    startTokenId // `tokenId`.
                )

                // The `iszero(eq(,))` check ensures that large values of `quantity`
                // that overflows uint256 will make the loop run out of gas.
                // The compiler will optimize the `iszero` away for performance.
                for {
                    let tokenId := add(startTokenId, 1)
                } iszero(eq(tokenId, end)) {
                    tokenId := add(tokenId, 1)
                } {
                    // Emit the `Transfer` event. Similar to above.
                    log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
                }
            }
            if (toMasked == 0) revert MintToZeroAddress();

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

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * This function is intended for efficient minting only during contract creation.
     *
     * It emits only one {ConsecutiveTransfer} as defined in
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
     * instead of a sequence of {Transfer} event(s).
     *
     * Calling this function outside of contract creation WILL make your contract
     * non-compliant with the ERC721 standard.
     * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
     * {ConsecutiveTransfer} event is only permissible during contract creation.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {ConsecutiveTransfer} event.
     */
    function _mintERC2309(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();
        if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();

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

        // Overflows are unrealistic due to the above check for `quantity` to be below the limit.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);

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

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

        unchecked {
            if (to.code.length != 0) {
                uint256 end = _currentIndex;
                uint256 index = end - quantity;
                do {
                    if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (index < end);
                // Reentrancy protection.
                if (_currentIndex != end) revert();
            }
        }
    }

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

    // =============================================================
    //                       APPROVAL OPERATIONS
    // =============================================================

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

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the
     * zero address clears previous approvals.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function _approve(
        address to,
        uint256 tokenId,
        bool approvalCheck
    ) internal virtual {
        address owner = ownerOf(tokenId);

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

        _tokenApprovals[tokenId].value = to;
        emit Approval(owner, to, tokenId);
    }

    // =============================================================
    //                        BURN OPERATIONS
    // =============================================================

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

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

        address from = address(uint160(prevOwnershipPacked));

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        if (approvalCheck) {
            // The nested ifs save around 20+ gas over a compound boolean condition.
            if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
                if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
        }

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

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
        unchecked {
            // Updates:
            // - `balance -= 1`.
            // - `numberBurned += 1`.
            //
            // We can directly decrement the balance, and increment the number burned.
            // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`.
            _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1;

            // Updates:
            // - `address` to the last owner.
            // - `startTimestamp` to the timestamp of burning.
            // - `burned` to `true`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                from,
                (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

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

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

    // =============================================================
    //                     EXTRA DATA OPERATIONS
    // =============================================================

    /**
     * @dev Directly sets the extra data for the ownership data `index`.
     */
    function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {
        uint256 packed = _packedOwnerships[index];
        if (packed == 0) revert OwnershipNotInitializedForExtraData();
        uint256 extraDataCasted;
        // Cast `extraData` with assembly to avoid redundant masking.
        assembly {
            extraDataCasted := extraData
        }
        packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA);
        _packedOwnerships[index] = packed;
    }

    /**
     * @dev Called during each token transfer to set the 24bit `extraData` field.
     * Intended to be overridden by the cosumer contract.
     *
     * `previousExtraData` - the value of `extraData` before transfer.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _extraData(
        address from,
        address to,
        uint24 previousExtraData
    ) internal view virtual returns (uint24) {}

    /**
     * @dev Returns the next extra data for the packed ownership data.
     * The returned result is shifted into position.
     */
    function _nextExtraData(
        address from,
        address to,
        uint256 prevOwnershipPacked
    ) private view returns (uint256) {
        uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA);
        return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA;
    }

    // =============================================================
    //                       OTHER OPERATIONS
    // =============================================================

    /**
     * @dev Returns the message sender (defaults to `msg.sender`).
     *
     * If you are writing GSN compatible contracts, you need to override this function.
     */
    function _msgSenderERC721A() internal view virtual returns (address) {
        return msg.sender;
    }

    /**
     * @dev Converts a uint256 to its ASCII string decimal representation.
     */
    function _toString(uint256 value) internal pure virtual returns (string memory str) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit), but
            // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned.
            // We will need 1 word for the trailing zeros padding, 1 word for the length,
            // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0.
            let m := add(mload(0x40), 0xa0)
            // Update the free memory pointer to allocate.
            mstore(0x40, m)
            // Assign the `str` to the end.
            str := sub(m, 0x20)
            // Zeroize the slot after the string.
            mstore(str, 0)

            // Cache the end of the memory to calculate the length later.
            let end := str

            // We write the string from rightmost digit to leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            // prettier-ignore
            for { let temp := value } 1 {} {
                str := sub(str, 1)
                // Write the character to the pointer.
                // The ASCII index of the '0' character is 48.
                mstore8(str, add(48, mod(temp, 10)))
                // Keep dividing `temp` until zero.
                temp := div(temp, 10)
                // prettier-ignore
                if iszero(temp) { break }
            }

            let length := sub(end, str)
            // Move the pointer 32 bytes leftwards to make room for the length.
            str := sub(str, 0x20)
            // Store the length.
            mstore(str, length)
        }
    }
}

File 22 of 24 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

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

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

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

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

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

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

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

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

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

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

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

    /**
     * The `quantity` minted with ERC2309 exceeds the safety limit.
     */
    error MintERC2309QuantityExceedsLimit();

    /**
     * The `extraData` cannot be set on an unintialized ownership slot.
     */
    error OwnershipNotInitializedForExtraData();

    // =============================================================
    //                            STRUCTS
    // =============================================================

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Stores the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
        // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.
        uint24 extraData;
    }

    // =============================================================
    //                         TOKEN COUNTERS
    // =============================================================

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() external view returns (uint256);

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);

    // =============================================================
    //                            IERC721
    // =============================================================

    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

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

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

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

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

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

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external payable;

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

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

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

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

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

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

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

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

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

    // =============================================================
    //                           IERC2309
    // =============================================================

    /**
     * @dev Emitted when tokens in `fromTokenId` to `toTokenId`
     * (inclusive) is transferred from `from` to `to`, as defined in the
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
     *
     * See {_mintERC2309} for more details.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}

File 23 of 24 : OperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/// @notice Optimized and flexible operator filterer to abide to OpenSea's
/// mandatory on-chain royalty enforcement in order for new collections to
/// receive royalties.
/// For more information, see:
/// See: https://github.com/ProjectOpenSea/operator-filter-registry
abstract contract OperatorFilterer {
    /// @dev The default OpenSea operator blocklist subscription.
    address internal constant _DEFAULT_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;

    /// @dev The OpenSea operator filter registry.
    address internal constant _OPERATOR_FILTER_REGISTRY = 0x000000000000AAeB6D7670E522A718067333cd4E;

    /// @dev Registers the current contract to OpenSea's operator filter,
    /// and subscribe to the default OpenSea operator blocklist.
    /// Note: Will not revert nor update existing settings for repeated registration.
    function _registerForOperatorFiltering() internal virtual {
        _registerForOperatorFiltering(_DEFAULT_SUBSCRIPTION, true);
    }

    /// @dev Registers the current contract to OpenSea's operator filter.
    /// Note: Will not revert nor update existing settings for repeated registration.
    function _registerForOperatorFiltering(address subscriptionOrRegistrantToCopy, bool subscribe)
        internal
        virtual
    {
        /// @solidity memory-safe-assembly
        assembly {
            let functionSelector := 0x7d3e3dbe // `registerAndSubscribe(address,address)`.

            // Clean the upper 96 bits of `subscriptionOrRegistrantToCopy` in case they are dirty.
            subscriptionOrRegistrantToCopy := shr(96, shl(96, subscriptionOrRegistrantToCopy))

            for {} iszero(subscribe) {} {
                if iszero(subscriptionOrRegistrantToCopy) {
                    functionSelector := 0x4420e486 // `register(address)`.
                    break
                }
                functionSelector := 0xa0af2903 // `registerAndCopyEntries(address,address)`.
                break
            }
            // Store the function selector.
            mstore(0x00, shl(224, functionSelector))
            // Store the `address(this)`.
            mstore(0x04, address())
            // Store the `subscriptionOrRegistrantToCopy`.
            mstore(0x24, subscriptionOrRegistrantToCopy)
            // Register into the registry.
            if iszero(call(gas(), _OPERATOR_FILTER_REGISTRY, 0, 0x00, 0x44, 0x00, 0x04)) {
                // If the function selector has not been overwritten,
                // it is an out-of-gas error.
                if eq(shr(224, mload(0x00)), functionSelector) {
                    // To prevent gas under-estimation.
                    revert(0, 0)
                }
            }
            // Restore the part of the free memory pointer that was overwritten,
            // which is guaranteed to be zero, because of Solidity's memory size limits.
            mstore(0x24, 0)
        }
    }

    /// @dev Modifier to guard a function and revert if the caller is a blocked operator.
    modifier onlyAllowedOperator(address from) virtual {
        if (from != msg.sender) {
            if (!_isPriorityOperator(msg.sender)) {
                if (_operatorFilteringEnabled()) _revertIfBlocked(msg.sender);
            }
        }
        _;
    }

    /// @dev Modifier to guard a function from approving a blocked operator..
    modifier onlyAllowedOperatorApproval(address operator) virtual {
        if (!_isPriorityOperator(operator)) {
            if (_operatorFilteringEnabled()) _revertIfBlocked(operator);
        }
        _;
    }

    /// @dev Helper function that reverts if the `operator` is blocked by the registry.
    function _revertIfBlocked(address operator) private view {
        /// @solidity memory-safe-assembly
        assembly {
            // Store the function selector of `isOperatorAllowed(address,address)`,
            // shifted left by 6 bytes, which is enough for 8tb of memory.
            // We waste 6-3 = 3 bytes to save on 6 runtime gas (PUSH1 0x224 SHL).
            mstore(0x00, 0xc6171134001122334455)
            // Store the `address(this)`.
            mstore(0x1a, address())
            // Store the `operator`.
            mstore(0x3a, operator)

            // `isOperatorAllowed` always returns true if it does not revert.
            if iszero(staticcall(gas(), _OPERATOR_FILTER_REGISTRY, 0x16, 0x44, 0x00, 0x00)) {
                // Bubble up the revert if the staticcall reverts.
                returndatacopy(0x00, 0x00, returndatasize())
                revert(0x00, returndatasize())
            }

            // We'll skip checking if `from` is inside the blacklist.
            // Even though that can block transferring out of wrapper contracts,
            // we don't want tokens to be stuck.

            // Restore the part of the free memory pointer that was overwritten,
            // which is guaranteed to be zero, if less than 8tb of memory is used.
            mstore(0x3a, 0)
        }
    }

    /// @dev For deriving contracts to override, so that operator filtering
    /// can be turned on / off.
    /// Returns true by default.
    function _operatorFilteringEnabled() internal view virtual returns (bool) {
        return true;
    }

    /// @dev For deriving contracts to override, so that preferred marketplaces can
    /// skip operator filtering, helping users save gas.
    /// Returns false for all inputs by default.
    function _isPriorityOperator(address) internal view virtual returns (bool) {
        return false;
    }
}

File 24 of 24 : TokenHierarchy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC721A.sol";
import "./AltsTokenOperatorFilter.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

import {OperatorFilterer} from "./OperatorFilterer.sol";

abstract contract TokenHierarchy is
    ERC721A,
    ERC721Holder,
    ERC1155Holder,
    ERC2981,
    Ownable,
    OperatorFilterer
{
    using EnumerableSet for EnumerableSet.AddressSet;
    using EnumerableSet for EnumerableSet.UintSet;
    using SafeERC20 for IERC20;

    /// @dev Operator filter
    bool public operatorFilteringEnabled;
    /// @dev Minting/trading status
    bool public contractLocked = false;

    uint256 public waitDuration = 1 hours;

    address public altsTokenOperatorFilter;

    bool public contractFiltering = false;

    bool public childrenLocked = true;

    /// @dev
    mapping(uint256 => uint256) private waitStartTime;

    /// @dev tokenId => contract Addresses
    mapping(uint256 => EnumerableSet.AddressSet) private erc20TokenContracts;
    mapping(uint256 => EnumerableSet.AddressSet) private erc721TokenContracts;
    mapping(uint256 => EnumerableSet.AddressSet) private erc1155TokenContracts;

    /// @dev tokenId => (token contract => balance)
    mapping(uint256 => mapping(address => uint256)) private child20Balances;

    /// @dev tokenId => (token contract => tokenid => balance)
    mapping(uint256 => mapping(address => mapping(uint256 => uint256)))
        private child1155Balances;

    /// @dev token contract => array tokenids
    mapping(address => EnumerableSet.UintSet) private uniqueChild1155TokenIds;

    /// @dev ERC-721 children
    mapping(uint256 => mapping(address => EnumerableSet.UintSet))
        private child721Tokens;
    mapping(uint256 => uint256) private total721Children;

    /// @dev child address => childId => tokenId
    mapping(address => mapping(uint256 => uint256)) private child721TokenOwner;

    function setWaitDuration(uint256 number) public onlyOwner {
        waitDuration = number;
    }

    /// @dev Mint status
    function setContractLocked(bool status) public onlyOwner {
        contractLocked = status;
    }

    /// @dev Mint status
    function setChildrenLocked(bool status) public onlyOwner {
        childrenLocked = status;
    }

    function setAltsTokenOperatorFilter(
        address _filterAddress
    ) public onlyOwner {
        altsTokenOperatorFilter = _filterAddress;
        contractFiltering = true;
    }

    /// @dev Royalties
    function setRoyalties(address recipient, uint96 value) public onlyOwner {
        _setDefaultRoyalty(recipient, value);
    }

    /// @dev Set contractFiltering
    function setContractFiltering(bool value) public onlyOwner {
        contractFiltering = value;
    }

    /// @dev Interface Support
    function supportsInterface(
        bytes4 interfaceId
    )
        public
        view
        virtual
        override(ERC721A, ERC2981, ERC1155Receiver)
        returns (bool)
    {
        /**
         * @dev Supports the following interfaceIds:
         * IERC165: 0x01ffc9a7
         * IERC721: 0x80ac58cd
         * IERC721Metadata: 0x5b5e139f
         * IERC2981: 0x2a55205a
         */
        return
            ERC721A.supportsInterface(interfaceId) ||
            ERC2981.supportsInterface(interfaceId) ||
            ERC1155Receiver.supportsInterface(interfaceId);
    }

    function setApprovalForAll(
        address operator,
        bool approved
    ) public override(ERC721A) onlyAllowedOperatorApproval(operator) {
        super.setApprovalForAll(operator, approved);
    }

    function approve(
        address operator,
        uint256 tokenId
    ) public payable override(ERC721A) onlyAllowedOperatorApproval(operator) {
        super.approve(operator, tokenId);
    }

    function _startTokenId() internal pure override(ERC721A) returns (uint256) {
        return 1;
    }

    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable override(ERC721A) onlyAllowedOperator(from) {
        require(!contractLocked, "Contract is locked");
        require(
            waitStartTime[tokenId] + waitDuration < block.timestamp,
            "Transfer blocked for wait period"
        );
        super.transferFrom(from, to, tokenId);
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable override(ERC721A) onlyAllowedOperator(from) {
        super.safeTransferFrom(from, to, tokenId);
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) public payable override(ERC721A) onlyAllowedOperator(from) {
        super.safeTransferFrom(from, to, tokenId, data);
    }

    function isContractApproved(
        address _childContract
    ) private view returns (bool) {
        if (contractFiltering) {
            return
                AltsTokenOperatorFilter(altsTokenOperatorFilter)
                    .isContractApproved(_childContract);
        } else {
            return false;
        }
    }

    /**
     * @dev childRescue is an OwnerOnly function in the case of lost children.
     * @param _tokenId where original child token was kept
     * @param _childContract contract of child token
     * @param _childTokenId tokenId of child token
     */
    function childRescue(
        uint256 _type,
        uint256 _tokenId,
        address _childContract,
        uint256 _childTokenId
    ) public onlyOwner {
        if (_type == 0) {
            // ERC20 rescue
            uint256 balance = child20Balances[_tokenId][_childContract];
            _removeERC20Child(_tokenId, _childContract, balance);
            IERC20(_childContract).transfer(msg.sender, balance);
        } else if (_type == 1) {
            // ERC721 rescue
            child721Tokens[_tokenId][_childContract].remove(_childTokenId);
            if (child721Tokens[_tokenId][_childContract].length() == 0) {
                erc721TokenContracts[_tokenId].remove(_childContract);
            }
            total721Children[_tokenId]--;
            child721TokenOwner[_childContract][_childTokenId] = 0;
            ERC721A(_childContract).transferFrom(address(this), msg.sender, _childTokenId);
        } else {
            uint256 amount = child1155Balances[_tokenId][_childContract][
                _childTokenId
            ];
            _removeERC1155Child(_tokenId, _childContract, _childTokenId, amount);
            IERC1155(_childContract).safeTransferFrom(
                address(this),
                msg.sender,
                _childTokenId,
                amount,
                ""
            );
        }
    }

    /// @dev ERC721 children
    function transferERC721Child(
        uint256 _tokenId,
        address _to,
        address _childContract,
        uint256 _childTokenId
    ) public {
        require(!childrenLocked, "Child addition/removal temporarily locked");
        require(_to != address(0), "Receiving address not valid");
        require(ownerOf(_tokenId) == msg.sender, "Not authorized owner");
        require(
            child721TokenOwner[_childContract][_childTokenId] == _tokenId,
            "Not a owner of child"
        );

        child721Tokens[_tokenId][_childContract].remove(_childTokenId);
        if (child721Tokens[_tokenId][_childContract].length() == 0) {
            erc721TokenContracts[_tokenId].remove(_childContract);
        }
        total721Children[_tokenId]--;
        child721TokenOwner[_childContract][_childTokenId] = 0;
        ERC721A(_childContract).transferFrom(address(this), _to, _childTokenId);
        waitStartTime[_tokenId] = block.timestamp;
    }

    function bulkTransferERC721Child(
        uint256 _tokenId,
        address _to,
        address[] calldata _childContracts,
        uint256[] calldata _childTokenIds
    ) public {
        require(
            _childContracts.length == _childTokenIds.length,
            "Contracts length doesn't match"
        );
        require(_childContracts.length > 0, "Missing contracts or tokenIds");
        unchecked {
            for (uint i = 0; i < _childTokenIds.length; i++) {
                transferERC721Child(
                    _tokenId,
                    _to,
                    _childContracts[i],
                    _childTokenIds[i]
                );
            }
        }
    }

    /// @dev Contract must be approved first in _childContract
    function addERC721Child(
        uint256 _tokenId,
        address _childContract,
        uint256 _childTokenId
    ) public {
        require(!childrenLocked, "Child addition/removal temporarily locked");
        require(ownerOf(_tokenId) == msg.sender, "Not authorized owner");
        require(isContractApproved(_childContract), "Token not approved child");

        uint256 contractLimit = AltsTokenOperatorFilter(
            altsTokenOperatorFilter
        ).getContractLimit(_childContract);
        uint256 globalLimit = AltsTokenOperatorFilter(
            altsTokenOperatorFilter
        ).globalERC721ChildrenLimit();
        require(
            child721Tokens[_tokenId][_childContract].length() + 1 <=
                contractLimit,
            "Child contract limit reached"
        );
        require(
            total721Children[_tokenId] + 1 <= globalLimit,
            "Child contract limit reached"
        );

        erc721TokenContracts[_tokenId].add(_childContract);

        bool added = child721Tokens[_tokenId][_childContract].add(
            _childTokenId
        );
        if (!added) revert("Token may already be added");

        child721TokenOwner[_childContract][_childTokenId] = _tokenId;
        total721Children[_tokenId]++;

        ERC721A(_childContract).transferFrom(
            msg.sender,
            address(this),
            _childTokenId
        );
    }

    function bulkAddERC721Child(
        uint256 _tokenId,
        address[] calldata _childContracts,
        uint256[] calldata _childTokenIds
    ) public {
        require(
            _childContracts.length == _childTokenIds.length,
            "Contracts length doesn't match"
        );
        require(_childContracts.length > 0, "Missing contracts or tokenIds");
        unchecked {
            for (uint i = 0; i < _childTokenIds.length; i++) {
                addERC721Child(_tokenId, _childContracts[i], _childTokenIds[i]);
            }
        }
    }

    function ownerOf721Child(
        address _childContract,
        uint256 _childTokenId
    ) external view returns (address, uint256) {
        uint256 parentTokenId = child721TokenOwner[_childContract][
            _childTokenId
        ];
        return (ownerOf(parentTokenId), parentTokenId);
    }

    function child721Exists(
        address _childContract,
        uint256 _childTokenId
    ) external view returns (bool) {
        uint256 tokenId = child721TokenOwner[_childContract][_childTokenId];
        return tokenId != 0;
    }

    function total721ChildTokens(
        uint256 _tokenId,
        address _childContract
    ) external view returns (uint256) {
        return child721Tokens[_tokenId][_childContract].length();
    }

    /// @dev ERC20 children
    function balanceOfERC20Child(
        uint256 _tokenId,
        address _childContract
    ) public view returns (uint256) {
        return child20Balances[_tokenId][_childContract];
    }

    function _removeERC20Child(
        uint256 _tokenId,
        address _childContract,
        uint256 _value
    ) private {
        require(!childrenLocked, "Child addition/removal temporarily locked");
        require(_value > 0, "Value should be greater than 0");
        uint256 erc20Balance = child20Balances[_tokenId][_childContract];
        require(erc20Balance >= _value, "Insufficient tokens to remove");
        unchecked {
            uint256 newERC20Balance = erc20Balance - _value;
            child20Balances[_tokenId][_childContract] = newERC20Balance;
            if (newERC20Balance == 0) {
                erc20TokenContracts[_tokenId].remove(_childContract);
            }
        }

        waitStartTime[_tokenId] = block.timestamp;
    }

    function transferERC20Child(
        uint256 _tokenId,
        address _to,
        address _childContract,
        uint256 _value
    ) public {
        require(_to != address(0), "Receiving address not valid");
        require(ownerOf(_tokenId) == msg.sender, "Not authorized owner");
        _removeERC20Child(_tokenId, _childContract, _value);
        require(
            IERC20(_childContract).transfer(_to, _value),
            "ERC20 transfer failed"
        );
    }

    function bulkTransferERC20Child(
        uint256 _tokenId,
        address _to,
        address[] calldata _childContracts,
        uint256[] calldata _values
    ) public {
        require(
            _childContracts.length == _values.length,
            "Contracts length doesn't match"
        );
        require(_childContracts.length > 0, "Missing contracts or tokenIds");
        unchecked {
            for (uint i = 0; i < _childContracts.length; i++) {
                transferERC20Child(
                    _tokenId,
                    _to,
                    _childContracts[i],
                    _values[i]
                );
            }
        }
    }

    function transferSafeERC20Child(
        uint256 _tokenId,
        address _to,
        address _childContract,
        uint256 _value
    ) external {
        require(_to != address(0), "Receiving address not valid");
        require(ownerOf(_tokenId) == msg.sender, "Not authorized owner");
        _removeERC20Child(_tokenId, _childContract, _value);
        IERC20(_childContract).safeTransfer(_to, _value);
    }

    function addERC20Child(
        uint256 _tokenId,
        address _childContract,
        uint256 _value
    ) public {
        require(!childrenLocked, "Child addition/removal temporarily locked");
        require(isContractApproved(_childContract), "Token not approved child");
        require(ownerOf(_tokenId) == msg.sender, "Not authorized owner");
        uint256 contractLimit = AltsTokenOperatorFilter(
            altsTokenOperatorFilter
        ).getContractLimit(_childContract);
        require(
            child20Balances[_tokenId][_childContract] + _value <= contractLimit,
            "Child contract limit reached"
        );

        erc20TokenContracts[_tokenId].add(_childContract);

        unchecked {
            child20Balances[_tokenId][_childContract] += _value;
        }

        IERC20(_childContract).safeTransferFrom(
            msg.sender,
            address(this),
            _value
        );
    }

    function bulkAddERC20Child(
        uint256 _tokenId,
        address[] calldata _childContracts,
        uint256[] calldata _values
    ) public {
        require(
            _childContracts.length == _values.length,
            "Contracts length doesn't match"
        );
        require(_childContracts.length > 0, "Missing contracts or values");
        unchecked {
            for (uint i = 0; i < _childContracts.length; i++) {
                addERC20Child(_tokenId, _childContracts[i], _values[i]);
            }
        }
    }

    /// @dev ERC1155 children
    function balanceOfERC1155Child(
        uint256 _tokenId,
        address _childContract,
        uint256 _childTokenId
    ) public view returns (uint256) {
        return child1155Balances[_tokenId][_childContract][_childTokenId];
    }

    function _removeERC1155Child(
        uint256 _tokenId,
        address _childContract,
        uint256 _childTokenId,
        uint256 _value
    ) private {
        require(!childrenLocked, "Child addition/removal temporarily locked");
        require(_value > 0, "Value should be greater than 0");
        uint256 erc1155Balance = child1155Balances[_tokenId][_childContract][
            _childTokenId
        ];
        require(erc1155Balance >= _value, "Insufficient tokens to remove");
        unchecked {
            uint256 newERC1155Balance = erc1155Balance - _value;
            child1155Balances[_tokenId][_childContract][
                _childTokenId
            ] = newERC1155Balance;
        }

        bool hasOtherTokens = false;
        for (uint i=0; i < uniqueChild1155TokenIds[_childContract].length(); i++) {
            uint256 childId = uniqueChild1155TokenIds[_childContract].at(i);
            uint256 balance = child1155Balances[_tokenId][_childContract][childId];
            if (balance > 0) {
                hasOtherTokens = true;
                break;
            }
        }

        if (!hasOtherTokens) {
            erc1155TokenContracts[_tokenId].remove(_childContract);
        }

        waitStartTime[_tokenId] = block.timestamp;
    }

    function transferERC1155Child(
        uint256 _tokenId,
        address _to,
        address _childContract,
        uint256 _childTokenId,
        uint256 _value
    ) public {
        require(_to != address(0), "Receiving address not valid");
        require(ownerOf(_tokenId) == msg.sender, "Not authorized owner");
        _removeERC1155Child(_tokenId, _childContract, _childTokenId, _value);
        IERC1155(_childContract).safeTransferFrom(
            address(this),
            _to,
            _childTokenId,
            _value,
            ""
        );
    }

    function bulkTransferERC1155Child(
        uint256 _tokenId,
        address _to,
        address[] calldata _childContracts,
        uint256[] calldata _childTokenIds,
        uint256[] calldata _values
    ) public {
        require(
            _childContracts.length == _values.length,
            "Contracts length doesn't match"
        );
        require(
            _values.length == _childTokenIds.length,
            "Values length doesn't match"
        );
        require(_childContracts.length > 0, "Missing contracts/ids/values");
        unchecked {
            for (uint i = 0; i < _childTokenIds.length; i++) {
                transferERC1155Child(
                    _tokenId,
                    _to,
                    _childContracts[i],
                    _childTokenIds[i],
                    _values[i]
                );
            }
        }
    }

    function addERC1155Child(
        uint256 _tokenId,
        address _childContract,
        uint256 _childTokenId,
        uint256 _value
    ) public {
        require(!childrenLocked, "Child addition/removal temporarily locked");
        require(isContractApproved(_childContract), "Token not approved child");
        require(ownerOf(_tokenId) == msg.sender, "Not authorized owner");

        if (!uniqueChild1155TokenIds[_childContract].contains(_childTokenId)) {
            uniqueChild1155TokenIds[_childContract].add(_childTokenId);
        }

        uint256 contractLimit = AltsTokenOperatorFilter(
            altsTokenOperatorFilter
        ).get1155ContractLimit(_childContract, _childTokenId);
        require(
            child1155Balances[_tokenId][_childContract][_childTokenId] +
                _value <=
                contractLimit,
            "Child contract limit reached"
        );

        child1155Balances[_tokenId][_childContract][_childTokenId] += _value;

        erc1155TokenContracts[_tokenId].add(_childContract);

        IERC1155(_childContract).safeTransferFrom(
            msg.sender,
            address(this),
            _childTokenId,
            _value,
            ""
        );
    }

    function bulkAddERC1155Child(
        uint256 _tokenId,
        address[] calldata _childContracts,
        uint256[] calldata _childTokenIds,
        uint256[] calldata _values
    ) public {
        require(
            _childContracts.length == _values.length,
            "Contracts length doesn't match"
        );
        require(
            _values.length == _childTokenIds.length,
            "Values length doesn't match"
        );
        require(_childContracts.length > 0, "Missing contracts/ids/values");
        unchecked {
            for (uint i = 0; i < _childTokenIds.length; i++) {
                addERC1155Child(
                    _tokenId,
                    _childContracts[i],
                    _childTokenIds[i],
                    _values[i]
                );
            }
        }
    }

    function tokenHasChildren(uint256 _tokenId) public view returns (bool) {
        /// @dev Step 1: checking ERC20 tokens
        address[] memory erc20Contracts = new address[](
            erc721TokenContracts[_tokenId].length()
        );
        unchecked {
            for (uint i = 0; i < erc721TokenContracts[_tokenId].length(); i++) {
                erc20Contracts[i] = erc721TokenContracts[_tokenId].at(i);
            }
        }

        unchecked {
            for (uint i = 0; i < erc20Contracts.length; i++) {
                address childContract = erc20Contracts[i];
                uint256 balance = balanceOfERC20Child(_tokenId, childContract);

                if (balance > 0) {
                    return true;
                }
            }
        }

        /// @dev Step 2: checking ERC721 tokens
        address[] memory erc721Contracts = getAllERC721ChildContracts(_tokenId);

        unchecked {
            for (uint i = 0; i < erc721Contracts.length; i++) {
                address childContract = erc721Contracts[i];

                if (child721Tokens[_tokenId][childContract].length() > 0) {
                    return true;
                }
            }
        }

        /// @dev Step 3: checking ERC1155 tokens
        address[] memory erc1155Contracts = getAllERC1155ChildContracts(
            _tokenId
        );

        unchecked {
            for (uint i = 0; i < erc1155Contracts.length; i++) {
                address childContract = erc1155Contracts[i];

                for (
                    uint j = 0;
                    j < uniqueChild1155TokenIds[childContract].length();
                    j++
                ) {
                    uint256 childTokenId = uniqueChild1155TokenIds[
                        childContract
                    ].at(j);
                    uint256 balance = child1155Balances[_tokenId][
                        childContract
                    ][childTokenId];
                    if (balance > 0) {
                        return true;
                    }
                }
            }
        }
        return false;
    }

    function getERC20Children(
        uint256 _tokenId
    ) public view returns (address[] memory, uint256[] memory) {
        address[] memory erc20Contracts = AltsTokenOperatorFilter(
            altsTokenOperatorFilter
        ).getTypeChildContracts(0);

        address[] memory erc20ChildrenContracts = new address[](
            erc20Contracts.length
        );
        uint256[] memory erc20ChildrenBalances = new uint256[](
            erc20Contracts.length
        );

        unchecked {
            for (uint i = 0; i < erc20Contracts.length; i++) {
                address childContract = erc20Contracts[i];
                uint256 balance = balanceOfERC20Child(_tokenId, childContract);
                erc20ChildrenContracts[i] = childContract;
                erc20ChildrenBalances[i] = balance;
            }
        }
        return (erc20ChildrenContracts, erc20ChildrenBalances);
    }

    function getAllERC721ChildContracts(
        uint256 _tokenId
    ) public view returns (address[] memory) {
        address[] memory erc721ChildrenContracts = new address[](
            erc721TokenContracts[_tokenId].length()
        );
        unchecked {
            for (uint i = 0; i < erc721TokenContracts[_tokenId].length(); i++) {
                erc721ChildrenContracts[i] = erc721TokenContracts[_tokenId].at(
                    i
                );
            }
        }

        return erc721ChildrenContracts;
    }

    function getERC721Children(
        uint256 _tokenId,
        address _childContract
    ) public view returns (uint256[] memory) {
        uint256[] memory erc721ChildrenTokenIds = new uint256[](
            child721Tokens[_tokenId][_childContract].length()
        );
        unchecked {
            for (
                uint i = 0;
                i < child721Tokens[_tokenId][_childContract].length();
                i++
            ) {
                erc721ChildrenTokenIds[i] = child721Tokens[_tokenId][
                    _childContract
                ].at(i);
            }
        }

        return erc721ChildrenTokenIds;
    }

    function getAllERC1155ChildContracts(
        uint256 _tokenId
    ) public view returns (address[] memory) {
        address[] memory erc1155ChildrenContracts = new address[](
            erc1155TokenContracts[_tokenId].length()
        );
        unchecked {
            for (
                uint i = 0;
                i < erc1155TokenContracts[_tokenId].length();
                i++
            ) {
                erc1155ChildrenContracts[i] = erc1155TokenContracts[_tokenId]
                    .at(i);
            }
        }

        return erc1155ChildrenContracts;
    }

    function getERC1155Children(
        uint256 _tokenId,
        address _childContract
    ) public view returns (uint256[] memory, uint256[] memory) {
        uint256 tokenIdsLength = uniqueChild1155TokenIds[_childContract]
            .length();
        uint256[] memory erc1155ChildrenTokenIds = new uint256[](
            tokenIdsLength
        );
        uint256[] memory erc1155ChildrenTokenBalance = new uint256[](
            tokenIdsLength
        );

        unchecked {
            for (uint i = 0; i < tokenIdsLength; i++) {
                uint256 childTokenId = uniqueChild1155TokenIds[_childContract]
                    .at(i);
                uint256 balance = child1155Balances[_tokenId][_childContract][
                    childTokenId
                ];
                erc1155ChildrenTokenIds[i] = childTokenId;
                erc1155ChildrenTokenBalance[i] = balance;
            }
        }
        return (erc1155ChildrenTokenIds, erc1155ChildrenTokenBalance);
    }

    /**
     * @param __owner address of queried owner
     * @param _startingIndex starting index range value
     * @param _endingIndex ending index range value
     * @return ownedTokenIds list of all tokenIds owned by the wallet
     */
    function walletOfOwner(
        address __owner,
        uint256 _startingIndex,
        uint256 _endingIndex
    ) public view returns (uint256[] memory) {
        uint256 ownerTokenCount = balanceOf(__owner);
        uint256[] memory ownedTokenIds = new uint256[](ownerTokenCount);
        uint256 currentTokenId = _startingIndex;
        uint256 ownedTokenIndex = 0;

        if (ownerTokenCount > 0) {
            unchecked {
                while (
                    ownedTokenIndex < ownerTokenCount &&
                    currentTokenId < _endingIndex
                ) {
                    if (ownerOf(currentTokenId) == __owner) {
                        ownedTokenIds[ownedTokenIndex] = currentTokenId;
                        ownedTokenIndex++;
                    }
                    currentTokenId++;
                }
            }
        }
        return ownedTokenIds;
    }

    /// @dev Vectorized Operator Filter
    function setOperatorFilteringEnabled(bool value) public onlyOwner {
        operatorFilteringEnabled = value;
    }

    function _operatorFilteringEnabled() internal view override returns (bool) {
        return operatorFilteringEnabled;
    }

    function _isPriorityOperator(
        address operator
    ) internal pure override returns (bool) {
        /// @dev OpenSea Seaport Conduit:
        /// https://etherscan.io/address/0x1E0049783F008A0085193E00003D00cd54003c71
        /// https://goerli.etherscan.io/address/0x1E0049783F008A0085193E00003D00cd54003c71
        return operator == address(0x1E0049783F008A0085193E00003D00cd54003c71);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"__name","type":"string"},{"internalType":"string","name":"__symbol","type":"string"},{"internalType":"address","name":"_filterAddress","type":"address"},{"internalType":"address","name":"_ERC1155address","type":"address"},{"internalType":"string","name":"_baseUri","type":"string"},{"internalType":"string","name":"_uriSuffix","type":"string"},{"internalType":"string","name":"_uri","type":"string"},{"internalType":"address","name":"_royaltyReceipient","type":"address"},{"internalType":"uint96","name":"_royaltyValue","type":"uint96"},{"internalType":"uint256","name":"_waitTimelapse","type":"uint256"},{"internalType":"uint256","name":"__maxSupply","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_childContract","type":"address"},{"internalType":"uint256","name":"_childTokenId","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"addERC1155Child","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_childContract","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"addERC20Child","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_childContract","type":"address"},{"internalType":"uint256","name":"_childTokenId","type":"uint256"}],"name":"addERC721Child","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"altsTokenOperatorFilter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_childContract","type":"address"},{"internalType":"uint256","name":"_childTokenId","type":"uint256"}],"name":"balanceOfERC1155Child","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_childContract","type":"address"}],"name":"balanceOfERC20Child","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address[]","name":"_childContracts","type":"address[]"},{"internalType":"uint256[]","name":"_childTokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_values","type":"uint256[]"}],"name":"bulkAddERC1155Child","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address[]","name":"_childContracts","type":"address[]"},{"internalType":"uint256[]","name":"_values","type":"uint256[]"}],"name":"bulkAddERC20Child","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address[]","name":"_childContracts","type":"address[]"},{"internalType":"uint256[]","name":"_childTokenIds","type":"uint256[]"}],"name":"bulkAddERC721Child","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"address[]","name":"_childContracts","type":"address[]"},{"internalType":"uint256[]","name":"_childTokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_values","type":"uint256[]"}],"name":"bulkTransferERC1155Child","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"address[]","name":"_childContracts","type":"address[]"},{"internalType":"uint256[]","name":"_values","type":"uint256[]"}],"name":"bulkTransferERC20Child","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"address[]","name":"_childContracts","type":"address[]"},{"internalType":"uint256[]","name":"_childTokenIds","type":"uint256[]"}],"name":"bulkTransferERC721Child","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnAndMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_childContract","type":"address"},{"internalType":"uint256","name":"_childTokenId","type":"uint256"}],"name":"child721Exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_type","type":"uint256"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_childContract","type":"address"},{"internalType":"uint256","name":"_childTokenId","type":"uint256"}],"name":"childRescue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"childrenLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractFiltering","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getAllERC1155ChildContracts","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getAllERC721ChildContracts","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_childContract","type":"address"}],"name":"getERC1155Children","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getERC20Children","outputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_childContract","type":"address"}],"name":"getERC721Children","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"uint256[]","name":"value","type":"uint256[]"}],"name":"mintMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"operatorFilteringEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_childContract","type":"address"},{"internalType":"uint256","name":"_childTokenId","type":"uint256"}],"name":"ownerOf721Child","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_filterAddress","type":"address"}],"name":"setAltsTokenOperatorFilter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseUri","type":"string"}],"name":"setBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"setChildrenLocked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"value","type":"bool"}],"name":"setContractFiltering","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"setContractLocked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"setMintLocked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"__name","type":"string"},{"internalType":"string","name":"__symbol","type":"string"}],"name":"setNameAndSymbol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"value","type":"bool"}],"name":"setOperatorFilteringEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"reveal","type":"bool"},{"internalType":"string","name":"_baseUri","type":"string"}],"name":"setReveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uriSuffix","type":"string"}],"name":"setUriSuffix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"number","type":"uint256"}],"name":"setWaitDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenHasChildren","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_childContract","type":"address"}],"name":"total721ChildTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"address","name":"_childContract","type":"address"},{"internalType":"uint256","name":"_childTokenId","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transferERC1155Child","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"address","name":"_childContract","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transferERC20Child","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"address","name":"_childContract","type":"address"},{"internalType":"uint256","name":"_childTokenId","type":"uint256"}],"name":"transferERC721Child","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"address","name":"_childContract","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transferSafeERC20Child","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uriSuffix","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"waitDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"__owner","type":"address"},{"internalType":"uint256","name":"_startingIndex","type":"uint256"},{"internalType":"uint256","name":"_endingIndex","type":"uint256"}],"name":"walletOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"}]

60806040523462000ba4576200659a803803806200001d8162000d9f565b92833981016101608282031262000ba45781516001600160401b03811162000ba457816200004d91840162000dc5565b60208301516001600160401b03811162000ba457826200006f91850162000dc5565b6200007d6040850162000e37565b906200008c6060860162000e37565b60808601519093906001600160401b03811162000ba45785620000b191880162000dc5565b60a08701519096906001600160401b03811162000ba45786620000d691830162000dc5565b60c082015190966001600160401b03821162000ba457620000f991830162000dc5565b906200010860e0820162000e37565b61010082015195906001600160601b038716870362000ba45761014061012084015193015196855160018060401b038111620006ec57600254600181811c9116801562000d94575b6020821014620006cb57601f811162000d3b575b50806020601f821160011462000cc15760009162000cb5575b508160011b916000199060031b1c1916176002555b86516001600160401b038111620006ec57600354600181811c9116801562000caa575b6020821014620006cb57601f811162000c40575b50806020601f821160011462000bb55760009162000ba9575b508160011b916000199060031b1c1916176003555b6001600055600a543360018060a01b0382167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3600161ff0160a01b0319163360ff60a81b191617600a55610e10600b55600c805461ffff60a01b1916600160a81b179055601d805460ff60a01b19908116600160a01b17909155633e9f1edf60e11b6000908152306004908152733cc6cdda760b79bafa08df41ecfa224f810dceb660245290604481806daaeb6d7670e522a718067333cd4e5af11562000b92575b6000602452600a8054909116600160a01b1790556127106001600160601b0382161162000b3a576001600160a01b0382161562000af557604080519081018082116001600160401b0390911117620006ec57604081810190526001600160a01b03929092168083526001600160601b03821660209093019290925260a01b6001600160a01b031916176008556200035362000e4c565b600c80546001600160a81b0319166001600160a01b0390921691909117600160a01b1790556200038262000e4c565b600b558051906001600160401b038211620006ec57601e5490600182811c9216801562000aea575b6020831014620006cb5781601f84931162000a86575b50602090601f831160011462000a0857600092620009fc575b50508160011b916000199060031b1c191617601e555b8051906001600160401b038211620006ec5760195490600182811c92168015620009f1575b6020831014620006cb5781601f8493116200097c575b50602090601f8311600114620008f157600092620008e5575b50508160011b916000199060031b1c1916176019555b8051906001600160401b038211620006ec57601a5490600182811c92168015620008da575b6020831014620006cb5781601f84931162000876575b50602090601f8311600114620007fc57600092620007f0575b50508160011b916000199060031b1c191617601a555b83516001600160401b038111620006ec57601754600181811c91168015620007e5575b6020821014620006cb57601f81116200077b575b50602094601f82116001146200070e5794819293949560009262000702575b50508160011b916000199060031b1c1916176017555b82516001600160401b038111620006ec57601854600181811c91168015620006e1575b6020821014620006cb57601f811162000661575b506020601f8211600114620005d75781929394600092620005cb575b50508160011b916000199060031b1c1916176018555b601c55601d80546001600160a01b0319166001600160a01b0392909216919091179055604051615694908162000ea68239f35b01519050388062000582565b601860009081527fb13d2d76d1f4b7be834882e410b3e3a8afaf69f83600ae24db354391d2378d2e9190601f198416905b81811062000648575095836001959697106200062e575b505050811b0160185562000598565b015160001960f88460031b161c191690553880806200061f565b9192602060018192868b01518155019401920162000608565b60186000527fb13d2d76d1f4b7be834882e410b3e3a8afaf69f83600ae24db354391d2378d2e601f830160051c81019160208410620006c0575b601f0160051c01905b818110620006b3575062000566565b60008155600101620006a4565b90915081906200069b565b634e487b7160e01b600052602260045260246000fd5b90607f169062000552565b634e487b7160e01b600052604160045260246000fd5b01519050388062000519565b601f19821695601760005260206000209160005b888110620007625750836001959697981062000748575b505050811b016017556200052f565b015160001960f88460031b161c1916905538808062000739565b9192602060018192868501518155019401920162000722565b60176000527fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c15601f830160051c81019160208410620007da575b601f0160051c01905b818110620007cd5750620004fa565b60008155600101620007be565b9091508190620007b5565b90607f1690620004e6565b015190503880620004ad565b601a60009081526000805160206200657a8339815191529350601f198516905b8181106200085d575090846001959493921062000843575b505050811b01601a55620004c3565b015160001960f88460031b161c1916905538808062000834565b929360206001819287860151815501950193016200081c565b601a6000529091506000805160206200657a833981519152601f840160051c81019160208510620008cf575b90601f859493920160051c01905b818110620008bf575062000494565b60008155849350600101620008b0565b9091508190620008a2565b91607f16916200047e565b01519050388062000443565b601960009081527f944998273e477b495144fb8794c914197f3ccb46be2900f4698fd0ef743c96959350601f198516905b81811062000963575090846001959493921062000949575b505050811b0160195562000459565b015160001960f88460031b161c191690553880806200093a565b9293602060018192878601518155019501930162000922565b60196000529091507f944998273e477b495144fb8794c914197f3ccb46be2900f4698fd0ef743c9695601f840160051c81019160208510620009e6575b90601f859493920160051c01905b818110620009d657506200042a565b60008155849350600101620009c7565b9091508190620009b9565b91607f169162000414565b015190503880620003d9565b601e600090815293506000805160206200655a83398151915291905b601f198416851062000a6a576001945083601f1981161062000a50575b505050811b01601e55620003ef565b015160001960f88460031b161c1916905538808062000a41565b8181015183556020948501946001909301929091019062000a24565b601e6000529091506000805160206200655a833981519152601f840160051c8101916020851062000adf575b90601f859493920160051c01905b81811062000acf5750620003c0565b6000815584935060010162000ac0565b909150819062000ab2565b91607f1691620003aa565b60405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608490fd5b637d3e3dbe60005160e01c03620002bd575b600080fd5b905088015138620001e2565b6003600090815292507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b905b8a601f198416851062000c2857506001935082601f1981161062000c0e575b5050811b01600355620001f7565b8a015160001960f88460031b161c19169055388062000c00565b81015182556020938401936001909201910162000be1565b60036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f830160051c8101916020841062000c9f575b601f0160051c01905b81811062000c925750620001c9565b6000815560010162000c83565b909150819062000c7a565b90607f1690620001b5565b9050870151386200017d565b600260009081526000805160206200653a8339815191529250601f198416905b8a82821062000d22575050908360019493921062000d08575b5050811b0160025562000192565b89015160001960f88460031b161c19169055388062000cfa565b6001849560209395849301518155019401920162000ce1565b60026000526000805160206200653a833981519152601f830160051c8101916020841062000d89575b601f0160051c01905b81811062000d7c575062000164565b6000815560010162000d6d565b909150819062000d64565b90607f169062000150565b6040519190601f01601f191682016001600160401b03811183821017620006ec57604052565b919080601f8401121562000ba45782516001600160401b038111620006ec5760209062000dfb601f8201601f1916830162000d9f565b9281845282828701011162000ba45760005b81811062000e2357508260009394955001015290565b858101830151848201840152820162000e0d565b51906001600160a01b038216820362000ba457565b600a546001600160a01b0316330362000e6157565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fdfe60806040526004361015610013575b600080fd5b60003560e01c806301ffc9a7146105db57806306fdde03146105d2578063081812fc146105c9578063095ea7b3146105c05780630b478197146105b75780631058bd25146105ae57806310d2c370146105a5578063150b7a021461059c57806316ba10e014610593578063170778651461058a57806318160ddd146105815780631cf72b47146105785780631d86c0ee1461056f578063210ee6ea1461056657806322899aff1461055d57806323b872dd146105545780632466a3d11461054b57806327a8d7ab146105425780632947c145146105395780632a55205a14610530578063324cb3cb1461052757806335ab47061461051e57806338d8bb32146105155780633b17160f1461050c5780634029a3ce1461050357806340c284e3146104fa5780634137516f146104f157806342842e0e146104e857806347150f2b146104df5780634acf4dd3146104d65780635503a0e8146104cd5780635a446215146104c45780635dafa291146104bb5780636352211e146104b257806370a08231146104a9578063715018a6146104a057806375444fa51461049757806375f88f271461048e5780638da5cb5b146104855780639178c1bb1461047c57806392bd524c14610473578063938e3d7b1461046a57806394efa33c1461046157806395d89b4114610458578063982df8e61461044f578063985eaec6146104465780639abc83201461043d5780639cdc4c7914610434578063a0bcfc7f1461042b578063a22cb46514610422578063a264824914610419578063a525401c14610410578063a7a159b314610407578063af13c26b146103fe578063b7c0b8e8146103f5578063b80f55c9146103ec578063b88d4fde146103e3578063bc197c81146103da578063c21b471b146103d1578063c2ae5dc2146103c8578063c87b56dd146103bf578063d5abeb01146103b6578063dc98f7bc146103ad578063dd504bb7146103a4578063df3c3a301461039b578063e8a3d48514610392578063e985e9c514610389578063ee026cab14610380578063f23a6e6114610377578063f2fde38b1461036e578063f742c24814610365578063f85a732f1461035c578063f93c8346146103535763fb796e6c1461034b57600080fd5b61000e613209565b5061000e613120565b5061000e6130db565b5061000e61308e565b5061000e612fc5565b5061000e612f6b565b5061000e612e2e565b5061000e612dc5565b5061000e612d1d565b5061000e612cf6565b5061000e612bfa565b5061000e612bd3565b5061000e612bb4565b5061000e612b80565b5061000e612b65565b5061000e612a5c565b5061000e6129cf565b5061000e612915565b5061000e61283c565b5061000e6127f7565b5061000e6127ae565b5061000e612769565b5061000e61271a565b5061000e6126fa565b5061000e61261c565b5061000e61252e565b5061000e6124c4565b5061000e61242e565b5061000e6123e9565b5061000e6123b8565b5061000e612310565b5061000e612267565b5061000e612167565b5061000e612140565b5061000e6120f2565b5061000e6120c8565b5061000e6120b0565b5061000e612044565b5061000e611fe5565b5061000e611fb5565b5061000e611f85565b5061000e611e65565b5061000e611d08565b5061000e611c72565b5061000e611b24565b5061000e611aab565b5061000e61194c565b5061000e6118e3565b5061000e611853565b5061000e61178c565b5061000e6116f4565b5061000e61161f565b5061000e611598565b5061000e611571565b5061000e6114b4565b5061000e61148b565b5061000e6113cd565b5061000e6113a1565b5061000e61128e565b5061000e611235565b5061000e61111e565b5061000e6110cf565b5061000e61100b565b5061000e610f8a565b5061000e610d08565b5061000e610c1a565b5061000e610b9b565b5061000e610a2c565b5061000e6109df565b5061000e61099f565b5061000e61086c565b5061000e610806565b5061000e610724565b5061000e6105f6565b6001600160e01b031981160361000e57565b503461000e57602036600319011261000e5761065e600435610617816105e4565b6001600160e01b031981166301ffc9a760e01b8114919082156106ac575b821561069b575b8215610672575b508115610662575b5060405190151581529081906020820190565b0390f35b61066c9150613cd3565b3861064b565b90915063152a902d60e11b14801561068c575b9038610643565b5061069681613cd3565b610685565b635b5e139f60e01b8114925061063c565b6380ac58cd60e01b81149250610635565b600091031261000e57565b60005b8381106106db5750506000910152565b81810151838201526020016106cb565b90602091610704815180928185528580860191016106c8565b601f01601f1916010190565b9060206107219281815201906106eb565b90565b503461000e5760008060031936011261080357604051908060195461074881611b8e565b808552916001918083169081156107d9575060011461077e575b61065e8561077281870382610ab1565b60405191829182610710565b9250601983527f944998273e477b495144fb8794c914197f3ccb46be2900f4698fd0ef743c96955b8284106107c15750505081016020016107728261065e610762565b805460208587018101919091529093019281016107a6565b86955061065e9693506020925061077294915060ff191682840152151560051b8201019293610762565b80fd5b503461000e57602036600319011261000e5760043561082481613a32565b15610849576000526006602052602060018060a01b0360406000205416604051908152f35b6040516333d1c03960e21b8152600490fd5b6001600160a01b0381160361000e57565b50604036600319011261000e576004356108858161085b565b602435906001600160a01b038082169190731e0049783f008a0085193e00003d00cd54003c70198301610983575b6108bc8461399c565b1690813303610924575b6108fd906108de856000526006602052604060002090565b80546001600160a01b0319166001600160a01b03909216919091179055565b7f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600080a4005b61096c6109686109613361094a8660018060a01b03166000526007602052604060002090565b9060018060a01b0316600052602052604060002090565b5460ff1690565b1590565b156108c6576040516367d9dca160e11b8152600490fd5b60ff600a5460a01c16156108b35761099a82613cff565b6108b3565b503461000e5760a036600319011261000e576109dd6024356109c08161085b565b604435906109cd8261085b565b6084359160643591600435614fb7565b005b503461000e57600036600319011261000e57600c546040516001600160a01b039091168152602090f35b606090600319011261000e5760043590602435610a258161085b565b9060443590565b503461000e576109dd610a3e36610a09565b91614d1d565b50634e487b7160e01b600052604160045260246000fd5b6001600160401b038111610a6e57604052565b610a76610a44565b604052565b604081019081106001600160401b03821117610a6e57604052565b602081019081106001600160401b03821117610a6e57604052565b90601f801991011681019081106001600160401b03821117610a6e57604052565b60405190610adf82610a7b565b565b6020906001600160401b038111610afe575b601f01601f19160190565b610b06610a44565b610af3565b81601f8201121561000e57803590610b2282610ae1565b92610b306040519485610ab1565b8284526020838301011161000e57816000926020809301838601378301015290565b90608060031983011261000e57600435610b6b8161085b565b91602435610b788161085b565b9160443591606435906001600160401b03821161000e5761072191600401610b0b565b503461000e57610baa36610b52565b505050506020604051630a85bd0160e11b8152f35b9181601f8401121561000e578235916001600160401b03831161000e576020838186019501011161000e57565b602060031982011261000e57600435906001600160401b03821161000e57610c1691600401610bbf565b9091565b503461000e57610c2936610bec565b610c31613230565b6001600160401b038111610cfb575b610c5481610c4f601854611b8e565b61330a565b6000601f8211600114610c8f578192600092610c84575b5050600019600383901b1c191660019190911b17601855005b013590503880610c6b565b6018600052601f1982169260008051602061561f83398151915291805b858110610ce357508360019510610cc9575b505050811b01601855005b0135600019600384901b60f8161c19169055388080610cbe565b90926020600181928686013581550194019101610cac565b610d03610a44565b610c40565b503461000e57608036600319011261000e57600435604435602435610d2c8261085b565b60643592610d38613230565b80610de65750600092508180610d6e83610d6560209661094a610d98976000526011602052604060002090565b54928391614a07565b60405163a9059cbb60e01b8152336004820152602481019190915293849283919082906044820190565b03926001600160a01b03165af18015610dd9575b610db257005b6109dd9060203d8111610dd2575b610dca8183610ab1565b81019061405d565b503d610dc0565b610de1613934565b610dac565b600103610f165780610e1284610e0d8561094a610e41966000526014602052604060002090565b6140eb565b50610e2b8361094a836000526014602052604060002090565b5415610ee8576000526015602052604060002090565b610e4b8154614042565b90556001600160a01b0381166000908152601660205260408120610e7b9084905b90600052602052604060002090565b556001600160a01b0316803b1561000e576040516323b872dd60e01b815230600482015233602482015260448101929092526000908290606490829084905af18015610edb575b610ec857005b80610ed56109dd92610a5b565b806106bd565b610ee3613934565b610ec2565b610f0583610f0083600052600f602052604060002090565b614072565b506000526015602052604060002090565b90610f438284610f3a81610e6c8661094a819a996000526012602052604060002090565b54958692614e7d565b6001600160a01b031691823b1561000e57610f7a9260009283604051809681958294637921219560e11b845233306004860161400e565b03925af18015610edb57610ec857005b503461000e57600036600319011261000e576000546001546040519103600019018152602090f35b90815180825260208080930193019160005b828110610fd2575050505090565b835185529381019392810192600101610fc4565b9091610ffd61072193604084526040840190610fb2565b916020818403910152610fb2565b503461000e5760408060031936011261000e576004359060243561102e8161085b565b60018060a01b038116916000918383526013906020938285528381205492611055846152a9565b9561105f856152a9565b97835b8681106110775787518061065e8c8c83610fe6565b8061094a6110b18d610e6c8a6110976001978f8a8e528c8c528d20614085565b90549060031b1c9485936000526012602052604060002090565b54906110bd838d6152db565b526110c8828d6152db565b5201611062565b503461000e57600036600319011261000e576020600b54604051908152f35b9181601f8401121561000e578235916001600160401b03831161000e576020808501948460051b01011161000e57565b503461000e57608036600319011261000e576001600160401b0360043560243582811161000e576111539036906004016110ee565b909160443584811161000e5761116d9036906004016110ee565b93909460643590811161000e576111889036906004016110ee565b959091611196878614614476565b6111a186881461503e565b6111ac85151561508a565b60005b8681106111b857005b806111f26111c96001938986613765565b356111d38161085b565b6111de838b88613765565b356111ea848d8a613765565b3591896150d6565b016111af565b90815180825260208080930193019160005b828110611218575050505090565b83516001600160a01b03168552938101939281019260010161120a565b503461000e57602036600319011261000e5761065e6112556004356155c3565b6040519182916020835260208301906111f8565b606090600319011261000e576004356112818161085b565b90602435610a258161085b565b5061129836611269565b90336001600160a01b03841603611339575b6112bc60ff600a5460a81c1615613845565b81600052600d602052604060002054600b54810180911161132c575b4211156112e8576109dd92613d3f565b606460405162461bcd60e51b815260206004820152602060248201527f5472616e7366657220626c6f636b656420666f72207761697420706572696f646044820152fd5b6113346132d3565b6112d8565b731e0049783f008a0085193e00003d00cd54003c713303156112aa5760ff600a5460a01c16156112aa5761136c33613cff565b6112aa565b608090600319011261000e576004359060243561138d8161085b565b9060443561139a8161085b565b9060643590565b503461000e576109dd6113b336611371565b929190916142d9565b906020610721928181520190610fb2565b503461000e57606036600319011261000e576004356113eb8161085b565b6044356113f78261394b565b91611401836152a9565b91602435916000918561141d575b6040518061065e87826113bc565b6001600160a01b039182169594935b85841080611482575b1561146e5786836114458361399c565b1614611454575b60010161142c565b92600181856114648394896152db565b520193905061144c565b50505050905061065e91503880808061140f565b50818110611435565b503461000e57602036600319011261000e5760206114aa6004356152fd565b6040519015158152f35b503461000e57604036600319011261000e5761271060243560043560005260096020526114e460406000206132ae565b80516001600160a01b03161561155a575b611529816001600160601b03602061065e940151169384810294818604149015171561154d575b516001600160a01b031690565b604080516001600160a01b0390921682529390920460208301529091829190820190565b6115556132d3565b61151c565b5061065e611529611569613288565b9150506114f5565b503461000e57600036600319011261000e57602060ff600a5460a81c166040519015158152f35b503461000e576109dd6116196115ad36611371565b9390916115e4858460018060a01b03966115ca8886161515614207565b6115df886115d78361399c565b163314614253565b614a07565b60405163a9059cbb60e01b60208201526001600160a01b03919091166024820152604480820195909552938452606484610ab1565b16614bb2565b503461000e5760408060031936011261000e576004356024356116418161085b565b6000828152601460208181528583206001600160a01b03851684528152604083209093929190611672905b546152a9565b93825b8684528282528784206001600160a01b038616600090815260209190915260409020548110156116e7576001908785528383526116cf816116ca888c89209060018060a01b0316600052602052604060002090565b614085565b90549060031b1c6116e082896152db565b5201611675565b87518061065e88826113bc565b503461000e57604036600319011261000e57602061173d6024356117178161085b565b6004356000526011835260406000209060018060a01b0316600052602052604060002090565b54604051908152f35b604060031982011261000e576001600160401b039160043583811161000e5782611772916004016110ee565b9390939260243591821161000e57610c16916004016110ee565b503461000e5761179b36611746565b6117a6939293613230565b80840361180f57600093845b8181106117bd578580f35b6001906117e18754600019906117d484888a613765565b350101601c5410156138e8565b6118096117f76117f283868a613765565b613941565b611802838789613765565b3590613a6d565b016117b2565b60405162461bcd60e51b81526020600482015260126024820152714d69736d617463686564206c656e6774687360701b6044820152606490fd5b8015150361000e57565b503461000e57602036600319011261000e5760043561187181611849565b611879613230565b600a805460ff60a81b191691151560a81b60ff60a81b16919091179055005b90606060031983011261000e57600435916001600160401b039160243583811161000e57826118c9916004016110ee565b9390939260443591821161000e57610c16916004016110ee565b503461000e576118f236611898565b91929390611901838514614476565b61190c8415156144c2565b60005b83811061191857005b80611946611929600193888a613765565b356119338161085b565b61193e838887613765565b3590866145cd565b0161190f565b5061195636611269565b9091906001600160a01b0382163314159081611a73575b6040519161197a83610a96565b8060008452611a3b575b611a03575b61199b60ff600a5460a81c1615613845565b80600052600d602052604060002054600b5481018091116119f6575b4211156112e8576119c9818585613d3f565b833b6119d157005b6119de9361096893613f65565b6119e457005b6040516368d2bf6b60e11b8152600490fd5b6119fe6132d3565b6119b7565b731e0049783f008a0085193e00003d00cd54003c713303156119895760ff600a5460a01c161561198957611a3633613cff565b611989565b731e0049783f008a0085193e00003d00cd54003c713303156119845760ff600a5460a01c161561198457611a6e33613cff565b611984565b731e0049783f008a0085193e00003d00cd54003c7133031561196d5760ff600a5460a01c161561196d57611aa633613cff565b61196d565b503461000e57602036600319011261000e57611ac5613230565b600435600b55005b608060031982011261000e5760043591602435611ae98161085b565b916001600160401b039160443583811161000e5782611b0a916004016110ee565b9390939260643591821161000e57610c16916004016110ee565b503461000e57611b3336611acd565b92949193611b42848614614476565b611b4d8515156144c2565b60005b858110611b5957005b80611b88611b6a600193898b613765565b35611b748161085b565b611b7f838988613765565b35908588614ac6565b01611b50565b90600182811c92168015611bbe575b6020831014611ba857565b634e487b7160e01b600052602260045260246000fd5b91607f1691611b9d565b6040519060008260175491611bdc83611b8e565b80835292600190818116908115611c505750600114611c03575b50610adf92500383610ab1565b60176000908152915060008051602061563f8339815191525b848310611c355750610adf935050810160200138611bf6565b81935090816020925483858a01015201910190918592611c1c565b905060209250610adf94915060ff191682840152151560051b82010138611bf6565b503461000e57600080600319360112610803576040519080601854611c9681611b8e565b808552916001918083169081156107d95750600114611cbf5761065e8561077281870382610ab1565b92506018835260008051602061561f8339815191525b828410611cf05750505081016020016107728261065e610762565b80546020858701810191909152909301928101611cd5565b503461000e57604036600319011261000e576001600160401b0360043581811161000e57611d3a903690600401610bbf565b9160243581811161000e57611d53903690600401610bbf565b929091611d5e613230565b8411611e41575b611d7984611d74601954611b8e565b613369565b600090601f8511600114611dba576109dd949160009183611daf575b50508160011b916000199060031b1c19161760195561351b565b013590503880611d95565b60196000527f944998273e477b495144fb8794c914197f3ccb46be2900f4698fd0ef743c969591601f198616815b818110611e2957509160019391876109dd989410611e0f575b505050811b0160195561351b565b0135600019600384901b60f8161c19169055388080611e01565b91936020600181928787013581550195019201611de8565b611e49610a44565b611d65565b9091610ffd610721936040845260408401906111f8565b503461000e57602036600319011261000e57600c5460043590611e9e90611e92906001600160a01b031681565b6001600160a01b031690565b604051631251768b60e31b81526000600482018190529091829060249082905afa908115611f78575b600091611f57575b50611eda81516152a9565b611ee482516152a9565b9260005b8351811015611f485780611f0161151c600193876152db565b611f37611f1c8261094a876000526011602052604060002090565b5491611f2884886152db565b6001600160a01b039091169052565b611f4182886152db565b5201611ee8565b6040518061065e878683611e4e565b611f72913d8091833e611f6a8183610ab1565b8101906154da565b38611ecf565b611f80613934565b611ec7565b503461000e57602036600319011261000e5760206001600160a01b03611fac60043561399c565b16604051908152f35b503461000e57602036600319011261000e576020611fdd600435611fd88161085b565b61394b565b604051908152f35b503461000e5760008060031936011261080357612000613230565b600a80546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461000e57604036600319011261000e576004356120628161085b565b60018060a01b0380911660005260166020526040600020602435600052602052604060002054906120928261399c565b60408051919092166001600160a01b03168152602081019290925290f35b503461000e576109dd6120c236610a09565b916145cd565b503461000e57600036600319011261000e57600a546040516001600160a01b039091168152602090f35b503461000e57604036600319011261000e576004356121108161085b565b60018060a01b03166000526016602052604060002060243560005260205260206040600020541515604051908152f35b503461000e57600036600319011261000e57602060ff600c5460a81c166040519015158152f35b503461000e5761217636610bec565b61217e613230565b6001600160401b03811161225a575b6121a18161219c601e54611b8e565b6133da565b6000601f82116001146121dc5781926000926121d1575b5050600019600383901b1c191660019190911b17601e55005b0135905038806121b8565b601e600052601f198216927f50bb669a95c7b50b7e8a6f09454034b2b14cf2b85c730dca9a539ca82cb6e35091805b85811061224257508360019510612228575b505050811b01601e55005b0135600019600384901b60f8161c1916905538808061221d565b9092602060018192868601358155019401910161220b565b612262610a44565b61218d565b503461000e5761227636611898565b91929390612285838514614476565b83156122cb5760005b84811061229757005b806122c56122a8600193888a613765565b356122b28161085b565b6122bd838887613765565b359086614d1d565b0161228e565b60405162461bcd60e51b815260206004820152601b60248201527f4d697373696e6720636f6e747261637473206f722076616c75657300000000006044820152606490fd5b503461000e57600080600319360112610803576040519080601a5461233481611b8e565b808552916001918083169081156107d9575060011461235d5761065e8561077281870382610ab1565b9250601a83527f057c384a7d1c54f3a1b2e5e67b2617b8224fdfd1ea7234eea573a6ff665ff63e5b8284106123a05750505081016020016107728261065e610762565b80546020858701810191909152909301928101612385565b503461000e57608036600319011261000e576109dd6024356123d98161085b565b60643590604435906004356150d6565b503461000e57602036600319011261000e5760043561240781611849565b61240f613230565b600c805460ff60a81b191691151560a81b60ff60a81b16919091179055005b503461000e5760008060031936011261080357604051908060175461245281611b8e565b808552916001918083169081156107d9575060011461247b5761065e8561077281870382610ab1565b92506017835260008051602061563f8339815191525b8284106124ac5750505081016020016107728261065e610762565b80546020858701810191909152909301928101612491565b503461000e576124d336611acd565b929491936124e2848614614476565b6124ed8515156144c2565b60005b8481106124f957005b8061252861250a600193898b613765565b356125148161085b565b61251f838988613765565b359085886142d9565b016124f0565b503461000e5761253d36610bec565b612545613230565b6001600160401b03811161260f575b61256881612563601754611b8e565b61344b565b6000601f82116001146125a3578192600092612598575b5050600019600383901b1c191660019190911b17601755005b01359050388061257f565b6017600052601f1982169260008051602061563f83398151915291805b8581106125f7575083600195106125dd575b505050811b01601755005b0135600019600384901b60f8161c191690553880806125d2565b909260206001819286860135815501940191016125c0565b612617610a44565b612554565b503461000e57604036600319011261000e5760043561263a8161085b565b60243561264681611849565b6001600160a01b038216916126ae90829061269d90731e0049783f008a0085193e00003d00cd54003c701986016126de575b33600052600760205260406000209060018060a01b0316600052602052604060002090565b9060ff801983541691151516179055565b60405190151581527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b60ff600a5460a01c1615612678576126f581613cff565b612678565b503461000e57602036600319011261000e5761065e61125560043561555d565b503461000e5761275261272c36610a09565b9291600052601260205260406000209060018060a01b0316600052602052604060002090565b906000526020526020604060002054604051908152f35b503461000e57602036600319011261000e5760043561278781611849565b61278f613230565b600c805460ff60a01b191691151560a01b60ff60a01b16919091179055005b503461000e57604036600319011261000e57602061173d6024356127d18161085b565b6004356000526014835260406000209060018060a01b0316600052602052604060002090565b503461000e57602036600319011261000e5760043561281581611849565b61281d613230565b600a805460ff60a01b191691151560a01b60ff60a01b16919091179055005b503461000e57602036600319011261000e576004356001600160401b03811161000e5761286d9036906004016110ee565b80156128dd57600191825b82811061288157005b83906128a43361289e611e92612898858989613765565b35613986565b1461377d565b6128c36128be6109686128b8848888613765565b356152fd565b6137c2565b6128d76128d1828686613765565b35613b42565b01612878565b60405162461bcd60e51b815260206004820152601060248201526f4d697373696e6720746f6b656e49647360801b6044820152606490fd5b5061291f36610b52565b919291906001600160a01b03831633141580611a3b57611a035761199b60ff600a5460a81c1615613845565b6020906001600160401b038111612964575b60051b0190565b61296c610a44565b61295d565b81601f8201121561000e578035916129888361294b565b926129966040519485610ab1565b808452602092838086019260051b82010192831161000e578301905b8282106129c0575050505090565b813581529083019083016129b2565b503461000e5760a036600319011261000e576129ec60043561085b565b6129f760243561085b565b6001600160401b0360443581811161000e57612a17903690600401612971565b5060643581811161000e57612a30903690600401612971565b5060843590811161000e57612a49903690600401610b0b565b5060405163bc197c8160e01b8152602090f35b503461000e57604036600319011261000e57600435612a7a8161085b565b602435906001600160601b03821680830361000e5761271090612a9b613230565b11612b0d576109dd91612ae690612abc6001600160a01b0384161515613c87565b612ad6612ac7610ad2565b6001600160a01b039094168452565b6001600160601b03166020830152565b805160209091015160a01b6001600160a01b0319166001600160a01b039190911617600855565b60405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608490fd5b503461000e576109dd612b7736611371565b92919091614ac6565b503461000e57602036600319011261000e5761065e612ba060043561369a565b6040519182916020835260208301906106eb565b503461000e57600036600319011261000e576020601c54604051908152f35b503461000e57600036600319011261000e57602060ff600c5460a01c166040519015158152f35b503461000e57604036600319011261000e57600435612c1881611849565b6001600160401b0360243581811161000e57612c38903690600401610bbf565b919092612c43613230565b60ff8019601b54169115151617601b558111612ce9575b612c6981612563601754611b8e565b6000601f8211600114612c98578192600092612598575050600019600383901b1c191660019190911b17601755005b6017600052601f1982169260008051602061563f83398151915291805b858110612cd1575083600195106125dd57505050811b01601755005b90926020600181928686013581550194019101612cb5565b612cf1610a44565b612c5a565b503461000e57600036600319011261000e57602060ff601d5460a01c166040519015158152f35b503461000e57600080600319360112610803576040519080601e54612d4181611b8e565b808552916001918083169081156107d95750600114612d6a5761065e8561077281870382610ab1565b9250601e83527f50bb669a95c7b50b7e8a6f09454034b2b14cf2b85c730dca9a539ca82cb6e3505b828410612dad5750505081016020016107728261065e610762565b80546020858701810191909152909301928101612d92565b503461000e57604036600319011261000e57602060ff612e22600435612dea8161085b565b60243590612df78261085b565b60018060a01b03166000526007845260406000209060018060a01b0316600052602052604060002090565b54166040519015158152f35b503461000e57612e3d36611746565b612e4b81849593951461380e565b612e66612e61610968600a5460ff9060a81c1690565b613845565b601d92612e83612e7e610968865460ff9060a01c1690565b613886565b60005b818110612e8f57005b612eb8612eae60001960005401612ea784878b613765565b35906138db565b601c5410156138e8565b8454612ecc906001600160a01b0316611e92565b90612ed8818487613765565b3591612ee582868a613765565b3592813b1561000e57604051637a94c56560e11b815233600482015260248101919091526044810193909352600192906000908290606490829084905af18015612f5e575b612f4b575b50612f45612f3e82868a613765565b3533613a6d565b01612e86565b80610ed5612f5892610a5b565b38612f2f565b612f66613934565b612f2a565b503461000e5760a036600319011261000e57612f8860043561085b565b612f9360243561085b565b6084356001600160401b03811161000e57612fb2903690600401610b0b565b5060405163f23a6e6160e01b8152602090f35b503461000e57602036600319011261000e57600435612fe38161085b565b612feb613230565b6001600160a01b0390811690811561303a57600a54826001600160601b0360a01b821617600a55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b503461000e57602036600319011261000e576004356130ac8161085b565b6130b4613230565b600c80546001600160a81b0319166001600160a01b0390921691909117600160a01b179055005b503461000e57602036600319011261000e576004356130f981611849565b613101613230565b601d805460ff60a01b191691151560a01b60ff60a01b16919091179055005b503461000e5760a036600319011261000e576024356004356131418261085b565b6001600160401b039060443582811161000e576131629036906004016110ee565b919060643584811161000e5761317c9036906004016110ee565b9460843590811161000e576131959036906004016110ee565b9690926131a3888714614476565b6131ae87891461503e565b6131b986151561508a565b60005b8781106131c557005b80613203898b6131fa846131f2816131e18f9960019a8c613765565b35956131ec8761085b565b8c613765565b35928b613765565b3591878b614fb7565b016131bc565b503461000e57600036600319011261000e57602060ff600a5460a01c166040519015158152f35b600a546001600160a01b0316330361324457565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b6040519061329582610a7b565b6008546001600160a01b038116835260a01c6020830152565b906040516132bb81610a7b565b91546001600160a01b038116835260a01c6020830152565b50634e487b7160e01b600052601160045260246000fd5b916133069183549060031b600019811b9283911b169119161790565b9055565b601f8111613316575050565b6000906018825260008051602061561f833981519152906020601f850160051c8301941061335f575b601f0160051c01915b82811061335457505050565b818155600101613348565b909250829061333f565b601f8111613375575050565b600090601982527f944998273e477b495144fb8794c914197f3ccb46be2900f4698fd0ef743c9695906020601f850160051c830194106133d0575b601f0160051c01915b8281106133c557505050565b8181556001016133b9565b90925082906133b0565b601f81116133e6575050565b600090601e82527f50bb669a95c7b50b7e8a6f09454034b2b14cf2b85c730dca9a539ca82cb6e350906020601f850160051c83019410613441575b601f0160051c01915b82811061343657505050565b81815560010161342a565b9092508290613421565b601f8111613457575050565b6000906017825260008051602061563f833981519152906020601f850160051c830194106134a0575b601f0160051c01915b82811061349557505050565b818155600101613489565b9092508290613480565b601f81116134b6575050565b600090601a82527f057c384a7d1c54f3a1b2e5e67b2617b8224fdfd1ea7234eea573a6ff665ff63e906020601f850160051c83019410613511575b601f0160051c01915b82811061350657505050565b8181556001016134fa565b90925082906134f1565b91906001600160401b0381116135f9575b6135408161353b601a54611b8e565b6134aa565b6000601f821160011461357a5781929360009261356f575b50508160011b916000199060031b1c191617601a55565b013590503880613558565b601a600052601f198216937f057c384a7d1c54f3a1b2e5e67b2617b8224fdfd1ea7234eea573a6ff665ff63e91805b8681106135e157508360019596106135c7575b505050811b01601a55565b0135600019600384901b60f8161c191690553880806135bc565b909260206001819286860135815501940191016135a9565b613601610a44565b61352c565b90613619602092828151948592016106c8565b0190565b6018546000929161362d82611b8e565b91600190818116908115613687575060011461364857505050565b9091929350601860005260008051602061561f833981519152906000915b848310613674575050500190565b8181602092548587015201920191613666565b60ff191683525050811515909102019150565b6136a381613a32565b15613709576136b0611bc8565b9060016136bf601b5460ff1690565b151503613705576136ec916136f76136f26136dc61072194613c48565b6040519586946020860190613606565b90613606565b61361d565b03601f198101835282610ab1565b5090565b60405162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e006044820152606490fd5b50634e487b7160e01b600052603260045260246000fd5b91908110156137755760051b0190565b61296c61374e565b1561378457565b60405162461bcd60e51b815260206004820152601660248201527526bab9ba1037bbb7103a37b5b2b7103a3790313ab93760511b6044820152606490fd5b156137c957565b60405162461bcd60e51b815260206004820152601f60248201527f43616e6e6f74206275726e20746f6b656e2077697468206368696c6472656e006044820152606490fd5b1561381557565b60405162461bcd60e51b8152602060048201526008602482015267426164206461746160c01b6044820152606490fd5b1561384c57565b60405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81b1bd8dad95960721b6044820152606490fd5b1561388d57565b60405162461bcd60e51b815260206004820152601060248201526f135a5b9d081a5cc8191a5cd8589b195960821b6044820152606490fd5b90600182018092116138d357565b610adf6132d3565b919082018092116138d357565b156138ef57565b60405162461bcd60e51b815260206004820152601860248201527f4d617820537570706c79206c696d6974207265616368656400000000000000006044820152606490fd5b506040513d6000823e3d90fd5b356107218161085b565b6001600160a01b031680156139745760005260056020526001600160401b036040600020541690565b6040516323d3ad8160e21b8152600490fd5b6001600160a01b03906139989061399c565b1690565b600190808211156139ba575b604051636f96cda160e11b8152600490fd5b6139ce816000526004602052604060002090565b5491600160e01b8316156139e257506139a8565b82156139ed57505090565b6000548210156139a85790815b613a0357505090565b90915060001901613a1e816000526004602052604060002090565b54918215613a2b57505090565b90816139fa565b80600111159081613a61575b81613a47575090565b90506000526004602052600160e01b604060002054161590565b60005481109150613a3e565b906000908154928115613b30576001600160a01b0381166000908152600560205260409020805468010000000000000001840201905560008481526004602052604090206001600160a01b03909116916001914260a01b83831460e11b1784179055840193817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91808587858180a4015b858103613b215750505015613b105755565b604051622e076360e81b8152600490fd5b8083918587858180a401613afe565b60405163b562e8dd60e01b8152600490fd5b6000613b4d8261399c565b600083815260066020526040902080546001600160a01b038316929190613c3f575b506001600160a01b038216600090815260056020526040902080546fffffffffffffffffffffffffffffffff01905560008481526004602052604090204260a01b8317600360e01b179055600160e11b811615613bf6575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8280a46001805401600155565b60018401613c0e816000526004602052604060002090565b5415613c1b575b50613bc7565b83548114613c1557613c37906000526004602052604060002090565b553880613c15565b83905538613b6f565b9060405160a08101604052608081019260008452925b6000190192600a906030828206018553049283613c5e57809350608091030191601f1901918252565b15613c8e57565b60405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606490fd5b63ffffffff60e01b16630271189760e51b8114908115613cf1575090565b6301ffc9a760e01b14919050565b60009069c6171134001122334455825230601a52603a528080604460166daaeb6d7670e522a718067333cd4e5afa15613d3757603a52565b3d81803e3d90fd5b90613d498361399c565b6001600160a01b0383811692828216849003613ede57600086815260066020526040902080549092613d8a6001600160a01b03881633908114908414171590565b613ea1575b8216958615613e8f57613de293613dc092613e85575b506001600160a01b0316600090815260056020526040902090565b80546000190190556001600160a01b0316600090815260056020526040902090565b80546001019055600160e11b804260a01b851717613e0a866000526004602052604060002090565b55811615613e3b575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4565b60018401613e53816000526004602052604060002090565b5415613e60575b50613e13565b6000548114613e5a57613e7d906000526004602052604060002090565b553880613e5a565b6000905538613da5565b604051633a954ecd60e21b8152600490fd5b613ec76109686109613361094a8b60018060a01b03166000526007602052604060002090565b15613d8f57604051632ce44b5f60e11b8152600490fd5b60405162a1148160e81b8152600490fd5b9081602091031261000e5751610721816105e4565b6001600160a01b039182168152911660208201526040810191909152608060608201819052610721929101906106eb565b3d15613f60573d90613f4682610ae1565b91613f546040519384610ab1565b82523d6000602084013e565b606090565b92602091613f8e936000604051809681958294630a85bd0160e11b9a8b85523360048601613f04565b03926001600160a01b03165af160009181613fde575b50613fd057613fb1613f35565b80519081613fcb576040516368d2bf6b60e11b8152600490fd5b602001fd5b6001600160e01b0319161490565b61400091925060203d8111614007575b613ff88183610ab1565b810190613eef565b9038613fa4565b503d613fee565b929060c0949260018060a01b0380921685521660208401526040830152606082015260a06080820152600060a08201520190565b8015614050575b6000190190565b6140586132d3565b614049565b9081602091031261000e575161072181611849565b610721916001600160a01b0316906140eb565b805482101561409e575b60005260206000200190600090565b6140a661374e565b61408f565b80549081156140d557600019918201916140c58383614085565b909182549160031b1b1916905555565b634e487b7160e01b600052603160045260246000fd5b60018101918060005282602052604060002054928315156000146141a057610e6c61413d936000958619808201828111614193575b8354918201918211614186575b808203614143575b5050506140ab565b55600190565b61416d6141679161415761417d9487614085565b90549060031b1c92839187614085565b906132ea565b8590600052602052604060002090565b55388080614135565b61418e6132d3565b61412d565b61419b6132d3565b614120565b50505050600090565b156141b057565b60405162461bcd60e51b815260206004820152602960248201527f4368696c64206164646974696f6e2f72656d6f76616c2074656d706f726172696044820152681b1e481b1bd8dad95960ba1b6064820152608490fd5b1561420e57565b60405162461bcd60e51b815260206004820152601b60248201527f526563656976696e672061646472657373206e6f742076616c696400000000006044820152606490fd5b1561425a57565b60405162461bcd60e51b81526020600482015260146024820152732737ba1030baba3437b934bd32b21037bbb732b960611b6044820152606490fd5b1561429d57565b60405162461bcd60e51b8152602060048201526014602482015273139bdd0818481bdddb995c881bd98818da1a5b1960621b6044820152606490fd5b92916142f66142f1610968600c5460ff9060a81c1690565b6141a9565b6001600160a01b039061430c8383161515614207565b61432761431e611e92611e928861399c565b83163314614253565b6143528561434b86610e6c8560018060a01b03166000526016602052604060002090565b5414614296565b61436e84610e0d8361094a896000526014602052604060002090565b506143878161094a876000526014602052604060002090565b5415614458575b6143a2856000526015602052604060002090565b6143ac8154614042565b90556001600160a01b03811660009081526016602052604081206143d1908690610e6c565b551691823b1561000e576040516323b872dd60e01b81523060048201526001600160a01b039290921660248301526044820152906000908290606490829084905af1801561444b575b614438575b506144354291600052600d602052604060002090565b55565b80610ed561444592610a5b565b3861441f565b614453613934565b61441a565b61447081610f0087600052600f602052604060002090565b5061438e565b1561447d57565b60405162461bcd60e51b815260206004820152601e60248201527f436f6e747261637473206c656e67746820646f65736e2774206d6174636800006044820152606490fd5b156144c957565b60405162461bcd60e51b815260206004820152601d60248201527f4d697373696e6720636f6e747261637473206f7220746f6b656e4964730000006044820152606490fd5b1561451557565b60405162461bcd60e51b815260206004820152601860248201527f546f6b656e206e6f7420617070726f766564206368696c6400000000000000006044820152606490fd5b9081602091031261000e575190565b1561457057565b60405162461bcd60e51b815260206004820152601c60248201527f4368696c6420636f6e7472616374206c696d69742072656163686564000000006044820152606490fd5b60019060001981146145c5570190565b6136196132d3565b9061460c916146c8600c546145e860ff8260a81c16156141a9565b6145f7611e92611e928561399c565b6001600160a01b039586929183163314614253565b61461d614618866148fb565b61450e565b604051631365001960e31b81526001600160a01b03861660048201526020929190911690828082602481865afa91821561485d575b60009261483d575b506040516303e6111360e31b81529192829060049082905afa928315614830575b6000936147fb575b50506146b1906146aa6146a48761094a886000526014602052604060002090565b546138c5565b1115614569565b6146aa6146a4846000526015602052604060002090565b6146e5826146e083600052600f602052604060002090565b61486a565b5061470a610968856147058561094a866000526014602052604060002090565b614879565b6147b257806147449161473386610e6c8660018060a01b03166000526016602052604060002090565b556000526015602052604060002090565b61474e81546145b5565b905516803b1561000e576040516323b872dd60e01b815233600482015230602482015260448101929092526000908290818381606481015b03925af180156147a5575b6147985750565b80610ed5610adf92610a5b565b6147ad613934565b614791565b60405162461bcd60e51b815260206004820152601a60248201527f546f6b656e206d617920616c72656164792062652061646465640000000000006044820152606490fd5b0390fd5b6146b1929350908161482192903d10614829575b6148198183610ab1565b81019061455a565b919038614683565b503d61480f565b614838613934565b61467b565b6004925061485790823d8411614829576148198183610ab1565b9161465a565b614865613934565b614652565b610721916001600160a01b0316905b60008281526001820160205260409020546148f45780826148d06148b760019454680100000000000000008110156148e7575b858101855584614085565b819391549060031b600019811b9283911b169119161790565b905580549260005201602052604060002055600190565b6148ef610a44565b6148ac565b5050600090565b600c5460ff8160a01c166000146148f45760405163070d39d960e01b81526001600160a01b0392831660048201529160209183916024918391165afa908115614962575b60009161494a575090565b610721915060203d8111610dd257610dca8183610ab1565b61496a613934565b61493f565b1561497657565b60405162461bcd60e51b815260206004820152601e60248201527f56616c75652073686f756c642062652067726561746572207468616e203000006044820152606490fd5b156149c257565b60405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e7420746f6b656e7320746f2072656d6f76650000006044820152606490fd5b91614a1a60ff600c5460a81c16156141a9565b614a2581151561496f565b60008381526011602090815260408083206001600160a01b0386168452909152902054614a54828210156149bb565b60008481526011602090815260408083206001600160a01b03871684529091529020828203905514614a9657506144354291600052600d602052604060002090565b614abf90614aae83600052600e602052604060002090565b6001600160a01b03909116906140eb565b503861441f565b91614b2d93916000602094614af8858560018060a01b0393614aeb8588161515614207565b6115df856115d78361399c565b60405163a9059cbb60e01b81526001600160a01b03909316600484015260248301949094529094859384929183906044820190565b0393165af1908115614ba5575b600091614b87575b5015614b4a57565b60405162461bcd60e51b8152602060048201526015602482015274115490cc8c081d1c985b9cd9995c8819985a5b1959605a1b6044820152606490fd5b614b9f915060203d8111610dd257610dca8183610ab1565b38614b42565b614bad613934565b614b3a565b604051614c10916001600160a01b0316614bcb82610a7b565b6000806020958685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656487860152868151910182855af1614c0a613f35565b91614c8c565b80519081614c1d57505050565b8280614c2d93830101910161405d565b15614c355750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b91929015614cee5750815115614ca0575090565b3b15614ca95790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b825190915015614d015750805190602001fd5b60405162461bcd60e51b81529081906147f79060048301610710565b610adf9291614df98161094a600c5494614d3d60ff8760a81c16156141a9565b614d49614618846148fb565b614dd0614d5b611e92611e928461399c565b6001600160a01b039790614d729089163314614253565b604051631365001960e31b81526001600160a01b038616600482015290602090829060249082908c165afa908115614e27575b600091614e09575b506146aa89614dca8761094a876000526011602052604060002090565b546138db565b614de8836146e083600052600e602052604060002090565b506000526011602052604060002090565b8381540190553091339116614e34565b614e21915060203d8111614829576148198183610ab1565b38614dad565b614e2f613934565b614da5565b6040516323b872dd60e01b60208201526001600160a01b039283166024820152929091166044830152606480830193909352918152610adf91614e78608483610ab1565b614bb2565b919092614ee890614e9a6142f1610968600c5460ff9060a81c1690565b614ea581151561496f565b614ec183610e6c8761094a886000526012602052604060002090565b54614ece828210156149bb565b0391610e6c8561094a866000526012602052604060002090565b55600091825b6001600160a01b038216600090815260136020526040902054811015614f9b57614f4e614f3682614f318560018060a01b03166000526013602052604060002090565b614fa3565b610e6c8461094a876000526012602052604060002090565b54614f6157614f5c906145b5565b614eee565b5090915060015b15614f8357506144354291600052600d602052604060002090565b614abf90610f00836000526010602052604060002090565b509091614f68565b90614fad91614085565b90549060031b1c90565b90929391614fe883868360018060a01b0395614fd6878a161515614207565b614fe3876115d78361399c565b614e7d565b16803b1561000e57615016936000809460405196879586948593637921219560e11b8552306004860161400e565b03925af18015615031575b6150285750565b610adf90610a5b565b615039613934565b615021565b1561504557565b60405162461bcd60e51b815260206004820152601b60248201527f56616c756573206c656e67746820646f65736e2774206d6174636800000000006044820152606490fd5b1561509157565b60405162461bcd60e51b815260206004820152601c60248201527f4d697373696e6720636f6e7472616374732f6964732f76616c756573000000006044820152606490fd5b906150ed6142f1610968600c5460ff9060a81c1690565b6150f9614618826148fb565b615225816146e061510f611e92611e928761399c565b6001600160a01b0395906151269087163314614253565b61515e610968886151498660018060a01b03166000526013602052604060002090565b60019160005201602052604060002054151590565b615280575b6151ec6151b7602089615183611e92611e92600c5460018060a01b031690565b6040516372d3975960e11b81526001600160a01b038916600482015260248101929092529092839190829081906044820190565b03915afa908115615273575b600091615255575b506146aa8a614dca8b610e6c8961094a896000526012602052604060002090565b61520887610e6c8561094a856000526012602052604060002090565b6152138982546138db565b90556000526010602052604060002090565b501691823b1561000e576147869260009283604051809681958294637921219560e11b845230336004860161400e565b61526d915060203d8111614829576148198183610ab1565b386151cb565b61527b613934565b6151c3565b6001600160a01b03831660009081526013602052604090206152a3908890614879565b50615163565b906152b38261294b565b6152c06040519182610ab1565b82815280926152d1601f199161294b565b0190602036910137565b60209181518110156152f0575b60051b010190565b6152f861374e565b6152e8565b61531461166c82600052600f602052604060002090565b9060005b61532c82600052600f602052604060002090565b54811015615367578061536161535760019361535286600052600f602052604060002090565b6154bb565b611f2883876152db565b01615318565b5060005b82518110156153bf576153ab61538461151c83866152db565b8360009081526011602090815260408083206001600160a01b039094168352929052205490565b6153b75760010161536b565b505050600190565b5090506153cb8161555d565b9060005b8251811015615409576153fc6153e861151c83866152db565b61094a846000526014602052604060002090565b546153b7576001016153cf565b509050615415816155c3565b906000915b80518310156154b35761543061151c84836152db565b9060005b6001600160a01b0383166000908152601360205260409020548110156154a65761548f61547782614f318660018060a01b03166000526013602052604060002090565b610e6c8561094a886000526012602052604060002090565b5461549c57600101615434565b5050505050600190565b509260019150019161541a565b505050600090565b906154c591614085565b905460039190911b1c6001600160a01b031690565b602090818184031261000e578051906001600160401b03821161000e57019180601f8401121561000e57825161550f8161294b565b9361551d6040519586610ab1565b818552838086019260051b82010192831161000e578301905b828210615544575050505090565b83809183516155528161085b565b815201910190615536565b600091818352600f9260209184835260409461557b868420546152a9565b93835b868552828252878520548110156155b8578061559e6001928a88206154bb565b6155a882896152db565b90838060a01b031690520161557e565b505050935050905090565b6000918183526010926020918483526040946155e1868420546152a9565b93835b868552828252878520548110156155b857806156046001928a88206154bb565b61560e82896152db565b90838060a01b03169052016155e456feb13d2d76d1f4b7be834882e410b3e3a8afaf69f83600ae24db354391d2378d2ec624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c15a26469706673582212207c23458e1c408b8c01dfca378f77133f7ff79ed0935da2145231c0a8cfafd1ca64736f6c63430008110033405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace50bb669a95c7b50b7e8a6f09454034b2b14cf2b85c730dca9a539ca82cb6e350057c384a7d1c54f3a1b2e5e67b2617b8224fdfd1ea7234eea573a6ff665ff63e000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000a61772321a319d961ec2f5b830d5d1b77591051000000000000000000000000028472a58a490c5e09a238847f66a68a47cc76f0f00000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000002a00000000000000000000000000d86bdd298defc36d562effd56115cf6c59c4c8900000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000007530000000000000000000000000000000000000000000000000000000000000000e414c5453206279206164696461730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003414c5400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043697066733a2f2f6261667962656962716368347a61333235726a7a7661346e787467726a64346b34716466366476616c346a776a786274706a3264797436716a68792f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000052e6a736f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d546d386e4b6a684d5650717a4b6f58766e503779677532563541566f503378354d6a78465044526f543557562f00000000000000000000

Deployed Bytecode

0x60806040526004361015610013575b600080fd5b60003560e01c806301ffc9a7146105db57806306fdde03146105d2578063081812fc146105c9578063095ea7b3146105c05780630b478197146105b75780631058bd25146105ae57806310d2c370146105a5578063150b7a021461059c57806316ba10e014610593578063170778651461058a57806318160ddd146105815780631cf72b47146105785780631d86c0ee1461056f578063210ee6ea1461056657806322899aff1461055d57806323b872dd146105545780632466a3d11461054b57806327a8d7ab146105425780632947c145146105395780632a55205a14610530578063324cb3cb1461052757806335ab47061461051e57806338d8bb32146105155780633b17160f1461050c5780634029a3ce1461050357806340c284e3146104fa5780634137516f146104f157806342842e0e146104e857806347150f2b146104df5780634acf4dd3146104d65780635503a0e8146104cd5780635a446215146104c45780635dafa291146104bb5780636352211e146104b257806370a08231146104a9578063715018a6146104a057806375444fa51461049757806375f88f271461048e5780638da5cb5b146104855780639178c1bb1461047c57806392bd524c14610473578063938e3d7b1461046a57806394efa33c1461046157806395d89b4114610458578063982df8e61461044f578063985eaec6146104465780639abc83201461043d5780639cdc4c7914610434578063a0bcfc7f1461042b578063a22cb46514610422578063a264824914610419578063a525401c14610410578063a7a159b314610407578063af13c26b146103fe578063b7c0b8e8146103f5578063b80f55c9146103ec578063b88d4fde146103e3578063bc197c81146103da578063c21b471b146103d1578063c2ae5dc2146103c8578063c87b56dd146103bf578063d5abeb01146103b6578063dc98f7bc146103ad578063dd504bb7146103a4578063df3c3a301461039b578063e8a3d48514610392578063e985e9c514610389578063ee026cab14610380578063f23a6e6114610377578063f2fde38b1461036e578063f742c24814610365578063f85a732f1461035c578063f93c8346146103535763fb796e6c1461034b57600080fd5b61000e613209565b5061000e613120565b5061000e6130db565b5061000e61308e565b5061000e612fc5565b5061000e612f6b565b5061000e612e2e565b5061000e612dc5565b5061000e612d1d565b5061000e612cf6565b5061000e612bfa565b5061000e612bd3565b5061000e612bb4565b5061000e612b80565b5061000e612b65565b5061000e612a5c565b5061000e6129cf565b5061000e612915565b5061000e61283c565b5061000e6127f7565b5061000e6127ae565b5061000e612769565b5061000e61271a565b5061000e6126fa565b5061000e61261c565b5061000e61252e565b5061000e6124c4565b5061000e61242e565b5061000e6123e9565b5061000e6123b8565b5061000e612310565b5061000e612267565b5061000e612167565b5061000e612140565b5061000e6120f2565b5061000e6120c8565b5061000e6120b0565b5061000e612044565b5061000e611fe5565b5061000e611fb5565b5061000e611f85565b5061000e611e65565b5061000e611d08565b5061000e611c72565b5061000e611b24565b5061000e611aab565b5061000e61194c565b5061000e6118e3565b5061000e611853565b5061000e61178c565b5061000e6116f4565b5061000e61161f565b5061000e611598565b5061000e611571565b5061000e6114b4565b5061000e61148b565b5061000e6113cd565b5061000e6113a1565b5061000e61128e565b5061000e611235565b5061000e61111e565b5061000e6110cf565b5061000e61100b565b5061000e610f8a565b5061000e610d08565b5061000e610c1a565b5061000e610b9b565b5061000e610a2c565b5061000e6109df565b5061000e61099f565b5061000e61086c565b5061000e610806565b5061000e610724565b5061000e6105f6565b6001600160e01b031981160361000e57565b503461000e57602036600319011261000e5761065e600435610617816105e4565b6001600160e01b031981166301ffc9a760e01b8114919082156106ac575b821561069b575b8215610672575b508115610662575b5060405190151581529081906020820190565b0390f35b61066c9150613cd3565b3861064b565b90915063152a902d60e11b14801561068c575b9038610643565b5061069681613cd3565b610685565b635b5e139f60e01b8114925061063c565b6380ac58cd60e01b81149250610635565b600091031261000e57565b60005b8381106106db5750506000910152565b81810151838201526020016106cb565b90602091610704815180928185528580860191016106c8565b601f01601f1916010190565b9060206107219281815201906106eb565b90565b503461000e5760008060031936011261080357604051908060195461074881611b8e565b808552916001918083169081156107d9575060011461077e575b61065e8561077281870382610ab1565b60405191829182610710565b9250601983527f944998273e477b495144fb8794c914197f3ccb46be2900f4698fd0ef743c96955b8284106107c15750505081016020016107728261065e610762565b805460208587018101919091529093019281016107a6565b86955061065e9693506020925061077294915060ff191682840152151560051b8201019293610762565b80fd5b503461000e57602036600319011261000e5760043561082481613a32565b15610849576000526006602052602060018060a01b0360406000205416604051908152f35b6040516333d1c03960e21b8152600490fd5b6001600160a01b0381160361000e57565b50604036600319011261000e576004356108858161085b565b602435906001600160a01b038082169190731e0049783f008a0085193e00003d00cd54003c70198301610983575b6108bc8461399c565b1690813303610924575b6108fd906108de856000526006602052604060002090565b80546001600160a01b0319166001600160a01b03909216919091179055565b7f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600080a4005b61096c6109686109613361094a8660018060a01b03166000526007602052604060002090565b9060018060a01b0316600052602052604060002090565b5460ff1690565b1590565b156108c6576040516367d9dca160e11b8152600490fd5b60ff600a5460a01c16156108b35761099a82613cff565b6108b3565b503461000e5760a036600319011261000e576109dd6024356109c08161085b565b604435906109cd8261085b565b6084359160643591600435614fb7565b005b503461000e57600036600319011261000e57600c546040516001600160a01b039091168152602090f35b606090600319011261000e5760043590602435610a258161085b565b9060443590565b503461000e576109dd610a3e36610a09565b91614d1d565b50634e487b7160e01b600052604160045260246000fd5b6001600160401b038111610a6e57604052565b610a76610a44565b604052565b604081019081106001600160401b03821117610a6e57604052565b602081019081106001600160401b03821117610a6e57604052565b90601f801991011681019081106001600160401b03821117610a6e57604052565b60405190610adf82610a7b565b565b6020906001600160401b038111610afe575b601f01601f19160190565b610b06610a44565b610af3565b81601f8201121561000e57803590610b2282610ae1565b92610b306040519485610ab1565b8284526020838301011161000e57816000926020809301838601378301015290565b90608060031983011261000e57600435610b6b8161085b565b91602435610b788161085b565b9160443591606435906001600160401b03821161000e5761072191600401610b0b565b503461000e57610baa36610b52565b505050506020604051630a85bd0160e11b8152f35b9181601f8401121561000e578235916001600160401b03831161000e576020838186019501011161000e57565b602060031982011261000e57600435906001600160401b03821161000e57610c1691600401610bbf565b9091565b503461000e57610c2936610bec565b610c31613230565b6001600160401b038111610cfb575b610c5481610c4f601854611b8e565b61330a565b6000601f8211600114610c8f578192600092610c84575b5050600019600383901b1c191660019190911b17601855005b013590503880610c6b565b6018600052601f1982169260008051602061561f83398151915291805b858110610ce357508360019510610cc9575b505050811b01601855005b0135600019600384901b60f8161c19169055388080610cbe565b90926020600181928686013581550194019101610cac565b610d03610a44565b610c40565b503461000e57608036600319011261000e57600435604435602435610d2c8261085b565b60643592610d38613230565b80610de65750600092508180610d6e83610d6560209661094a610d98976000526011602052604060002090565b54928391614a07565b60405163a9059cbb60e01b8152336004820152602481019190915293849283919082906044820190565b03926001600160a01b03165af18015610dd9575b610db257005b6109dd9060203d8111610dd2575b610dca8183610ab1565b81019061405d565b503d610dc0565b610de1613934565b610dac565b600103610f165780610e1284610e0d8561094a610e41966000526014602052604060002090565b6140eb565b50610e2b8361094a836000526014602052604060002090565b5415610ee8576000526015602052604060002090565b610e4b8154614042565b90556001600160a01b0381166000908152601660205260408120610e7b9084905b90600052602052604060002090565b556001600160a01b0316803b1561000e576040516323b872dd60e01b815230600482015233602482015260448101929092526000908290606490829084905af18015610edb575b610ec857005b80610ed56109dd92610a5b565b806106bd565b610ee3613934565b610ec2565b610f0583610f0083600052600f602052604060002090565b614072565b506000526015602052604060002090565b90610f438284610f3a81610e6c8661094a819a996000526012602052604060002090565b54958692614e7d565b6001600160a01b031691823b1561000e57610f7a9260009283604051809681958294637921219560e11b845233306004860161400e565b03925af18015610edb57610ec857005b503461000e57600036600319011261000e576000546001546040519103600019018152602090f35b90815180825260208080930193019160005b828110610fd2575050505090565b835185529381019392810192600101610fc4565b9091610ffd61072193604084526040840190610fb2565b916020818403910152610fb2565b503461000e5760408060031936011261000e576004359060243561102e8161085b565b60018060a01b038116916000918383526013906020938285528381205492611055846152a9565b9561105f856152a9565b97835b8681106110775787518061065e8c8c83610fe6565b8061094a6110b18d610e6c8a6110976001978f8a8e528c8c528d20614085565b90549060031b1c9485936000526012602052604060002090565b54906110bd838d6152db565b526110c8828d6152db565b5201611062565b503461000e57600036600319011261000e576020600b54604051908152f35b9181601f8401121561000e578235916001600160401b03831161000e576020808501948460051b01011161000e57565b503461000e57608036600319011261000e576001600160401b0360043560243582811161000e576111539036906004016110ee565b909160443584811161000e5761116d9036906004016110ee565b93909460643590811161000e576111889036906004016110ee565b959091611196878614614476565b6111a186881461503e565b6111ac85151561508a565b60005b8681106111b857005b806111f26111c96001938986613765565b356111d38161085b565b6111de838b88613765565b356111ea848d8a613765565b3591896150d6565b016111af565b90815180825260208080930193019160005b828110611218575050505090565b83516001600160a01b03168552938101939281019260010161120a565b503461000e57602036600319011261000e5761065e6112556004356155c3565b6040519182916020835260208301906111f8565b606090600319011261000e576004356112818161085b565b90602435610a258161085b565b5061129836611269565b90336001600160a01b03841603611339575b6112bc60ff600a5460a81c1615613845565b81600052600d602052604060002054600b54810180911161132c575b4211156112e8576109dd92613d3f565b606460405162461bcd60e51b815260206004820152602060248201527f5472616e7366657220626c6f636b656420666f72207761697420706572696f646044820152fd5b6113346132d3565b6112d8565b731e0049783f008a0085193e00003d00cd54003c713303156112aa5760ff600a5460a01c16156112aa5761136c33613cff565b6112aa565b608090600319011261000e576004359060243561138d8161085b565b9060443561139a8161085b565b9060643590565b503461000e576109dd6113b336611371565b929190916142d9565b906020610721928181520190610fb2565b503461000e57606036600319011261000e576004356113eb8161085b565b6044356113f78261394b565b91611401836152a9565b91602435916000918561141d575b6040518061065e87826113bc565b6001600160a01b039182169594935b85841080611482575b1561146e5786836114458361399c565b1614611454575b60010161142c565b92600181856114648394896152db565b520193905061144c565b50505050905061065e91503880808061140f565b50818110611435565b503461000e57602036600319011261000e5760206114aa6004356152fd565b6040519015158152f35b503461000e57604036600319011261000e5761271060243560043560005260096020526114e460406000206132ae565b80516001600160a01b03161561155a575b611529816001600160601b03602061065e940151169384810294818604149015171561154d575b516001600160a01b031690565b604080516001600160a01b0390921682529390920460208301529091829190820190565b6115556132d3565b61151c565b5061065e611529611569613288565b9150506114f5565b503461000e57600036600319011261000e57602060ff600a5460a81c166040519015158152f35b503461000e576109dd6116196115ad36611371565b9390916115e4858460018060a01b03966115ca8886161515614207565b6115df886115d78361399c565b163314614253565b614a07565b60405163a9059cbb60e01b60208201526001600160a01b03919091166024820152604480820195909552938452606484610ab1565b16614bb2565b503461000e5760408060031936011261000e576004356024356116418161085b565b6000828152601460208181528583206001600160a01b03851684528152604083209093929190611672905b546152a9565b93825b8684528282528784206001600160a01b038616600090815260209190915260409020548110156116e7576001908785528383526116cf816116ca888c89209060018060a01b0316600052602052604060002090565b614085565b90549060031b1c6116e082896152db565b5201611675565b87518061065e88826113bc565b503461000e57604036600319011261000e57602061173d6024356117178161085b565b6004356000526011835260406000209060018060a01b0316600052602052604060002090565b54604051908152f35b604060031982011261000e576001600160401b039160043583811161000e5782611772916004016110ee565b9390939260243591821161000e57610c16916004016110ee565b503461000e5761179b36611746565b6117a6939293613230565b80840361180f57600093845b8181106117bd578580f35b6001906117e18754600019906117d484888a613765565b350101601c5410156138e8565b6118096117f76117f283868a613765565b613941565b611802838789613765565b3590613a6d565b016117b2565b60405162461bcd60e51b81526020600482015260126024820152714d69736d617463686564206c656e6774687360701b6044820152606490fd5b8015150361000e57565b503461000e57602036600319011261000e5760043561187181611849565b611879613230565b600a805460ff60a81b191691151560a81b60ff60a81b16919091179055005b90606060031983011261000e57600435916001600160401b039160243583811161000e57826118c9916004016110ee565b9390939260443591821161000e57610c16916004016110ee565b503461000e576118f236611898565b91929390611901838514614476565b61190c8415156144c2565b60005b83811061191857005b80611946611929600193888a613765565b356119338161085b565b61193e838887613765565b3590866145cd565b0161190f565b5061195636611269565b9091906001600160a01b0382163314159081611a73575b6040519161197a83610a96565b8060008452611a3b575b611a03575b61199b60ff600a5460a81c1615613845565b80600052600d602052604060002054600b5481018091116119f6575b4211156112e8576119c9818585613d3f565b833b6119d157005b6119de9361096893613f65565b6119e457005b6040516368d2bf6b60e11b8152600490fd5b6119fe6132d3565b6119b7565b731e0049783f008a0085193e00003d00cd54003c713303156119895760ff600a5460a01c161561198957611a3633613cff565b611989565b731e0049783f008a0085193e00003d00cd54003c713303156119845760ff600a5460a01c161561198457611a6e33613cff565b611984565b731e0049783f008a0085193e00003d00cd54003c7133031561196d5760ff600a5460a01c161561196d57611aa633613cff565b61196d565b503461000e57602036600319011261000e57611ac5613230565b600435600b55005b608060031982011261000e5760043591602435611ae98161085b565b916001600160401b039160443583811161000e5782611b0a916004016110ee565b9390939260643591821161000e57610c16916004016110ee565b503461000e57611b3336611acd565b92949193611b42848614614476565b611b4d8515156144c2565b60005b858110611b5957005b80611b88611b6a600193898b613765565b35611b748161085b565b611b7f838988613765565b35908588614ac6565b01611b50565b90600182811c92168015611bbe575b6020831014611ba857565b634e487b7160e01b600052602260045260246000fd5b91607f1691611b9d565b6040519060008260175491611bdc83611b8e565b80835292600190818116908115611c505750600114611c03575b50610adf92500383610ab1565b60176000908152915060008051602061563f8339815191525b848310611c355750610adf935050810160200138611bf6565b81935090816020925483858a01015201910190918592611c1c565b905060209250610adf94915060ff191682840152151560051b82010138611bf6565b503461000e57600080600319360112610803576040519080601854611c9681611b8e565b808552916001918083169081156107d95750600114611cbf5761065e8561077281870382610ab1565b92506018835260008051602061561f8339815191525b828410611cf05750505081016020016107728261065e610762565b80546020858701810191909152909301928101611cd5565b503461000e57604036600319011261000e576001600160401b0360043581811161000e57611d3a903690600401610bbf565b9160243581811161000e57611d53903690600401610bbf565b929091611d5e613230565b8411611e41575b611d7984611d74601954611b8e565b613369565b600090601f8511600114611dba576109dd949160009183611daf575b50508160011b916000199060031b1c19161760195561351b565b013590503880611d95565b60196000527f944998273e477b495144fb8794c914197f3ccb46be2900f4698fd0ef743c969591601f198616815b818110611e2957509160019391876109dd989410611e0f575b505050811b0160195561351b565b0135600019600384901b60f8161c19169055388080611e01565b91936020600181928787013581550195019201611de8565b611e49610a44565b611d65565b9091610ffd610721936040845260408401906111f8565b503461000e57602036600319011261000e57600c5460043590611e9e90611e92906001600160a01b031681565b6001600160a01b031690565b604051631251768b60e31b81526000600482018190529091829060249082905afa908115611f78575b600091611f57575b50611eda81516152a9565b611ee482516152a9565b9260005b8351811015611f485780611f0161151c600193876152db565b611f37611f1c8261094a876000526011602052604060002090565b5491611f2884886152db565b6001600160a01b039091169052565b611f4182886152db565b5201611ee8565b6040518061065e878683611e4e565b611f72913d8091833e611f6a8183610ab1565b8101906154da565b38611ecf565b611f80613934565b611ec7565b503461000e57602036600319011261000e5760206001600160a01b03611fac60043561399c565b16604051908152f35b503461000e57602036600319011261000e576020611fdd600435611fd88161085b565b61394b565b604051908152f35b503461000e5760008060031936011261080357612000613230565b600a80546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461000e57604036600319011261000e576004356120628161085b565b60018060a01b0380911660005260166020526040600020602435600052602052604060002054906120928261399c565b60408051919092166001600160a01b03168152602081019290925290f35b503461000e576109dd6120c236610a09565b916145cd565b503461000e57600036600319011261000e57600a546040516001600160a01b039091168152602090f35b503461000e57604036600319011261000e576004356121108161085b565b60018060a01b03166000526016602052604060002060243560005260205260206040600020541515604051908152f35b503461000e57600036600319011261000e57602060ff600c5460a81c166040519015158152f35b503461000e5761217636610bec565b61217e613230565b6001600160401b03811161225a575b6121a18161219c601e54611b8e565b6133da565b6000601f82116001146121dc5781926000926121d1575b5050600019600383901b1c191660019190911b17601e55005b0135905038806121b8565b601e600052601f198216927f50bb669a95c7b50b7e8a6f09454034b2b14cf2b85c730dca9a539ca82cb6e35091805b85811061224257508360019510612228575b505050811b01601e55005b0135600019600384901b60f8161c1916905538808061221d565b9092602060018192868601358155019401910161220b565b612262610a44565b61218d565b503461000e5761227636611898565b91929390612285838514614476565b83156122cb5760005b84811061229757005b806122c56122a8600193888a613765565b356122b28161085b565b6122bd838887613765565b359086614d1d565b0161228e565b60405162461bcd60e51b815260206004820152601b60248201527f4d697373696e6720636f6e747261637473206f722076616c75657300000000006044820152606490fd5b503461000e57600080600319360112610803576040519080601a5461233481611b8e565b808552916001918083169081156107d9575060011461235d5761065e8561077281870382610ab1565b9250601a83527f057c384a7d1c54f3a1b2e5e67b2617b8224fdfd1ea7234eea573a6ff665ff63e5b8284106123a05750505081016020016107728261065e610762565b80546020858701810191909152909301928101612385565b503461000e57608036600319011261000e576109dd6024356123d98161085b565b60643590604435906004356150d6565b503461000e57602036600319011261000e5760043561240781611849565b61240f613230565b600c805460ff60a81b191691151560a81b60ff60a81b16919091179055005b503461000e5760008060031936011261080357604051908060175461245281611b8e565b808552916001918083169081156107d9575060011461247b5761065e8561077281870382610ab1565b92506017835260008051602061563f8339815191525b8284106124ac5750505081016020016107728261065e610762565b80546020858701810191909152909301928101612491565b503461000e576124d336611acd565b929491936124e2848614614476565b6124ed8515156144c2565b60005b8481106124f957005b8061252861250a600193898b613765565b356125148161085b565b61251f838988613765565b359085886142d9565b016124f0565b503461000e5761253d36610bec565b612545613230565b6001600160401b03811161260f575b61256881612563601754611b8e565b61344b565b6000601f82116001146125a3578192600092612598575b5050600019600383901b1c191660019190911b17601755005b01359050388061257f565b6017600052601f1982169260008051602061563f83398151915291805b8581106125f7575083600195106125dd575b505050811b01601755005b0135600019600384901b60f8161c191690553880806125d2565b909260206001819286860135815501940191016125c0565b612617610a44565b612554565b503461000e57604036600319011261000e5760043561263a8161085b565b60243561264681611849565b6001600160a01b038216916126ae90829061269d90731e0049783f008a0085193e00003d00cd54003c701986016126de575b33600052600760205260406000209060018060a01b0316600052602052604060002090565b9060ff801983541691151516179055565b60405190151581527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b60ff600a5460a01c1615612678576126f581613cff565b612678565b503461000e57602036600319011261000e5761065e61125560043561555d565b503461000e5761275261272c36610a09565b9291600052601260205260406000209060018060a01b0316600052602052604060002090565b906000526020526020604060002054604051908152f35b503461000e57602036600319011261000e5760043561278781611849565b61278f613230565b600c805460ff60a01b191691151560a01b60ff60a01b16919091179055005b503461000e57604036600319011261000e57602061173d6024356127d18161085b565b6004356000526014835260406000209060018060a01b0316600052602052604060002090565b503461000e57602036600319011261000e5760043561281581611849565b61281d613230565b600a805460ff60a01b191691151560a01b60ff60a01b16919091179055005b503461000e57602036600319011261000e576004356001600160401b03811161000e5761286d9036906004016110ee565b80156128dd57600191825b82811061288157005b83906128a43361289e611e92612898858989613765565b35613986565b1461377d565b6128c36128be6109686128b8848888613765565b356152fd565b6137c2565b6128d76128d1828686613765565b35613b42565b01612878565b60405162461bcd60e51b815260206004820152601060248201526f4d697373696e6720746f6b656e49647360801b6044820152606490fd5b5061291f36610b52565b919291906001600160a01b03831633141580611a3b57611a035761199b60ff600a5460a81c1615613845565b6020906001600160401b038111612964575b60051b0190565b61296c610a44565b61295d565b81601f8201121561000e578035916129888361294b565b926129966040519485610ab1565b808452602092838086019260051b82010192831161000e578301905b8282106129c0575050505090565b813581529083019083016129b2565b503461000e5760a036600319011261000e576129ec60043561085b565b6129f760243561085b565b6001600160401b0360443581811161000e57612a17903690600401612971565b5060643581811161000e57612a30903690600401612971565b5060843590811161000e57612a49903690600401610b0b565b5060405163bc197c8160e01b8152602090f35b503461000e57604036600319011261000e57600435612a7a8161085b565b602435906001600160601b03821680830361000e5761271090612a9b613230565b11612b0d576109dd91612ae690612abc6001600160a01b0384161515613c87565b612ad6612ac7610ad2565b6001600160a01b039094168452565b6001600160601b03166020830152565b805160209091015160a01b6001600160a01b0319166001600160a01b039190911617600855565b60405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608490fd5b503461000e576109dd612b7736611371565b92919091614ac6565b503461000e57602036600319011261000e5761065e612ba060043561369a565b6040519182916020835260208301906106eb565b503461000e57600036600319011261000e576020601c54604051908152f35b503461000e57600036600319011261000e57602060ff600c5460a01c166040519015158152f35b503461000e57604036600319011261000e57600435612c1881611849565b6001600160401b0360243581811161000e57612c38903690600401610bbf565b919092612c43613230565b60ff8019601b54169115151617601b558111612ce9575b612c6981612563601754611b8e565b6000601f8211600114612c98578192600092612598575050600019600383901b1c191660019190911b17601755005b6017600052601f1982169260008051602061563f83398151915291805b858110612cd1575083600195106125dd57505050811b01601755005b90926020600181928686013581550194019101612cb5565b612cf1610a44565b612c5a565b503461000e57600036600319011261000e57602060ff601d5460a01c166040519015158152f35b503461000e57600080600319360112610803576040519080601e54612d4181611b8e565b808552916001918083169081156107d95750600114612d6a5761065e8561077281870382610ab1565b9250601e83527f50bb669a95c7b50b7e8a6f09454034b2b14cf2b85c730dca9a539ca82cb6e3505b828410612dad5750505081016020016107728261065e610762565b80546020858701810191909152909301928101612d92565b503461000e57604036600319011261000e57602060ff612e22600435612dea8161085b565b60243590612df78261085b565b60018060a01b03166000526007845260406000209060018060a01b0316600052602052604060002090565b54166040519015158152f35b503461000e57612e3d36611746565b612e4b81849593951461380e565b612e66612e61610968600a5460ff9060a81c1690565b613845565b601d92612e83612e7e610968865460ff9060a01c1690565b613886565b60005b818110612e8f57005b612eb8612eae60001960005401612ea784878b613765565b35906138db565b601c5410156138e8565b8454612ecc906001600160a01b0316611e92565b90612ed8818487613765565b3591612ee582868a613765565b3592813b1561000e57604051637a94c56560e11b815233600482015260248101919091526044810193909352600192906000908290606490829084905af18015612f5e575b612f4b575b50612f45612f3e82868a613765565b3533613a6d565b01612e86565b80610ed5612f5892610a5b565b38612f2f565b612f66613934565b612f2a565b503461000e5760a036600319011261000e57612f8860043561085b565b612f9360243561085b565b6084356001600160401b03811161000e57612fb2903690600401610b0b565b5060405163f23a6e6160e01b8152602090f35b503461000e57602036600319011261000e57600435612fe38161085b565b612feb613230565b6001600160a01b0390811690811561303a57600a54826001600160601b0360a01b821617600a55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b503461000e57602036600319011261000e576004356130ac8161085b565b6130b4613230565b600c80546001600160a81b0319166001600160a01b0390921691909117600160a01b179055005b503461000e57602036600319011261000e576004356130f981611849565b613101613230565b601d805460ff60a01b191691151560a01b60ff60a01b16919091179055005b503461000e5760a036600319011261000e576024356004356131418261085b565b6001600160401b039060443582811161000e576131629036906004016110ee565b919060643584811161000e5761317c9036906004016110ee565b9460843590811161000e576131959036906004016110ee565b9690926131a3888714614476565b6131ae87891461503e565b6131b986151561508a565b60005b8781106131c557005b80613203898b6131fa846131f2816131e18f9960019a8c613765565b35956131ec8761085b565b8c613765565b35928b613765565b3591878b614fb7565b016131bc565b503461000e57600036600319011261000e57602060ff600a5460a01c166040519015158152f35b600a546001600160a01b0316330361324457565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b6040519061329582610a7b565b6008546001600160a01b038116835260a01c6020830152565b906040516132bb81610a7b565b91546001600160a01b038116835260a01c6020830152565b50634e487b7160e01b600052601160045260246000fd5b916133069183549060031b600019811b9283911b169119161790565b9055565b601f8111613316575050565b6000906018825260008051602061561f833981519152906020601f850160051c8301941061335f575b601f0160051c01915b82811061335457505050565b818155600101613348565b909250829061333f565b601f8111613375575050565b600090601982527f944998273e477b495144fb8794c914197f3ccb46be2900f4698fd0ef743c9695906020601f850160051c830194106133d0575b601f0160051c01915b8281106133c557505050565b8181556001016133b9565b90925082906133b0565b601f81116133e6575050565b600090601e82527f50bb669a95c7b50b7e8a6f09454034b2b14cf2b85c730dca9a539ca82cb6e350906020601f850160051c83019410613441575b601f0160051c01915b82811061343657505050565b81815560010161342a565b9092508290613421565b601f8111613457575050565b6000906017825260008051602061563f833981519152906020601f850160051c830194106134a0575b601f0160051c01915b82811061349557505050565b818155600101613489565b9092508290613480565b601f81116134b6575050565b600090601a82527f057c384a7d1c54f3a1b2e5e67b2617b8224fdfd1ea7234eea573a6ff665ff63e906020601f850160051c83019410613511575b601f0160051c01915b82811061350657505050565b8181556001016134fa565b90925082906134f1565b91906001600160401b0381116135f9575b6135408161353b601a54611b8e565b6134aa565b6000601f821160011461357a5781929360009261356f575b50508160011b916000199060031b1c191617601a55565b013590503880613558565b601a600052601f198216937f057c384a7d1c54f3a1b2e5e67b2617b8224fdfd1ea7234eea573a6ff665ff63e91805b8681106135e157508360019596106135c7575b505050811b01601a55565b0135600019600384901b60f8161c191690553880806135bc565b909260206001819286860135815501940191016135a9565b613601610a44565b61352c565b90613619602092828151948592016106c8565b0190565b6018546000929161362d82611b8e565b91600190818116908115613687575060011461364857505050565b9091929350601860005260008051602061561f833981519152906000915b848310613674575050500190565b8181602092548587015201920191613666565b60ff191683525050811515909102019150565b6136a381613a32565b15613709576136b0611bc8565b9060016136bf601b5460ff1690565b151503613705576136ec916136f76136f26136dc61072194613c48565b6040519586946020860190613606565b90613606565b61361d565b03601f198101835282610ab1565b5090565b60405162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e006044820152606490fd5b50634e487b7160e01b600052603260045260246000fd5b91908110156137755760051b0190565b61296c61374e565b1561378457565b60405162461bcd60e51b815260206004820152601660248201527526bab9ba1037bbb7103a37b5b2b7103a3790313ab93760511b6044820152606490fd5b156137c957565b60405162461bcd60e51b815260206004820152601f60248201527f43616e6e6f74206275726e20746f6b656e2077697468206368696c6472656e006044820152606490fd5b1561381557565b60405162461bcd60e51b8152602060048201526008602482015267426164206461746160c01b6044820152606490fd5b1561384c57565b60405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81b1bd8dad95960721b6044820152606490fd5b1561388d57565b60405162461bcd60e51b815260206004820152601060248201526f135a5b9d081a5cc8191a5cd8589b195960821b6044820152606490fd5b90600182018092116138d357565b610adf6132d3565b919082018092116138d357565b156138ef57565b60405162461bcd60e51b815260206004820152601860248201527f4d617820537570706c79206c696d6974207265616368656400000000000000006044820152606490fd5b506040513d6000823e3d90fd5b356107218161085b565b6001600160a01b031680156139745760005260056020526001600160401b036040600020541690565b6040516323d3ad8160e21b8152600490fd5b6001600160a01b03906139989061399c565b1690565b600190808211156139ba575b604051636f96cda160e11b8152600490fd5b6139ce816000526004602052604060002090565b5491600160e01b8316156139e257506139a8565b82156139ed57505090565b6000548210156139a85790815b613a0357505090565b90915060001901613a1e816000526004602052604060002090565b54918215613a2b57505090565b90816139fa565b80600111159081613a61575b81613a47575090565b90506000526004602052600160e01b604060002054161590565b60005481109150613a3e565b906000908154928115613b30576001600160a01b0381166000908152600560205260409020805468010000000000000001840201905560008481526004602052604090206001600160a01b03909116916001914260a01b83831460e11b1784179055840193817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91808587858180a4015b858103613b215750505015613b105755565b604051622e076360e81b8152600490fd5b8083918587858180a401613afe565b60405163b562e8dd60e01b8152600490fd5b6000613b4d8261399c565b600083815260066020526040902080546001600160a01b038316929190613c3f575b506001600160a01b038216600090815260056020526040902080546fffffffffffffffffffffffffffffffff01905560008481526004602052604090204260a01b8317600360e01b179055600160e11b811615613bf6575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8280a46001805401600155565b60018401613c0e816000526004602052604060002090565b5415613c1b575b50613bc7565b83548114613c1557613c37906000526004602052604060002090565b553880613c15565b83905538613b6f565b9060405160a08101604052608081019260008452925b6000190192600a906030828206018553049283613c5e57809350608091030191601f1901918252565b15613c8e57565b60405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606490fd5b63ffffffff60e01b16630271189760e51b8114908115613cf1575090565b6301ffc9a760e01b14919050565b60009069c6171134001122334455825230601a52603a528080604460166daaeb6d7670e522a718067333cd4e5afa15613d3757603a52565b3d81803e3d90fd5b90613d498361399c565b6001600160a01b0383811692828216849003613ede57600086815260066020526040902080549092613d8a6001600160a01b03881633908114908414171590565b613ea1575b8216958615613e8f57613de293613dc092613e85575b506001600160a01b0316600090815260056020526040902090565b80546000190190556001600160a01b0316600090815260056020526040902090565b80546001019055600160e11b804260a01b851717613e0a866000526004602052604060002090565b55811615613e3b575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4565b60018401613e53816000526004602052604060002090565b5415613e60575b50613e13565b6000548114613e5a57613e7d906000526004602052604060002090565b553880613e5a565b6000905538613da5565b604051633a954ecd60e21b8152600490fd5b613ec76109686109613361094a8b60018060a01b03166000526007602052604060002090565b15613d8f57604051632ce44b5f60e11b8152600490fd5b60405162a1148160e81b8152600490fd5b9081602091031261000e5751610721816105e4565b6001600160a01b039182168152911660208201526040810191909152608060608201819052610721929101906106eb565b3d15613f60573d90613f4682610ae1565b91613f546040519384610ab1565b82523d6000602084013e565b606090565b92602091613f8e936000604051809681958294630a85bd0160e11b9a8b85523360048601613f04565b03926001600160a01b03165af160009181613fde575b50613fd057613fb1613f35565b80519081613fcb576040516368d2bf6b60e11b8152600490fd5b602001fd5b6001600160e01b0319161490565b61400091925060203d8111614007575b613ff88183610ab1565b810190613eef565b9038613fa4565b503d613fee565b929060c0949260018060a01b0380921685521660208401526040830152606082015260a06080820152600060a08201520190565b8015614050575b6000190190565b6140586132d3565b614049565b9081602091031261000e575161072181611849565b610721916001600160a01b0316906140eb565b805482101561409e575b60005260206000200190600090565b6140a661374e565b61408f565b80549081156140d557600019918201916140c58383614085565b909182549160031b1b1916905555565b634e487b7160e01b600052603160045260246000fd5b60018101918060005282602052604060002054928315156000146141a057610e6c61413d936000958619808201828111614193575b8354918201918211614186575b808203614143575b5050506140ab565b55600190565b61416d6141679161415761417d9487614085565b90549060031b1c92839187614085565b906132ea565b8590600052602052604060002090565b55388080614135565b61418e6132d3565b61412d565b61419b6132d3565b614120565b50505050600090565b156141b057565b60405162461bcd60e51b815260206004820152602960248201527f4368696c64206164646974696f6e2f72656d6f76616c2074656d706f726172696044820152681b1e481b1bd8dad95960ba1b6064820152608490fd5b1561420e57565b60405162461bcd60e51b815260206004820152601b60248201527f526563656976696e672061646472657373206e6f742076616c696400000000006044820152606490fd5b1561425a57565b60405162461bcd60e51b81526020600482015260146024820152732737ba1030baba3437b934bd32b21037bbb732b960611b6044820152606490fd5b1561429d57565b60405162461bcd60e51b8152602060048201526014602482015273139bdd0818481bdddb995c881bd98818da1a5b1960621b6044820152606490fd5b92916142f66142f1610968600c5460ff9060a81c1690565b6141a9565b6001600160a01b039061430c8383161515614207565b61432761431e611e92611e928861399c565b83163314614253565b6143528561434b86610e6c8560018060a01b03166000526016602052604060002090565b5414614296565b61436e84610e0d8361094a896000526014602052604060002090565b506143878161094a876000526014602052604060002090565b5415614458575b6143a2856000526015602052604060002090565b6143ac8154614042565b90556001600160a01b03811660009081526016602052604081206143d1908690610e6c565b551691823b1561000e576040516323b872dd60e01b81523060048201526001600160a01b039290921660248301526044820152906000908290606490829084905af1801561444b575b614438575b506144354291600052600d602052604060002090565b55565b80610ed561444592610a5b565b3861441f565b614453613934565b61441a565b61447081610f0087600052600f602052604060002090565b5061438e565b1561447d57565b60405162461bcd60e51b815260206004820152601e60248201527f436f6e747261637473206c656e67746820646f65736e2774206d6174636800006044820152606490fd5b156144c957565b60405162461bcd60e51b815260206004820152601d60248201527f4d697373696e6720636f6e747261637473206f7220746f6b656e4964730000006044820152606490fd5b1561451557565b60405162461bcd60e51b815260206004820152601860248201527f546f6b656e206e6f7420617070726f766564206368696c6400000000000000006044820152606490fd5b9081602091031261000e575190565b1561457057565b60405162461bcd60e51b815260206004820152601c60248201527f4368696c6420636f6e7472616374206c696d69742072656163686564000000006044820152606490fd5b60019060001981146145c5570190565b6136196132d3565b9061460c916146c8600c546145e860ff8260a81c16156141a9565b6145f7611e92611e928561399c565b6001600160a01b039586929183163314614253565b61461d614618866148fb565b61450e565b604051631365001960e31b81526001600160a01b03861660048201526020929190911690828082602481865afa91821561485d575b60009261483d575b506040516303e6111360e31b81529192829060049082905afa928315614830575b6000936147fb575b50506146b1906146aa6146a48761094a886000526014602052604060002090565b546138c5565b1115614569565b6146aa6146a4846000526015602052604060002090565b6146e5826146e083600052600f602052604060002090565b61486a565b5061470a610968856147058561094a866000526014602052604060002090565b614879565b6147b257806147449161473386610e6c8660018060a01b03166000526016602052604060002090565b556000526015602052604060002090565b61474e81546145b5565b905516803b1561000e576040516323b872dd60e01b815233600482015230602482015260448101929092526000908290818381606481015b03925af180156147a5575b6147985750565b80610ed5610adf92610a5b565b6147ad613934565b614791565b60405162461bcd60e51b815260206004820152601a60248201527f546f6b656e206d617920616c72656164792062652061646465640000000000006044820152606490fd5b0390fd5b6146b1929350908161482192903d10614829575b6148198183610ab1565b81019061455a565b919038614683565b503d61480f565b614838613934565b61467b565b6004925061485790823d8411614829576148198183610ab1565b9161465a565b614865613934565b614652565b610721916001600160a01b0316905b60008281526001820160205260409020546148f45780826148d06148b760019454680100000000000000008110156148e7575b858101855584614085565b819391549060031b600019811b9283911b169119161790565b905580549260005201602052604060002055600190565b6148ef610a44565b6148ac565b5050600090565b600c5460ff8160a01c166000146148f45760405163070d39d960e01b81526001600160a01b0392831660048201529160209183916024918391165afa908115614962575b60009161494a575090565b610721915060203d8111610dd257610dca8183610ab1565b61496a613934565b61493f565b1561497657565b60405162461bcd60e51b815260206004820152601e60248201527f56616c75652073686f756c642062652067726561746572207468616e203000006044820152606490fd5b156149c257565b60405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e7420746f6b656e7320746f2072656d6f76650000006044820152606490fd5b91614a1a60ff600c5460a81c16156141a9565b614a2581151561496f565b60008381526011602090815260408083206001600160a01b0386168452909152902054614a54828210156149bb565b60008481526011602090815260408083206001600160a01b03871684529091529020828203905514614a9657506144354291600052600d602052604060002090565b614abf90614aae83600052600e602052604060002090565b6001600160a01b03909116906140eb565b503861441f565b91614b2d93916000602094614af8858560018060a01b0393614aeb8588161515614207565b6115df856115d78361399c565b60405163a9059cbb60e01b81526001600160a01b03909316600484015260248301949094529094859384929183906044820190565b0393165af1908115614ba5575b600091614b87575b5015614b4a57565b60405162461bcd60e51b8152602060048201526015602482015274115490cc8c081d1c985b9cd9995c8819985a5b1959605a1b6044820152606490fd5b614b9f915060203d8111610dd257610dca8183610ab1565b38614b42565b614bad613934565b614b3a565b604051614c10916001600160a01b0316614bcb82610a7b565b6000806020958685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656487860152868151910182855af1614c0a613f35565b91614c8c565b80519081614c1d57505050565b8280614c2d93830101910161405d565b15614c355750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b91929015614cee5750815115614ca0575090565b3b15614ca95790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b825190915015614d015750805190602001fd5b60405162461bcd60e51b81529081906147f79060048301610710565b610adf9291614df98161094a600c5494614d3d60ff8760a81c16156141a9565b614d49614618846148fb565b614dd0614d5b611e92611e928461399c565b6001600160a01b039790614d729089163314614253565b604051631365001960e31b81526001600160a01b038616600482015290602090829060249082908c165afa908115614e27575b600091614e09575b506146aa89614dca8761094a876000526011602052604060002090565b546138db565b614de8836146e083600052600e602052604060002090565b506000526011602052604060002090565b8381540190553091339116614e34565b614e21915060203d8111614829576148198183610ab1565b38614dad565b614e2f613934565b614da5565b6040516323b872dd60e01b60208201526001600160a01b039283166024820152929091166044830152606480830193909352918152610adf91614e78608483610ab1565b614bb2565b919092614ee890614e9a6142f1610968600c5460ff9060a81c1690565b614ea581151561496f565b614ec183610e6c8761094a886000526012602052604060002090565b54614ece828210156149bb565b0391610e6c8561094a866000526012602052604060002090565b55600091825b6001600160a01b038216600090815260136020526040902054811015614f9b57614f4e614f3682614f318560018060a01b03166000526013602052604060002090565b614fa3565b610e6c8461094a876000526012602052604060002090565b54614f6157614f5c906145b5565b614eee565b5090915060015b15614f8357506144354291600052600d602052604060002090565b614abf90610f00836000526010602052604060002090565b509091614f68565b90614fad91614085565b90549060031b1c90565b90929391614fe883868360018060a01b0395614fd6878a161515614207565b614fe3876115d78361399c565b614e7d565b16803b1561000e57615016936000809460405196879586948593637921219560e11b8552306004860161400e565b03925af18015615031575b6150285750565b610adf90610a5b565b615039613934565b615021565b1561504557565b60405162461bcd60e51b815260206004820152601b60248201527f56616c756573206c656e67746820646f65736e2774206d6174636800000000006044820152606490fd5b1561509157565b60405162461bcd60e51b815260206004820152601c60248201527f4d697373696e6720636f6e7472616374732f6964732f76616c756573000000006044820152606490fd5b906150ed6142f1610968600c5460ff9060a81c1690565b6150f9614618826148fb565b615225816146e061510f611e92611e928761399c565b6001600160a01b0395906151269087163314614253565b61515e610968886151498660018060a01b03166000526013602052604060002090565b60019160005201602052604060002054151590565b615280575b6151ec6151b7602089615183611e92611e92600c5460018060a01b031690565b6040516372d3975960e11b81526001600160a01b038916600482015260248101929092529092839190829081906044820190565b03915afa908115615273575b600091615255575b506146aa8a614dca8b610e6c8961094a896000526012602052604060002090565b61520887610e6c8561094a856000526012602052604060002090565b6152138982546138db565b90556000526010602052604060002090565b501691823b1561000e576147869260009283604051809681958294637921219560e11b845230336004860161400e565b61526d915060203d8111614829576148198183610ab1565b386151cb565b61527b613934565b6151c3565b6001600160a01b03831660009081526013602052604090206152a3908890614879565b50615163565b906152b38261294b565b6152c06040519182610ab1565b82815280926152d1601f199161294b565b0190602036910137565b60209181518110156152f0575b60051b010190565b6152f861374e565b6152e8565b61531461166c82600052600f602052604060002090565b9060005b61532c82600052600f602052604060002090565b54811015615367578061536161535760019361535286600052600f602052604060002090565b6154bb565b611f2883876152db565b01615318565b5060005b82518110156153bf576153ab61538461151c83866152db565b8360009081526011602090815260408083206001600160a01b039094168352929052205490565b6153b75760010161536b565b505050600190565b5090506153cb8161555d565b9060005b8251811015615409576153fc6153e861151c83866152db565b61094a846000526014602052604060002090565b546153b7576001016153cf565b509050615415816155c3565b906000915b80518310156154b35761543061151c84836152db565b9060005b6001600160a01b0383166000908152601360205260409020548110156154a65761548f61547782614f318660018060a01b03166000526013602052604060002090565b610e6c8561094a886000526012602052604060002090565b5461549c57600101615434565b5050505050600190565b509260019150019161541a565b505050600090565b906154c591614085565b905460039190911b1c6001600160a01b031690565b602090818184031261000e578051906001600160401b03821161000e57019180601f8401121561000e57825161550f8161294b565b9361551d6040519586610ab1565b818552838086019260051b82010192831161000e578301905b828210615544575050505090565b83809183516155528161085b565b815201910190615536565b600091818352600f9260209184835260409461557b868420546152a9565b93835b868552828252878520548110156155b8578061559e6001928a88206154bb565b6155a882896152db565b90838060a01b031690520161557e565b505050935050905090565b6000918183526010926020918483526040946155e1868420546152a9565b93835b868552828252878520548110156155b857806156046001928a88206154bb565b61560e82896152db565b90838060a01b03169052016155e456feb13d2d76d1f4b7be834882e410b3e3a8afaf69f83600ae24db354391d2378d2ec624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c15a26469706673582212207c23458e1c408b8c01dfca378f77133f7ff79ed0935da2145231c0a8cfafd1ca64736f6c63430008110033

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

000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000a61772321a319d961ec2f5b830d5d1b77591051000000000000000000000000028472a58a490c5e09a238847f66a68a47cc76f0f00000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000002a00000000000000000000000000d86bdd298defc36d562effd56115cf6c59c4c8900000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000007530000000000000000000000000000000000000000000000000000000000000000e414c5453206279206164696461730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003414c5400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000043697066733a2f2f6261667962656962716368347a61333235726a7a7661346e787467726a64346b34716466366476616c346a776a786274706a3264797436716a68792f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000052e6a736f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d546d386e4b6a684d5650717a4b6f58766e503779677532563541566f503378354d6a78465044526f543557562f00000000000000000000

-----Decoded View---------------
Arg [0] : __name (string): ALTS by adidas
Arg [1] : __symbol (string): ALT
Arg [2] : _filterAddress (address): 0xa61772321A319D961ec2F5b830d5d1b775910510
Arg [3] : _ERC1155address (address): 0x28472a58A490c5e09A238847F66A68a47cC76f0f
Arg [4] : _baseUri (string): ipfs://bafybeibqch4za325rjzva4nxtgrjd4k4qdf6dval4jwjxbtpj2dyt6qjhy/
Arg [5] : _uriSuffix (string): .json
Arg [6] : _uri (string): ipfs://QmTm8nKjhMVPqzKoXvnP7ygu2V5AVoP3x5MjxFPDRoT5WV/
Arg [7] : _royaltyReceipient (address): 0x0d86bdD298DEfC36d562eFFD56115Cf6c59c4c89
Arg [8] : _royaltyValue (uint96): 1000
Arg [9] : _waitTimelapse (uint256): 1000
Arg [10] : __maxSupply (uint256): 30000

-----Encoded View---------------
24 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [1] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [2] : 000000000000000000000000a61772321a319d961ec2f5b830d5d1b775910510
Arg [3] : 00000000000000000000000028472a58a490c5e09a238847f66a68a47cc76f0f
Arg [4] : 00000000000000000000000000000000000000000000000000000000000001e0
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000260
Arg [6] : 00000000000000000000000000000000000000000000000000000000000002a0
Arg [7] : 0000000000000000000000000d86bdd298defc36d562effd56115cf6c59c4c89
Arg [8] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [9] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [10] : 0000000000000000000000000000000000000000000000000000000000007530
Arg [11] : 000000000000000000000000000000000000000000000000000000000000000e
Arg [12] : 414c545320627920616469646173000000000000000000000000000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [14] : 414c540000000000000000000000000000000000000000000000000000000000
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000043
Arg [16] : 697066733a2f2f6261667962656962716368347a61333235726a7a7661346e78
Arg [17] : 7467726a64346b34716466366476616c346a776a786274706a3264797436716a
Arg [18] : 68792f0000000000000000000000000000000000000000000000000000000000
Arg [19] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [20] : 2e6a736f6e000000000000000000000000000000000000000000000000000000
Arg [21] : 0000000000000000000000000000000000000000000000000000000000000036
Arg [22] : 697066733a2f2f516d546d386e4b6a684d5650717a4b6f58766e503779677532
Arg [23] : 563541566f503378354d6a78465044526f543557562f00000000000000000000


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

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