ETH Price: $2,931.40 (-9.55%)
Gas: 27 Gwei

Contract

0xD25B2713fa6674260f8Bc9DBcf158890d4fA28A1
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
0x60806040166904062023-02-23 10:08:59497 days ago1677146939IN
 Create: TypeBlocks
0 ETH0.1337521424.94961166

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TypeBlocks

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 10 runs

Other Settings:
default evmVersion
File 1 of 29 : TypeBlocks.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol';
import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol";
import "./standards/TypeBlocks721.sol";
import "./libraries/TypeBlocksArt.sol";
import "./libraries/TypeBlocksMetadata.sol";
import "./libraries/Utils.sol";

contract TypeBlocks is TypeBlocks721, ReentrancyGuardUpgradeable {
    using CountersUpgradeable for CountersUpgradeable.Counter;

    CountersUpgradeable.Counter private _seed;

    string public constant DEFAULT_COLOR = "White";

    bool public isMintLive;
    bool public isBlendable;
    bool public isSuperBurnLive;
    uint256 public mintPrice;
    string[] public baseColor;
    string[] public extendedColor;

    mapping(uint256 => bytes1[]) public tokenLetters;
    mapping(uint256 => string) public tokenColor;
    mapping(uint256 => uint256) public tokenShuffle;
    mapping(address => uint256) public freeMints;

    event MetadataUpdate(uint256 tokenId);

    function initialize() initializer public {
        TypeBlocks721.__ERC721_init('Type Blocks', 'TYPEBLOCKS');

        isMintLive = true;
        isBlendable = false;
        isSuperBurnLive = false;
        mintPrice = 0.0069 ether;
    }

    function mint(uint256 quantity, address ref) external payable nonReentrant {
        require(isMintLive, "E11");
        require(quantity > 0, "E12");
        require(ref != msg.sender, "E10");
        require(msg.value >= quantity * mintPrice, "Not enough eth");

        uint256 _freeMint = freeMints[msg.sender];

        if(_freeMint > 0) {
            freeMints[msg.sender] = 0;
            unchecked { quantity += _freeMint; }
        }
        
        _mint(msg.sender, quantity);

        if(quantity > 2) {
            _freeMint = quantity / 3;
            unchecked { freeMints[ref] += _freeMint; }
        }
    }

    function tokenURI(uint256 tokenId) public view virtual override(ERC721AUpgradeable, IERC721AUpgradeable) returns (string memory) {
        if (tokenId > _totalMinted()) revert URIQueryForNonexistentToken();

        bytes1[] memory letters = tokenLetters[tokenId];
        if(letters.length == 0) {
            letters = _initLetters(tokenId);
        }

        string memory color = tokenColor[tokenId];
        if(!Utils.isStringExists(color)) {
            color = DEFAULT_COLOR;
        }

        return TypeBlocksMetadata.tokenURI(tokenId, letters, color, tokenShuffle[tokenId]);
    }

    function blend(uint256[] calldata tokenIds, bool keepColor) external nonReentrant {
        require(isBlendable, "E01");
        require(tokenIds.length > 1, "E02");

        uint256 characters;

        for (uint256 i = 0; i < tokenIds.length; i++) {
            require(ownerOf(tokenIds[i]) == msg.sender, "E03");
            bytes1[] storage blendLetters = _getTokenLetters(tokenIds[i]);
            characters = characters + blendLetters.length;
        }

        require(characters < 5, "E04");

        bytes1[] storage _tokenLetters = _getTokenLetters(tokenIds[0]);

        for (uint256 i = 1; i < tokenIds.length; i++) {
            bytes1[] storage blendLetters = _getTokenLetters(tokenIds[i]);
            
            for (uint256 j = 0; j < blendLetters.length; j++) {
                _tokenLetters.push(blendLetters[j]);
            }

            _burn(tokenIds[i]);
        }

        if(!keepColor) {
            tokenColor[tokenIds[0]] = _getBaseColor();
        }

        _shuffleTokenLetters(tokenIds[0]);
        emit MetadataUpdate(tokenIds[0]);
    }
    
    function superBurn(uint256 keeper, uint256 burner, uint256 action) external nonReentrant {
        require(isSuperBurnLive, "E05");
        require(ownerOf(keeper) == msg.sender, "E03");
        require(ownerOf(burner) == msg.sender, "E03");
        require(action >= 0 && action < 3, "E06");

        bytes1[] storage _tokenLetters = _getTokenLetters(keeper);
        bytes1[] memory burnerLetters = _getTokenLetters(burner);

        require((_tokenLetters.length == burnerLetters.length) && (_tokenLetters.length <= 5), "E07");

        // 0 = Color, 1 = Shuffle, 2 = craftLetter
        if(0 == action) {
            tokenColor[keeper] = _getColor();
        } else if(1 == action) {
            _shuffleTokenLetters(keeper);
        } else {
            require(_tokenLetters.length == 4, "E08");
            tokenColor[keeper] = DEFAULT_COLOR;
            _craftLetter(_tokenLetters, burnerLetters);
            _shuffleTokenLetters(keeper);
            _mint(msg.sender, 1);
        }

        _burn(burner);

        emit MetadataUpdate(keeper);
    }

    function _getBaseColor() internal returns (string memory) {
        require(baseColor.length > 0, "E09");
        _seed.increment();
        uint256 n = Utils.getRandom(block.timestamp + _seed.current(), baseColor.length);
        return baseColor[n];
    }

    function _getExtendedColor() internal returns (string memory) {
        require(extendedColor.length > 0, "E09");
        _seed.increment();
        uint256 n = Utils.getRandom(block.timestamp + _seed.current(), extendedColor.length);
        return extendedColor[n];
    }
    
    function _getColor() internal returns (string memory) {
        _seed.increment();
        uint256 n = Utils.getRandom(block.timestamp + _seed.current(), 100);

        if(n < 80) {
            return _getBaseColor();
        } else {
            return _getExtendedColor();
        }
    }

    function _craftLetter(bytes1[] storage letters, bytes1[] memory burnerLetters) internal {
        _seed.increment();
        uint256 n = Utils.getRandom(block.timestamp + _seed.current(), burnerLetters.length);
        bytes1 randomLetter = burnerLetters[n];
        letters.push(randomLetter);
    }

    function _getTokenLetters(uint256 tokenId) internal returns(bytes1[] storage) {
        bytes1[] storage _tokenLetters = tokenLetters[tokenId];
        if(_tokenLetters.length == 0) {
            bytes1[] memory iniLetters = _initLetters(tokenId);
            for (uint256 i; i < iniLetters.length; i++) {
                _tokenLetters.push(iniLetters[i]);
            }
        }
        return _tokenLetters;
    }

    function _shuffleTokenLetters(uint256 tokenId) internal {
        bytes1[] storage _tokenLetters = _getTokenLetters(tokenId);
        for (uint256 i = 0; i < _tokenLetters.length; i++) {
            _seed.increment();
            uint256 n = Utils.getRandom(block.timestamp + _seed.current(), _tokenLetters.length - i) + i;
            bytes1 temp = _tokenLetters[n];
            _tokenLetters[n] = _tokenLetters[i];
            _tokenLetters[i] = temp;
        }
        unchecked { tokenShuffle[tokenId] += 1; }
    }

    function _initLetters(uint256 tokenId) internal view returns (bytes1[] memory letters) {
        if (tokenId <= 2000) {
            letters = TypeBlocksArt.getLetter(tokenId, 2, 3);
        } else if (tokenId <= 6000) {
            letters = TypeBlocksArt.getLetter(tokenId, 1, 3);
        } else if (tokenId <= 10000) {
            letters = TypeBlocksArt.getLetter(tokenId, 1, 2);
        } else {
            letters = TypeBlocksArt.getLetter(tokenId, 1, 1);
        }
        return letters;
    }

    function addFreeMint(address[] calldata addresses, uint256 quantity) external onlyOwner {
        for (uint256 i = 0; i < addresses.length; i++) {
            freeMints[addresses[i]] = quantity;
        }
    }

    function setBaseColor(string[] memory color) external onlyOwner {
        baseColor = color;
    }

    function setExtendedColor(string[] memory color) external onlyOwner {
        extendedColor = color;
    }

    function toggleMintLive() external onlyOwner {
        isMintLive = !isMintLive;
    }

    function toggleBlendable() external onlyOwner {
        isBlendable = !isBlendable;
    }

    function toggleSuperBurnLive() external onlyOwner {
        isSuperBurnLive = !isSuperBurnLive;
    }

    function withdraw() external onlyOwner {
        payable(msg.sender).transfer(address(this).balance);
    }
}

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

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _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);
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

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

pragma solidity ^0.8.0;

import "../utils/introspection/IERC165Upgradeable.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 IERC2981Upgradeable is IERC165Upgradeable {
    /**
     * @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 29 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
     * constructor.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: setting the version to 255 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint8) {
        return _initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _initializing;
    }
}

File 5 of 29 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

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

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

    uint256 private _status;

    function __ReentrancyGuard_init() internal onlyInitializing {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal onlyInitializing {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

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

pragma solidity ^0.8.0;

import "../../interfaces/IERC2981Upgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.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 ERC2981Upgradeable is Initializable, IERC2981Upgradeable, ERC165Upgradeable {
    function __ERC2981_init() internal onlyInitializing {
    }

    function __ERC2981_init_unchained() internal onlyInitializing {
    }
    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(IERC165Upgradeable, ERC165Upgradeable) returns (bool) {
        return interfaceId == type(IERC2981Upgradeable).interfaceId || super.supportsInterface(interfaceId);
    }

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[48] private __gap;
}

File 7 of 29 : AddressUpgradeable.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 AddressUpgradeable {
    /**
     * @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 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 8 of 29 : Base64Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides a set of functions to operate with Base64 strings.
 *
 * _Available since v4.5._
 */
library Base64Upgradeable {
    /**
     * @dev Base64 Encoding/Decoding Table
     */
    string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

    /**
     * @dev Converts a `bytes` to its Bytes64 `string` representation.
     */
    function encode(bytes memory data) internal pure returns (string memory) {
        /**
         * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence
         * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol
         */
        if (data.length == 0) return "";

        // Loads the table into memory
        string memory table = _TABLE;

        // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter
        // and split into 4 numbers of 6 bits.
        // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up
        // - `data.length + 2`  -> Round up
        // - `/ 3`              -> Number of 3-bytes chunks
        // - `4 *`              -> 4 characters for each chunk
        string memory result = new string(4 * ((data.length + 2) / 3));

        /// @solidity memory-safe-assembly
        assembly {
            // Prepare the lookup table (skip the first "length" byte)
            let tablePtr := add(table, 1)

            // Prepare result pointer, jump over length
            let resultPtr := add(result, 32)

            // Run over the input, 3 bytes at a time
            for {
                let dataPtr := data
                let endPtr := add(data, mload(data))
            } lt(dataPtr, endPtr) {

            } {
                // Advance 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // To write each character, shift the 3 bytes (18 bits) chunk
                // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)
                // and apply logical AND with 0x3F which is the number of
                // the previous character in the ASCII table prior to the Base64 Table
                // The result is then added to the table to get the character to write,
                // and finally write it in the result pointer but with a left shift
                // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits

                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance
            }

            // When data `bytes` is not exactly 3 bytes long
            // it is padded with `=` characters at the end
            switch mod(mload(data), 3)
            case 1 {
                mstore8(sub(resultPtr, 1), 0x3d)
                mstore8(sub(resultPtr, 2), 0x3d)
            }
            case 2 {
                mstore8(sub(resultPtr, 1), 0x3d)
            }
        }

        return result;
    }
}

File 9 of 29 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 10 of 29 : CountersUpgradeable.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 CountersUpgradeable {
    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 11 of 29 : ERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {
    function __ERC165_init() internal onlyInitializing {
    }

    function __ERC165_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 12 of 29 : IERC165Upgradeable.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 IERC165Upgradeable {
    /**
     * @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 13 of 29 : MathUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library MathUpgradeable {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

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

pragma solidity ^0.8.0;

import "./math/MathUpgradeable.sol";

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = MathUpgradeable.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, MathUpgradeable.log256(value) + 1);
        }
    }

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

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 15 of 29 : TypeBlocksArt.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";
import "./Utils.sol";

library TypeBlocksArt {

    bytes public constant ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

    uint256 internal constant XSTART = 213;
    uint256 internal constant YSTART = 126;
    uint256 internal constant SPACING = 40;

    function ALPHABETPLOT(bytes1 letter) internal pure returns (uint8[20] memory) {
        if(letter == 0x41) {
            return [ 2, 3, 4, 6, 10, 11, 15, 16, 20, 21, 22, 23, 24, 25, 26, 30, 31, 35, 0, 0 ];
        } else if(letter == 0x42) {
            return [ 1, 2, 3, 4, 6, 10, 11, 15, 16, 17, 18, 19, 21, 25, 26, 30, 31, 32, 33, 34 ];
        } else if(letter == 0x43) {
            return [ 2, 3, 4, 6, 10, 11, 16, 21, 26, 30, 32, 33, 34, 0, 0, 0, 0, 0, 0, 0 ];
        } else if(letter == 0x44) {
            return [ 1, 2, 3, 4, 6, 10, 11, 15, 16, 20, 21, 25, 26, 30, 31, 32, 33, 34, 0, 0 ];
        } else if(letter == 0x45) {
            return [ 1, 2, 3, 4, 5, 6, 11, 16, 17, 18, 19, 21, 26, 31, 32, 33, 34, 35, 0, 0 ];
        } else if(letter == 0x46) {
            return [ 1, 2, 3, 4, 5, 6, 11, 16, 17, 18, 19, 21, 26, 31, 0, 0, 0, 0, 0, 0 ];
        } else if(letter == 0x47) {
            return [ 2, 3, 4, 6, 10, 11, 16, 21, 24, 25, 26, 30, 32, 33, 34, 0, 0, 0, 0, 0 ];
        } else if(letter == 0x48) {
            return [ 1, 5, 6, 10, 11, 15, 16, 17, 18, 19, 20, 21, 25, 26, 30, 31, 35, 0, 0, 0 ];
        } else if(letter == 0x49) {
            return [ 2, 3, 4, 8, 13, 18, 23, 28, 32, 33, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];
        } else if(letter == 0x4A) {
            return [ 2, 3, 4, 5, 9, 14, 19, 24, 26, 29, 32, 33, 0, 0, 0, 0, 0, 0, 0, 0 ];
        } else if(letter == 0x4B) {
            return [ 1, 5, 6, 9, 11, 13, 16, 17, 21, 23, 26, 29, 31, 35, 0, 0, 0, 0, 0, 0 ];
        } else if(letter == 0x4C) {
            return [ 1, 6, 11, 16, 21, 26, 31, 32, 33, 34, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];
        } else if(letter == 0x4D) {
            return [ 1, 5, 6, 7, 9, 10, 11, 13, 15, 16, 20, 21, 25, 26, 30, 31, 35, 0, 0, 0 ];
        } else if(letter == 0x4E) {
            return [ 1, 5, 6, 7, 10, 11, 13, 15, 16, 19, 20, 21, 25, 26, 30, 31, 35, 0, 0, 0 ];
        } else if(letter == 0x4F) {
            return [ 2, 3, 4, 6, 10, 11, 15, 16, 20, 21, 25, 26, 30, 32, 33, 34, 0, 0, 0, 0 ];
        } else if(letter == 0x50) {
            return [ 1, 2, 3, 4, 6, 10, 11, 15, 16, 17, 18, 19, 21, 26, 31, 0, 0, 0, 0, 0 ];
        } else if(letter == 0x51) {
            return [ 2, 3, 4, 6, 10, 11, 15, 16, 20, 21, 23, 25, 26, 29, 30, 32, 33, 34, 35, 0 ];
        } else if(letter == 0x52) {
            return [ 1, 2, 3, 4, 6, 10, 11, 15, 16, 17, 18, 19, 21, 23, 26, 29, 31, 35, 0, 0 ];
        } else if(letter == 0x53) {
            return [ 2, 3, 4, 6, 10, 11, 17, 18, 19, 25, 26, 30, 32, 33, 34, 0, 0, 0, 0, 0 ];
        } else if(letter == 0x54) {
            return [ 1, 2, 3, 4, 5, 8, 13, 18, 23, 28, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];
        } else if(letter == 0x55) {
            return [ 1, 5, 6, 10, 11, 15, 16, 20, 21, 25, 26, 30, 32, 33, 34, 0, 0, 0, 0, 0 ];
        } else if(letter == 0x56) {
            return [ 1, 5, 6, 10, 11, 15, 16, 20, 21, 25, 27, 29, 33, 0, 0, 0, 0, 0, 0, 0 ];
        } else if(letter == 0x57) {
            return [ 1, 5, 6, 10, 11, 15, 16, 20, 21, 23, 25, 26, 28, 30, 32, 34, 0, 0, 0, 0 ];
        } else if(letter == 0x58) {
            return [ 1, 5, 6, 10, 11, 15, 17, 18, 19, 21, 25, 26, 30, 31, 35, 0, 0, 0, 0, 0 ];
        } else if(letter == 0x59) {
            return [ 1, 5, 6, 10, 11, 15, 17, 18, 19, 23, 28, 33, 0, 0, 0, 0, 0, 0, 0, 0 ];
        } else if(letter == 0x5A) {
            return [ 1, 2, 3, 4, 5, 10, 14, 18, 22, 26, 31, 32, 33, 34, 35, 0, 0, 0, 0, 0 ];
        } else {
            return [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];
        }
    }

    function getLetter(uint256 tokenId, uint256 min, uint256 max) internal view returns (bytes1[] memory) {
        uint256 range = max - min + 1;
        uint256 length = 1;
        if(range > 1) {
            length = Utils.getRandom(tokenId, range) + min;
        }

        bytes1[] memory letters = new bytes1[](length);
        
        for (uint256 i; i < length; i++) {
            uint256 alphabetIndex = Utils.getRandom(i + length + tokenId, 26);

            letters[i] = ALPHABET[alphabetIndex];
        }

        return letters;
    }

    function generateSVG(bytes1[] memory letters, string memory color) internal pure returns (bytes memory) {
        return abi.encodePacked(
            '<svg ',
                'viewBox="0 0 300 300" ',
                'fill="none" xmlns="http://www.w3.org/2000/svg" ',
                'style="width:100%;background:#000;"',
            '>',
                '<rect width="300" height="300" fill="#000"/>',
                generateBlocks(letters, color),
            '</svg>'
        );
    }

    function generateBlocks(bytes1[] memory letters, string memory color) internal pure returns (bytes memory blocks) {
        for (uint256 i; i < 5; i++) {
            blocks = abi.encodePacked(
                blocks,
                '<g>',
                generateBlock(i, letters, color),
                '</g>'
            );
        }

        return blocks;
    }
    
    function generateBlock(uint256 number, bytes1[] memory letters, string memory color) internal pure returns (bytes memory typeBlock) {
        uint256 xStart = XSTART - number * SPACING;
        uint256 yStart = YSTART;
        string memory opacity = "0.09";
        uint256 count = 1;
        bytes1 letter;

        if(letters.length > 0 && number < letters.length ) {
            letter = letters[letters.length - 1 - number];
        }
        
        for (uint256 i; i < 7; i++) {
            for (uint256 j; j < 5; j++) {
                uint256 cx = xStart + (j * 7);
                uint256 cy = yStart + (i * 7);
                uint8[20] memory plot = ALPHABETPLOT(letter);
                
                for (uint256 k; k < plot.length; k++) {
                    opacity = "0.09";
                    if(0 == plot[k]) {
                        break;
                    } else if(count == plot[k]) {
                        opacity = "1";
                        break;
                    }
                }
                
                typeBlock = abi.encodePacked(
                    typeBlock,
                    '<rect x="', StringsUpgradeable.toString(cx), '" y="', StringsUpgradeable.toString(cy), '" fill="', color ,'" fill-opacity="', opacity ,'" width="6" height="6" rx=".69" ry=".69"/>'
                );
                unchecked { count++; }
            }
        }

        return typeBlock;
    }
}

File 16 of 29 : TypeBlocksMetadata.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/Base64Upgradeable.sol";
import "./TypeBlocksArt.sol";
import "./Utils.sol";

library TypeBlocksMetadata {

    function tokenURI(uint256 tokenId, bytes1[] memory letters , string memory color, uint256 tokenShuffle) internal pure returns (string memory) {
        bytes memory svg = TypeBlocksArt.generateSVG(letters, color);

        bytes memory metadata = abi.encodePacked(
            '{',
                '"name": "Type Blocks ', StringsUpgradeable.toString(tokenId), '",',
                '"description": "The Art Of Block, The Blocks Of Artwork.",',
                '"image": ',
                    '"data:image/svg+xml;base64,',
                    Base64Upgradeable.encode(svg),
                    '",',
                '"attributes": [',
                    _attributes(letters, color, tokenId, tokenShuffle),
                ']',
            '}'
        );

        return string(
            abi.encodePacked(
                "data:application/json;base64,",
                Base64Upgradeable.encode(metadata)
            )
        );
    }

    function _attributes(bytes1[] memory letters, string memory color, uint256 tokenId, uint256 tokenShuffle) internal pure returns (bytes memory) {
        return abi.encodePacked(
            _trait('Letters', string(Utils.join(letters)), ','),
            _trait('Characters', StringsUpgradeable.toString(letters.length), ','),
            _trait('Color', color, ','),
            _trait('Mint Phase', StringsUpgradeable.toString(_getMintPhase(tokenId)), ','),
            _trait('Shuffle', StringsUpgradeable.toString(tokenShuffle), '')
        );
    }

    function _trait(string memory traitType, string memory traitValue, string memory append) internal pure returns (string memory) {
        return string(abi.encodePacked(
            '{',
                '"trait_type": "', traitType, '",'
                '"value": "', traitValue, '"'
            '}',
            append
        ));
    }

    function _getMintPhase(uint256 tokenId) internal pure returns (uint256 mintPhase) {
        if (tokenId <= 2000) {
            mintPhase = 1;
        } else if (tokenId <= 6000) {
            mintPhase = 2;
        } else {
            mintPhase = 3;
        }
    }
}

File 17 of 29 : Utils.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

library Utils {
    function join(bytes1[] memory a) internal pure returns (bytes memory) {
        uint256 pointer;

        assembly {
            pointer := a
        }
        return _joinValueType(pointer, 1, 0);
    }

    function _joinValueType(
        uint256 a,
        uint256 typeLength,
        uint256 shiftLeft
    ) internal pure returns (bytes memory) {
        bytes memory tempBytes;

        assembly {
            let inputLength := mload(a)
            let inputData := add(a, 0x20)
            let end := add(inputData, mul(inputLength, 0x20))

            // Get a location of some free memory and store it in tempBytes as
            // Solidity does for memory variables.
            tempBytes := mload(0x40)

            // Initialize the length of the final bytes: length is typeLength x inputLength (array of bytes4)
            mstore(tempBytes, mul(inputLength, typeLength))
            let memoryPointer := add(tempBytes, 0x20)

            // Iterate over all bytes4
            for {
                let pointer := inputData
            } lt(pointer, end) {
                pointer := add(pointer, 0x20)
            } {
                let currentSlot := shl(shiftLeft, mload(pointer))
                mstore(memoryPointer, currentSlot)
                memoryPointer := add(memoryPointer, typeLength)
            }

            mstore(0x40, and(add(memoryPointer, 31), not(31)))
        }
        return tempBytes;
    }

    function isStringExists(string memory value) internal pure returns (bool) {
        if(bytes(value).length>0){
            return true;
        } else {
            return false;
        }
    }

    function getRandom(uint256 input, uint256 max) internal view returns (uint256) {
        return (uint256(keccak256(abi.encodePacked(input, address(this)))) % max);
    }

}

File 18 of 29 : TypeBlocks721.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import 'erc721a-upgradeable/contracts/extensions/ERC721AQueryableUpgradeable.sol';
import '@openzeppelin/contracts-upgradeable/token/common/ERC2981Upgradeable.sol';
import 'operator-filter-registry/src/upgradeable/DefaultOperatorFiltererUpgradeable.sol';
import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';

contract TypeBlocks721 is ERC721AQueryableUpgradeable, ERC2981Upgradeable, DefaultOperatorFiltererUpgradeable, OwnableUpgradeable {
    
    function __ERC721_init(string memory _name, string memory _symbol) initializerERC721A initializer internal {
        ERC721AUpgradeable.__ERC721A_init(_name, _symbol);
        __ERC2981_init();
        __Ownable_init();
        __DefaultOperatorFilterer_init();

        _setDefaultRoyalty(msg.sender, 330);
    }

    function _startTokenId() internal view virtual override returns (uint256) {
        return 1;
    }

    function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlyOwner {
        _setDefaultRoyalty(receiver, feeNumerator);
    }

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

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

    function transferFrom(address from, address to, uint256 tokenId) 
        public
        payable
        virtual
        override 
        (IERC721AUpgradeable, ERC721AUpgradeable) onlyAllowedOperator(from) 
    {
        super.transferFrom(from, to, tokenId);
    }
    
    function safeTransferFrom(address from, address to, uint256 tokenId) 
        public
        payable
        virtual
        override (IERC721AUpgradeable, ERC721AUpgradeable) onlyAllowedOperator(from) 
    {
        super.safeTransferFrom(from, to, tokenId);
    }

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

    function supportsInterface(bytes4 interfaceId) 
        public 
        view
        virtual 
        override(ERC721AUpgradeable, ERC2981Upgradeable, IERC721AUpgradeable) returns (bool) 
    {
        return 
            ERC721AUpgradeable.supportsInterface(interfaceId) || 
            ERC2981Upgradeable.supportsInterface(interfaceId);
    }
}

File 19 of 29 : ERC721A__Initializable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
 * @dev This is a base contract to aid in writing upgradeable diamond facet contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 */

import {ERC721A__InitializableStorage} from './ERC721A__InitializableStorage.sol';

abstract contract ERC721A__Initializable {
    using ERC721A__InitializableStorage for ERC721A__InitializableStorage.Layout;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializerERC721A() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(
            ERC721A__InitializableStorage.layout()._initializing
                ? _isConstructor()
                : !ERC721A__InitializableStorage.layout()._initialized,
            'ERC721A__Initializable: contract is already initialized'
        );

        bool isTopLevelCall = !ERC721A__InitializableStorage.layout()._initializing;
        if (isTopLevelCall) {
            ERC721A__InitializableStorage.layout()._initializing = true;
            ERC721A__InitializableStorage.layout()._initialized = true;
        }

        _;

        if (isTopLevelCall) {
            ERC721A__InitializableStorage.layout()._initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializingERC721A() {
        require(
            ERC721A__InitializableStorage.layout()._initializing,
            'ERC721A__Initializable: contract is not initializing'
        );
        _;
    }

    /// @dev Returns true if and only if the function is running in the constructor
    function _isConstructor() private view returns (bool) {
        // extcodesize checks the size of the code stored in an address, and
        // address returns the current address. Since the code is still not
        // deployed when running a constructor, any checks on its code size will
        // yield zero, making it an effective way to detect if a contract is
        // under construction or not.
        address self = address(this);
        uint256 cs;
        assembly {
            cs := extcodesize(self)
        }
        return cs == 0;
    }
}

File 20 of 29 : ERC721A__InitializableStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev This is a base storage for the  initialization function for upgradeable diamond facet contracts
 **/

library ERC721A__InitializableStorage {
    struct Layout {
        /*
         * Indicates that the contract has been initialized.
         */
        bool _initialized;
        /*
         * Indicates that the contract is in the process of being initialized.
         */
        bool _initializing;
    }

    bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.initializable.facet');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }
}

File 21 of 29 : ERC721AStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library ERC721AStorage {
    // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
    struct TokenApprovalRef {
        address value;
    }

    struct Layout {
        // =============================================================
        //                            STORAGE
        // =============================================================

        // The next token ID to be minted.
        uint256 _currentIndex;
        // The number of tokens burned.
        uint256 _burnCounter;
        // Token name
        string _name;
        // Token symbol
        string _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) _packedOwnerships;
        // Mapping owner address to address data.
        //
        // Bits Layout:
        // - [0..63]    `balance`
        // - [64..127]  `numberMinted`
        // - [128..191] `numberBurned`
        // - [192..255] `aux`
        mapping(address => uint256) _packedAddressData;
        // Mapping from token ID to approved address.
        mapping(uint256 => ERC721AStorage.TokenApprovalRef) _tokenApprovals;
        // Mapping from owner to operator approvals
        mapping(address => mapping(address => bool)) _operatorApprovals;
    }

    bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.ERC721A');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }
}

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

pragma solidity ^0.8.4;

import './IERC721AUpgradeable.sol';
import {ERC721AStorage} from './ERC721AStorage.sol';
import './ERC721A__Initializable.sol';

/**
 * @dev Interface of ERC721 token receiver.
 */
interface ERC721A__IERC721ReceiverUpgradeable {
    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 ERC721AUpgradeable is ERC721A__Initializable, IERC721AUpgradeable {
    using ERC721AStorage for ERC721AStorage.Layout;

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

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

    function __ERC721A_init(string memory name_, string memory symbol_) internal onlyInitializingERC721A {
        __ERC721A_init_unchained(name_, symbol_);
    }

    function __ERC721A_init_unchained(string memory name_, string memory symbol_) internal onlyInitializingERC721A {
        ERC721AStorage.layout()._name = name_;
        ERC721AStorage.layout()._symbol = symbol_;
        ERC721AStorage.layout()._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 ERC721AStorage.layout()._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 ERC721AStorage.layout()._currentIndex - ERC721AStorage.layout()._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 ERC721AStorage.layout()._currentIndex - _startTokenId();
        }
    }

    /**
     * @dev Returns the total number of tokens burned.
     */
    function _totalBurned() internal view virtual returns (uint256) {
        return ERC721AStorage.layout()._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 ERC721AStorage.layout()._packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return
            (ERC721AStorage.layout()._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
            (ERC721AStorage.layout()._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(ERC721AStorage.layout()._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 = ERC721AStorage.layout()._packedAddressData[owner];
        uint256 auxCasted;
        // Cast `aux` with assembly to avoid redundant masking.
        assembly {
            auxCasted := aux
        }
        packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
        ERC721AStorage.layout()._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 ERC721AStorage.layout()._name;
    }

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() public view virtual override returns (string memory) {
        return ERC721AStorage.layout()._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(ERC721AStorage.layout()._packedOwnerships[index]);
    }

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

    /**
     * Returns the packed ownership data of `tokenId`.
     */
    function _packedOwnershipOf(uint256 tokenId) private view returns (uint256 packed) {
        if (_startTokenId() <= tokenId) {
            packed = ERC721AStorage.layout()._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 >= ERC721AStorage.layout()._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 = ERC721AStorage.layout()._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 ERC721AStorage.layout()._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 {
        ERC721AStorage.layout()._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 ERC721AStorage.layout()._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 < ERC721AStorage.layout()._currentIndex && // If within bounds,
            ERC721AStorage.layout()._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)
    {
        ERC721AStorage.TokenApprovalRef storage tokenApproval = ERC721AStorage.layout()._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.
            --ERC721AStorage.layout()._packedAddressData[from]; // Updates: `balance -= 1`.
            ++ERC721AStorage.layout()._packedAddressData[to]; // Updates: `balance += 1`.

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            ERC721AStorage.layout()._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 (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != ERC721AStorage.layout()._currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        ERC721AStorage.layout()._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__IERC721ReceiverUpgradeable(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data)
        returns (bytes4 retval) {
            return retval == ERC721A__IERC721ReceiverUpgradeable(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 = ERC721AStorage.layout()._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`.
            ERC721AStorage.layout()._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`.
            ERC721AStorage.layout()._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();

            ERC721AStorage.layout()._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 = ERC721AStorage.layout()._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`.
            ERC721AStorage.layout()._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`.
            ERC721AStorage.layout()._packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

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

            ERC721AStorage.layout()._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 = ERC721AStorage.layout()._currentIndex;
                uint256 index = end - quantity;
                do {
                    if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (index < end);
                // Reentrancy protection.
                if (ERC721AStorage.layout()._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();
                }

        ERC721AStorage.layout()._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;`.
            ERC721AStorage.layout()._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`.
            ERC721AStorage.layout()._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 (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != ERC721AStorage.layout()._currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        ERC721AStorage.layout()._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 {
            ERC721AStorage.layout()._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 = ERC721AStorage.layout()._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);
        ERC721AStorage.layout()._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 23 of 29 : ERC721AQueryableUpgradeable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721AQueryableUpgradeable.sol';
import '../ERC721AUpgradeable.sol';
import '../ERC721A__Initializable.sol';

/**
 * @title ERC721AQueryable.
 *
 * @dev ERC721A subclass with convenience query functions.
 */
abstract contract ERC721AQueryableUpgradeable is
    ERC721A__Initializable,
    ERC721AUpgradeable,
    IERC721AQueryableUpgradeable
{
    function __ERC721AQueryable_init() internal onlyInitializingERC721A {
        __ERC721AQueryable_init_unchained();
    }

    function __ERC721AQueryable_init_unchained() internal onlyInitializingERC721A {}

    /**
     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
     *
     * If the `tokenId` is out of bounds:
     *
     * - `addr = address(0)`
     * - `startTimestamp = 0`
     * - `burned = false`
     * - `extraData = 0`
     *
     * If the `tokenId` is burned:
     *
     * - `addr = <Address of owner before token was burned>`
     * - `startTimestamp = <Timestamp when token was burned>`
     * - `burned = true`
     * - `extraData = <Extra data when token was burned>`
     *
     * Otherwise:
     *
     * - `addr = <Address of owner>`
     * - `startTimestamp = <Timestamp of start of ownership>`
     * - `burned = false`
     * - `extraData = <Extra data at start of ownership>`
     */
    function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) {
        TokenOwnership memory ownership;
        if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) {
            return ownership;
        }
        ownership = _ownershipAt(tokenId);
        if (ownership.burned) {
            return ownership;
        }
        return _ownershipOf(tokenId);
    }

    /**
     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
     * See {ERC721AQueryable-explicitOwnershipOf}
     */
    function explicitOwnershipsOf(uint256[] calldata tokenIds)
        external
        view
        virtual
        override
        returns (TokenOwnership[] memory)
    {
        unchecked {
            uint256 tokenIdsLength = tokenIds.length;
            TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength);
            for (uint256 i; i != tokenIdsLength; ++i) {
                ownerships[i] = explicitOwnershipOf(tokenIds[i]);
            }
            return ownerships;
        }
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`,
     * in the range [`start`, `stop`)
     * (i.e. `start <= tokenId < stop`).
     *
     * This function allows for tokens to be queried if the collection
     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
     *
     * Requirements:
     *
     * - `start < stop`
     */
    function tokensOfOwnerIn(
        address owner,
        uint256 start,
        uint256 stop
    ) external view virtual override returns (uint256[] memory) {
        unchecked {
            if (start >= stop) revert InvalidQueryRange();
            uint256 tokenIdsIdx;
            uint256 stopLimit = _nextTokenId();
            // Set `start = max(start, _startTokenId())`.
            if (start < _startTokenId()) {
                start = _startTokenId();
            }
            // Set `stop = min(stop, stopLimit)`.
            if (stop > stopLimit) {
                stop = stopLimit;
            }
            uint256 tokenIdsMaxLength = balanceOf(owner);
            // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`,
            // to cater for cases where `balanceOf(owner)` is too big.
            if (start < stop) {
                uint256 rangeLength = stop - start;
                if (rangeLength < tokenIdsMaxLength) {
                    tokenIdsMaxLength = rangeLength;
                }
            } else {
                tokenIdsMaxLength = 0;
            }
            uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength);
            if (tokenIdsMaxLength == 0) {
                return tokenIds;
            }
            // We need to call `explicitOwnershipOf(start)`,
            // because the slot at `start` may not be initialized.
            TokenOwnership memory ownership = explicitOwnershipOf(start);
            address currOwnershipAddr;
            // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`.
            // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range.
            if (!ownership.burned) {
                currOwnershipAddr = ownership.addr;
            }
            for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) {
                ownership = _ownershipAt(i);
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            // Downsize the array to fit.
            assembly {
                mstore(tokenIds, tokenIdsIdx)
            }
            return tokenIds;
        }
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(`totalSupply`) in complexity.
     * It is meant to be called off-chain.
     *
     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
     * multiple smaller scans if the collection is large enough to cause
     * an out-of-gas error (10K collections should be fine).
     */
    function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) {
        unchecked {
            uint256 tokenIdsIdx;
            address currOwnershipAddr;
            uint256 tokenIdsLength = balanceOf(owner);
            uint256[] memory tokenIds = new uint256[](tokenIdsLength);
            TokenOwnership memory ownership;
            for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) {
                ownership = _ownershipAt(i);
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            return tokenIds;
        }
    }
}

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

pragma solidity ^0.8.4;

import '../IERC721AUpgradeable.sol';

/**
 * @dev Interface of ERC721AQueryable.
 */
interface IERC721AQueryableUpgradeable is IERC721AUpgradeable {
    /**
     * Invalid query range (`start` >= `stop`).
     */
    error InvalidQueryRange();

    /**
     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
     *
     * If the `tokenId` is out of bounds:
     *
     * - `addr = address(0)`
     * - `startTimestamp = 0`
     * - `burned = false`
     * - `extraData = 0`
     *
     * If the `tokenId` is burned:
     *
     * - `addr = <Address of owner before token was burned>`
     * - `startTimestamp = <Timestamp when token was burned>`
     * - `burned = true`
     * - `extraData = <Extra data when token was burned>`
     *
     * Otherwise:
     *
     * - `addr = <Address of owner>`
     * - `startTimestamp = <Timestamp of start of ownership>`
     * - `burned = false`
     * - `extraData = <Extra data at start of ownership>`
     */
    function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory);

    /**
     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
     * See {ERC721AQueryable-explicitOwnershipOf}
     */
    function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory);

    /**
     * @dev Returns an array of token IDs owned by `owner`,
     * in the range [`start`, `stop`)
     * (i.e. `start <= tokenId < stop`).
     *
     * This function allows for tokens to be queried if the collection
     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
     *
     * Requirements:
     *
     * - `start < stop`
     */
    function tokensOfOwnerIn(
        address owner,
        uint256 start,
        uint256 stop
    ) external view returns (uint256[] memory);

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(`totalSupply`) in complexity.
     * It is meant to be called off-chain.
     *
     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
     * multiple smaller scans if the collection is large enough to cause
     * an out-of-gas error (10K collections should be fine).
     */
    function tokensOfOwner(address owner) external view returns (uint256[] memory);
}

File 25 of 29 : IERC721AUpgradeable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

/**
 * @dev Interface of ERC721A.
 */
interface IERC721AUpgradeable {
    /**
     * 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 26 of 29 : IOperatorFilterRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

interface IOperatorFilterRegistry {
    /**
     * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns
     *         true if supplied registrant address is not registered.
     */
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);

    /**
     * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner.
     */
    function register(address registrant) external;

    /**
     * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes.
     */
    function registerAndSubscribe(address registrant, address subscription) external;

    /**
     * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another
     *         address without subscribing.
     */
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;

    /**
     * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner.
     *         Note that this does not remove any filtered addresses or codeHashes.
     *         Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes.
     */
    function unregister(address addr) external;

    /**
     * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered.
     */
    function updateOperator(address registrant, address operator, bool filtered) external;

    /**
     * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates.
     */
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;

    /**
     * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered.
     */
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;

    /**
     * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates.
     */
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;

    /**
     * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous
     *         subscription if present.
     *         Note that accounts with subscriptions may go on to subscribe to other accounts - in this case,
     *         subscriptions will not be forwarded. Instead the former subscription's existing entries will still be
     *         used.
     */
    function subscribe(address registrant, address registrantToSubscribe) external;

    /**
     * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes.
     */
    function unsubscribe(address registrant, bool copyExistingEntries) external;

    /**
     * @notice Get the subscription address of a given registrant, if any.
     */
    function subscriptionOf(address addr) external returns (address registrant);

    /**
     * @notice Get the set of addresses subscribed to a given registrant.
     *         Note that order is not guaranteed as updates are made.
     */
    function subscribers(address registrant) external returns (address[] memory);

    /**
     * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant.
     *         Note that order is not guaranteed as updates are made.
     */
    function subscriberAt(address registrant, uint256 index) external returns (address);

    /**
     * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr.
     */
    function copyEntriesOf(address registrant, address registrantToCopy) external;

    /**
     * @notice Returns true if operator is filtered by a given address or its subscription.
     */
    function isOperatorFiltered(address registrant, address operator) external returns (bool);

    /**
     * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription.
     */
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);

    /**
     * @notice Returns true if a codeHash is filtered by a given address or its subscription.
     */
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);

    /**
     * @notice Returns a list of filtered operators for a given address or its subscription.
     */
    function filteredOperators(address addr) external returns (address[] memory);

    /**
     * @notice Returns the set of filtered codeHashes for a given address or its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);

    /**
     * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or
     *         its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);

    /**
     * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or
     *         its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);

    /**
     * @notice Returns true if an address has registered
     */
    function isRegistered(address addr) external returns (bool);

    /**
     * @dev Convenience method to compute the code hash of an arbitrary contract
     */
    function codeHashOf(address addr) external returns (bytes32);
}

File 27 of 29 : Constants.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E;
address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;

File 28 of 29 : DefaultOperatorFiltererUpgradeable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {OperatorFiltererUpgradeable} from "./OperatorFiltererUpgradeable.sol";
import {CANONICAL_CORI_SUBSCRIPTION} from "../lib/Constants.sol";

/**
 * @title  DefaultOperatorFiltererUpgradeable
 * @notice Inherits from OperatorFiltererUpgradeable and automatically subscribes to the default OpenSea subscription
 *         when the init function is called.
 */
abstract contract DefaultOperatorFiltererUpgradeable is OperatorFiltererUpgradeable {
    /// @dev The upgradeable initialize function that should be called when the contract is being deployed.
    function __DefaultOperatorFilterer_init() internal onlyInitializing {
        OperatorFiltererUpgradeable.__OperatorFilterer_init(CANONICAL_CORI_SUBSCRIPTION, true);
    }
}

File 29 of 29 : OperatorFiltererUpgradeable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {IOperatorFilterRegistry} from "../IOperatorFilterRegistry.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
 * @title  OperatorFiltererUpgradeable
 * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
 *         registrant's entries in the OperatorFilterRegistry when the init function is called.
 * @dev    This smart contract is meant to be inherited by token contracts so they can use the following:
 *         - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
 *         - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
 */
abstract contract OperatorFiltererUpgradeable is Initializable {
    /// @notice Emitted when an operator is not allowed.
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry constant OPERATOR_FILTER_REGISTRY =
        IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);

    /// @dev The upgradeable initialize function that should be called when the contract is being upgraded.
    function __OperatorFilterer_init(address subscriptionOrRegistrantToCopy, bool subscribe)
        internal
        onlyInitializing
    {
        // If an inheriting token contract is deployed to a network without the registry deployed, the modifier
        // will not revert, but the contract will need to be registered with the registry once it is deployed in
        // order for the modifier to filter addresses.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            if (!OPERATOR_FILTER_REGISTRY.isRegistered(address(this))) {
                if (subscribe) {
                    OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
                } else {
                    if (subscriptionOrRegistrantToCopy != address(0)) {
                        OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
                    } else {
                        OPERATOR_FILTER_REGISTRY.register(address(this));
                    }
                }
            }
        }
    }

    /**
     * @dev A helper modifier to check if the operator is allowed.
     */
    modifier onlyAllowedOperator(address from) virtual {
        // Allow spending tokens from addresses with balance
        // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
        // from an EOA.
        if (from != msg.sender) {
            _checkFilterOperator(msg.sender);
        }
        _;
    }

    /**
     * @dev A helper modifier to check if the operator approval is allowed.
     */
    modifier onlyAllowedOperatorApproval(address operator) virtual {
        _checkFilterOperator(operator);
        _;
    }

    /**
     * @dev A helper function to check if the operator is allowed.
     */
    function _checkFilterOperator(address operator) internal view virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            // under normal circumstances, this function will revert rather than return false, but inheriting or
            // upgraded contracts may specify their own OperatorFilterRegistry implementations, which may behave
            // differently
            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
                revert OperatorNotAllowed(operator);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","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":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"MetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_COLOR","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"addFreeMint","outputs":[],"stateMutability":"nonpayable","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":"","type":"uint256"}],"name":"baseColor","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bool","name":"keepColor","type":"bool"}],"name":"blend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721AUpgradeable.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721AUpgradeable.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"extendedColor","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"freeMints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","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":"isBlendable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMintLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSuperBurnLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"address","name":"ref","type":"address"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"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":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"color","type":"string[]"}],"name":"setBaseColor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"color","type":"string[]"}],"name":"setExtendedColor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"keeper","type":"uint256"},{"internalType":"uint256","name":"burner","type":"uint256"},{"internalType":"uint256","name":"action","type":"uint256"}],"name":"superBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleBlendable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleMintLive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleSuperBurnLive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenColor","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenLetters","outputs":[{"internalType":"bytes1","name":"","type":"bytes1"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenShuffle","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","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":"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":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50615ffe80620000216000396000f3fe6080604052600436106102025760003560e01c806301ffc9a71461020757806304634d8d1461023c57806306fdde031461025e578063081812fc14610280578063095ea7b3146102ad578063105739b8146102c057806318160ddd146102d557806323b872dd146102f85780632a55205a1461030b5780633ccfd60b1461034a57806342842e0e1461035f5780634c3b0289146103725780634eb6b49914610387578063506f0ab2146103a757806354050c75146103c757806358ac8eef146103e75780635bbb2177146104075780636329a06f146104345780636352211e146104625780636817c76c146104825780636d41d4fb1461049857806370a08231146104c6578063715018a6146104e6578063742f0a62146104fb5780638129fc1c1461051057806381378c30146105255780638462151c146105455780638737fbb2146105725780638da5cb5b146105925780638dbb02fa146105a757806394bf804d146105c657806395d89b41146105d957806399a2557a146105ee5780639c6e0a671461060e5780639e2b233a1461062e578063a22cb4651461065f578063b0b68b331461067f578063b88d4fde1461069f578063c23dc68f146106b2578063c87b56dd146106df578063db44f7cb146106ff578063e985e9c51461071f578063f2fde38b1461073f578063fbde0e561461075f578063fdfc7aae14610798575b600080fd5b34801561021357600080fd5b50610227610222366004614ffe565b6107b2565b60405190151581526020015b60405180910390f35b34801561024857600080fd5b5061025c610257366004615032565b6107d2565b005b34801561026a57600080fd5b506102736107e8565b60405161023391906150c5565b34801561028c57600080fd5b506102a061029b3660046150d8565b610883565b60405161023391906150f1565b61025c6102bb366004615105565b6108d0565b3480156102cc57600080fd5b5061025c6108e9565b3480156102e157600080fd5b506102ea610905565b604051908152602001610233565b61025c61030636600461512f565b610925565b34801561031757600080fd5b5061032b61032636600461516b565b610950565b604080516001600160a01b039093168352602083019190915201610233565b34801561035657600080fd5b5061025c6109fe565b61025c61036d36600461512f565b610a35565b34801561037e57600080fd5b5061025c610a5a565b34801561039357600080fd5b5061025c6103a236600461522a565b610a7f565b3480156103b357600080fd5b506102736103c23660046150d8565b610a9a565b3480156103d357600080fd5b5060fc546102279062010000900460ff1681565b3480156103f357600080fd5b506102736104023660046150d8565b610b46565b34801561041357600080fd5b50610427610422366004615345565b610b60565b60405161023391906153c2565b34801561044057600080fd5b506102ea61044f3660046150d8565b6101026020526000908152604090205481565b34801561046e57600080fd5b506102a061047d3660046150d8565b610c12565b34801561048e57600080fd5b506102ea60fd5481565b3480156104a457600080fd5b506102ea6104b3366004615404565b6101036020526000908152604090205481565b3480156104d257600080fd5b506102ea6104e1366004615404565b610c1d565b3480156104f257600080fd5b5061025c610c85565b34801561050757600080fd5b5061025c610c99565b34801561051c57600080fd5b5061025c610cc0565b34801561053157600080fd5b5061025c61054036600461522a565b610de8565b34801561055157600080fd5b50610565610560366004615404565b610e03565b604051610233919061541f565b34801561057e57600080fd5b5061025c61058d366004615457565b610ee9565b34801561059e57600080fd5b506102a06111af565b3480156105b357600080fd5b5060fc5461022790610100900460ff1681565b61025c6105d4366004615483565b6111be565b3480156105e557600080fd5b50610273611337565b3480156105fa57600080fd5b506105656106093660046154af565b61134f565b34801561061a57600080fd5b5061025c6106293660046154e2565b6114d5565b34801561063a57600080fd5b5061027360405180604001604052806005815260200164576869746560d81b81525081565b34801561066b57600080fd5b5061025c61067a36600461553b565b611541565b34801561068b57600080fd5b5061025c61069a366004615567565b611555565b61025c6106ad3660046155bd565b611835565b3480156106be57600080fd5b506106d26106cd3660046150d8565b611862565b6040516102339190615638565b3480156106eb57600080fd5b506102736106fa3660046150d8565b6118b7565b34801561070b57600080fd5b5061027361071a3660046150d8565b611a69565b34801561072b57600080fd5b5061022761073a366004615646565b611a79565b34801561074b57600080fd5b5061025c61075a366004615404565b611ab6565b34801561076b57600080fd5b5061077f61077a36600461516b565b611b2c565b6040516001600160f81b03199091168152602001610233565b3480156107a457600080fd5b5060fc546102279060ff1681565b60006107bd82611b70565b806107cc57506107cc82611bbe565b92915050565b6107da611bf3565b6107e48282611c52565b5050565b60606107f2611d4b565b600201805461080090615670565b80601f016020809104026020016040519081016040528092919081815260200182805461082c90615670565b80156108795780601f1061084e57610100808354040283529160200191610879565b820191906000526020600020905b81548152906001019060200180831161085c57829003601f168201915b5050505050905090565b600061088e82611d6f565b6108ab576040516333d1c03960e21b815260040160405180910390fd5b6108b3611d4b565b60009283526006016020525060409020546001600160a01b031690565b816108da81611db8565b6108e48383611e60565b505050565b6108f1611bf3565b60fc805460ff19811660ff90911615179055565b60006001610911611d4b565b6001015461091d611d4b565b540303919050565b826001600160a01b038116331461093f5761093f33611db8565b61094a848484611e6c565b50505050565b60008281526034602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916109c55750604080518082019091526033546001600160a01b0381168252600160a01b90046001600160601b031660208201525b6020810151600090612710906109e4906001600160601b0316876156c0565b6109ee91906156ed565b91519350909150505b9250929050565b610a06611bf3565b60405133904780156108fc02916000818181858888f19350505050158015610a32573d6000803e3d6000fd5b50565b826001600160a01b0381163314610a4f57610a4f33611db8565b61094a848484612053565b610a62611bf3565b60fc805461ff001981166101009182900460ff1615909102179055565b610a87611bf3565b80516107e49060ff906020840190614ee9565b60ff8181548110610aaa57600080fd5b906000526020600020016000915090508054610ac590615670565b80601f0160208091040260200160405190810160405280929190818152602001828054610af190615670565b8015610b3e5780601f10610b1357610100808354040283529160200191610b3e565b820191906000526020600020905b815481529060010190602001808311610b2157829003601f168201915b505050505081565b6101016020526000908152604090208054610ac590615670565b6060816000816001600160401b03811115610b7d57610b7d61518d565b604051908082528060200260200182016040528015610bb657816020015b610ba3614f3b565b815260200190600190039081610b9b5790505b50905060005b828114610c0957610be4868683818110610bd857610bd8615701565b90506020020135611862565b828281518110610bf657610bf6615701565b6020908102919091010152600101610bbc565b50949350505050565b60006107cc8261206e565b60006001600160a01b038216610c46576040516323d3ad8160e21b815260040160405180910390fd5b6001600160401b03610c56611d4b565b6005016000846001600160a01b03166001600160a01b0316815260200190815260200160002054169050919050565b610c8d611bf3565b610c97600061211b565b565b610ca1611bf3565b60fc805462ff0000198116620100009182900460ff1615909102179055565b600054610100900460ff1615808015610ce05750600054600160ff909116105b80610d015750610cef3061216d565b158015610d01575060005460ff166001145b610d265760405162461bcd60e51b8152600401610d1d90615717565b60405180910390fd5b6000805460ff191660011790558015610d49576000805461ff0019166101001790555b610d986040518060400160405280600b81526020016a5479706520426c6f636b7360a81b8152506040518060400160405280600a81526020016954595045424c4f434b5360b01b81525061217c565b60fc805462ffffff191660011790556618838370f3400060fd558015610a32576000805461ff001916905560405160018152600080516020615f698339815191529060200160405180910390a150565b610df0611bf3565b80516107e49060fe906020840190614ee9565b60606000806000610e1385610c1d565b90506000816001600160401b03811115610e2f57610e2f61518d565b604051908082528060200260200182016040528015610e58578160200160208202803683370190505b509050610e63614f3b565b60015b838614610edd57610e7681612365565b91508160400151610ed55781516001600160a01b031615610e9657815194505b876001600160a01b0316856001600160a01b031603610ed55780838780600101985081518110610ec857610ec8615701565b6020026020010181815250505b600101610e66565b50909695505050505050565b610ef1612390565b60fc5462010000900460ff16610f2f5760405162461bcd60e51b815260206004820152600360248201526245303560e81b6044820152606401610d1d565b33610f3984610c12565b6001600160a01b031614610f5f5760405162461bcd60e51b8152600401610d1d90615765565b33610f6983610c12565b6001600160a01b031614610f8f5760405162461bcd60e51b8152600401610d1d90615765565b60038110610fc55760405162461bcd60e51b815260206004820152600360248201526222981b60e91b6044820152606401610d1d565b6000610fd0846123e9565b90506000610fdd846123e9565b80548060200260200160405190810160405280929190818152602001828054801561104f57602002820191906000526020600020906000905b825461010083900a900460f81b6001600160f81b0319168152602060019283018181049485019490930390920291018084116110165790505b505050505090508051828054905014801561106c57508154600510155b61109e5760405162461bcd60e51b815260206004820152600360248201526245303760e81b6044820152606401610d1d565b826000036110ce576110ae612488565b600086815261010160205260409020906110c890826157c8565b50611178565b826001036110e4576110df856124dc565b611178565b815460041461111b5760405162461bcd60e51b815260206004820152600360248201526208a60760eb1b6044820152606401610d1d565b60405180604001604052806005815260200164576869746560d81b8152506101016000878152602001908152602001600020908161115991906157c8565b50611164828261264a565b61116d856124dc565b6111783360016126d5565b611181846127eb565b604051858152600080516020615fa9833981519152906020015b60405180910390a150506108e4600160c955565b6097546001600160a01b031690565b6111c6612390565b60fc5460ff166111fe5760405162461bcd60e51b815260206004820152600360248201526245313160e81b6044820152606401610d1d565b600082116112345760405162461bcd60e51b815260206004820152600360248201526222989960e91b6044820152606401610d1d565b336001600160a01b038216036112725760405162461bcd60e51b815260206004820152600360248201526204531360ec1b6044820152606401610d1d565b60fd5461127f90836156c0565b3410156112bf5760405162461bcd60e51b815260206004820152600e60248201526d09cdee840cadcdeeaced040cae8d60931b6044820152606401610d1d565b336000908152610103602052604090205480156112ec573360009081526101036020526040812055918201915b6112f633846126d5565b600283111561132c5761130a6003846156ed565b6001600160a01b03831660009081526101036020526040902080548201905590505b506107e4600160c955565b6060611341611d4b565b600301805461080090615670565b606081831061137157604051631960ccad60e11b815260040160405180910390fd5b60008061137c6127f6565b9050600185101561138c57600194505b80841115611398578093505b60006113a387610c1d565b9050848610156113c257858503818110156113bc578091505b506113c6565b5060005b6000816001600160401b038111156113e0576113e061518d565b604051908082528060200260200182016040528015611409578160200160208202803683370190505b5090508160000361141f5793506114ce92505050565b600061142a88611862565b90506000816040015161143b575080515b885b88811415801561144d5750848714155b156114c25761145b81612365565b925082604001516114ba5782516001600160a01b03161561147b57825191505b8a6001600160a01b0316826001600160a01b0316036114ba57808488806001019950815181106114ad576114ad615701565b6020026020010181815250505b60010161143d565b50505092835250909150505b9392505050565b6114dd611bf3565b60005b8281101561094a5781610103600086868581811061150057611500615701565b90506020020160208101906115159190615404565b6001600160a01b031681526020810191909152604001600020558061153981615887565b9150506114e0565b8161154b81611db8565b6108e48383612806565b61155d612390565b60fc54610100900460ff1661159a5760405162461bcd60e51b815260206004820152600360248201526245303160e81b6044820152606401610d1d565b600182116115d05760405162461bcd60e51b815260206004820152600360248201526222981960e91b6044820152606401610d1d565b6000805b8381101561166c57336115fe8686848181106115f2576115f2615701565b90506020020135610c12565b6001600160a01b0316146116245760405162461bcd60e51b8152600401610d1d90615765565b600061164786868481811061163b5761163b615701565b905060200201356123e9565b805490915061165690846158a0565b925050808061166490615887565b9150506115d4565b50600581106116a35760405162461bcd60e51b8152602060048201526003602482015262114c0d60ea1b6044820152606401610d1d565b60006116bb8585600081811061163b5761163b615701565b905060015b848110156117925760006116df87878481811061163b5761163b615701565b905060005b815481101561175d578382828154811061170057611700615701565b60009182526020808320818304015484546001810186559484529281902090840401805460ff601f93841661010090810a90950481169590931690930a93840291909302199091161790558061175581615887565b9150506116e4565b5061177f87878481811061177357611773615701565b905060200201356127eb565b508061178a81615887565b9150506116c0565b50826117db576117a0612883565b6101016000878760008181106117b8576117b8615701565b90506020020135815260200190815260200160002090816117d991906157c8565b505b6117fd858560008181106117f1576117f1615701565b905060200201356124dc565b600080516020615fa98339815191528585600081811061181f5761181f615701565b9050602002013560405161119b91815260200190565b836001600160a01b038116331461184f5761184f33611db8565b61185b85858585612981565b5050505050565b61186a614f3b565b611872614f3b565b600183108061188857506118846127f6565b8310155b156118935792915050565b61189c83612365565b90508060400151156118ae5792915050565b6114ce836129c5565b60606118c16129de565b8211156118e157604051630a14c4b560e41b815260040160405180910390fd5b6000828152610100602090815260408083208054825181850281018501909352808352919290919083018282801561196057602002820191906000526020600020906000905b825461010083900a900460f81b6001600160f81b0319168152602060019283018181049485019490930390920291018084116119275790505b50505050509050805160000361197c57611979836129f1565b90505b600083815261010160205260408120805461199690615670565b80601f01602080910402602001604051908101604052809291908181526020018280546119c290615670565b8015611a0f5780601f106119e457610100808354040283529160200191611a0f565b820191906000526020600020905b8154815290600101906020018083116119f257829003601f168201915b50505050509050611a1f81612a41565b611a415750604080518082019091526005815264576869746560d81b60208201525b611a61848383610102600089815260200190815260200160002054612a5b565b949350505050565b60fe8181548110610aaa57600080fd5b6000611a83611d4b565b6001600160a01b039384166000908152600791909101602090815260408083209490951682529290925250205460ff1690565b611abe611bf3565b6001600160a01b038116611b235760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d1d565b610a328161211b565b6101006020528160005260406000208181548110611b4957600080fd5b9060005260206000209060209182820401919006915091509054906101000a900460f81b81565b60006301ffc9a760e01b6001600160e01b031983161480611ba157506380ac58cd60e01b6001600160e01b03198316145b806107cc5750506001600160e01b031916635b5e139f60e01b1490565b60006001600160e01b0319821663152a902d60e11b14806107cc57506301ffc9a760e01b6001600160e01b03198316146107cc565b33611bfc6111af565b6001600160a01b031614610c975760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d1d565b6127106001600160601b0382161115611cc05760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610d1d565b6001600160a01b038216611d125760405162461bcd60e51b815260206004820152601960248201527822a921991c9c189d1034b73b30b634b2103932b1b2b4bb32b960391b6044820152606401610d1d565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217603355565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4090565b600081600111158015611d895750611d85611d4b565b5482105b80156107cc5750600160e01b611d9d611d4b565b60008481526004919091016020526040902054161592915050565b6daaeb6d7670e522a718067333cd4e3b15610a3257604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c617113490611e0090309085906004016158b3565b602060405180830381865afa158015611e1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e4191906158cd565b610a325780604051633b79c77360e21b8152600401610d1d91906150f1565b6107e482826001612ae2565b6000611e778261206e565b9050836001600160a01b0316816001600160a01b031614611eaa5760405162a1148160e81b815260040160405180910390fd5b600080611eb684612b97565b91509150611edb8187611ec63390565b6001600160a01b039081169116811491141790565b611f0657611ee98633611a79565b611f0657604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516611f2d57604051633a954ecd60e21b815260040160405180910390fd5b8015611f3857600082555b611f40611d4b565b6001600160a01b0387166000908152600591909101602052604090208054600019019055611f6c611d4b565b6001600160a01b03861660009081526005919091016020526040902080546001019055611f9d85600160e11b612bbf565b611fa5611d4b565b60008681526004919091016020526040812091909155600160e11b8416900361201b5760018401611fd4611d4b565b60008281526004919091016020526040812054900361201957611ff5611d4b565b5481146120195783612005611d4b565b600083815260049190910160205260409020555b505b83856001600160a01b0316876001600160a01b0316600080516020615f8983398151915260405160405180910390a45b505050505050565b6108e483838360405180602001604052806000815250611835565b60008160011161210257612080611d4b565b600083815260049190910160205260408120549150600160e01b8216900361210257806000036120fd576120b2611d4b565b5482106120d257604051636f96cda160e11b815260040160405180910390fd5b6120da611d4b565b6000199092016000818152600493909301602052604090922054905080156120d2575b919050565b604051636f96cda160e11b815260040160405180910390fd5b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03163b151590565b612184612bd4565b54610100900460ff166121a357612199612bd4565b5460ff16156121a7565b303b155b6122015760405162461bcd60e51b81526020600482015260376024820152600080516020615f09833981519152604482015276081a5cc8185b1c9958591e481a5b9a5d1a585b1a5e9959604a1b6064820152608401610d1d565b600061220b612bd4565b54610100900460ff161590508015612257576001612227612bd4565b80549115156101000261ff00199092169190911790556001612247612bd4565b805460ff19169115159190911790555b600054610100900460ff16158080156122775750600054600160ff909116105b8061229857506122863061216d565b158015612298575060005460ff166001145b6122b45760405162461bcd60e51b8152600401610d1d90615717565b6000805460ff1916600117905580156122d7576000805461ff0019166101001790555b6122e18484612bf8565b6122e9612c2f565b6122f1612c56565b6122f9612c85565b6123053361014a611c52565b8015612339576000805461ff001916905560405160018152600080516020615f698339815191529060200160405180910390a15b5080156108e457600061234a612bd4565b80549115156101000261ff0019909216919091179055505050565b61236d614f3b565b6107cc612378611d4b565b60008481526004919091016020526040902054612ccb565b600260c954036123e25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d1d565b600260c955565b600081815261010060205260408120805482036107cc57600061240b846129f1565b905060005b8151811015612480578282828151811061242c5761242c615701565b6020908102919091018101518254600181018455600093845292829020918304909101805460ff601f9094166101000a938402191660f89290921c929092021790558061247881615887565b915050612410565b505092915050565b606061249860fb80546001019055565b60006124b76124a660fb5490565b6124b090426158a0565b6064612d0e565b905060508110156124d0576124ca612883565b91505090565b6124ca612d5d565b5090565b60006124e7826123e9565b905060005b81548110156126305761250360fb80546001019055565b60008161252e61251260fb5490565b61251c90426158a0565b85546125299086906158ea565b612d0e565b61253891906158a0565b9050600083828154811061254e5761254e615701565b90600052602060002090602091828204019190069054906101000a900460f81b905083838154811061258257612582615701565b90600052602060002090602091828204019190069054906101000a900460f81b8483815481106125b4576125b4615701565b90600052602060002090602091828204019190066101000a81548160ff021916908360f81c0217905550808484815481106125f1576125f1615701565b90600052602060002090602091828204019190066101000a81548160ff021916908360f81c02179055505050808061262890615887565b9150506124ec565b505060009081526101026020526040902080546001019055565b61265860fb80546001019055565b600061267761266660fb5490565b61267090426158a0565b8351612d0e565b9050600082828151811061268d5761268d615701565b6020908102919091018101518554600181018755600096875295829020918604909101805460ff601f9097166101000a968702191660f89290921c9590950217909355505050565b60006126df611d4b565b54905060008290036127045760405163b562e8dd60e01b815260040160405180910390fd5b6001600160401b018202612716611d4b565b6001600160a01b038516600090815260059190910160205260409020805491909101905561274a836001841460e11b612bbf565b612752611d4b565b600083815260049190910160205260408120919091556001600160a01b038416908383019083908390600080516020615f898339815191528180a4600183015b8181146127b85780836000600080516020615f89833981519152600080a4600101612792565b50816000036127d957604051622e076360e81b815260040160405180910390fd5b806127e2611d4b565b55506108e49050565b610a32816000612dc2565b6000612800611d4b565b54919050565b8061280f611d4b565b336000818152600792909201602090815260408084206001600160a01b03881680865290835293819020805460ff19169515159590951790945592518415158152919290917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60fe546060906128a55760405162461bcd60e51b8152600401610d1d906158fd565b6128b360fb80546001019055565b60006128d36128c160fb5490565b6128cb90426158a0565b60fe54612d0e565b905060fe81815481106128e8576128e8615701565b9060005260206000200180546128fd90615670565b80601f016020809104026020016040519081016040528092919081815260200182805461292990615670565b80156129765780601f1061294b57610100808354040283529160200191612976565b820191906000526020600020905b81548152906001019060200180831161295957829003601f168201915b505050505091505090565b61298c848484610925565b6001600160a01b0383163b1561094a576129a884848484612f29565b61094a576040516368d2bf6b60e11b815260040160405180910390fd5b6129cd614f3b565b6107cc6129d98361206e565b612ccb565b600060016129ea611d4b565b5403919050565b60606107d08211612a09576107cc8260026003613011565b6117708211612a1f576107cc8260016003613011565b6127108211612a35576107cc8260016002613011565b6107cc82600180613011565b805160009015612a5357506001919050565b506000919050565b60606000612a69858561315a565b90506000612a768761318d565b612a7f8361321f565b612a8b88888b89613371565b604051602001612a9d93929190615936565b6040516020818303038152906040529050612ab78161321f565b604051602001612ac79190615a71565b60405160208183030381529060405292505050949350505050565b6000612aed83610c12565b90508115612b2c57336001600160a01b03821614612b2c57612b0f8133611a79565b612b2c576040516367d9dca160e11b815260040160405180910390fd5b83612b35611d4b565b6000858152600691909101602052604080822080546001600160a01b0319166001600160a01b0394851617905551859287811692908516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259190a450505050565b6000806000612ba4611d4b565b60009485526006016020525050604090912080549092909150565b4260a01b176001600160a01b03919091161790565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f90565b612c00612bd4565b54610100900460ff16612c255760405162461bcd60e51b8152600401610d1d90615ab6565b6107e482826134d4565b600054610100900460ff16610c975760405162461bcd60e51b8152600401610d1d90615af8565b600054610100900460ff16612c7d5760405162461bcd60e51b8152600401610d1d90615af8565b610c97613540565b600054610100900460ff16612cac5760405162461bcd60e51b8152600401610d1d90615af8565b610c97733cc6cdda760b79bafa08df41ecfa224f810dceb66001613570565b612cd3614f3b565b6001600160a01b03821681526001600160401b0360a083901c166020820152600160e01b82161515604082015260e89190911c606082015290565b6000818330604051602001612d3a92919091825260601b6001600160601b031916602082015260340190565b6040516020818303038152906040528051906020012060001c6114ce9190615b43565b60ff54606090612d7f5760405162461bcd60e51b8152600401610d1d906158fd565b612d8d60fb80546001019055565b6000612dad612d9b60fb5490565b612da590426158a0565b60ff54612d0e565b905060ff81815481106128e8576128e8615701565b6000612dcd8361206e565b905080600080612ddc86612b97565b915091508415612e1c57612df1818433611ec6565b612e1c57612dff8333611a79565b612e1c57604051632ce44b5f60e11b815260040160405180910390fd5b8015612e2757600082555b6001600160801b03612e37611d4b565b6001600160a01b0385166000908152600591909101602052604090208054919091019055612e6983600360e01b612bbf565b612e71611d4b565b60008881526004919091016020526040812091909155600160e11b85169003612ee75760018601612ea0611d4b565b600082815260049190910160205260408120549003612ee557612ec1611d4b565b548114612ee55784612ed1611d4b565b600083815260049190910160205260409020555b505b60405186906000906001600160a01b03861690600080516020615f89833981519152908390a4612f15611d4b565b600190810180549091019055505050505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612f5e903390899088908890600401615b57565b6020604051808303816000875af1925050508015612f99575060408051601f3d908101601f19168201909252612f9691810190615b8a565b60015b612ff7573d808015612fc7576040519150601f19603f3d011682016040523d82523d6000602084013e612fcc565b606091505b508051600003612fef576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611a61565b6060600061301f84846158ea565b61302a9060016158a0565b905060018082111561304e57846130418784612d0e565b61304b91906158a0565b90505b6000816001600160401b038111156130685761306861518d565b604051908082528060200260200182016040528015613091578160200160208202803683370190505b50905060005b8281101561314f5760006130c0896130af86856158a0565b6130b991906158a0565b601a612d0e565b90506040518060400160405280601a81526020017920a121a222a323a424a525a626a727a828a929aa2aab2bac2cad60311b815250818151811061310657613106615701565b602001015160f81c60f81b83838151811061312357613123615701565b6001600160f81b031990921660209283029190910190910152508061314781615887565b915050613097565b509695505050505050565b606061316683836136fe565b6040516020016131769190615ba7565b604051602081830303815290604052905092915050565b6060600061319a83613754565b60010190506000816001600160401b038111156131b9576131b961518d565b6040519080825280601f01601f1916602001820160405280156131e3576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846131ed57509392505050565b6060815160000361323e57505060408051602081019091526000815290565b6000604051806060016040528060408152602001615f29604091399050600060038451600261326d91906158a0565b61327791906156ed565b6132829060046156c0565b6001600160401b038111156132995761329961518d565b6040519080825280601f01601f1916602001820160405280156132c3576020820181803683370190505b509050600182016020820185865187015b8082101561332f576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f81168501518453506001830192506132d4565b505060038651066001811461334b576002811461335e57613366565b603d6001830353603d6002830353613366565b603d60018303535b509195945050505050565b60606133be604051806040016040528060078152602001664c65747465727360c81b81525061339f8761382a565b604051806040016040528060018152602001600b60fa1b81525061383a565b6133ee6040518060400160405280600a8152602001694368617261637465727360b01b81525061339f885161318d565b61342f6040518060400160405280600581526020016421b7b637b960d91b81525087604051806040016040528060018152602001600b60fa1b81525061383a565b6134666040518060400160405280600a8152602001694d696e7420506861736560b01b81525061339f61346189613869565b61318d565b6134a76040518060400160405280600781526020016653687566666c6560c81b8152506134928861318d565b6040518060200160405280600081525061383a565b6040516020016134bb959493929190615cb9565b6040516020818303038152906040529050949350505050565b6134dc612bd4565b54610100900460ff166135015760405162461bcd60e51b8152600401610d1d90615ab6565b8161350a611d4b565b6002019061351890826157c8565b5080613522611d4b565b6003019061353090826157c8565b50600161353b611d4b565b555050565b600054610100900460ff166135675760405162461bcd60e51b8152600401610d1d90615af8565b610c973361211b565b600054610100900460ff166135975760405162461bcd60e51b8152600401610d1d90615af8565b6daaeb6d7670e522a718067333cd4e3b156107e45760405163c3c5a54760e01b81526daaeb6d7670e522a718067333cd4e9063c3c5a547906135dd9030906004016150f1565b6020604051808303816000875af11580156135fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061362091906158cd565b6107e457801561368b57604051633e9f1edf60e11b81526daaeb6d7670e522a718067333cd4e90637d3e3dbe9061365d90309086906004016158b3565b600060405180830381600087803b15801561367757600080fd5b505af115801561204b573d6000803e3d6000fd5b6001600160a01b038216156136cd5760405163a0af290360e01b81526daaeb6d7670e522a718067333cd4e9063a0af29039061365d90309086906004016158b3565b604051632210724360e11b81526daaeb6d7670e522a718067333cd4e90634420e4869061365d9030906004016150f1565b606060005b600581101561374d5781613718828686613895565b604051602001613729929190615d24565b6040516020818303038152906040529150808061374590615887565b915050613703565b5092915050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106137935772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6904ee2d6d415b85acef8160201b83106137bd576904ee2d6d415b85acef8160201b830492506020015b662386f26fc1000083106137db57662386f26fc10000830492506010015b6305f5e10083106137f3576305f5e100830492506008015b612710831061380757612710830492506004015b60648310613819576064830492506002015b600a83106107cc5760010192915050565b6060816114ce8160016000613a8c565b606083838360405160200161385193929190615d73565b60405160208183030381529060405290509392505050565b60006107d0821161387c57506001919050565b611770821161388d57506002919050565b506003919050565b606060006138a46028866156c0565b6138af9060d56158ea565b604080518082019091526004815263302e303960e01b60208201528551919250607e91600190600090158015906138e65750875189105b1561392057878960018a516138fb91906158ea565b61390591906158ea565b8151811061391557613915615701565b602002602001015190505b60005b6007811015613a7f5760005b6005811015613a6c5760006139458260076156c0565b61394f90896158a0565b9050600061395e8460076156c0565b61396890896158a0565b9050600061397586613add565b905060005b6014811015613a145760405180604001604052806004815260200163302e303960e01b81525098508181601481106139b4576139b4615701565b602002015160ff1615613a14578181601481106139d3576139d3615701565b602002015160ff168803613a0257604051806040016040528060018152602001603160f81b8152509850613a14565b80613a0c81615887565b91505061397a565b508a613a1f8461318d565b613a288461318d565b8e8b604051602001613a3e959493929190615e04565b60408051601f198184030181529190529a505060019095019450819050613a6481615887565b91505061392f565b5080613a7781615887565b915050613923565b5050505050509392505050565b60608084516020860160208202810160405193508683028452602084019250815b81811015613ac7578051871b845292870192602001613aad565b505050601f01601f191660405290509392505050565b613ae5614f62565b6001600160f81b03198216604160f81b03613ba15750506040805161028081018252600281526003602082015260049181019190915260066060820152600a6080820152600b60a0820152600f60c0820152601060e08201526014610100820152601561012082015260166101408201526017610160820152601861018082015260196101a0820152601a6101c0820152601e6101e0820152601f61020082015260236102208201526000610240820181905261026082015290565b6001600160f81b03198216602160f91b03613c6257505060408051610280810182526001815260026020808301919091526003928201929092526004606082015260066080820152600a60a0820152600b60c0820152600f60e08201526010610100820152601161012082015260126101408201526013610160820152601561018082015260196101a0820152601a6101c0820152601e6101e0820152601f6102008201526102208101919091526021610240820152602261026082015290565b6001600160f81b03198216604360f81b03613d23575050604080516102808101825260028152600360208083019190915260049282019290925260066060820152600a6080820152600b60a0820152601060c0820152601560e0820152601a610100820152601e6101208201526101408101919091526021610160820152602261018082015260006101a082018190526101c082018190526101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216601160fa1b03613de457505060408051610280810182526001815260026020808301919091526003928201929092526004606082015260066080820152600a60a0820152600b60c0820152600f60e08201526010610100820152601461012082015260156101408201526019610160820152601a610180820152601e6101a0820152601f6101c08201526101e0810191909152602161020082015260226102208201526000610240820181905261026082015290565b6001600160f81b03198216604560f81b03613ea557505060408051610280810182526001815260026020808301919091526003928201929092526004606082015260056080820152600660a0820152600b60c0820152601060e08201526011610100820152601261012082015260136101408201526015610160820152601a610180820152601f6101a08201526101c081019190915260216101e0820152602261020082015260236102208201526000610240820181905261026082015290565b6001600160f81b03198216602360f91b03613f61575050604080516102808101825260018152600260208201526003918101919091526004606082015260056080820152600660a0820152600b60c0820152601060e08201526011610100820152601261012082015260136101408201526015610160820152601a610180820152601f6101a082015260006101c082018190526101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216604760f81b03614022575050604080516102808101825260028152600360208083019190915260049282019290925260066060820152600a6080820152600b60a0820152601060c0820152601560e082015260186101008201526019610120820152601a610140820152601e61016082015261018081019190915260216101a082015260226101c082015260006101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216600960fb1b036140de57505060408051610280810182526001815260056020820152600691810191909152600a6060820152600b6080820152600f60a0820152601060c0820152601160e082015260126101008201526013610120820152601461014082015260156101608201526019610180820152601a6101a0820152601e6101c0820152601f6101e0820152602361020082015260006102208201819052610240820181905261026082015290565b6001600160f81b03198216604960f81b0361419f575050604080516102808101825260028152600360208083019190915260049282019290925260086060820152600d6080820152601260a0820152601760c0820152601c60e0820152610100810191909152602161012082015260226101408201526000610160820181905261018082018190526101a082018190526101c082018190526101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216602560f91b0361426057505060408051610280810182526002815260036020808301919091526004928201929092526005606082015260096080820152600e60a0820152601360c0820152601860e0820152601a610100820152601d6101208201526101408101919091526021610160820152600061018082018190526101a082018190526101c082018190526101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216604b60f81b0361431c5750506040805161028081018252600181526005602082015260069181019190915260096060820152600b6080820152600d60a0820152601060c0820152601160e082015260156101008201526017610120820152601a610140820152601d610160820152601f61018082015260236101a082015260006101c082018190526101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216601360fa1b036143dd5750506040805161028081018252600181526006602080830191909152600b928201929092526010606082015260156080820152601a60a0820152601f60c082015260e08101919091526021610100820152602261012082015260236101408201526000610160820181905261018082018190526101a082018190526101c082018190526101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216604d60f81b03614499575050604080516102808101825260018152600560208201526006918101919091526007606082015260096080820152600a60a0820152600b60c0820152600d60e0820152600f6101008201526010610120820152601461014082015260156101608201526019610180820152601a6101a0820152601e6101c0820152601f6101e0820152602361020082015260006102208201819052610240820181905261026082015290565b6001600160f81b03198216602760f91b036145555750506040805161028081018252600181526005602082015260069181019190915260076060820152600a6080820152600b60a0820152600d60c0820152600f60e082015260106101008201526013610120820152601461014082015260156101608201526019610180820152601a6101a0820152601e6101c0820152601f6101e0820152602361020082015260006102208201819052610240820181905261026082015290565b6001600160f81b03198216604f60f81b03614616575050604080516102808101825260028152600360208083019190915260049282019290925260066060820152600a6080820152600b60a0820152600f60c0820152601060e0820152601461010082015260156101208201526019610140820152601a610160820152601e6101808201526101a081019190915260216101c082015260226101e0820152600061020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216600560fc1b036146d2575050604080516102808101825260018152600260208201526003918101919091526004606082015260066080820152600a60a0820152600b60c0820152600f60e082015260106101008201526011610120820152601261014082015260136101608201526015610180820152601a6101a0820152601f6101c082015260006101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216605160f81b03614793575050604080516102808101825260028152600360208083019190915260049282019290925260066060820152600a6080820152600b60a0820152600f60c0820152601060e08201526014610100820152601561012082015260176101408201526019610160820152601a610180820152601d6101a0820152601e6101c08201526101e0810191909152602161020082015260226102208201526023610240820152600061026082015290565b6001600160f81b03198216602960f91b0361484f575050604080516102808101825260018152600260208201526003918101919091526004606082015260066080820152600a60a0820152600b60c0820152600f60e08201526010610100820152601161012082015260126101408201526013610160820152601561018082015260176101a0820152601a6101c0820152601d6101e0820152601f61020082015260236102208201526000610240820181905261026082015290565b6001600160f81b03198216605360f81b03614910575050604080516102808101825260028152600360208083019190915260049282019290925260066060820152600a6080820152600b60a0820152601160c0820152601260e082015260136101008201526019610120820152601a610140820152601e61016082015261018081019190915260216101a082015260226101c082015260006101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216601560fa1b036149cc575050604080516102808101825260018152600260208201526003918101919091526004606082015260056080820152600860a0820152600d60c0820152601260e08201526017610100820152601c61012082015260216101408201526000610160820181905261018082018190526101a082018190526101c082018190526101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216605560f81b03614a8d5750506040805161028081018252600181526005602080830191909152600692820192909252600a6060820152600b6080820152600f60a0820152601060c0820152601460e082015260156101008201526019610120820152601a610140820152601e61016082015261018081019190915260216101a082015260226101c082015260006101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216602b60f91b03614b4957505060408051610280810182526001815260056020820152600691810191909152600a6060820152600b6080820152600f60a0820152601060c0820152601460e082015260156101008201526019610120820152601b610140820152601d610160820152602161018082015260006101a082018190526101c082018190526101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216605760f81b03614c0a5750506040805161028081018252600181526005602080830191909152600692820192909252600a6060820152600b6080820152600f60a0820152601060c0820152601460e0820152601561010082015260176101208201526019610140820152601a610160820152601c610180820152601e6101a08201526101c081019190915260226101e0820152600061020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216600b60fb1b03614cc657505060408051610280810182526001815260056020820152600691810191909152600a6060820152600b6080820152600f60a0820152601160c0820152601260e0820152601361010082015260156101208201526019610140820152601a610160820152601e610180820152601f6101a082015260236101c082015260006101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216605960f81b03614d8257505060408051610280810182526001815260056020820152600691810191909152600a6060820152600b6080820152600f60a0820152601160c0820152601260e082015260136101008201526017610120820152601c6101408201526021610160820152600061018082018190526101a082018190526101c082018190526101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216602d60f91b03614e4357505060408051610280810182526001815260026020808301919091526003928201929092526004606082015260056080820152600a60a0820152600e60c0820152601260e08201526016610100820152601a610120820152601f610140820152610160810191909152602161018082015260226101a082015260236101c082015260006101e0820181905261020082018190526102208201819052610240820181905261026082015290565b50506040805161028081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a081018290526101c081018290526101e0810182905261020081018290526102208101829052610240810182905261026081019190915290565b828054828255906000526020600020908101928215614f2f579160200282015b82811115614f2f5782518290614f1f90826157c8565b5091602001919060010190614f09565b506124d8929150614f81565b60408051608081018252600080825260208201819052918101829052606081019190915290565b6040518061028001604052806014906020820280368337509192915050565b808211156124d8576000614f958282614f9e565b50600101614f81565b508054614faa90615670565b6000825580601f10614fba575050565b601f016020900490600052602060002090810190610a3291905b808211156124d85760008155600101614fd4565b6001600160e01b031981168114610a3257600080fd5b60006020828403121561501057600080fd5b81356114ce81614fe8565b80356001600160a01b03811681146120fd57600080fd5b6000806040838503121561504557600080fd5b61504e8361501b565b915060208301356001600160601b038116811461506a57600080fd5b809150509250929050565b60005b83811015615090578181015183820152602001615078565b50506000910152565b600081518084526150b1816020860160208601615075565b601f01601f19169290920160200192915050565b6020815260006114ce6020830184615099565b6000602082840312156150ea57600080fd5b5035919050565b6001600160a01b0391909116815260200190565b6000806040838503121561511857600080fd5b6151218361501b565b946020939093013593505050565b60008060006060848603121561514457600080fd5b61514d8461501b565b925061515b6020850161501b565b9150604084013590509250925092565b6000806040838503121561517e57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156151cb576151cb61518d565b604052919050565b60006001600160401b038311156151ec576151ec61518d565b6151ff601f8401601f19166020016151a3565b905082815283838301111561521357600080fd5b828260208301376000602084830101529392505050565b6000602080838503121561523d57600080fd5b82356001600160401b038082111561525457600080fd5b818501915085601f83011261526857600080fd5b81358181111561527a5761527a61518d565b8060051b6152898582016151a3565b91825283810185019185810190898411156152a357600080fd5b86860192505b838310156152f4578235858111156152c15760008081fd5b8601603f81018b136152d35760008081fd5b6152e48b89830135604084016151d3565b83525091860191908601906152a9565b9998505050505050505050565b60008083601f84011261531357600080fd5b5081356001600160401b0381111561532a57600080fd5b6020830191508360208260051b85010111156109f757600080fd5b6000806020838503121561535857600080fd5b82356001600160401b0381111561536e57600080fd5b61537a85828601615301565b90969095509350505050565b80516001600160a01b031682526020808201516001600160401b03169083015260408082015115159083015260609081015162ffffff16910152565b6020808252825182820181905260009190848201906040850190845b81811015610edd576153f1838551615386565b92840192608092909201916001016153de565b60006020828403121561541657600080fd5b6114ce8261501b565b6020808252825182820181905260009190848201906040850190845b81811015610edd5783518352928401929184019160010161543b565b60008060006060848603121561546c57600080fd5b505081359360208301359350604090920135919050565b6000806040838503121561549657600080fd5b823591506154a66020840161501b565b90509250929050565b6000806000606084860312156154c457600080fd5b6154cd8461501b565b95602085013595506040909401359392505050565b6000806000604084860312156154f757600080fd5b83356001600160401b0381111561550d57600080fd5b61551986828701615301565b909790965060209590950135949350505050565b8015158114610a3257600080fd5b6000806040838503121561554e57600080fd5b6155578361501b565b9150602083013561506a8161552d565b60008060006040848603121561557c57600080fd5b83356001600160401b0381111561559257600080fd5b61559e86828701615301565b90945092505060208401356155b28161552d565b809150509250925092565b600080600080608085870312156155d357600080fd5b6155dc8561501b565b93506155ea6020860161501b565b92506040850135915060608501356001600160401b0381111561560c57600080fd5b8501601f8101871361561d57600080fd5b61562c878235602084016151d3565b91505092959194509250565b608081016107cc8284615386565b6000806040838503121561565957600080fd5b6156628361501b565b91506154a66020840161501b565b600181811c9082168061568457607f821691505b6020821081036156a457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176107cc576107cc6156aa565b634e487b7160e01b600052601260045260246000fd5b6000826156fc576156fc6156d7565b500490565b634e487b7160e01b600052603260045260246000fd5b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526003908201526245303360e81b604082015260600190565b601f8211156108e457600081815260208120601f850160051c810160208610156157a95750805b601f850160051c820191505b8181101561204b578281556001016157b5565b81516001600160401b038111156157e1576157e161518d565b6157f5816157ef8454615670565b84615782565b602080601f83116001811461582a57600084156158125750858301515b600019600386901b1c1916600185901b17855561204b565b600085815260208120601f198616915b828110156158595788860151825594840194600190910190840161583a565b50858210156158775787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018201615899576158996156aa565b5060010190565b808201808211156107cc576107cc6156aa565b6001600160a01b0392831681529116602082015260400190565b6000602082840312156158df57600080fd5b81516114ce8161552d565b818103818111156107cc576107cc6156aa565b60208082526003908201526245303960e81b604082015260600190565b6000815161592c818560208601615075565b9290920192915050565b607b60f81b8152740113730b6b2911d10112a3cb83290213637b1b5b99605d1b60018201528351600090615971816016850160208901615075565b61088b60f21b60169184019182018190527f226465736372697074696f6e223a202254686520417274204f6620426c6f636b6018830152790b08151a1948109b1bd8dadcc813d988105c9d1ddbdc9acb888b60321b60388301526801134b6b0b3b2911d160bd1b60528301527a0899185d184e9a5b5859d94bdcdd99cade1b5b0ed8985cd94d8d0b602a1b605b8301528551615a14816076850160208a01615075565b6076920191820152615a67615a5a615a4d615a47607885016e2261747472696275746573223a205b60881b8152600f0190565b8761591a565b605d60f81b815260010190565b607d60f81b815260010190565b9695505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251615aa981601d850160208701615075565b91909101601d0192915050565b6020808252603490820152600080516020615f09833981519152604082015273206973206e6f7420696e697469616c697a696e6760601b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082615b5257615b526156d7565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615a6790830184615099565b600060208284031215615b9c57600080fd5b81516114ce81614fe8565b6401e39bb33960dd1b81527503b34b2bba137bc1e91181018101998181019981811160551b60058201527f66696c6c3d226e6f6e652220786d6c6e733d22687474703a2f2f7777772e7733601b8201526e01737b933979918181817b9bb33911608d1b603b8201527f7374796c653d2277696474683a313030253b6261636b67726f756e643a233030604a82015262181d9160e91b606a820152601f60f91b606d8201527f3c726563742077696474683d2233303022206865696768743d22333030222066606e8201526b34b6361e911198181811179f60a11b608e8201528151600090615c9c81609a850160208701615075565b651e17b9bb339f60d11b609a93909101928301525060a001919050565b60008651615ccb818460208b01615075565b865190830190615cdf818360208b01615075565b8651910190615cf2818360208a01615075565b8551910190615d05818360208901615075565b8451910190615d18818360208801615075565b01979650505050505050565b60008351615d36818460208801615075565b621e339f60e91b9083019081528351615d56816003840160208801615075565b631e17b39f60e11b60039290910191820152600701949350505050565b607b60f81b81526e113a3930b4ba2fba3cb832911d101160891b60018201528351600090615da8816010850160208901615075565b6b1116113b30b63ab2911d101160a11b6010918401918201528451615dd481601c840160208901615075565b61227d60f01b601c92909101918201528351615df781601e840160208801615075565b01601e0195945050505050565b60008651615e16818460208b01615075565b681e3932b1ba103c1e9160b91b9083019081528651615e3c816009840160208b01615075565b6411103c9e9160d91b600992909101918201528551615e6281600e840160208a01615075565b6711103334b6361e9160c11b600e92909101918201528451615e8b816016840160208901615075565b6f11103334b63616b7b830b1b4ba3c9e9160811b601692909101918201528351615ebc816026840160208801615075565b7f222077696474683d223622206865696768743d2236222072783d222e363922206026929091019182015269393c9e91171b1c91179f60b11b604682015260500197965050505050505056fe455243373231415f5f496e697469616c697a61626c653a20636f6e74726163744142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3eff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce7a264697066735822122045484dba23d11184499e6f295250b8ec057b6d85898664b1ea8fedec7a45221664736f6c63430008110033

Deployed Bytecode

0x6080604052600436106102025760003560e01c806301ffc9a71461020757806304634d8d1461023c57806306fdde031461025e578063081812fc14610280578063095ea7b3146102ad578063105739b8146102c057806318160ddd146102d557806323b872dd146102f85780632a55205a1461030b5780633ccfd60b1461034a57806342842e0e1461035f5780634c3b0289146103725780634eb6b49914610387578063506f0ab2146103a757806354050c75146103c757806358ac8eef146103e75780635bbb2177146104075780636329a06f146104345780636352211e146104625780636817c76c146104825780636d41d4fb1461049857806370a08231146104c6578063715018a6146104e6578063742f0a62146104fb5780638129fc1c1461051057806381378c30146105255780638462151c146105455780638737fbb2146105725780638da5cb5b146105925780638dbb02fa146105a757806394bf804d146105c657806395d89b41146105d957806399a2557a146105ee5780639c6e0a671461060e5780639e2b233a1461062e578063a22cb4651461065f578063b0b68b331461067f578063b88d4fde1461069f578063c23dc68f146106b2578063c87b56dd146106df578063db44f7cb146106ff578063e985e9c51461071f578063f2fde38b1461073f578063fbde0e561461075f578063fdfc7aae14610798575b600080fd5b34801561021357600080fd5b50610227610222366004614ffe565b6107b2565b60405190151581526020015b60405180910390f35b34801561024857600080fd5b5061025c610257366004615032565b6107d2565b005b34801561026a57600080fd5b506102736107e8565b60405161023391906150c5565b34801561028c57600080fd5b506102a061029b3660046150d8565b610883565b60405161023391906150f1565b61025c6102bb366004615105565b6108d0565b3480156102cc57600080fd5b5061025c6108e9565b3480156102e157600080fd5b506102ea610905565b604051908152602001610233565b61025c61030636600461512f565b610925565b34801561031757600080fd5b5061032b61032636600461516b565b610950565b604080516001600160a01b039093168352602083019190915201610233565b34801561035657600080fd5b5061025c6109fe565b61025c61036d36600461512f565b610a35565b34801561037e57600080fd5b5061025c610a5a565b34801561039357600080fd5b5061025c6103a236600461522a565b610a7f565b3480156103b357600080fd5b506102736103c23660046150d8565b610a9a565b3480156103d357600080fd5b5060fc546102279062010000900460ff1681565b3480156103f357600080fd5b506102736104023660046150d8565b610b46565b34801561041357600080fd5b50610427610422366004615345565b610b60565b60405161023391906153c2565b34801561044057600080fd5b506102ea61044f3660046150d8565b6101026020526000908152604090205481565b34801561046e57600080fd5b506102a061047d3660046150d8565b610c12565b34801561048e57600080fd5b506102ea60fd5481565b3480156104a457600080fd5b506102ea6104b3366004615404565b6101036020526000908152604090205481565b3480156104d257600080fd5b506102ea6104e1366004615404565b610c1d565b3480156104f257600080fd5b5061025c610c85565b34801561050757600080fd5b5061025c610c99565b34801561051c57600080fd5b5061025c610cc0565b34801561053157600080fd5b5061025c61054036600461522a565b610de8565b34801561055157600080fd5b50610565610560366004615404565b610e03565b604051610233919061541f565b34801561057e57600080fd5b5061025c61058d366004615457565b610ee9565b34801561059e57600080fd5b506102a06111af565b3480156105b357600080fd5b5060fc5461022790610100900460ff1681565b61025c6105d4366004615483565b6111be565b3480156105e557600080fd5b50610273611337565b3480156105fa57600080fd5b506105656106093660046154af565b61134f565b34801561061a57600080fd5b5061025c6106293660046154e2565b6114d5565b34801561063a57600080fd5b5061027360405180604001604052806005815260200164576869746560d81b81525081565b34801561066b57600080fd5b5061025c61067a36600461553b565b611541565b34801561068b57600080fd5b5061025c61069a366004615567565b611555565b61025c6106ad3660046155bd565b611835565b3480156106be57600080fd5b506106d26106cd3660046150d8565b611862565b6040516102339190615638565b3480156106eb57600080fd5b506102736106fa3660046150d8565b6118b7565b34801561070b57600080fd5b5061027361071a3660046150d8565b611a69565b34801561072b57600080fd5b5061022761073a366004615646565b611a79565b34801561074b57600080fd5b5061025c61075a366004615404565b611ab6565b34801561076b57600080fd5b5061077f61077a36600461516b565b611b2c565b6040516001600160f81b03199091168152602001610233565b3480156107a457600080fd5b5060fc546102279060ff1681565b60006107bd82611b70565b806107cc57506107cc82611bbe565b92915050565b6107da611bf3565b6107e48282611c52565b5050565b60606107f2611d4b565b600201805461080090615670565b80601f016020809104026020016040519081016040528092919081815260200182805461082c90615670565b80156108795780601f1061084e57610100808354040283529160200191610879565b820191906000526020600020905b81548152906001019060200180831161085c57829003601f168201915b5050505050905090565b600061088e82611d6f565b6108ab576040516333d1c03960e21b815260040160405180910390fd5b6108b3611d4b565b60009283526006016020525060409020546001600160a01b031690565b816108da81611db8565b6108e48383611e60565b505050565b6108f1611bf3565b60fc805460ff19811660ff90911615179055565b60006001610911611d4b565b6001015461091d611d4b565b540303919050565b826001600160a01b038116331461093f5761093f33611db8565b61094a848484611e6c565b50505050565b60008281526034602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916109c55750604080518082019091526033546001600160a01b0381168252600160a01b90046001600160601b031660208201525b6020810151600090612710906109e4906001600160601b0316876156c0565b6109ee91906156ed565b91519350909150505b9250929050565b610a06611bf3565b60405133904780156108fc02916000818181858888f19350505050158015610a32573d6000803e3d6000fd5b50565b826001600160a01b0381163314610a4f57610a4f33611db8565b61094a848484612053565b610a62611bf3565b60fc805461ff001981166101009182900460ff1615909102179055565b610a87611bf3565b80516107e49060ff906020840190614ee9565b60ff8181548110610aaa57600080fd5b906000526020600020016000915090508054610ac590615670565b80601f0160208091040260200160405190810160405280929190818152602001828054610af190615670565b8015610b3e5780601f10610b1357610100808354040283529160200191610b3e565b820191906000526020600020905b815481529060010190602001808311610b2157829003601f168201915b505050505081565b6101016020526000908152604090208054610ac590615670565b6060816000816001600160401b03811115610b7d57610b7d61518d565b604051908082528060200260200182016040528015610bb657816020015b610ba3614f3b565b815260200190600190039081610b9b5790505b50905060005b828114610c0957610be4868683818110610bd857610bd8615701565b90506020020135611862565b828281518110610bf657610bf6615701565b6020908102919091010152600101610bbc565b50949350505050565b60006107cc8261206e565b60006001600160a01b038216610c46576040516323d3ad8160e21b815260040160405180910390fd5b6001600160401b03610c56611d4b565b6005016000846001600160a01b03166001600160a01b0316815260200190815260200160002054169050919050565b610c8d611bf3565b610c97600061211b565b565b610ca1611bf3565b60fc805462ff0000198116620100009182900460ff1615909102179055565b600054610100900460ff1615808015610ce05750600054600160ff909116105b80610d015750610cef3061216d565b158015610d01575060005460ff166001145b610d265760405162461bcd60e51b8152600401610d1d90615717565b60405180910390fd5b6000805460ff191660011790558015610d49576000805461ff0019166101001790555b610d986040518060400160405280600b81526020016a5479706520426c6f636b7360a81b8152506040518060400160405280600a81526020016954595045424c4f434b5360b01b81525061217c565b60fc805462ffffff191660011790556618838370f3400060fd558015610a32576000805461ff001916905560405160018152600080516020615f698339815191529060200160405180910390a150565b610df0611bf3565b80516107e49060fe906020840190614ee9565b60606000806000610e1385610c1d565b90506000816001600160401b03811115610e2f57610e2f61518d565b604051908082528060200260200182016040528015610e58578160200160208202803683370190505b509050610e63614f3b565b60015b838614610edd57610e7681612365565b91508160400151610ed55781516001600160a01b031615610e9657815194505b876001600160a01b0316856001600160a01b031603610ed55780838780600101985081518110610ec857610ec8615701565b6020026020010181815250505b600101610e66565b50909695505050505050565b610ef1612390565b60fc5462010000900460ff16610f2f5760405162461bcd60e51b815260206004820152600360248201526245303560e81b6044820152606401610d1d565b33610f3984610c12565b6001600160a01b031614610f5f5760405162461bcd60e51b8152600401610d1d90615765565b33610f6983610c12565b6001600160a01b031614610f8f5760405162461bcd60e51b8152600401610d1d90615765565b60038110610fc55760405162461bcd60e51b815260206004820152600360248201526222981b60e91b6044820152606401610d1d565b6000610fd0846123e9565b90506000610fdd846123e9565b80548060200260200160405190810160405280929190818152602001828054801561104f57602002820191906000526020600020906000905b825461010083900a900460f81b6001600160f81b0319168152602060019283018181049485019490930390920291018084116110165790505b505050505090508051828054905014801561106c57508154600510155b61109e5760405162461bcd60e51b815260206004820152600360248201526245303760e81b6044820152606401610d1d565b826000036110ce576110ae612488565b600086815261010160205260409020906110c890826157c8565b50611178565b826001036110e4576110df856124dc565b611178565b815460041461111b5760405162461bcd60e51b815260206004820152600360248201526208a60760eb1b6044820152606401610d1d565b60405180604001604052806005815260200164576869746560d81b8152506101016000878152602001908152602001600020908161115991906157c8565b50611164828261264a565b61116d856124dc565b6111783360016126d5565b611181846127eb565b604051858152600080516020615fa9833981519152906020015b60405180910390a150506108e4600160c955565b6097546001600160a01b031690565b6111c6612390565b60fc5460ff166111fe5760405162461bcd60e51b815260206004820152600360248201526245313160e81b6044820152606401610d1d565b600082116112345760405162461bcd60e51b815260206004820152600360248201526222989960e91b6044820152606401610d1d565b336001600160a01b038216036112725760405162461bcd60e51b815260206004820152600360248201526204531360ec1b6044820152606401610d1d565b60fd5461127f90836156c0565b3410156112bf5760405162461bcd60e51b815260206004820152600e60248201526d09cdee840cadcdeeaced040cae8d60931b6044820152606401610d1d565b336000908152610103602052604090205480156112ec573360009081526101036020526040812055918201915b6112f633846126d5565b600283111561132c5761130a6003846156ed565b6001600160a01b03831660009081526101036020526040902080548201905590505b506107e4600160c955565b6060611341611d4b565b600301805461080090615670565b606081831061137157604051631960ccad60e11b815260040160405180910390fd5b60008061137c6127f6565b9050600185101561138c57600194505b80841115611398578093505b60006113a387610c1d565b9050848610156113c257858503818110156113bc578091505b506113c6565b5060005b6000816001600160401b038111156113e0576113e061518d565b604051908082528060200260200182016040528015611409578160200160208202803683370190505b5090508160000361141f5793506114ce92505050565b600061142a88611862565b90506000816040015161143b575080515b885b88811415801561144d5750848714155b156114c25761145b81612365565b925082604001516114ba5782516001600160a01b03161561147b57825191505b8a6001600160a01b0316826001600160a01b0316036114ba57808488806001019950815181106114ad576114ad615701565b6020026020010181815250505b60010161143d565b50505092835250909150505b9392505050565b6114dd611bf3565b60005b8281101561094a5781610103600086868581811061150057611500615701565b90506020020160208101906115159190615404565b6001600160a01b031681526020810191909152604001600020558061153981615887565b9150506114e0565b8161154b81611db8565b6108e48383612806565b61155d612390565b60fc54610100900460ff1661159a5760405162461bcd60e51b815260206004820152600360248201526245303160e81b6044820152606401610d1d565b600182116115d05760405162461bcd60e51b815260206004820152600360248201526222981960e91b6044820152606401610d1d565b6000805b8381101561166c57336115fe8686848181106115f2576115f2615701565b90506020020135610c12565b6001600160a01b0316146116245760405162461bcd60e51b8152600401610d1d90615765565b600061164786868481811061163b5761163b615701565b905060200201356123e9565b805490915061165690846158a0565b925050808061166490615887565b9150506115d4565b50600581106116a35760405162461bcd60e51b8152602060048201526003602482015262114c0d60ea1b6044820152606401610d1d565b60006116bb8585600081811061163b5761163b615701565b905060015b848110156117925760006116df87878481811061163b5761163b615701565b905060005b815481101561175d578382828154811061170057611700615701565b60009182526020808320818304015484546001810186559484529281902090840401805460ff601f93841661010090810a90950481169590931690930a93840291909302199091161790558061175581615887565b9150506116e4565b5061177f87878481811061177357611773615701565b905060200201356127eb565b508061178a81615887565b9150506116c0565b50826117db576117a0612883565b6101016000878760008181106117b8576117b8615701565b90506020020135815260200190815260200160002090816117d991906157c8565b505b6117fd858560008181106117f1576117f1615701565b905060200201356124dc565b600080516020615fa98339815191528585600081811061181f5761181f615701565b9050602002013560405161119b91815260200190565b836001600160a01b038116331461184f5761184f33611db8565b61185b85858585612981565b5050505050565b61186a614f3b565b611872614f3b565b600183108061188857506118846127f6565b8310155b156118935792915050565b61189c83612365565b90508060400151156118ae5792915050565b6114ce836129c5565b60606118c16129de565b8211156118e157604051630a14c4b560e41b815260040160405180910390fd5b6000828152610100602090815260408083208054825181850281018501909352808352919290919083018282801561196057602002820191906000526020600020906000905b825461010083900a900460f81b6001600160f81b0319168152602060019283018181049485019490930390920291018084116119275790505b50505050509050805160000361197c57611979836129f1565b90505b600083815261010160205260408120805461199690615670565b80601f01602080910402602001604051908101604052809291908181526020018280546119c290615670565b8015611a0f5780601f106119e457610100808354040283529160200191611a0f565b820191906000526020600020905b8154815290600101906020018083116119f257829003601f168201915b50505050509050611a1f81612a41565b611a415750604080518082019091526005815264576869746560d81b60208201525b611a61848383610102600089815260200190815260200160002054612a5b565b949350505050565b60fe8181548110610aaa57600080fd5b6000611a83611d4b565b6001600160a01b039384166000908152600791909101602090815260408083209490951682529290925250205460ff1690565b611abe611bf3565b6001600160a01b038116611b235760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d1d565b610a328161211b565b6101006020528160005260406000208181548110611b4957600080fd5b9060005260206000209060209182820401919006915091509054906101000a900460f81b81565b60006301ffc9a760e01b6001600160e01b031983161480611ba157506380ac58cd60e01b6001600160e01b03198316145b806107cc5750506001600160e01b031916635b5e139f60e01b1490565b60006001600160e01b0319821663152a902d60e11b14806107cc57506301ffc9a760e01b6001600160e01b03198316146107cc565b33611bfc6111af565b6001600160a01b031614610c975760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d1d565b6127106001600160601b0382161115611cc05760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610d1d565b6001600160a01b038216611d125760405162461bcd60e51b815260206004820152601960248201527822a921991c9c189d1034b73b30b634b2103932b1b2b4bb32b960391b6044820152606401610d1d565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217603355565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4090565b600081600111158015611d895750611d85611d4b565b5482105b80156107cc5750600160e01b611d9d611d4b565b60008481526004919091016020526040902054161592915050565b6daaeb6d7670e522a718067333cd4e3b15610a3257604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c617113490611e0090309085906004016158b3565b602060405180830381865afa158015611e1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e4191906158cd565b610a325780604051633b79c77360e21b8152600401610d1d91906150f1565b6107e482826001612ae2565b6000611e778261206e565b9050836001600160a01b0316816001600160a01b031614611eaa5760405162a1148160e81b815260040160405180910390fd5b600080611eb684612b97565b91509150611edb8187611ec63390565b6001600160a01b039081169116811491141790565b611f0657611ee98633611a79565b611f0657604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516611f2d57604051633a954ecd60e21b815260040160405180910390fd5b8015611f3857600082555b611f40611d4b565b6001600160a01b0387166000908152600591909101602052604090208054600019019055611f6c611d4b565b6001600160a01b03861660009081526005919091016020526040902080546001019055611f9d85600160e11b612bbf565b611fa5611d4b565b60008681526004919091016020526040812091909155600160e11b8416900361201b5760018401611fd4611d4b565b60008281526004919091016020526040812054900361201957611ff5611d4b565b5481146120195783612005611d4b565b600083815260049190910160205260409020555b505b83856001600160a01b0316876001600160a01b0316600080516020615f8983398151915260405160405180910390a45b505050505050565b6108e483838360405180602001604052806000815250611835565b60008160011161210257612080611d4b565b600083815260049190910160205260408120549150600160e01b8216900361210257806000036120fd576120b2611d4b565b5482106120d257604051636f96cda160e11b815260040160405180910390fd5b6120da611d4b565b6000199092016000818152600493909301602052604090922054905080156120d2575b919050565b604051636f96cda160e11b815260040160405180910390fd5b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03163b151590565b612184612bd4565b54610100900460ff166121a357612199612bd4565b5460ff16156121a7565b303b155b6122015760405162461bcd60e51b81526020600482015260376024820152600080516020615f09833981519152604482015276081a5cc8185b1c9958591e481a5b9a5d1a585b1a5e9959604a1b6064820152608401610d1d565b600061220b612bd4565b54610100900460ff161590508015612257576001612227612bd4565b80549115156101000261ff00199092169190911790556001612247612bd4565b805460ff19169115159190911790555b600054610100900460ff16158080156122775750600054600160ff909116105b8061229857506122863061216d565b158015612298575060005460ff166001145b6122b45760405162461bcd60e51b8152600401610d1d90615717565b6000805460ff1916600117905580156122d7576000805461ff0019166101001790555b6122e18484612bf8565b6122e9612c2f565b6122f1612c56565b6122f9612c85565b6123053361014a611c52565b8015612339576000805461ff001916905560405160018152600080516020615f698339815191529060200160405180910390a15b5080156108e457600061234a612bd4565b80549115156101000261ff0019909216919091179055505050565b61236d614f3b565b6107cc612378611d4b565b60008481526004919091016020526040902054612ccb565b600260c954036123e25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d1d565b600260c955565b600081815261010060205260408120805482036107cc57600061240b846129f1565b905060005b8151811015612480578282828151811061242c5761242c615701565b6020908102919091018101518254600181018455600093845292829020918304909101805460ff601f9094166101000a938402191660f89290921c929092021790558061247881615887565b915050612410565b505092915050565b606061249860fb80546001019055565b60006124b76124a660fb5490565b6124b090426158a0565b6064612d0e565b905060508110156124d0576124ca612883565b91505090565b6124ca612d5d565b5090565b60006124e7826123e9565b905060005b81548110156126305761250360fb80546001019055565b60008161252e61251260fb5490565b61251c90426158a0565b85546125299086906158ea565b612d0e565b61253891906158a0565b9050600083828154811061254e5761254e615701565b90600052602060002090602091828204019190069054906101000a900460f81b905083838154811061258257612582615701565b90600052602060002090602091828204019190069054906101000a900460f81b8483815481106125b4576125b4615701565b90600052602060002090602091828204019190066101000a81548160ff021916908360f81c0217905550808484815481106125f1576125f1615701565b90600052602060002090602091828204019190066101000a81548160ff021916908360f81c02179055505050808061262890615887565b9150506124ec565b505060009081526101026020526040902080546001019055565b61265860fb80546001019055565b600061267761266660fb5490565b61267090426158a0565b8351612d0e565b9050600082828151811061268d5761268d615701565b6020908102919091018101518554600181018755600096875295829020918604909101805460ff601f9097166101000a968702191660f89290921c9590950217909355505050565b60006126df611d4b565b54905060008290036127045760405163b562e8dd60e01b815260040160405180910390fd5b6001600160401b018202612716611d4b565b6001600160a01b038516600090815260059190910160205260409020805491909101905561274a836001841460e11b612bbf565b612752611d4b565b600083815260049190910160205260408120919091556001600160a01b038416908383019083908390600080516020615f898339815191528180a4600183015b8181146127b85780836000600080516020615f89833981519152600080a4600101612792565b50816000036127d957604051622e076360e81b815260040160405180910390fd5b806127e2611d4b565b55506108e49050565b610a32816000612dc2565b6000612800611d4b565b54919050565b8061280f611d4b565b336000818152600792909201602090815260408084206001600160a01b03881680865290835293819020805460ff19169515159590951790945592518415158152919290917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60fe546060906128a55760405162461bcd60e51b8152600401610d1d906158fd565b6128b360fb80546001019055565b60006128d36128c160fb5490565b6128cb90426158a0565b60fe54612d0e565b905060fe81815481106128e8576128e8615701565b9060005260206000200180546128fd90615670565b80601f016020809104026020016040519081016040528092919081815260200182805461292990615670565b80156129765780601f1061294b57610100808354040283529160200191612976565b820191906000526020600020905b81548152906001019060200180831161295957829003601f168201915b505050505091505090565b61298c848484610925565b6001600160a01b0383163b1561094a576129a884848484612f29565b61094a576040516368d2bf6b60e11b815260040160405180910390fd5b6129cd614f3b565b6107cc6129d98361206e565b612ccb565b600060016129ea611d4b565b5403919050565b60606107d08211612a09576107cc8260026003613011565b6117708211612a1f576107cc8260016003613011565b6127108211612a35576107cc8260016002613011565b6107cc82600180613011565b805160009015612a5357506001919050565b506000919050565b60606000612a69858561315a565b90506000612a768761318d565b612a7f8361321f565b612a8b88888b89613371565b604051602001612a9d93929190615936565b6040516020818303038152906040529050612ab78161321f565b604051602001612ac79190615a71565b60405160208183030381529060405292505050949350505050565b6000612aed83610c12565b90508115612b2c57336001600160a01b03821614612b2c57612b0f8133611a79565b612b2c576040516367d9dca160e11b815260040160405180910390fd5b83612b35611d4b565b6000858152600691909101602052604080822080546001600160a01b0319166001600160a01b0394851617905551859287811692908516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259190a450505050565b6000806000612ba4611d4b565b60009485526006016020525050604090912080549092909150565b4260a01b176001600160a01b03919091161790565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f90565b612c00612bd4565b54610100900460ff16612c255760405162461bcd60e51b8152600401610d1d90615ab6565b6107e482826134d4565b600054610100900460ff16610c975760405162461bcd60e51b8152600401610d1d90615af8565b600054610100900460ff16612c7d5760405162461bcd60e51b8152600401610d1d90615af8565b610c97613540565b600054610100900460ff16612cac5760405162461bcd60e51b8152600401610d1d90615af8565b610c97733cc6cdda760b79bafa08df41ecfa224f810dceb66001613570565b612cd3614f3b565b6001600160a01b03821681526001600160401b0360a083901c166020820152600160e01b82161515604082015260e89190911c606082015290565b6000818330604051602001612d3a92919091825260601b6001600160601b031916602082015260340190565b6040516020818303038152906040528051906020012060001c6114ce9190615b43565b60ff54606090612d7f5760405162461bcd60e51b8152600401610d1d906158fd565b612d8d60fb80546001019055565b6000612dad612d9b60fb5490565b612da590426158a0565b60ff54612d0e565b905060ff81815481106128e8576128e8615701565b6000612dcd8361206e565b905080600080612ddc86612b97565b915091508415612e1c57612df1818433611ec6565b612e1c57612dff8333611a79565b612e1c57604051632ce44b5f60e11b815260040160405180910390fd5b8015612e2757600082555b6001600160801b03612e37611d4b565b6001600160a01b0385166000908152600591909101602052604090208054919091019055612e6983600360e01b612bbf565b612e71611d4b565b60008881526004919091016020526040812091909155600160e11b85169003612ee75760018601612ea0611d4b565b600082815260049190910160205260408120549003612ee557612ec1611d4b565b548114612ee55784612ed1611d4b565b600083815260049190910160205260409020555b505b60405186906000906001600160a01b03861690600080516020615f89833981519152908390a4612f15611d4b565b600190810180549091019055505050505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612f5e903390899088908890600401615b57565b6020604051808303816000875af1925050508015612f99575060408051601f3d908101601f19168201909252612f9691810190615b8a565b60015b612ff7573d808015612fc7576040519150601f19603f3d011682016040523d82523d6000602084013e612fcc565b606091505b508051600003612fef576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611a61565b6060600061301f84846158ea565b61302a9060016158a0565b905060018082111561304e57846130418784612d0e565b61304b91906158a0565b90505b6000816001600160401b038111156130685761306861518d565b604051908082528060200260200182016040528015613091578160200160208202803683370190505b50905060005b8281101561314f5760006130c0896130af86856158a0565b6130b991906158a0565b601a612d0e565b90506040518060400160405280601a81526020017920a121a222a323a424a525a626a727a828a929aa2aab2bac2cad60311b815250818151811061310657613106615701565b602001015160f81c60f81b83838151811061312357613123615701565b6001600160f81b031990921660209283029190910190910152508061314781615887565b915050613097565b509695505050505050565b606061316683836136fe565b6040516020016131769190615ba7565b604051602081830303815290604052905092915050565b6060600061319a83613754565b60010190506000816001600160401b038111156131b9576131b961518d565b6040519080825280601f01601f1916602001820160405280156131e3576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846131ed57509392505050565b6060815160000361323e57505060408051602081019091526000815290565b6000604051806060016040528060408152602001615f29604091399050600060038451600261326d91906158a0565b61327791906156ed565b6132829060046156c0565b6001600160401b038111156132995761329961518d565b6040519080825280601f01601f1916602001820160405280156132c3576020820181803683370190505b509050600182016020820185865187015b8082101561332f576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f81168501518453506001830192506132d4565b505060038651066001811461334b576002811461335e57613366565b603d6001830353603d6002830353613366565b603d60018303535b509195945050505050565b60606133be604051806040016040528060078152602001664c65747465727360c81b81525061339f8761382a565b604051806040016040528060018152602001600b60fa1b81525061383a565b6133ee6040518060400160405280600a8152602001694368617261637465727360b01b81525061339f885161318d565b61342f6040518060400160405280600581526020016421b7b637b960d91b81525087604051806040016040528060018152602001600b60fa1b81525061383a565b6134666040518060400160405280600a8152602001694d696e7420506861736560b01b81525061339f61346189613869565b61318d565b6134a76040518060400160405280600781526020016653687566666c6560c81b8152506134928861318d565b6040518060200160405280600081525061383a565b6040516020016134bb959493929190615cb9565b6040516020818303038152906040529050949350505050565b6134dc612bd4565b54610100900460ff166135015760405162461bcd60e51b8152600401610d1d90615ab6565b8161350a611d4b565b6002019061351890826157c8565b5080613522611d4b565b6003019061353090826157c8565b50600161353b611d4b565b555050565b600054610100900460ff166135675760405162461bcd60e51b8152600401610d1d90615af8565b610c973361211b565b600054610100900460ff166135975760405162461bcd60e51b8152600401610d1d90615af8565b6daaeb6d7670e522a718067333cd4e3b156107e45760405163c3c5a54760e01b81526daaeb6d7670e522a718067333cd4e9063c3c5a547906135dd9030906004016150f1565b6020604051808303816000875af11580156135fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061362091906158cd565b6107e457801561368b57604051633e9f1edf60e11b81526daaeb6d7670e522a718067333cd4e90637d3e3dbe9061365d90309086906004016158b3565b600060405180830381600087803b15801561367757600080fd5b505af115801561204b573d6000803e3d6000fd5b6001600160a01b038216156136cd5760405163a0af290360e01b81526daaeb6d7670e522a718067333cd4e9063a0af29039061365d90309086906004016158b3565b604051632210724360e11b81526daaeb6d7670e522a718067333cd4e90634420e4869061365d9030906004016150f1565b606060005b600581101561374d5781613718828686613895565b604051602001613729929190615d24565b6040516020818303038152906040529150808061374590615887565b915050613703565b5092915050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106137935772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6904ee2d6d415b85acef8160201b83106137bd576904ee2d6d415b85acef8160201b830492506020015b662386f26fc1000083106137db57662386f26fc10000830492506010015b6305f5e10083106137f3576305f5e100830492506008015b612710831061380757612710830492506004015b60648310613819576064830492506002015b600a83106107cc5760010192915050565b6060816114ce8160016000613a8c565b606083838360405160200161385193929190615d73565b60405160208183030381529060405290509392505050565b60006107d0821161387c57506001919050565b611770821161388d57506002919050565b506003919050565b606060006138a46028866156c0565b6138af9060d56158ea565b604080518082019091526004815263302e303960e01b60208201528551919250607e91600190600090158015906138e65750875189105b1561392057878960018a516138fb91906158ea565b61390591906158ea565b8151811061391557613915615701565b602002602001015190505b60005b6007811015613a7f5760005b6005811015613a6c5760006139458260076156c0565b61394f90896158a0565b9050600061395e8460076156c0565b61396890896158a0565b9050600061397586613add565b905060005b6014811015613a145760405180604001604052806004815260200163302e303960e01b81525098508181601481106139b4576139b4615701565b602002015160ff1615613a14578181601481106139d3576139d3615701565b602002015160ff168803613a0257604051806040016040528060018152602001603160f81b8152509850613a14565b80613a0c81615887565b91505061397a565b508a613a1f8461318d565b613a288461318d565b8e8b604051602001613a3e959493929190615e04565b60408051601f198184030181529190529a505060019095019450819050613a6481615887565b91505061392f565b5080613a7781615887565b915050613923565b5050505050509392505050565b60608084516020860160208202810160405193508683028452602084019250815b81811015613ac7578051871b845292870192602001613aad565b505050601f01601f191660405290509392505050565b613ae5614f62565b6001600160f81b03198216604160f81b03613ba15750506040805161028081018252600281526003602082015260049181019190915260066060820152600a6080820152600b60a0820152600f60c0820152601060e08201526014610100820152601561012082015260166101408201526017610160820152601861018082015260196101a0820152601a6101c0820152601e6101e0820152601f61020082015260236102208201526000610240820181905261026082015290565b6001600160f81b03198216602160f91b03613c6257505060408051610280810182526001815260026020808301919091526003928201929092526004606082015260066080820152600a60a0820152600b60c0820152600f60e08201526010610100820152601161012082015260126101408201526013610160820152601561018082015260196101a0820152601a6101c0820152601e6101e0820152601f6102008201526102208101919091526021610240820152602261026082015290565b6001600160f81b03198216604360f81b03613d23575050604080516102808101825260028152600360208083019190915260049282019290925260066060820152600a6080820152600b60a0820152601060c0820152601560e0820152601a610100820152601e6101208201526101408101919091526021610160820152602261018082015260006101a082018190526101c082018190526101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216601160fa1b03613de457505060408051610280810182526001815260026020808301919091526003928201929092526004606082015260066080820152600a60a0820152600b60c0820152600f60e08201526010610100820152601461012082015260156101408201526019610160820152601a610180820152601e6101a0820152601f6101c08201526101e0810191909152602161020082015260226102208201526000610240820181905261026082015290565b6001600160f81b03198216604560f81b03613ea557505060408051610280810182526001815260026020808301919091526003928201929092526004606082015260056080820152600660a0820152600b60c0820152601060e08201526011610100820152601261012082015260136101408201526015610160820152601a610180820152601f6101a08201526101c081019190915260216101e0820152602261020082015260236102208201526000610240820181905261026082015290565b6001600160f81b03198216602360f91b03613f61575050604080516102808101825260018152600260208201526003918101919091526004606082015260056080820152600660a0820152600b60c0820152601060e08201526011610100820152601261012082015260136101408201526015610160820152601a610180820152601f6101a082015260006101c082018190526101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216604760f81b03614022575050604080516102808101825260028152600360208083019190915260049282019290925260066060820152600a6080820152600b60a0820152601060c0820152601560e082015260186101008201526019610120820152601a610140820152601e61016082015261018081019190915260216101a082015260226101c082015260006101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216600960fb1b036140de57505060408051610280810182526001815260056020820152600691810191909152600a6060820152600b6080820152600f60a0820152601060c0820152601160e082015260126101008201526013610120820152601461014082015260156101608201526019610180820152601a6101a0820152601e6101c0820152601f6101e0820152602361020082015260006102208201819052610240820181905261026082015290565b6001600160f81b03198216604960f81b0361419f575050604080516102808101825260028152600360208083019190915260049282019290925260086060820152600d6080820152601260a0820152601760c0820152601c60e0820152610100810191909152602161012082015260226101408201526000610160820181905261018082018190526101a082018190526101c082018190526101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216602560f91b0361426057505060408051610280810182526002815260036020808301919091526004928201929092526005606082015260096080820152600e60a0820152601360c0820152601860e0820152601a610100820152601d6101208201526101408101919091526021610160820152600061018082018190526101a082018190526101c082018190526101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216604b60f81b0361431c5750506040805161028081018252600181526005602082015260069181019190915260096060820152600b6080820152600d60a0820152601060c0820152601160e082015260156101008201526017610120820152601a610140820152601d610160820152601f61018082015260236101a082015260006101c082018190526101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216601360fa1b036143dd5750506040805161028081018252600181526006602080830191909152600b928201929092526010606082015260156080820152601a60a0820152601f60c082015260e08101919091526021610100820152602261012082015260236101408201526000610160820181905261018082018190526101a082018190526101c082018190526101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216604d60f81b03614499575050604080516102808101825260018152600560208201526006918101919091526007606082015260096080820152600a60a0820152600b60c0820152600d60e0820152600f6101008201526010610120820152601461014082015260156101608201526019610180820152601a6101a0820152601e6101c0820152601f6101e0820152602361020082015260006102208201819052610240820181905261026082015290565b6001600160f81b03198216602760f91b036145555750506040805161028081018252600181526005602082015260069181019190915260076060820152600a6080820152600b60a0820152600d60c0820152600f60e082015260106101008201526013610120820152601461014082015260156101608201526019610180820152601a6101a0820152601e6101c0820152601f6101e0820152602361020082015260006102208201819052610240820181905261026082015290565b6001600160f81b03198216604f60f81b03614616575050604080516102808101825260028152600360208083019190915260049282019290925260066060820152600a6080820152600b60a0820152600f60c0820152601060e0820152601461010082015260156101208201526019610140820152601a610160820152601e6101808201526101a081019190915260216101c082015260226101e0820152600061020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216600560fc1b036146d2575050604080516102808101825260018152600260208201526003918101919091526004606082015260066080820152600a60a0820152600b60c0820152600f60e082015260106101008201526011610120820152601261014082015260136101608201526015610180820152601a6101a0820152601f6101c082015260006101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216605160f81b03614793575050604080516102808101825260028152600360208083019190915260049282019290925260066060820152600a6080820152600b60a0820152600f60c0820152601060e08201526014610100820152601561012082015260176101408201526019610160820152601a610180820152601d6101a0820152601e6101c08201526101e0810191909152602161020082015260226102208201526023610240820152600061026082015290565b6001600160f81b03198216602960f91b0361484f575050604080516102808101825260018152600260208201526003918101919091526004606082015260066080820152600a60a0820152600b60c0820152600f60e08201526010610100820152601161012082015260126101408201526013610160820152601561018082015260176101a0820152601a6101c0820152601d6101e0820152601f61020082015260236102208201526000610240820181905261026082015290565b6001600160f81b03198216605360f81b03614910575050604080516102808101825260028152600360208083019190915260049282019290925260066060820152600a6080820152600b60a0820152601160c0820152601260e082015260136101008201526019610120820152601a610140820152601e61016082015261018081019190915260216101a082015260226101c082015260006101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216601560fa1b036149cc575050604080516102808101825260018152600260208201526003918101919091526004606082015260056080820152600860a0820152600d60c0820152601260e08201526017610100820152601c61012082015260216101408201526000610160820181905261018082018190526101a082018190526101c082018190526101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216605560f81b03614a8d5750506040805161028081018252600181526005602080830191909152600692820192909252600a6060820152600b6080820152600f60a0820152601060c0820152601460e082015260156101008201526019610120820152601a610140820152601e61016082015261018081019190915260216101a082015260226101c082015260006101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216602b60f91b03614b4957505060408051610280810182526001815260056020820152600691810191909152600a6060820152600b6080820152600f60a0820152601060c0820152601460e082015260156101008201526019610120820152601b610140820152601d610160820152602161018082015260006101a082018190526101c082018190526101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216605760f81b03614c0a5750506040805161028081018252600181526005602080830191909152600692820192909252600a6060820152600b6080820152600f60a0820152601060c0820152601460e0820152601561010082015260176101208201526019610140820152601a610160820152601c610180820152601e6101a08201526101c081019190915260226101e0820152600061020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216600b60fb1b03614cc657505060408051610280810182526001815260056020820152600691810191909152600a6060820152600b6080820152600f60a0820152601160c0820152601260e0820152601361010082015260156101208201526019610140820152601a610160820152601e610180820152601f6101a082015260236101c082015260006101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216605960f81b03614d8257505060408051610280810182526001815260056020820152600691810191909152600a6060820152600b6080820152600f60a0820152601160c0820152601260e082015260136101008201526017610120820152601c6101408201526021610160820152600061018082018190526101a082018190526101c082018190526101e0820181905261020082018190526102208201819052610240820181905261026082015290565b6001600160f81b03198216602d60f91b03614e4357505060408051610280810182526001815260026020808301919091526003928201929092526004606082015260056080820152600a60a0820152600e60c0820152601260e08201526016610100820152601a610120820152601f610140820152610160810191909152602161018082015260226101a082015260236101c082015260006101e0820181905261020082018190526102208201819052610240820181905261026082015290565b50506040805161028081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a081018290526101c081018290526101e0810182905261020081018290526102208101829052610240810182905261026081019190915290565b828054828255906000526020600020908101928215614f2f579160200282015b82811115614f2f5782518290614f1f90826157c8565b5091602001919060010190614f09565b506124d8929150614f81565b60408051608081018252600080825260208201819052918101829052606081019190915290565b6040518061028001604052806014906020820280368337509192915050565b808211156124d8576000614f958282614f9e565b50600101614f81565b508054614faa90615670565b6000825580601f10614fba575050565b601f016020900490600052602060002090810190610a3291905b808211156124d85760008155600101614fd4565b6001600160e01b031981168114610a3257600080fd5b60006020828403121561501057600080fd5b81356114ce81614fe8565b80356001600160a01b03811681146120fd57600080fd5b6000806040838503121561504557600080fd5b61504e8361501b565b915060208301356001600160601b038116811461506a57600080fd5b809150509250929050565b60005b83811015615090578181015183820152602001615078565b50506000910152565b600081518084526150b1816020860160208601615075565b601f01601f19169290920160200192915050565b6020815260006114ce6020830184615099565b6000602082840312156150ea57600080fd5b5035919050565b6001600160a01b0391909116815260200190565b6000806040838503121561511857600080fd5b6151218361501b565b946020939093013593505050565b60008060006060848603121561514457600080fd5b61514d8461501b565b925061515b6020850161501b565b9150604084013590509250925092565b6000806040838503121561517e57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156151cb576151cb61518d565b604052919050565b60006001600160401b038311156151ec576151ec61518d565b6151ff601f8401601f19166020016151a3565b905082815283838301111561521357600080fd5b828260208301376000602084830101529392505050565b6000602080838503121561523d57600080fd5b82356001600160401b038082111561525457600080fd5b818501915085601f83011261526857600080fd5b81358181111561527a5761527a61518d565b8060051b6152898582016151a3565b91825283810185019185810190898411156152a357600080fd5b86860192505b838310156152f4578235858111156152c15760008081fd5b8601603f81018b136152d35760008081fd5b6152e48b89830135604084016151d3565b83525091860191908601906152a9565b9998505050505050505050565b60008083601f84011261531357600080fd5b5081356001600160401b0381111561532a57600080fd5b6020830191508360208260051b85010111156109f757600080fd5b6000806020838503121561535857600080fd5b82356001600160401b0381111561536e57600080fd5b61537a85828601615301565b90969095509350505050565b80516001600160a01b031682526020808201516001600160401b03169083015260408082015115159083015260609081015162ffffff16910152565b6020808252825182820181905260009190848201906040850190845b81811015610edd576153f1838551615386565b92840192608092909201916001016153de565b60006020828403121561541657600080fd5b6114ce8261501b565b6020808252825182820181905260009190848201906040850190845b81811015610edd5783518352928401929184019160010161543b565b60008060006060848603121561546c57600080fd5b505081359360208301359350604090920135919050565b6000806040838503121561549657600080fd5b823591506154a66020840161501b565b90509250929050565b6000806000606084860312156154c457600080fd5b6154cd8461501b565b95602085013595506040909401359392505050565b6000806000604084860312156154f757600080fd5b83356001600160401b0381111561550d57600080fd5b61551986828701615301565b909790965060209590950135949350505050565b8015158114610a3257600080fd5b6000806040838503121561554e57600080fd5b6155578361501b565b9150602083013561506a8161552d565b60008060006040848603121561557c57600080fd5b83356001600160401b0381111561559257600080fd5b61559e86828701615301565b90945092505060208401356155b28161552d565b809150509250925092565b600080600080608085870312156155d357600080fd5b6155dc8561501b565b93506155ea6020860161501b565b92506040850135915060608501356001600160401b0381111561560c57600080fd5b8501601f8101871361561d57600080fd5b61562c878235602084016151d3565b91505092959194509250565b608081016107cc8284615386565b6000806040838503121561565957600080fd5b6156628361501b565b91506154a66020840161501b565b600181811c9082168061568457607f821691505b6020821081036156a457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176107cc576107cc6156aa565b634e487b7160e01b600052601260045260246000fd5b6000826156fc576156fc6156d7565b500490565b634e487b7160e01b600052603260045260246000fd5b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60208082526003908201526245303360e81b604082015260600190565b601f8211156108e457600081815260208120601f850160051c810160208610156157a95750805b601f850160051c820191505b8181101561204b578281556001016157b5565b81516001600160401b038111156157e1576157e161518d565b6157f5816157ef8454615670565b84615782565b602080601f83116001811461582a57600084156158125750858301515b600019600386901b1c1916600185901b17855561204b565b600085815260208120601f198616915b828110156158595788860151825594840194600190910190840161583a565b50858210156158775787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018201615899576158996156aa565b5060010190565b808201808211156107cc576107cc6156aa565b6001600160a01b0392831681529116602082015260400190565b6000602082840312156158df57600080fd5b81516114ce8161552d565b818103818111156107cc576107cc6156aa565b60208082526003908201526245303960e81b604082015260600190565b6000815161592c818560208601615075565b9290920192915050565b607b60f81b8152740113730b6b2911d10112a3cb83290213637b1b5b99605d1b60018201528351600090615971816016850160208901615075565b61088b60f21b60169184019182018190527f226465736372697074696f6e223a202254686520417274204f6620426c6f636b6018830152790b08151a1948109b1bd8dadcc813d988105c9d1ddbdc9acb888b60321b60388301526801134b6b0b3b2911d160bd1b60528301527a0899185d184e9a5b5859d94bdcdd99cade1b5b0ed8985cd94d8d0b602a1b605b8301528551615a14816076850160208a01615075565b6076920191820152615a67615a5a615a4d615a47607885016e2261747472696275746573223a205b60881b8152600f0190565b8761591a565b605d60f81b815260010190565b607d60f81b815260010190565b9695505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251615aa981601d850160208701615075565b91909101601d0192915050565b6020808252603490820152600080516020615f09833981519152604082015273206973206e6f7420696e697469616c697a696e6760601b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082615b5257615b526156d7565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615a6790830184615099565b600060208284031215615b9c57600080fd5b81516114ce81614fe8565b6401e39bb33960dd1b81527503b34b2bba137bc1e91181018101998181019981811160551b60058201527f66696c6c3d226e6f6e652220786d6c6e733d22687474703a2f2f7777772e7733601b8201526e01737b933979918181817b9bb33911608d1b603b8201527f7374796c653d2277696474683a313030253b6261636b67726f756e643a233030604a82015262181d9160e91b606a820152601f60f91b606d8201527f3c726563742077696474683d2233303022206865696768743d22333030222066606e8201526b34b6361e911198181811179f60a11b608e8201528151600090615c9c81609a850160208701615075565b651e17b9bb339f60d11b609a93909101928301525060a001919050565b60008651615ccb818460208b01615075565b865190830190615cdf818360208b01615075565b8651910190615cf2818360208a01615075565b8551910190615d05818360208901615075565b8451910190615d18818360208801615075565b01979650505050505050565b60008351615d36818460208801615075565b621e339f60e91b9083019081528351615d56816003840160208801615075565b631e17b39f60e11b60039290910191820152600701949350505050565b607b60f81b81526e113a3930b4ba2fba3cb832911d101160891b60018201528351600090615da8816010850160208901615075565b6b1116113b30b63ab2911d101160a11b6010918401918201528451615dd481601c840160208901615075565b61227d60f01b601c92909101918201528351615df781601e840160208801615075565b01601e0195945050505050565b60008651615e16818460208b01615075565b681e3932b1ba103c1e9160b91b9083019081528651615e3c816009840160208b01615075565b6411103c9e9160d91b600992909101918201528551615e6281600e840160208a01615075565b6711103334b6361e9160c11b600e92909101918201528451615e8b816016840160208901615075565b6f11103334b63616b7b830b1b4ba3c9e9160811b601692909101918201528351615ebc816026840160208801615075565b7f222077696474683d223622206865696768743d2236222072783d222e363922206026929091019182015269393c9e91171b1c91179f60b11b604682015260500197965050505050505056fe455243373231415f5f496e697469616c697a61626c653a20636f6e74726163744142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3eff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce7a264697066735822122045484dba23d11184499e6f295250b8ec057b6d85898664b1ea8fedec7a45221664736f6c63430008110033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.