ETH Price: $3,446.63 (-3.73%)

Contract

0x57671d81171f7774E588d36a8121E69dcF547E9d

Overview

ETH Balance

0.45 ETH

ETH Value

$1,550.99 (@ $3,446.63/ETH)

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Amount:Between 1-10
Reset Filter

Transaction Hash
Method
Block
From
To

There are no matching entries

1 Internal Transaction and 1 Token Transfer found.

Latest 1 internal transaction

Parent Transaction Hash Block From To
2071455032024-05-02 18:33:01558 days ago1714674781
0x57671d81...dcF547E9d
9.465 ETH

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GT

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 1000 runs

Other Settings:
paris EvmVersion
File 1 of 15 : GT.sol
// SPDX-License-Identifier: MIT

/* 
   _____       _     _              _______ _     _                 _____           __ 
  / ____|     | |   | |            |__   __(_)   | |               / ____|         /_ |
 | |  __  ___ | | __| | ___ _ __      | |   _  __| | ___  ___     | |  __  ___ _ __ | |
 | | |_ |/ _ \| |/ _` |/ _ \ '_ \     | |  | |/ _` |/ _ \/ __|    | | |_ |/ _ \ '_ \| |
 | |__| | (_) | | (_| |  __/ | | |    | |  | | (_| |  __/\__ \    | |__| |  __/ | | | |
  \_____|\___/|_|\__,_|\___|_| |_|    |_|  |_|\__,_|\___||___/     \_____|\___|_| |_|_|
                                                                                                                                                             
*/

pragma solidity =0.8.20;

// Importing the ERC721AQueryable contract, which extends the ERC721 standard and includes additional querying functionalities.
import "ERC721A/extensions/ERC721AQueryable.sol";

// Importing the Ownable contract from OpenZeppelin, providing basic authorization control functions.
import "@openzeppelin/contracts/access/Ownable.sol";

// Importing the ReentrancyGuard contract from OpenZeppelin to help prevent reentrancy attacks.
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";

// Importing the Strings utility library from OpenZeppelin for string manipulation.
import "@openzeppelin/contracts/utils/Strings.sol";

// Importing the ERC2981 contract from OpenZeppelin, implementing the ERC-2981 standard for royalties on NFT sales.
import "@openzeppelin/contracts/token/common/ERC2981.sol";

contract GT is ERC721AQueryable, ERC2981, Ownable, ReentrancyGuard {
    using Strings for uint256;

    // Receiver of collected contract funds
    address public gen1FundsReceiver;

    // Golden List
    mapping(address => bool) public gen1GoldenListed;
    mapping(address => bool) public gen1GoldenListClaimed;

    // URI Configuration
    string public gen1URIPrefix = "";
    string public gen1Hero12thURIPrefix = "";
    string public gen1URISuffix = ".json";
    string public gen1HiddenMetadataURI;

    // Minting Configuration
    uint256 public gen1Cost = 0.12 ether;
    uint256 public gen1PresaleCost = 0.09 ether;
    uint256 public constant GEN1_MAX_SUPPLY = 11000;
    uint256 public gen1GoldenListClaimedCount;

    // Pause and Reveal State
    bool public paused = true;
    bool public gen1Revealed = false;
    bool public gen1Hero12thRevealed = false;
    bool public gen1Hero12thMintStarted = false;
    bool public gen1SaleStarted = false;

    // Crowdsale Timing
    uint256 public gen1OpeningTime;
    uint256 public gen1ClosingTime;

    // Crowdsale Stages
    enum Gen1Stage {
        Locked,
        Presale,
        PublicSale
    }

    // Events
    event CrowdSaleStarted(uint256 openingTime, uint256 closingTime, string message);
    event GoldenlistUserAdded(address indexed user, string message);
    event GoldenlistUsersAdded(address[100] users, string message);
    event GoldenlistUserRemoved(address indexed user, string message);
    event GoldenlistHeroPackMinted(address indexed recipient, uint256 packSize, string message);
    event HeroPackMinted(address indexed recipient, uint256 packSize, string message);
    event HeroMinted(address indexed recipient, uint256 tokenId, string message);
    event PresaleCostSet(uint256 newPresaleCost, string message);
    event PublicCostSet(uint256 newPublicCost, string message);
    event RoyaltySet(address receiver, uint96 royaltyFeesInBips, string message);
    event TokenRoyaltySet(uint256 tokenId, address receiver, uint96 royaltyFeesInBips, string message);
    event AirdropInitiated(uint256 indexed airdropType, address[] users, string message);
    event TokenGiveAway(address indexed from, address indexed to, uint256 tokenId, string message);

    /**
     * @dev Constructor function to initialize the contract with specified parameters.
     * @param _tokenName The name of the ERC721 token.
     * @param _tokenSymbol The symbol of the ERC721 token.
     * @param _hiddenMetadataUri The URI for hidden metadata before the collection is revealed.
     * @param initialOwner The initial owner of the contract, set as the contract deployer.
     * @param _royaltyFeesInBips The royalty fees in basis points (1 basis point = 0.01%).
     * It represents the percentage of royalties the contract owner receives on each sale.
     */
    constructor(
        string memory _tokenName,
        string memory _tokenSymbol,
        string memory _hiddenMetadataUri,
        address initialOwner,
        address _fundsReceiver,
        uint96 _royaltyFeesInBips
    ) ERC721A(_tokenName, _tokenSymbol) Ownable(initialOwner) ReentrancyGuard() {
        _setGen1HiddenMetadataURI(_hiddenMetadataUri);
        _setRoyalty(msg.sender, _royaltyFeesInBips);
        _setGen1FundsReceiver(_fundsReceiver);
    }

    /**
     * @dev Modifier to enforce compliance with presale minting rules for hero packs.
     * @notice Ensures that the total count of golden-listed packs claimed, when incremented by 3 (hero pack size), does not exceed the presale limit (3,500 packs).
     *         Used in functions that involve presale minting of hero packs.
     */
    modifier gen1PresaleMintHeroPackCompliance() {
        require(gen1GoldenListClaimedCount < 2000, "Presale supply exceeded, sold out!");
        _;
    }

    /**
     * @dev Modifier to enforce compliance with public sale minting rules for hero packs.
     * @notice Ensures that the total supply, when incremented by 3 (hero pack size), does not exceed the maximum limit (11,000 tokens).
     *         Used in functions that involve public sale minting of hero packs.
     */
    modifier gen1PublicMintHeroPackCompliance() {
        require(totalSupply() < GEN1_MAX_SUPPLY, "Max supply exceeded, public sale sold out!");
        _;
    }

    /**
     * @dev Modifier to enforce compliance with public single minting rules.
     * @notice Ensures that the contract is not paused, minting has started, and the total supply does not exceed the maximum limit (12,000 tokens).
     *         Used in functions that involve public single minting.
     */
    modifier gen1Hero12thMintCompliance() {
        require(!paused, "Contract is currently paused!");
        require(gen1Hero12thMintStarted, "Minting not started!");
        require(totalSupply() < 12000, "Max supply exceeded, sold out!");
        _;
    }

    /**
     * @dev Modifier to enforce compliance with presale minting price rules for hero packs.
     * @notice Ensures that the Ether sent with the transaction is equal to or greater than the cost of minting a hero pack during the presale.
     *         Used in functions that involve presale minting of hero packs.
     */
    modifier gen1PresaleMintHeroPackPriceCompliance() {
        require(msg.value >= gen1PresaleCost, "Insufficient funds!");
        _;
    }

    /**
     * @dev Modifier to enforce compliance with public sale minting price rules for hero packs.
     * @notice Ensures that the Ether sent with the transaction is equal to or greater than the cost of minting a hero pack during the public sale.
     *         Used in functions that involve public sale minting of hero packs.
     */
    modifier gen1PublicsaleMintHeroPackPriceCompliance() {
        require(msg.value >= gen1Cost, "Insufficient funds!");
        _;
    }

    /**
     * @dev Modifier to enforce compliance with public single minting price rules.
     * @notice Ensures that the Ether sent with the transaction is equal to or greater than the cost of a single mint.
     *         Used in functions that involve public single minting.
     */
    modifier gen1MintPriceCompliance() {
        require(msg.value >= gen1Cost, "Insufficient funds!");
        _;
    }

    /**
     * @dev Modifier to check various conditions for presale minting.
     * @param abc The address for which presale minting conditions are checked.
     * @notice Ensures that the contract is not paused, minting is available (opening time is set),
     *         the sale is not locked, the provided address is golden-listed, and the address has not already claimed.
     *         Additionally, ensures that the sale is not in the public sale stage, preventing presale activities during the public sale period.
     *         Used in functions that initiate presale minting.
     */
    modifier gen1PresaleBuffer(address abc) {
        require(!paused, "Contract is currently paused!");
        require(gen1OpeningTime != 0, "Minting not available yet, opening time not set!");
        require(gen1SaleStage() != Gen1Stage.Locked, "Sale is currently locked!");
        require(gen1SaleStage() != Gen1Stage.PublicSale, "Presale timeout!");
        require((gen1IsGoldenlisted(abc)), "Address not goldenlisted!");
        require(!gen1GoldenListClaimed[_msgSender()], "Address already claimed!");
        _;
    }

    /**
     * @dev Modifier for initiating Gen1 airdrop type 1.
     * @param airdropType The type of the airdrop (1 or 2).
     * @notice Checks conditions to ensure airdrop type 1 can be initiated.
     *         Requires that the sale has not started, the total supply is less than 11,000,
     *         the provided airdrop type is 1, and the airdrop for this type has not been done before.
     *         Used in functions that initiate Gen1 airdrop type 1.
     */
    modifier gen1InitiateAirdropType1(uint256 airdropType) {
        require(!gen1SaleStarted && totalSupply() < GEN1_MAX_SUPPLY, "Cannot initiate gen1 airdrop type 1!");
        require(airdropType == 1, "Invalid airdrop type!");
        _;
    }

    /**
     * @dev Modifier for initiating Gen1 airdrop type 2.
     * @param airdropType The type of the airdrop (1 or 2).
     * @notice Checks conditions to ensure airdrop type 2 can be initiated.
     *         Requires that the mint has not started, the total supply is at least 11,000,
     *         the provided airdrop type is 2, and the airdrop for this type has not been done before.
     *         Used in functions that initiate Gen1 airdrop type 2.
     */
    modifier gen1InitiateAirdropType2(uint256 airdropType) {
        require(!gen1Hero12thMintStarted && totalSupply() >= GEN1_MAX_SUPPLY, "Cannot initiate gen1 airdrop type 2!");
        require(airdropType == 2, "Invalid airdrop type!");
        _;
    }

    /**
     * @dev Function to check if an address is goldenlisted for the presale.
     * @param xyz The address to check.
     * @return true if the address is goldenlisted, false otherwise.
     */
    function gen1IsGoldenlisted(address xyz) public view returns (bool) {
        return gen1GoldenListed[xyz];
    }

    /**
     * @dev Function to mint presale hero packs for goldenlisted addresses.
     * @notice Initiates the minting of a hero pack (containing multiple hero tokens) during the presale for golden-listed addresses.
     *         Requires payment in Ether, and ensures compliance with Gen1 presale minting rules and pricing requirements for hero packs.
     *         Uses a non-reentrant modifier to prevent reentrancy attacks.
     *         Checks if the sender's address is eligible for the presale through the `gen1_presalebuffer` modifier.
     *         Calls the internal function `_gen1_goldenlistPackMint()` to perform the minting.
     */
    function gen1GoldenlistPackMint()
        public
        payable
        nonReentrant
        gen1PresaleMintHeroPackCompliance
        gen1PresaleMintHeroPackPriceCompliance
        gen1PresaleBuffer(msg.sender)
    {
        _gen1GoldenlistPackMint();
    }

    /**
     * @dev Internal function to mint presale hero packs for goldenlisted addresses.
     * @notice Ensures compliance with Gen1 presale minting rules and pricing requirements for hero packs.
     *         Mints a hero pack (containing multiple hero tokens) and assigns it to the caller's address.
     *         Marks the caller's address as having claimed a golden-listed presale pack.
     *         Increases the count of golden-listed packs claimed.
     *         Internal function intended for use during the presale for golden-listed addresses.
     */
    function _gen1GoldenlistPackMint() internal {
        gen1GoldenListClaimed[_msgSender()] = true;
        gen1GoldenListClaimedCount++;
        _safeMint(msg.sender, 3);
        emit GoldenlistHeroPackMinted(msg.sender, 3, "Golden list hero pack minted successfully");
    }

    /**
     * @dev Function to mint public hero packs during the public sale.
     * @notice Initiates the minting of a hero pack (containing multiple hero tokens) for public sale.
     *         Requires payment in Ether, and ensures compliance with Gen1 public minting rules and pricing requirements.
     *         Uses a non-reentrant modifier to prevent reentrancy attacks.
     *         Requires the contract not to be paused, and the public sale stage to be active with the sale's closing time reached.
     *         Calls the internal function `_gen1_packMint()` to perform the minting.
     */
    function gen1PackMint()
        public
        payable
        nonReentrant
        gen1PublicMintHeroPackCompliance
        gen1PublicsaleMintHeroPackPriceCompliance
    {
        require(!paused, "Contract is currently paused");
        require(gen1SaleStage() == Gen1Stage.PublicSale, "Presale has not ended or started yet");
        _gen1PackMint();
    }

    /**
     * @dev Internal function to mint public hero packs during the public sale.
     * @notice Ensures compliance with Gen1 public minting rules and pricing requirements for hero packs.
     *         Mints a hero pack (containing multiple hero tokens) and assigns it to the caller's address.
     *         Internal function intended for use during the public sale.
     */
    function _gen1PackMint() internal {
        _safeMint(msg.sender, 3);
        emit HeroPackMinted(msg.sender, 3, "Hero pack minted successfully");
    }

    /**
     * @dev Function to initiate a single hero mint during the public sale.
     * @notice Initiates a Gen1 hero mint, ensuring compliance with Gen1 minting rules and pricing requirements.
     *         Requires payment in Ether. Uses a non-reentrant modifier to prevent reentrancy attacks.
     *         Calls the internal function `_gen1_mint()` to perform the minting.
     */
    function gen1Hero12thMint() public payable nonReentrant gen1Hero12thMintCompliance gen1MintPriceCompliance {
        _gen1Hero12thMint();
    }

    /**
     * @dev Internal function to initiate a single hero mint during the public sale.
     * @notice Ensures compliance with Gen1 minting rules and pricing requirements.
     *         Mints a single hero token and assigns it to the caller's address.
     *         Internal function intended for use during the public sale.
     */
    function _gen1Hero12thMint() internal {
        _safeMint(msg.sender, 1);
        emit HeroMinted(msg.sender, 1, "Hero minted successfully");
    }

    /**
     * @dev Internal function to retrieve the starting token ID.
     * @return The starting token ID.
     * @notice Returns the starting token ID used for minting tokens.
     *         The default starting token ID is 1.
     *         Override this function in derived contracts if a different starting ID is desired.
     */
    function _startTokenId() internal view virtual override returns (uint256) {
        return 1;
    }

    /**
     * @dev Function to reserve mint a specified number of tokens by the owner.
     * @param _mintAmount The number of tokens to mint.
     * @notice Allows the contract owner to mint a specified number of tokens and assign them to the owner's address.
     *         Only the contract owner can execute this function.
     *         Useful for reserving tokens or adjusting the initial token supply.
     *         Emits a transfer event to reflect the minted tokens.
     */
    function reserveGen1Mint(uint256 _mintAmount) public onlyOwner {
        require(totalSupply() + _mintAmount <= GEN1_MAX_SUPPLY, "Max supply exceeded");
        _safeMint(msg.sender, _mintAmount);
    }

    /**
     * @dev Function to reserve tokens for the 12th mint of Gen1 heroes.
     * Only callable by the owner of the contract.
     * @param _mintAmount The number of tokens to reserve.
     */
    function reserveGen1Hero12thMint(uint256 _mintAmount) public onlyOwner {
        require(totalSupply() + _mintAmount <= 12000, "Max supply exceeded");
        _safeMint(msg.sender, _mintAmount);
    }

    /**
     * @dev Function to initiate airdrop for a list of users of a specified type.
     * @param users The list of user addresses to receive airdropped tokens.
     * @param airdropType The type of airdrop (1 or 2).
     * @notice Initiates airdrop for the specified type, minting tokens for the provided users.
     *         Only the contract owner can execute this function.
     *         Ensures the validity of the airdrop type and the presence of users in the list.
     *         Delegates to separate internal functions for airdrop type 1 and airdrop type 2.
     */
    function gen1Airdrop(address[] memory users, uint256 airdropType) public onlyOwner {
        require(airdropType >= 1 && airdropType <= 2, "Invalid airdrop type!");

        if (airdropType == 1) {
            gen1AirdropType1(users, airdropType);
        } else if (airdropType == 2) {
            gen1AirdropType2(users, airdropType);
        }
    }

    /**
     * @dev Internal function to initiate Gen1 airdrop type 1.
     * @param users The array of addresses to receive the airdrop.
     * @param airdropType The type of the airdrop 1.
     * @notice Initiates airdrop type 1, minting single token for the specified users.
     *         Only the contract owner can execute this function.
     *         Uses the nonReentrant modifier to prevent reentrancy attacks.
     *         Conditions for airdrop type 1 initiation are checked using gen1InitiateAirdropType1 modifier.
     */
    function gen1AirdropType1(address[] memory users, uint256 airdropType)
        internal
        nonReentrant
        gen1InitiateAirdropType1(airdropType)
        onlyOwner
    {
        for (uint256 i = 0; i < users.length; i++) {
            _safeMint(users[i], 1);
        }

        emit AirdropInitiated(1, users, "Airdrop type 1 done successfully");
    }

    /**
     * @dev Internal function to initiate Gen1 airdrop type 2.
     * @param users The array of addresses to receive the airdrop.
     * @param airdropType The type of the airdrop (1 or 2).
     * @notice Initiates airdrop type 2, minting single token for the specified users.
     *         Only the contract owner can execute this function.
     *         Uses the nonReentrant modifier to prevent reentrancy attacks.
     *         Conditions for airdrop type 2 initiation are checked using gen1_initiateAirdropType2 modifier.
     */
    function gen1AirdropType2(address[] memory users, uint256 airdropType)
        internal
        nonReentrant
        gen1InitiateAirdropType2(airdropType)
        onlyOwner
    {
        for (uint256 i = 0; i < users.length; i++) {
            _safeMint(users[i], 1);
        }

        emit AirdropInitiated(1, users, "Airdrop type 2 done successfully");
    }

    /**
     * @dev Function to get the token URI for a given token ID.
     * @param _tokenId The token ID for which to get the URI.
     * @return The token URI.
     * @notice Reverts if the token ID does not exist.
     */
    function tokenURI(uint256 _tokenId) public view virtual override(ERC721A, IERC721A) returns (string memory) {
        require(_exists(_tokenId), "ERC721Metadata: URI query for nonexistent token");

        if (_tokenId <= GEN1_MAX_SUPPLY) {
            if (gen1Revealed == false) {
                return gen1HiddenMetadataURI;
            }

            string memory currentBaseURI = _baseURI();
            return bytes(currentBaseURI).length > 0
                ? string(abi.encodePacked(currentBaseURI, _tokenId.toString(), gen1URISuffix))
                : "";
        } else {
            if (gen1Hero12thRevealed == false) {
                return gen1HiddenMetadataURI;
            }
            string memory currentBaseURI = _12thHeroBaseURI();
            return bytes(currentBaseURI).length > 0
                ? string(abi.encodePacked(currentBaseURI, _tokenId.toString(), gen1URISuffix))
                : "";
        }
    }

    /**
     * @dev Function to set the revealed state of the Gen1 collection (11 characters).
     * @param _state The new revealed state.
     * @notice Only callable by the owner of the contract.
     */
    function setGen1Revealed(bool _state) public onlyOwner {
        gen1Revealed = _state;
    }

    /**
     * @dev Function to set the revealed state of the Gen1 12th character.
     * @param _state The new revealed state.
     * @notice Only callable by the owner of the contract.
     */
    function setGen1Hero12thRevealed(bool _state) public onlyOwner {
        gen1Hero12thRevealed = _state;
    }

    /**
     * @dev Function to set the cost for minting a hero pack during the public sale.
     * @
     *  param _cost The new cost value.
     * @notice Only callable by the owner of the contract.
     */
    function setGen1Cost(uint256 _cost) public onlyOwner {
        gen1Cost = _cost;
        emit PublicCostSet(_cost, "Public cost set successfully");
    }

    /**
     * @dev Function to set the cost for minting a hero pack during the presale.
     * @param _presaleCost The new presale cost value.
     * @notice Only callable by the owner of the contract.
     */
    function setGen1PresaleCost(uint256 _presaleCost) public onlyOwner {
        gen1PresaleCost = _presaleCost;
        emit PresaleCostSet(_presaleCost, "Presale cost set successfully");
    }

    /**
     * @dev Function to set royalty information for the contract.
     * @param _receiver The address to receive royalty payments.
     * @param _royaltyFeesInBips The royalty fees in basis points (1 basis point = 0.01%).
     * @notice Only callable by the owner of the contract.
     */
    function setRoyalty(address _receiver, uint96 _royaltyFeesInBips) public onlyOwner {
        _setRoyalty(_receiver, _royaltyFeesInBips);
    }

    /**
     * @dev Internal function for setting royalty fees.
     * @param _royaltyRecipient The address to receive royalty fees.
     * @param _royaltyFeesInBips The royalty fees in basis points (1 basis point = 0.01%).
     * @notice This function should be called only from within the contract to avoid external access.
     */
    function _setRoyalty(address _royaltyRecipient, uint96 _royaltyFeesInBips) internal {
        _setDefaultRoyalty(_royaltyRecipient, _royaltyFeesInBips);
        emit RoyaltySet(_royaltyRecipient, _royaltyFeesInBips, "Default royalty set successfully");
    }

    /**
     * @dev Allows the owner of the contract to set royalty information for a specific token.
     *
     * @param _tokenId The unique identifier of the token for which royalty information is being set.
     * @param _receiver The address of the royalty recipient who will receive fees from secondary sales.
     * @param _royaltyFeesInBips The royalty fees to be applied, represented in Basis Points (Bips).
     *                           1 Basis Point is equal to 0.01%, so 100 Bips is equivalent to 1%.
     * @notice Allows the owner of the contract to set royalty information for a specific token.
     */
    function setTokenRoyalty(uint256 _tokenId, address _receiver, uint96 _royaltyFeesInBips) public onlyOwner {
        _setTokenRoyalty(_tokenId, _receiver, _royaltyFeesInBips);
        emit TokenRoyaltySet(_tokenId, _receiver, _royaltyFeesInBips, "Token royalty set successfully");
    }

    /**
     * @dev Function to set the URI for hidden metadata before the collection is revealed.
     * @param _hiddenMetadataUri The new hidden metadata URI.
     * @notice Only callable by the owner of the contract.
     */
    function setGen1HiddenMetadataURI(string memory _hiddenMetadataUri) public onlyOwner {
        _setGen1HiddenMetadataURI(_hiddenMetadataUri);
    }

    /**
     * @dev Internal function for setting the hidden metadata URI for Gen1 tokens.
     * @param _hiddenMetadataUri The URI to set as the hidden metadata.
     * @notice This function should be called only from within the contract to avoid external access.
     */
    function _setGen1HiddenMetadataURI(string memory _hiddenMetadataUri) internal {
        gen1HiddenMetadataURI = _hiddenMetadataUri;
    }

    /**
     * @dev Function to set the base URI prefix for token metadata.
     * @param _uriPrefix The new URI prefix.
     * @notice Only callable by the owner of the contract.
     */
    function setGen1URIPrefix(string memory _uriPrefix) public onlyOwner {
        gen1URIPrefix = _uriPrefix;
    }

    /**
     * @dev Function to set the base URI prefix for 12th hero token metadata.
     * @param _uriPrefix The new URI prefix.
     * @notice Only callable by the owner of the contract.
     */
    function setGen1Hero12thURIPrefix(string memory _uriPrefix) public onlyOwner {
        gen1Hero12thURIPrefix = _uriPrefix;
    }

    /**
     * @dev Function to set the URI suffix for token metadata.
     * @param _uriSuffix The new URI suffix.
     * @notice Only callable by the owner of the contract.
     */
    function setGen1URISuffix(string memory _uriSuffix) public onlyOwner {
        gen1URISuffix = _uriSuffix;
    }

    /**
     * @dev Allows the owner to set the minting status for Gen1 single mint tokens.
     * @param _state The new single minting status to be set (true for started, false for stopped).
     * @notice Only callable by the owner of the contract.
     */
    function setGen1Hero12thMintStarted(bool _state) public onlyOwner {
        gen1Hero12thMintStarted = _state;
    }

    /**
     * @dev Public function to set the Gen1 funds receiver.
     * @param _receiver The new address to set as the Gen1 funds receiver.
     * @notice This function can only be called by the owner of the contract.
     */
    function setGen1FundsReceiver(address _receiver) public onlyOwner {
        _setGen1FundsReceiver(_receiver);
    }

    /**
     * @dev Internal function to update the Gen1 funds receiver.
     * @param _receiver The new address to set as the Gen1 funds receiver.
     * @notice This function should only be called by the setGen1FundsReceiver function.
     */
    function _setGen1FundsReceiver(address _receiver) internal {
        require(_receiver != address(0), "Invalid address");
        require(_receiver != gen1FundsReceiver, "Same as current receiver");
        gen1FundsReceiver = _receiver;
    }

    /**
     * @dev Function to pause or unpause the contract.
     * @param _state The new pause state.
     * @notice Only callable by the owner of the contract.
     */
    function setPaused(bool _state) public onlyOwner {
        paused = _state;
    }

    /**
     * @dev Function to start the crowdsale with specified opening and closing times.
     * The crowdsale has specified opening and closing times, and it can only be started if it has not already begun
     * @param _openingTime The opening time of the crowdsale.
     * @param _closingTime The closing time of the crowdsale.
     * @notice Only callable by the owner of the contract.
     */
    function gen1StartCrowdSale(uint256 _openingTime, uint256 _closingTime) public onlyOwner {
        require(_openingTime >= block.timestamp, "Invalid opening time!");
        require(_closingTime >= _openingTime, "Invalid closing time!");

        gen1OpeningTime = _openingTime;
        gen1ClosingTime = _closingTime;
        gen1SaleStarted = true;

        emit CrowdSaleStarted(_openingTime, _closingTime, "Crowdsale started successfully");
    }

    /**
     * @dev Determines the current stage of the Golden Tides Gen1 sale based on the current timestamp.
     * @return stage The current stage as an enumerated type `Stage`.
     */
    function gen1SaleStage() public view returns (Gen1Stage stage) {
        if (block.timestamp < gen1OpeningTime || gen1OpeningTime == 0) {
            return Gen1Stage.Locked;
        } else if (block.timestamp >= gen1OpeningTime && block.timestamp <= gen1ClosingTime) {
            return Gen1Stage.Presale;
        } else if (block.timestamp >= gen1ClosingTime) {
            return Gen1Stage.PublicSale;
        }
    }

    /**
     * @dev Function to add a single address to the goldenlist for the presale.
     * @param _user The address to add to the goldenlist.
     * @notice Only callable by the owner of the contract.
     */
    function gen1AddGoldenlistUser(address _user) public onlyOwner {
        require(!gen1GoldenListed[_user], "Address is already in the goldenlist");
        gen1GoldenListed[_user] = true;
        emit GoldenlistUserAdded(_user, "User added to the goldenlist successfully");
    }

    /**
     * @dev Function to add multiple addresses to the goldenlist for the presale.
     * @param _users The list of addresses to add to the goldenlist.
     * @notice Only callable by the owner of the contract.
     */
    function gen1Add100GoldenlistUsers(address[100] memory _users) public onlyOwner {
        for (uint256 i = 0; i < _users.length; i++) {
            require(
                !gen1GoldenListed[_users[i]],
                string(
                    abi.encodePacked(
                        "Address ", Strings.toHexString(uint160(_users[i])), " is already in the goldenlist"
                    )
                )
            );
            gen1GoldenListed[_users[i]] = true;
        }
        emit GoldenlistUsersAdded(_users, "Multiple users added to the goldenlist successfully");
    }

    /**
     * @dev Function to remove a single address from the goldenlist for the presale.
     * @param _user The address to remove from the goldenlist.
     * @notice Only callable by the owner of the contract.
     */
    function gen1RemoveGoldenlistUser(address _user) public onlyOwner {
        require(gen1GoldenListed[_user], "Address is not in the goldenlist");
        gen1GoldenListed[_user] = false;
        emit GoldenlistUserRemoved(_user, "User removed from the goldenlist successfully");
    }

    /**
     * @dev Function to transfer ownership of a token from the owner to another address.
     * @param winner The address to which the token will be transferred.
     * @param _tokenIdToGiveaway The token ID to transfer.
     * @notice Only callable by the owner of the contract.
     */
    function gen1GiveAway(address winner, uint256 _tokenIdToGiveaway) public onlyOwner {
        safeTransferFrom(msg.sender, winner, _tokenIdToGiveaway);
        emit TokenGiveAway(msg.sender, winner, _tokenIdToGiveaway, "Token giveaway done successfull");
    }

    /**
     * @dev This contract inherits and overrides the supportsInterface function from multiple ERC standards.
     *      ERC721A: ERC721 standard with additional optional extension functions
     *      IERC721A: Interface for ERC721A, defining the additional functions
     *      ERC2981: Standard for royalties on NFT sales
     * @param interfaceId The interface ID to check for support.
     * @return true if the contract supports the given interface, false otherwise.
     */
    function supportsInterface(bytes4 interfaceId) public view override(ERC721A, IERC721A, ERC2981) returns (bool) {
        return super.supportsInterface(interfaceId);
    }

    /**
     * @dev Function to withdraw the contract's balance to the funds receiver address.
     * @notice Only callable by the owner of the contract.
     */
    function withdraw() public onlyOwner {
        require(gen1FundsReceiver != address(0), "Funds receiver not set");

        (bool success,) = payable(gen1FundsReceiver).call{value: address(this).balance}("");

        require(success, "Withdrawal failed");
    }

    /**
     * @dev Internal function to compute the base URI for token metadata.
     * If set, the resulting URI for each token will be the concatenation of the `baseURI` and the `tokenId`.
     * @return The base URI for token metadata.
     */
    function _baseURI() internal view virtual override returns (string memory) {
        return gen1URIPrefix;
    }

    /**
     * @dev Internal function to retrieve the base URI for the 12th Hero.
     * @return string Base URI for the 12th item's token metadata.
     */
    function _12thHeroBaseURI() internal view returns (string memory) {
        return gen1Hero12thURIPrefix;
    }
}

// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721AQueryable.sol';
import '../ERC721A.sol';

/**
 * @title ERC721AQueryable.
 *
 * @dev ERC721A subclass with convenience query functions.
 */
abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable {
    /**
     * @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;
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

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

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @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 {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

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

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _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
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // 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 Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)

pragma solidity ^0.8.20;

import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant HEX_DIGITS = "0123456789abcdef";
    uint8 private constant ADDRESS_LENGTH = 20;

    /**
     * @dev The `value` string doesn't fit in the specified `length`.
     */
    error StringsInsufficientHexLength(uint256 value, uint256 length);

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.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), HEX_DIGITS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toStringSigned(int256 value) internal pure returns (string memory) {
        return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value)));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.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) {
        uint256 localValue = value;
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = HEX_DIGITS[localValue & 0xf];
            localValue >>= 4;
        }
        if (localValue != 0) {
            revert StringsInsufficientHexLength(value, length);
        }
        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);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.20;

import {IERC2981} from "../../interfaces/IERC2981.sol";
import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol";

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

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

    /**
     * @dev The default royalty set is invalid (eg. (numerator / denominator) >= 1).
     */
    error ERC2981InvalidDefaultRoyalty(uint256 numerator, uint256 denominator);

    /**
     * @dev The default royalty receiver is invalid.
     */
    error ERC2981InvalidDefaultRoyaltyReceiver(address receiver);

    /**
     * @dev The royalty set for an specific `tokenId` is invalid (eg. (numerator / denominator) >= 1).
     */
    error ERC2981InvalidTokenRoyalty(uint256 tokenId, uint256 numerator, uint256 denominator);

    /**
     * @dev The royalty receiver for `tokenId` is invalid.
     */
    error ERC2981InvalidTokenRoyaltyReceiver(uint256 tokenId, address receiver);

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

    /**
     * @inheritdoc IERC2981
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual 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 {
        uint256 denominator = _feeDenominator();
        if (feeNumerator > denominator) {
            // Royalty fee will exceed the sale price
            revert ERC2981InvalidDefaultRoyalty(feeNumerator, denominator);
        }
        if (receiver == address(0)) {
            revert ERC2981InvalidDefaultRoyaltyReceiver(address(0));
        }

        _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 {
        uint256 denominator = _feeDenominator();
        if (feeNumerator > denominator) {
            // Royalty fee will exceed the sale price
            revert ERC2981InvalidTokenRoyalty(tokenId, feeNumerator, denominator);
        }
        if (receiver == address(0)) {
            revert ERC2981InvalidTokenRoyaltyReceiver(tokenId, address(0));
        }

        _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];
    }
}

// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '../IERC721A.sol';

/**
 * @dev Interface of ERC721AQueryable.
 */
interface IERC721AQueryable is IERC721A {
    /**
     * 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 8 of 15 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * Returns the packed ownership data of `tokenId`.
     */
    function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr)
                if (curr < _currentIndex) {
                    uint256 packed = _packedOwnerships[curr];
                    // If not burned.
                    if (packed & _BITMASK_BURNED == 0) {
                        // 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, `curr` will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed will be zero.
                        while (packed == 0) {
                            packed = _packedOwnerships[--curr];
                        }
                        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.
     * 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) public payable virtual override {
        address owner = ownerOf(tokenId);

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

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

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

        return _tokenApprovals[tokenId].value;
    }

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfers(from, to, tokenId, 1);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            uint256 toMasked;
            uint256 end = startTokenId + quantity;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        address from = address(uint160(prevOwnershipPacked));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Muldiv operation overflow.
     */
    error MathOverflowedMulDiv();

    enum Rounding {
        Floor, // Toward negative infinity
        Ceil, // Toward positive infinity
        Trunc, // Toward zero
        Expand // Away from zero
    }

    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the 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 towards infinity instead
     * of rounding towards zero.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        if (b == 0) {
            // Guarantee the same behavior as in a regular Solidity division.
            return a / b;
        }

        // (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 = x * y; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            if (denominator <= prod1) {
                revert MathOverflowedMulDiv();
            }

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

            uint256 twos = denominator & (0 - denominator);
            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 (unsignedRoundsUp(rounding) && 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
     * towards zero.
     *
     * 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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2 of a positive value rounded towards zero.
     * 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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10 of a positive value rounded towards zero.
     * 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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256 of a positive value rounded towards zero.
     * 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 256, 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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
        }
    }

    /**
     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
     */
    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
        return uint8(rounding) % 2 == 1;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

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

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../utils/introspection/IERC165.sol";

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

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

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

// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

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

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "ERC721A/=lib/ERC721A/contracts/",
    "ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/openzeppelin-contracts/lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"string","name":"_tokenName","type":"string"},{"internalType":"string","name":"_tokenSymbol","type":"string"},{"internalType":"string","name":"_hiddenMetadataUri","type":"string"},{"internalType":"address","name":"initialOwner","type":"address"},{"internalType":"address","name":"_fundsReceiver","type":"address"},{"internalType":"uint96","name":"_royaltyFeesInBips","type":"uint96"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"ERC2981InvalidDefaultRoyalty","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC2981InvalidDefaultRoyaltyReceiver","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"ERC2981InvalidTokenRoyalty","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC2981InvalidTokenRoyaltyReceiver","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":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"length","type":"uint256"}],"name":"StringsInsufficientHexLength","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":"uint256","name":"airdropType","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"users","type":"address[]"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"AirdropInitiated","type":"event"},{"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":"uint256","name":"openingTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"closingTime","type":"uint256"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"CrowdSaleStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"packSize","type":"uint256"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"GoldenlistHeroPackMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"GoldenlistUserAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"GoldenlistUserRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[100]","name":"users","type":"address[100]"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"GoldenlistUsersAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"HeroMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"packSize","type":"uint256"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"HeroPackMinted","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":false,"internalType":"uint256","name":"newPresaleCost","type":"uint256"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"PresaleCostSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newPublicCost","type":"uint256"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"PublicCostSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint96","name":"royaltyFeesInBips","type":"uint96"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"RoyaltySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"TokenGiveAway","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint96","name":"royaltyFeesInBips","type":"uint96"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"TokenRoyaltySet","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":"GEN1_MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"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 IERC721A.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 IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[100]","name":"_users","type":"address[100]"}],"name":"gen1Add100GoldenlistUsers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"gen1AddGoldenlistUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"users","type":"address[]"},{"internalType":"uint256","name":"airdropType","type":"uint256"}],"name":"gen1Airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gen1ClosingTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gen1Cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gen1FundsReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"winner","type":"address"},{"internalType":"uint256","name":"_tokenIdToGiveaway","type":"uint256"}],"name":"gen1GiveAway","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"gen1GoldenListClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gen1GoldenListClaimedCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"gen1GoldenListed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gen1GoldenlistPackMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"gen1Hero12thMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"gen1Hero12thMintStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gen1Hero12thRevealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gen1Hero12thURIPrefix","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gen1HiddenMetadataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"xyz","type":"address"}],"name":"gen1IsGoldenlisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gen1OpeningTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gen1PackMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"gen1PresaleCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"gen1RemoveGoldenlistUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gen1Revealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gen1SaleStage","outputs":[{"internalType":"enum GT.Gen1Stage","name":"stage","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gen1SaleStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_openingTime","type":"uint256"},{"internalType":"uint256","name":"_closingTime","type":"uint256"}],"name":"gen1StartCrowdSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gen1URIPrefix","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gen1URISuffix","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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":"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":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"reserveGen1Hero12thMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"reserveGen1Mint","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":"uint256","name":"_cost","type":"uint256"}],"name":"setGen1Cost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"}],"name":"setGen1FundsReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setGen1Hero12thMintStarted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setGen1Hero12thRevealed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uriPrefix","type":"string"}],"name":"setGen1Hero12thURIPrefix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_hiddenMetadataUri","type":"string"}],"name":"setGen1HiddenMetadataURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_presaleCost","type":"uint256"}],"name":"setGen1PresaleCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setGen1Revealed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uriPrefix","type":"string"}],"name":"setGen1URIPrefix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uriSuffix","type":"string"}],"name":"setGen1URISuffix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint96","name":"_royaltyFeesInBips","type":"uint96"}],"name":"setRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint96","name":"_royaltyFeesInBips","type":"uint96"}],"name":"setTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"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"}]

60a060405260006080908152600f906200001a908262000462565b5060408051602081019091526000815260109062000039908262000462565b50604080518082019091526005815264173539b7b760d91b602082015260119062000065908262000462565b506701aa535d3d0c000060135567013fbe85edc900006014556016805464ffffffffff191660011790553480156200009c57600080fd5b5060405162004e4b38038062004e4b833981016040819052620000bf91620005fa565b8286866002620000d0838262000462565b506003620000df828262000462565b50600160005550506001600160a01b0381166200011757604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b620001228162000156565b506001600b556200013384620001a8565b6200013f3382620001ba565b6200014a826200024a565b505050505050620006d2565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6012620001b6828262000462565b5050565b620001c6828262000316565b604080516001600160a01b03841681526001600160601b03831660208083019190915260608284018190528201527f44656661756c7420726f79616c747920736574207375636365737366756c6c79608082015290517f7480478c32d8c4b807a7bcafb3ffb2eaac087e5abbfb04beec27dedc80ebbcc89181900360a00190a15050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064016200010e565b600c546001600160a01b0390811690821603620002f45760405162461bcd60e51b815260206004820152601860248201527f53616d652061732063757272656e74207265636569766572000000000000000060448201526064016200010e565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6127106001600160601b0382168110156200035757604051636f483d0960e01b81526001600160601b0383166004820152602481018290526044016200010e565b6001600160a01b0383166200038357604051635b6cc80560e11b8152600060048201526024016200010e565b50604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600855565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620003e857607f821691505b6020821081036200040957634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200045d57600081815260208120601f850160051c81016020861015620004385750805b601f850160051c820191505b81811015620004595782815560010162000444565b5050505b505050565b81516001600160401b038111156200047e576200047e620003bd565b62000496816200048f8454620003d3565b846200040f565b602080601f831160018114620004ce5760008415620004b55750858301515b600019600386901b1c1916600185901b17855562000459565b600085815260208120601f198616915b82811015620004ff57888601518255948401946001909101908401620004de565b50858210156200051e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082601f8301126200054057600080fd5b81516001600160401b03808211156200055d576200055d620003bd565b604051601f8301601f19908116603f01168101908282118183101715620005885762000588620003bd565b81604052838152602092508683858801011115620005a557600080fd5b600091505b83821015620005c95785820183015181830184015290820190620005aa565b600093810190920192909252949350505050565b80516001600160a01b0381168114620005f557600080fd5b919050565b60008060008060008060c087890312156200061457600080fd5b86516001600160401b03808211156200062c57600080fd5b6200063a8a838b016200052e565b975060208901519150808211156200065157600080fd5b6200065f8a838b016200052e565b965060408901519150808211156200067657600080fd5b506200068589828a016200052e565b9450506200069660608801620005dd565b9250620006a660808801620005dd565b60a08801519092506001600160601b0381168114620006c457600080fd5b809150509295509295509295565b61476980620006e26000396000f3fe6080604052600436106104125760003560e01c80637cd3011911610228578063ac5d533611610128578063c23dc68f116100bb578063e5bb6e111161008a578063eeee74e11161006f578063eeee74e114610bfc578063f2fde38b14610c1c578063fd03fdce14610c3c57600080fd5b8063e5bb6e1114610b93578063e985e9c514610bb357600080fd5b8063c23dc68f14610b06578063c797263a14610b33578063c87b56dd14610b53578063d7d6710014610b7357600080fd5b8063b7474181116100f7578063b747418114610a9d578063b88d4fde14610abd578063c03fda1f14610ad0578063c09894fb14610af057600080fd5b8063ac5d533614610a40578063aeb60e7814610a60578063b07f724e14610a75578063b4b2795a14610a9557600080fd5b806395d89b41116101bb578063a15efb311161018a578063a2cf94c71161016f578063a2cf94c7146109e0578063aa1139ae14610a00578063ac0357e014610a2057600080fd5b8063a15efb31146109a0578063a22cb465146109c057600080fd5b806395d89b411461091a57806399a2557a1461092f5780639c1401011461094f5780639fee82051461097057600080fd5b806387b8c5f1116101f757806387b8c5f1146108b157806388d7fd9f146108c75780638da5cb5b146108dc5780638f2fc60b146108fa57600080fd5b80637cd301191461082e5780638255cdc21461084e5780638462151c1461086457806386e0a17a1461089157600080fd5b80633a25f7db116103335780635c975abb116102c6578063715018a611610295578063732d113f1161027a578063732d113f146107cd57806378c4675b146107ec5780637a4ef9ab1461080c57600080fd5b8063715018a614610798578063731db1d4146107ad57600080fd5b80635c975abb146107285780636352211e146107425780636e356bc81461076257806370a082311461077857600080fd5b8063478a150111610302578063478a1501146106be5780634cd0d992146106c65780635944c753146106db5780635bbb2177146106fb57600080fd5b80633a25f7db146106545780633ccfd60b1461067657806341d426c51461068b57806342842e0e146106ab57600080fd5b806316c38b3c116103ab57806323b872dd1161037a57806323b872dd146105b357806326762272146105c6578063292cbe03146105ff5780632a55205a1461061557600080fd5b806316c38b3c1461051c57806318160ddd1461053c5780631821ddd91461056357806319be08eb1461059357600080fd5b806306fdde03116103e757806306fdde031461049c578063081812fc146104b157806308ae1282146104e9578063095ea7b31461050957600080fd5b80621336f114610417578062862a231461043957806301ffc9a714610464578063069fa9e614610494575b600080fd5b34801561042357600080fd5b50610437610432366004613b84565b610c52565b005b34801561044557600080fd5b5061044e610c74565b60405161045b9190613bef565b60405180910390f35b34801561047057600080fd5b5061048461047f366004613c18565b610d02565b604051901515815260200161045b565b610437610d13565b3480156104a857600080fd5b5061044e611065565b3480156104bd57600080fd5b506104d16104cc366004613c35565b6110f7565b6040516001600160a01b03909116815260200161045b565b3480156104f557600080fd5b50610437610504366004613cac565b611154565b610437610517366004613d5f565b6111e2565b34801561052857600080fd5b50610437610537366004613b84565b6112a8565b34801561054857600080fd5b5060015460005403600019015b60405190815260200161045b565b34801561056f57600080fd5b5061048461057e366004613d89565b600d6020526000908152604090205460ff1681565b34801561059f57600080fd5b506104376105ae366004613b84565b6112c3565b6104376105c1366004613da4565b6112e9565b3480156105d257600080fd5b506104846105e1366004613d89565b6001600160a01b03166000908152600d602052604090205460ff1690565b34801561060b57600080fd5b50610555612af881565b34801561062157600080fd5b50610635610630366004613de0565b6114ce565b604080516001600160a01b03909316835260208301919091520161045b565b34801561066057600080fd5b50610669611589565b60405161045b9190613e18565b34801561068257600080fd5b506104376115d7565b34801561069757600080fd5b506016546104849062010000900460ff1681565b6104376106b9366004613da4565b6116dd565b6104376116fd565b3480156106d257600080fd5b5061044e6118cc565b3480156106e757600080fd5b506104376106f6366004613e5c565b6118d9565b34801561070757600080fd5b5061071b610716366004613e98565b61197b565b60405161045b9190613f0d565b34801561073457600080fd5b506016546104849060ff1681565b34801561074e57600080fd5b506104d161075d366004613c35565b611a47565b34801561076e57600080fd5b5061055560145481565b34801561078457600080fd5b50610555610793366004613d89565b611a52565b3480156107a457600080fd5b50610437611aba565b3480156107b957600080fd5b506104376107c8366004613de0565b611acc565b3480156107d957600080fd5b5060165461048490610100900460ff1681565b3480156107f857600080fd5b50610437610807366004613fe2565b611c0f565b34801561081857600080fd5b5060165461048490640100000000900460ff1681565b34801561083a57600080fd5b50610437610849366004613c35565b611c23565b34801561085a57600080fd5b5061055560155481565b34801561087057600080fd5b5061088461087f366004613d89565b611c9f565b60405161045b919061402b565b34801561089d57600080fd5b506104376108ac366004613c35565b611da3565b3480156108bd57600080fd5b5061055560185481565b3480156108d357600080fd5b5061044e611e22565b3480156108e857600080fd5b50600a546001600160a01b03166104d1565b34801561090657600080fd5b50610437610915366004614063565b611e2f565b34801561092657600080fd5b5061044e611e41565b34801561093b57600080fd5b5061088461094a366004614096565b611e50565b34801561095b57600080fd5b50601654610484906301000000900460ff1681565b34801561097c57600080fd5b5061048461098b366004613d89565b600e6020526000908152604090205460ff1681565b3480156109ac57600080fd5b506104376109bb366004613d89565b611ff1565b3480156109cc57600080fd5b506104376109db3660046140c9565b612112565b3480156109ec57600080fd5b506104376109fb366004613d5f565b61217f565b348015610a0c57600080fd5b50610437610a1b366004613fe2565b61220c565b348015610a2c57600080fd5b50610437610a3b366004613d89565b612220565b348015610a4c57600080fd5b50610437610a5b366004613c35565b61234b565b348015610a6c57600080fd5b5061044e612369565b348015610a8157600080fd5b50610437610a90366004613c35565b612376565b6104376123ea565b348015610aa957600080fd5b50610437610ab8366004613fe2565b612555565b610437610acb3660046140f3565b612569565b348015610adc57600080fd5b50610437610aeb366004613b84565b6125b3565b348015610afc57600080fd5b5061055560175481565b348015610b1257600080fd5b50610b26610b21366004613c35565b6125d7565b60405161045b919061416f565b348015610b3f57600080fd5b50610437610b4e366004613fe2565b61265f565b348015610b5f57600080fd5b5061044e610b6e366004613c35565b612670565b348015610b7f57600080fd5b50610437610b8e3660046141b4565b61282b565b348015610b9f57600080fd5b50600c546104d1906001600160a01b031681565b348015610bbf57600080fd5b50610484610bce36600461423a565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610c0857600080fd5b50610437610c17366004613d89565b61296b565b348015610c2857600080fd5b50610437610c37366004613d89565b61297c565b348015610c4857600080fd5b5061055560135481565b610c5a6129d0565b601680549115156101000261ff0019909216919091179055565b60108054610c8190614264565b80601f0160208091040260200160405190810160405280929190818152602001828054610cad90614264565b8015610cfa5780601f10610ccf57610100808354040283529160200191610cfa565b820191906000526020600020905b815481529060010190602001808311610cdd57829003601f168201915b505050505081565b6000610d0d82612a16565b92915050565b610d1b612a7d565b6107d060155410610d995760405162461bcd60e51b815260206004820152602260248201527f50726573616c6520737570706c792065786365656465642c20736f6c64206f7560448201527f742100000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b601454341015610deb5760405162461bcd60e51b815260206004820152601360248201527f496e73756666696369656e742066756e647321000000000000000000000000006044820152606401610d90565b601654339060ff1615610e405760405162461bcd60e51b815260206004820152601d60248201527f436f6e74726163742069732063757272656e746c7920706175736564210000006044820152606401610d90565b601754600003610eb85760405162461bcd60e51b815260206004820152603060248201527f4d696e74696e67206e6f7420617661696c61626c65207965742c206f70656e6960448201527f6e672074696d65206e6f742073657421000000000000000000000000000000006064820152608401610d90565b6000610ec2611589565b6002811115610ed357610ed3613e02565b03610f205760405162461bcd60e51b815260206004820152601960248201527f53616c652069732063757272656e746c79206c6f636b656421000000000000006044820152606401610d90565b6002610f2a611589565b6002811115610f3b57610f3b613e02565b03610f885760405162461bcd60e51b815260206004820152601060248201527f50726573616c652074696d656f757421000000000000000000000000000000006044820152606401610d90565b6001600160a01b0381166000908152600d602052604090205460ff16610ff05760405162461bcd60e51b815260206004820152601960248201527f41646472657373206e6f7420676f6c64656e6c697374656421000000000000006044820152606401610d90565b336000908152600e602052604090205460ff16156110505760405162461bcd60e51b815260206004820152601860248201527f4164647265737320616c726561647920636c61696d65642100000000000000006044820152606401610d90565b611058612ac0565b506110636001600b55565b565b60606002805461107490614264565b80601f01602080910402602001604051908101604052809291908181526020018280546110a090614264565b80156110ed5780601f106110c2576101008083540402835291602001916110ed565b820191906000526020600020905b8154815290600101906020018083116110d057829003601f168201915b5050505050905090565b600061110282612b85565b611138576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b61115c6129d0565b6001811015801561116e575060028111155b6111ba5760405162461bcd60e51b815260206004820152601560248201527f496e76616c69642061697264726f7020747970652100000000000000000000006044820152606401610d90565b806001036111d0576111cc8282612bba565b5050565b806002036111cc576111cc8282612d3c565b60006111ed82611a47565b9050336001600160a01b0382161461123f576112098133610bce565b61123f576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6112b06129d0565b6016805460ff1916911515919091179055565b6112cb6129d0565b6016805491151563010000000263ff00000019909216919091179055565b60006112f482612e9c565b9050836001600160a01b0316816001600160a01b031614611341576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b038816909114176113a7576113718633610bce565b6113a7576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0385166113e7576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80156113f257600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003611484576001840160008181526004602052604081205490036114825760005481146114825760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b60008281526009602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046bffffffffffffffffffffffff1692820192909252829161154d5750604080518082019091526008546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff1660208201525b602081015160009061271090611571906bffffffffffffffffffffffff16876142b4565b61157b91906142cb565b915196919550909350505050565b600060175442108061159b5750601754155b156115a65750600090565b60175442101580156115ba57506018544211155b156115c55750600190565b60185442106115d45750600290565b90565b6115df6129d0565b600c546001600160a01b03166116375760405162461bcd60e51b815260206004820152601660248201527f46756e6473207265636569766572206e6f7420736574000000000000000000006044820152606401610d90565b600c546040516000916001600160a01b03169047908381818185875af1925050503d8060008114611684576040519150601f19603f3d011682016040523d82523d6000602084013e611689565b606091505b50509050806116da5760405162461bcd60e51b815260206004820152601160248201527f5769746864726177616c206661696c65640000000000000000000000000000006044820152606401610d90565b50565b6116f883838360405180602001604052806000815250612569565b505050565b611705612a7d565b600154600054612af891900360001901106117885760405162461bcd60e51b815260206004820152602a60248201527f4d617820737570706c792065786365656465642c207075626c69632073616c6560448201527f20736f6c64206f757421000000000000000000000000000000000000000000006064820152608401610d90565b6013543410156117da5760405162461bcd60e51b815260206004820152601360248201527f496e73756666696369656e742066756e647321000000000000000000000000006044820152606401610d90565b60165460ff161561182d5760405162461bcd60e51b815260206004820152601c60248201527f436f6e74726163742069732063757272656e746c7920706175736564000000006044820152606401610d90565b6002611837611589565b600281111561184857611848613e02565b146118ba5760405162461bcd60e51b8152602060048201526024808201527f50726573616c6520686173206e6f7420656e646564206f72207374617274656460448201527f20796574000000000000000000000000000000000000000000000000000000006064820152608401610d90565b6118c2612f24565b6110636001600b55565b60118054610c8190614264565b6118e16129d0565b6118ec838383612fa0565b604080518481526001600160a01b03841660208201526bffffffffffffffffffffffff831681830152608060608201819052601e908201527f546f6b656e20726f79616c747920736574207375636365737366756c6c79000060a082015290517f870dd722d4c97af1d628e76af62c4fb9181f61ae2d2457f4d6fcc25c715b3f449181900360c00190a1505050565b60608160008167ffffffffffffffff81111561199957611999613c4e565b6040519080825280602002602001820160405280156119eb57816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816119b75790505b50905060005b828114611a3e57611a19868683818110611a0d57611a0d6142ed565b905060200201356125d7565b828281518110611a2b57611a2b6142ed565b60209081029190910101526001016119f1565b50949350505050565b6000610d0d82612e9c565b60006001600160a01b038216611a94576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b611ac26129d0565b61106360006130a3565b611ad46129d0565b42821015611b245760405162461bcd60e51b815260206004820152601560248201527f496e76616c6964206f70656e696e672074696d652100000000000000000000006044820152606401610d90565b81811015611b745760405162461bcd60e51b815260206004820152601560248201527f496e76616c696420636c6f73696e672074696d652100000000000000000000006044820152606401610d90565b601782905560188190556016805464ff0000000019166401000000001790556040517f370976b57c90bf633fc37733dff06510f192d0a9b9a6a7c142c7cae2a70baa1b90611c0390849084909182526020820152606060408201819052601e908201527f43726f776473616c652073746172746564207375636365737366756c6c790000608082015260a00190565b60405180910390a15050565b611c176129d0565b600f6111cc8282614349565b611c2b6129d0565b600154600054612af891839103600019015b611c479190614409565b1115611c955760405162461bcd60e51b815260206004820152601360248201527f4d617820737570706c79206578636565646564000000000000000000000000006044820152606401610d90565b6116da3382613102565b60606000806000611caf85611a52565b905060008167ffffffffffffffff811115611ccc57611ccc613c4e565b604051908082528060200260200182016040528015611cf5578160200160208202803683370190505b5060408051608081018252600080825260208201819052918101829052606081019190915290915060015b838614611d9757611d308161311c565b91508160400151611d8f5781516001600160a01b031615611d5057815194505b876001600160a01b0316856001600160a01b031603611d8f5780838780600101985081518110611d8257611d826142ed565b6020026020010181815250505b600101611d20565b50909695505050505050565b611dab6129d0565b60148190556040517f66d9f38e124cde610194001ebee4f5b3f76dc9c9d3f3d7ed923899e629dc581b90611e1790838152604060208201819052601d908201527f50726573616c6520636f737420736574207375636365737366756c6c79000000606082015260800190565b60405180910390a150565b60128054610c8190614264565b611e376129d0565b6111cc828261319b565b60606003805461107490614264565b6060818310611e8b576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080611e9760005490565b90506001851015611ea757600194505b80841115611eb3578093505b6000611ebe87611a52565b905084861015611edd5785850381811015611ed7578091505b50611ee1565b5060005b60008167ffffffffffffffff811115611efc57611efc613c4e565b604051908082528060200260200182016040528015611f25578160200160208202803683370190505b50905081600003611f3b579350611fea92505050565b6000611f46886125d7565b905060008160400151611f57575080515b885b888114158015611f695750848714155b15611fde57611f778161311c565b92508260400151611fd65782516001600160a01b031615611f9757825191505b8a6001600160a01b0316826001600160a01b031603611fd65780848880600101995081518110611fc957611fc96142ed565b6020026020010181815250505b600101611f59565b50505092835250909150505b9392505050565b611ff96129d0565b6001600160a01b0381166000908152600d602052604090205460ff166120615760405162461bcd60e51b815260206004820181905260248201527f41646472657373206973206e6f7420696e2074686520676f6c64656e6c6973746044820152606401610d90565b6001600160a01b0381166000818152600d602052604090819020805460ff19169055517f61e26cbe0de4ca21ecddd9b0e175a92c14d7b7621484edc52e424baacbed26b990612107906020808252602d908201527f557365722072656d6f7665642066726f6d2074686520676f6c64656e6c69737460408201527f207375636365737366756c6c7900000000000000000000000000000000000000606082015260800190565b60405180910390a250565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191015b60405180910390a35050565b6121876129d0565b6121923383836116dd565b816001600160a01b0316336001600160a01b03167fb8fb28f9efdf92c8ca6c34295174057d14504a6be1f5b600ec542d5d07c8217d83604051612173918152604060208201819052601f908201527f546f6b656e20676976656177617920646f6e65207375636365737366756c6c00606082015260800190565b6122146129d0565b60106111cc8282614349565b6122286129d0565b6001600160a01b0381166000908152600d602052604090205460ff16156122b65760405162461bcd60e51b8152602060048201526024808201527f4164647265737320697320616c726561647920696e2074686520676f6c64656e60448201527f6c697374000000000000000000000000000000000000000000000000000000006064820152608401610d90565b6001600160a01b0381166000818152600d602052604090819020805460ff19166001179055517f2a7d41e2709b48ec7035b7a6e4f04d37058e83e6f2755f5b4b6e6f07aa845ed1906121079060208082526029908201527f5573657220616464656420746f2074686520676f6c64656e6c697374207375636040820152686365737366756c6c7960b81b606082015260800190565b6123536129d0565b600154600054612ee09183910360001901611c3d565b600f8054610c8190614264565b61237e6129d0565b60138190556040517f381589860a2a3c33ce35b04d4f8c89f17dbb61d4cb3e1d13cce0992e46ebe4b190611e1790838152604060208201819052601c908201527f5075626c696320636f737420736574207375636365737366756c6c7900000000606082015260800190565b6123f2612a7d565b60165460ff16156124455760405162461bcd60e51b815260206004820152601d60248201527f436f6e74726163742069732063757272656e746c7920706175736564210000006044820152606401610d90565b6016546301000000900460ff1661249e5760405162461bcd60e51b815260206004820152601460248201527f4d696e74696e67206e6f742073746172746564210000000000000000000000006044820152606401610d90565b600154600054612ee091900360001901106124fb5760405162461bcd60e51b815260206004820152601e60248201527f4d617820737570706c792065786365656465642c20736f6c64206f75742100006044820152606401610d90565b60135434101561254d5760405162461bcd60e51b815260206004820152601360248201527f496e73756666696369656e742066756e647321000000000000000000000000006044820152606401610d90565b6118c261322c565b61255d6129d0565b60116111cc8282614349565b6125748484846112e9565b6001600160a01b0383163b156125ad57612590848484846132a8565b6125ad576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6125bb6129d0565b60168054911515620100000262ff000019909216919091179055565b604080516080810182526000808252602082018190529181018290526060810191909152604080516080810182526000808252602082018190529181018290526060810191909152600183108061263057506000548310155b1561263b5792915050565b6126448361311c565b90508060400151156126565792915050565b611fea83613394565b6126676129d0565b6116da8161340c565b606061267b82612b85565b6126ed5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610d90565b612af882116127fa57601654610100900460ff16151560000361279c576012805461271790614264565b80601f016020809104026020016040519081016040528092919081815260200182805461274390614264565b80156127905780601f1061276557610100808354040283529160200191612790565b820191906000526020600020905b81548152906001019060200180831161277357829003601f168201915b50505050509050919050565b60006127a6613418565b905060008151116127c65760405180602001604052806000815250611fea565b806127d084613427565b60116040516020016127e49392919061441c565b6040516020818303038152906040529392505050565b60165462010000900460ff16151560000361281c576012805461271790614264565b60006127a66134c7565b919050565b6128336129d0565b60005b606481101561293b57600d6000838360648110612855576128556142ed565b602090810291909101516001600160a01b031682528101919091526040016000205460ff16156128a3838360648110612890576128906142ed565b60200201516001600160a01b03166134d6565b6040516020016128b391906144bc565b604051602081830303815290604052906128e05760405162461bcd60e51b8152600401610d909190613bef565b506001600d60008484606481106128f9576128f96142ed565b602090810291909101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061293381614528565b915050612836565b507f83395db7ce9786c991b70828cfe21cd4e4a75a6b4b4014f95e58ed658d183c0581604051611e179190614541565b6129736129d0565b6116da816134ed565b6129846129d0565b6001600160a01b0381166129c7576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401610d90565b6116da816130a3565b600a546001600160a01b03163314611063576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610d90565b60006001600160e01b031982167f2a55205a000000000000000000000000000000000000000000000000000000001480610d0d57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610d0d565b6002600b5403612ab9576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600b55565b336000908152600e60205260408120805460ff191660011790556015805491612ae883614528565b9190505550612af8336003613102565b336001600160a01b03167f44510b6a2c4f1634d8f179d4ab4d54e24d2ff20e8f3531a41230f21b37de42466003604051612b7b9181526040602082018190526029908201527f476f6c64656e206c697374206865726f207061636b206d696e746564207375636060820152686365737366756c6c7960b81b608082015260a00190565b60405180910390a2565b600081600111158015612b99575060005482105b8015610d0d575050600090815260046020526040902054600160e01b161590565b612bc2612a7d565b6016548190640100000000900460ff16158015612bec5750600154600054612af891900360001901105b612c5d5760405162461bcd60e51b8152602060048201526024808201527f43616e6e6f7420696e6974696174652067656e312061697264726f702074797060448201527f65203121000000000000000000000000000000000000000000000000000000006064820152608401610d90565b80600114612cad5760405162461bcd60e51b815260206004820152601560248201527f496e76616c69642061697264726f7020747970652100000000000000000000006044820152606401610d90565b612cb56129d0565b60005b8351811015612cf757612ce5848281518110612cd657612cd66142ed565b60200260200101516001613102565b80612cef81614528565b915050612cb8565b5060017f533b517095bfad269418df1a9adb8ff9a62a142e5ac99ed6177f6942606e003984604051612d29919061461f565b60405180910390a2506111cc6001600b55565b612d44612a7d565b60165481906301000000900460ff16158015612d6e5750600154600054612af89190036000190110155b612ddf5760405162461bcd60e51b8152602060048201526024808201527f43616e6e6f7420696e6974696174652067656e312061697264726f702074797060448201527f65203221000000000000000000000000000000000000000000000000000000006064820152608401610d90565b80600214612e2f5760405162461bcd60e51b815260206004820152601560248201527f496e76616c69642061697264726f7020747970652100000000000000000000006044820152606401610d90565b612e376129d0565b60005b8351811015612e6a57612e58848281518110612cd657612cd66142ed565b80612e6281614528565b915050612e3a565b5060017f533b517095bfad269418df1a9adb8ff9a62a142e5ac99ed6177f6942606e003984604051612d299190614671565b60008180600111612ef257600054811015612ef25760008181526004602052604081205490600160e01b82169003612ef0575b80600003611fea575060001901600081815260046020526040902054612ecf565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612f2f336003613102565b336001600160a01b03167fc1953b591274fa8044c8a14aa2f2d042f4a4ec29cb50ec1b0b40797706d60f566003604051612b7b918152604060208201819052601d908201527f4865726f207061636b206d696e746564207375636365737366756c6c79000000606082015260800190565b6127106bffffffffffffffffffffffff8216811015613009576040517fdfd1fc1b000000000000000000000000000000000000000000000000000000008152600481018590526bffffffffffffffffffffffff8316602482015260448101829052606401610d90565b6001600160a01b038316613053576040517f969f08520000000000000000000000000000000000000000000000000000000081526004810185905260006024820152604401610d90565b506040805180820182526001600160a01b0393841681526bffffffffffffffffffffffff92831660208083019182526000968752600990529190942093519051909116600160a01b029116179055565b600a80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6111cc8282604051806020016040528060008152506135d0565b604080516080810182526000808252602082018190529181018290526060810191909152600082815260046020526040902054610d0d90604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b6131a5828261363d565b604080516001600160a01b03841681526bffffffffffffffffffffffff83166020808301919091526060928201839052918101919091527f44656661756c7420726f79616c747920736574207375636365737366756c6c7960808201527f7480478c32d8c4b807a7bcafb3ffb2eaac087e5abbfb04beec27dedc80ebbcc89060a001611c03565b613237336001613102565b336001600160a01b03167f3106bdf16888d22e9467849f0285221a7a088f57cca491fb82ddfa8e7f207d516001604051612b7b9181526040602082018190526018908201527f4865726f206d696e746564207375636365737366756c6c790000000000000000606082015260800190565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906132dd9033908990889088906004016146c3565b6020604051808303816000875af1925050508015613318575060408051601f3d908101601f19168201909252613315918101906146ff565b60015b613376573d808015613346576040519150601f19603f3d011682016040523d82523d6000602084013e61334b565b606091505b50805160000361336e576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b604080516080810182526000808252602082018190529181018290526060810191909152610d0d6133c483612e9c565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b60126111cc8282614349565b6060600f805461107490614264565b6060600061343483613721565b600101905060008167ffffffffffffffff81111561345457613454613c4e565b6040519080825280601f01601f19166020018201604052801561347e576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461348857509392505050565b60606010805461107490614264565b6060610d0d826134e584613803565b60010161386d565b6001600160a01b0381166135435760405162461bcd60e51b815260206004820152600f60248201527f496e76616c6964206164647265737300000000000000000000000000000000006044820152606401610d90565b600c546001600160a01b03908116908216036135a15760405162461bcd60e51b815260206004820152601860248201527f53616d652061732063757272656e7420726563656976657200000000000000006044820152606401610d90565b600c805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6135da8383613a43565b6001600160a01b0383163b156116f8576000548281035b61360460008683806001019450866132a8565b613621576040516368d2bf6b60e11b815260040160405180910390fd5b8181106135f157816000541461363657600080fd5b5050505050565b6127106bffffffffffffffffffffffff821681101561369f576040517f6f483d090000000000000000000000000000000000000000000000000000000081526bffffffffffffffffffffffff8316600482015260248101829052604401610d90565b6001600160a01b0383166136e2576040517fb6d9900a00000000000000000000000000000000000000000000000000000000815260006004820152602401610d90565b50604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff9091166020909201829052600160a01b90910217600855565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061376a577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310613796576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106137b457662386f26fc10000830492506010015b6305f5e10083106137cc576305f5e100830492506008015b61271083106137e057612710830492506004015b606483106137f2576064830492506002015b600a8310610d0d5760010192915050565b600080608083901c1561381b5760809290921c916010015b604083901c156138305760409290921c916008015b602083901c156138455760209290921c916004015b601083901c1561385a5760109290921c916002015b600883901c15610d0d5760010192915050565b606082600061387d8460026142b4565b613888906002614409565b67ffffffffffffffff8111156138a0576138a0613c4e565b6040519080825280601f01601f1916602001820160405280156138ca576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110613901576139016142ed565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061394c5761394c6142ed565b60200101906001600160f81b031916908160001a90535060006139708560026142b4565b61397b906001614409565b90505b6001811115613a00577f303132333435363738396162636465660000000000000000000000000000000083600f16601081106139bc576139bc6142ed565b1a60f81b8282815181106139d2576139d26142ed565b60200101906001600160f81b031916908160001a90535060049290921c916139f98161471c565b905061397e565b50811561338c576040517fe22e27eb0000000000000000000000000000000000000000000000000000000081526004810186905260248101859052604401610d90565b6000805490829003613a81576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114613b3057808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101613af8565b5081600003613b6b576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005550505050565b8035801515811461282657600080fd5b600060208284031215613b9657600080fd5b611fea82613b74565b60005b83811015613bba578181015183820152602001613ba2565b50506000910152565b60008151808452613bdb816020860160208601613b9f565b601f01601f19169290920160200192915050565b602081526000611fea6020830184613bc3565b6001600160e01b0319811681146116da57600080fd5b600060208284031215613c2a57600080fd5b8135611fea81613c02565b600060208284031215613c4757600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613c8d57613c8d613c4e565b604052919050565b80356001600160a01b038116811461282657600080fd5b60008060408385031215613cbf57600080fd5b823567ffffffffffffffff80821115613cd757600080fd5b818501915085601f830112613ceb57600080fd5b8135602082821115613cff57613cff613c4e565b8160051b9250613d10818401613c64565b8281529284018101928181019089851115613d2a57600080fd5b948201945b84861015613d4f57613d4086613c95565b82529482019490820190613d2f565b9997909101359750505050505050565b60008060408385031215613d7257600080fd5b613d7b83613c95565b946020939093013593505050565b600060208284031215613d9b57600080fd5b611fea82613c95565b600080600060608486031215613db957600080fd5b613dc284613c95565b9250613dd060208501613c95565b9150604084013590509250925092565b60008060408385031215613df357600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b6020810160038310613e3a57634e487b7160e01b600052602160045260246000fd5b91905290565b80356bffffffffffffffffffffffff8116811461282657600080fd5b600080600060608486031215613e7157600080fd5b83359250613e8160208501613c95565b9150613e8f60408501613e40565b90509250925092565b60008060208385031215613eab57600080fd5b823567ffffffffffffffff80821115613ec357600080fd5b818501915085601f830112613ed757600080fd5b813581811115613ee657600080fd5b8660208260051b8501011115613efb57600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b81811015611d9757613f778385516001600160a01b03815116825267ffffffffffffffff602082015116602083015260408101511515604083015262ffffff60608201511660608301525050565b9284019260809290920191600101613f29565b600067ffffffffffffffff831115613fa457613fa4613c4e565b613fb7601f8401601f1916602001613c64565b9050828152838383011115613fcb57600080fd5b828260208301376000602084830101529392505050565b600060208284031215613ff457600080fd5b813567ffffffffffffffff81111561400b57600080fd5b8201601f8101841361401c57600080fd5b61338c84823560208401613f8a565b6020808252825182820181905260009190848201906040850190845b81811015611d9757835183529284019291840191600101614047565b6000806040838503121561407657600080fd5b61407f83613c95565b915061408d60208401613e40565b90509250929050565b6000806000606084860312156140ab57600080fd5b6140b484613c95565b95602085013595506040909401359392505050565b600080604083850312156140dc57600080fd5b6140e583613c95565b915061408d60208401613b74565b6000806000806080858703121561410957600080fd5b61411285613c95565b935061412060208601613c95565b925060408501359150606085013567ffffffffffffffff81111561414357600080fd5b8501601f8101871361415457600080fd5b61416387823560208401613f8a565b91505092959194509250565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608083015162ffffff169082015260808101610d0d565b6000610c808083850312156141c857600080fd5b83601f8401126141d757600080fd5b60405181810181811067ffffffffffffffff821117156141f9576141f9613c4e565b60405290830190808583111561420e57600080fd5b845b8381101561422f5761422181613c95565b825260209182019101614210565b509095945050505050565b6000806040838503121561424d57600080fd5b61425683613c95565b915061408d60208401613c95565b600181811c9082168061427857607f821691505b60208210810361429857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610d0d57610d0d61429e565b6000826142e857634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b601f8211156116f857600081815260208120601f850160051c8101602086101561432a5750805b601f850160051c820191505b818110156114c657828155600101614336565b815167ffffffffffffffff81111561436357614363613c4e565b614377816143718454614264565b84614303565b602080601f8311600181146143ac57600084156143945750858301515b600019600386901b1c1916600185901b1785556114c6565b600085815260208120601f198616915b828110156143db578886015182559484019460019091019084016143bc565b50858210156143f95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115610d0d57610d0d61429e565b60008451602061442f8285838a01613b9f565b8551918401916144428184848a01613b9f565b855492019160009061445381614264565b6001828116801561446b5760018114614480576144ac565b60ff19841687528215158302870194506144ac565b896000528560002060005b848110156144a45781548982015290830190870161448b565b505082870194505b50929a9950505050505050505050565b7f41646472657373200000000000000000000000000000000000000000000000008152600082516144f4816008850160208701613b9f565b7f20697320616c726561647920696e2074686520676f6c64656e6c6973740000006008939091019283015250602501919050565b60006001820161453a5761453a61429e565b5060010190565b6000610ca08284835b60648110156145725781516001600160a01b031683526020928301929091019060010161454a565b505050610c808301819052603390830152507f4d756c7469706c6520757365727320616464656420746f2074686520676f6c64610cc08201527f656e6c697374207375636365737366756c6c7900000000000000000000000000610ce0820152610d0001919050565b600081518084526020808501945080840160005b838110156146145781516001600160a01b0316875295820195908201906001016145ef565b509495945050505050565b60408152600061463260408301846145db565b8281036020840152602081527f41697264726f702074797065203120646f6e65207375636365737366756c6c7960208201526040810191505092915050565b60408152600061468460408301846145db565b8281036020840152602081527f41697264726f702074797065203220646f6e65207375636365737366756c6c7960208201526040810191505092915050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526146f56080830184613bc3565b9695505050505050565b60006020828403121561471157600080fd5b8151611fea81613c02565b60008161472b5761472b61429e565b50600019019056fea2646970667358221220812ca8500c57e45611f397602fec23756fc7203dec038ff666e9aac8df40941264736f6c6343000814003300000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000959807b8d94b324a74117956731f09e2893acd72000000000000000000000000731152e33fc5a94b82e6427de7e64700bdf7ee7100000000000000000000000000000000000000000000000000000000000001f40000000000000000000000000000000000000000000000000000000000000017476f6c64656e2054696465732047656e3120536b696e7300000000000000000000000000000000000000000000000000000000000000000000000000000000034754310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004f697066733a2f2f62616679626569636d67777a6b786b7769756c7a75347271356a32673365796669696a65666f6478796166666b7973366f6766676864756c7363652f68696464656e2e6a736f6e2f0000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106104125760003560e01c80637cd3011911610228578063ac5d533611610128578063c23dc68f116100bb578063e5bb6e111161008a578063eeee74e11161006f578063eeee74e114610bfc578063f2fde38b14610c1c578063fd03fdce14610c3c57600080fd5b8063e5bb6e1114610b93578063e985e9c514610bb357600080fd5b8063c23dc68f14610b06578063c797263a14610b33578063c87b56dd14610b53578063d7d6710014610b7357600080fd5b8063b7474181116100f7578063b747418114610a9d578063b88d4fde14610abd578063c03fda1f14610ad0578063c09894fb14610af057600080fd5b8063ac5d533614610a40578063aeb60e7814610a60578063b07f724e14610a75578063b4b2795a14610a9557600080fd5b806395d89b41116101bb578063a15efb311161018a578063a2cf94c71161016f578063a2cf94c7146109e0578063aa1139ae14610a00578063ac0357e014610a2057600080fd5b8063a15efb31146109a0578063a22cb465146109c057600080fd5b806395d89b411461091a57806399a2557a1461092f5780639c1401011461094f5780639fee82051461097057600080fd5b806387b8c5f1116101f757806387b8c5f1146108b157806388d7fd9f146108c75780638da5cb5b146108dc5780638f2fc60b146108fa57600080fd5b80637cd301191461082e5780638255cdc21461084e5780638462151c1461086457806386e0a17a1461089157600080fd5b80633a25f7db116103335780635c975abb116102c6578063715018a611610295578063732d113f1161027a578063732d113f146107cd57806378c4675b146107ec5780637a4ef9ab1461080c57600080fd5b8063715018a614610798578063731db1d4146107ad57600080fd5b80635c975abb146107285780636352211e146107425780636e356bc81461076257806370a082311461077857600080fd5b8063478a150111610302578063478a1501146106be5780634cd0d992146106c65780635944c753146106db5780635bbb2177146106fb57600080fd5b80633a25f7db146106545780633ccfd60b1461067657806341d426c51461068b57806342842e0e146106ab57600080fd5b806316c38b3c116103ab57806323b872dd1161037a57806323b872dd146105b357806326762272146105c6578063292cbe03146105ff5780632a55205a1461061557600080fd5b806316c38b3c1461051c57806318160ddd1461053c5780631821ddd91461056357806319be08eb1461059357600080fd5b806306fdde03116103e757806306fdde031461049c578063081812fc146104b157806308ae1282146104e9578063095ea7b31461050957600080fd5b80621336f114610417578062862a231461043957806301ffc9a714610464578063069fa9e614610494575b600080fd5b34801561042357600080fd5b50610437610432366004613b84565b610c52565b005b34801561044557600080fd5b5061044e610c74565b60405161045b9190613bef565b60405180910390f35b34801561047057600080fd5b5061048461047f366004613c18565b610d02565b604051901515815260200161045b565b610437610d13565b3480156104a857600080fd5b5061044e611065565b3480156104bd57600080fd5b506104d16104cc366004613c35565b6110f7565b6040516001600160a01b03909116815260200161045b565b3480156104f557600080fd5b50610437610504366004613cac565b611154565b610437610517366004613d5f565b6111e2565b34801561052857600080fd5b50610437610537366004613b84565b6112a8565b34801561054857600080fd5b5060015460005403600019015b60405190815260200161045b565b34801561056f57600080fd5b5061048461057e366004613d89565b600d6020526000908152604090205460ff1681565b34801561059f57600080fd5b506104376105ae366004613b84565b6112c3565b6104376105c1366004613da4565b6112e9565b3480156105d257600080fd5b506104846105e1366004613d89565b6001600160a01b03166000908152600d602052604090205460ff1690565b34801561060b57600080fd5b50610555612af881565b34801561062157600080fd5b50610635610630366004613de0565b6114ce565b604080516001600160a01b03909316835260208301919091520161045b565b34801561066057600080fd5b50610669611589565b60405161045b9190613e18565b34801561068257600080fd5b506104376115d7565b34801561069757600080fd5b506016546104849062010000900460ff1681565b6104376106b9366004613da4565b6116dd565b6104376116fd565b3480156106d257600080fd5b5061044e6118cc565b3480156106e757600080fd5b506104376106f6366004613e5c565b6118d9565b34801561070757600080fd5b5061071b610716366004613e98565b61197b565b60405161045b9190613f0d565b34801561073457600080fd5b506016546104849060ff1681565b34801561074e57600080fd5b506104d161075d366004613c35565b611a47565b34801561076e57600080fd5b5061055560145481565b34801561078457600080fd5b50610555610793366004613d89565b611a52565b3480156107a457600080fd5b50610437611aba565b3480156107b957600080fd5b506104376107c8366004613de0565b611acc565b3480156107d957600080fd5b5060165461048490610100900460ff1681565b3480156107f857600080fd5b50610437610807366004613fe2565b611c0f565b34801561081857600080fd5b5060165461048490640100000000900460ff1681565b34801561083a57600080fd5b50610437610849366004613c35565b611c23565b34801561085a57600080fd5b5061055560155481565b34801561087057600080fd5b5061088461087f366004613d89565b611c9f565b60405161045b919061402b565b34801561089d57600080fd5b506104376108ac366004613c35565b611da3565b3480156108bd57600080fd5b5061055560185481565b3480156108d357600080fd5b5061044e611e22565b3480156108e857600080fd5b50600a546001600160a01b03166104d1565b34801561090657600080fd5b50610437610915366004614063565b611e2f565b34801561092657600080fd5b5061044e611e41565b34801561093b57600080fd5b5061088461094a366004614096565b611e50565b34801561095b57600080fd5b50601654610484906301000000900460ff1681565b34801561097c57600080fd5b5061048461098b366004613d89565b600e6020526000908152604090205460ff1681565b3480156109ac57600080fd5b506104376109bb366004613d89565b611ff1565b3480156109cc57600080fd5b506104376109db3660046140c9565b612112565b3480156109ec57600080fd5b506104376109fb366004613d5f565b61217f565b348015610a0c57600080fd5b50610437610a1b366004613fe2565b61220c565b348015610a2c57600080fd5b50610437610a3b366004613d89565b612220565b348015610a4c57600080fd5b50610437610a5b366004613c35565b61234b565b348015610a6c57600080fd5b5061044e612369565b348015610a8157600080fd5b50610437610a90366004613c35565b612376565b6104376123ea565b348015610aa957600080fd5b50610437610ab8366004613fe2565b612555565b610437610acb3660046140f3565b612569565b348015610adc57600080fd5b50610437610aeb366004613b84565b6125b3565b348015610afc57600080fd5b5061055560175481565b348015610b1257600080fd5b50610b26610b21366004613c35565b6125d7565b60405161045b919061416f565b348015610b3f57600080fd5b50610437610b4e366004613fe2565b61265f565b348015610b5f57600080fd5b5061044e610b6e366004613c35565b612670565b348015610b7f57600080fd5b50610437610b8e3660046141b4565b61282b565b348015610b9f57600080fd5b50600c546104d1906001600160a01b031681565b348015610bbf57600080fd5b50610484610bce36600461423a565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610c0857600080fd5b50610437610c17366004613d89565b61296b565b348015610c2857600080fd5b50610437610c37366004613d89565b61297c565b348015610c4857600080fd5b5061055560135481565b610c5a6129d0565b601680549115156101000261ff0019909216919091179055565b60108054610c8190614264565b80601f0160208091040260200160405190810160405280929190818152602001828054610cad90614264565b8015610cfa5780601f10610ccf57610100808354040283529160200191610cfa565b820191906000526020600020905b815481529060010190602001808311610cdd57829003601f168201915b505050505081565b6000610d0d82612a16565b92915050565b610d1b612a7d565b6107d060155410610d995760405162461bcd60e51b815260206004820152602260248201527f50726573616c6520737570706c792065786365656465642c20736f6c64206f7560448201527f742100000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b601454341015610deb5760405162461bcd60e51b815260206004820152601360248201527f496e73756666696369656e742066756e647321000000000000000000000000006044820152606401610d90565b601654339060ff1615610e405760405162461bcd60e51b815260206004820152601d60248201527f436f6e74726163742069732063757272656e746c7920706175736564210000006044820152606401610d90565b601754600003610eb85760405162461bcd60e51b815260206004820152603060248201527f4d696e74696e67206e6f7420617661696c61626c65207965742c206f70656e6960448201527f6e672074696d65206e6f742073657421000000000000000000000000000000006064820152608401610d90565b6000610ec2611589565b6002811115610ed357610ed3613e02565b03610f205760405162461bcd60e51b815260206004820152601960248201527f53616c652069732063757272656e746c79206c6f636b656421000000000000006044820152606401610d90565b6002610f2a611589565b6002811115610f3b57610f3b613e02565b03610f885760405162461bcd60e51b815260206004820152601060248201527f50726573616c652074696d656f757421000000000000000000000000000000006044820152606401610d90565b6001600160a01b0381166000908152600d602052604090205460ff16610ff05760405162461bcd60e51b815260206004820152601960248201527f41646472657373206e6f7420676f6c64656e6c697374656421000000000000006044820152606401610d90565b336000908152600e602052604090205460ff16156110505760405162461bcd60e51b815260206004820152601860248201527f4164647265737320616c726561647920636c61696d65642100000000000000006044820152606401610d90565b611058612ac0565b506110636001600b55565b565b60606002805461107490614264565b80601f01602080910402602001604051908101604052809291908181526020018280546110a090614264565b80156110ed5780601f106110c2576101008083540402835291602001916110ed565b820191906000526020600020905b8154815290600101906020018083116110d057829003601f168201915b5050505050905090565b600061110282612b85565b611138576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b61115c6129d0565b6001811015801561116e575060028111155b6111ba5760405162461bcd60e51b815260206004820152601560248201527f496e76616c69642061697264726f7020747970652100000000000000000000006044820152606401610d90565b806001036111d0576111cc8282612bba565b5050565b806002036111cc576111cc8282612d3c565b60006111ed82611a47565b9050336001600160a01b0382161461123f576112098133610bce565b61123f576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6112b06129d0565b6016805460ff1916911515919091179055565b6112cb6129d0565b6016805491151563010000000263ff00000019909216919091179055565b60006112f482612e9c565b9050836001600160a01b0316816001600160a01b031614611341576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b038816909114176113a7576113718633610bce565b6113a7576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0385166113e7576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80156113f257600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003611484576001840160008181526004602052604081205490036114825760005481146114825760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b60008281526009602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046bffffffffffffffffffffffff1692820192909252829161154d5750604080518082019091526008546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff1660208201525b602081015160009061271090611571906bffffffffffffffffffffffff16876142b4565b61157b91906142cb565b915196919550909350505050565b600060175442108061159b5750601754155b156115a65750600090565b60175442101580156115ba57506018544211155b156115c55750600190565b60185442106115d45750600290565b90565b6115df6129d0565b600c546001600160a01b03166116375760405162461bcd60e51b815260206004820152601660248201527f46756e6473207265636569766572206e6f7420736574000000000000000000006044820152606401610d90565b600c546040516000916001600160a01b03169047908381818185875af1925050503d8060008114611684576040519150601f19603f3d011682016040523d82523d6000602084013e611689565b606091505b50509050806116da5760405162461bcd60e51b815260206004820152601160248201527f5769746864726177616c206661696c65640000000000000000000000000000006044820152606401610d90565b50565b6116f883838360405180602001604052806000815250612569565b505050565b611705612a7d565b600154600054612af891900360001901106117885760405162461bcd60e51b815260206004820152602a60248201527f4d617820737570706c792065786365656465642c207075626c69632073616c6560448201527f20736f6c64206f757421000000000000000000000000000000000000000000006064820152608401610d90565b6013543410156117da5760405162461bcd60e51b815260206004820152601360248201527f496e73756666696369656e742066756e647321000000000000000000000000006044820152606401610d90565b60165460ff161561182d5760405162461bcd60e51b815260206004820152601c60248201527f436f6e74726163742069732063757272656e746c7920706175736564000000006044820152606401610d90565b6002611837611589565b600281111561184857611848613e02565b146118ba5760405162461bcd60e51b8152602060048201526024808201527f50726573616c6520686173206e6f7420656e646564206f72207374617274656460448201527f20796574000000000000000000000000000000000000000000000000000000006064820152608401610d90565b6118c2612f24565b6110636001600b55565b60118054610c8190614264565b6118e16129d0565b6118ec838383612fa0565b604080518481526001600160a01b03841660208201526bffffffffffffffffffffffff831681830152608060608201819052601e908201527f546f6b656e20726f79616c747920736574207375636365737366756c6c79000060a082015290517f870dd722d4c97af1d628e76af62c4fb9181f61ae2d2457f4d6fcc25c715b3f449181900360c00190a1505050565b60608160008167ffffffffffffffff81111561199957611999613c4e565b6040519080825280602002602001820160405280156119eb57816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816119b75790505b50905060005b828114611a3e57611a19868683818110611a0d57611a0d6142ed565b905060200201356125d7565b828281518110611a2b57611a2b6142ed565b60209081029190910101526001016119f1565b50949350505050565b6000610d0d82612e9c565b60006001600160a01b038216611a94576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b611ac26129d0565b61106360006130a3565b611ad46129d0565b42821015611b245760405162461bcd60e51b815260206004820152601560248201527f496e76616c6964206f70656e696e672074696d652100000000000000000000006044820152606401610d90565b81811015611b745760405162461bcd60e51b815260206004820152601560248201527f496e76616c696420636c6f73696e672074696d652100000000000000000000006044820152606401610d90565b601782905560188190556016805464ff0000000019166401000000001790556040517f370976b57c90bf633fc37733dff06510f192d0a9b9a6a7c142c7cae2a70baa1b90611c0390849084909182526020820152606060408201819052601e908201527f43726f776473616c652073746172746564207375636365737366756c6c790000608082015260a00190565b60405180910390a15050565b611c176129d0565b600f6111cc8282614349565b611c2b6129d0565b600154600054612af891839103600019015b611c479190614409565b1115611c955760405162461bcd60e51b815260206004820152601360248201527f4d617820737570706c79206578636565646564000000000000000000000000006044820152606401610d90565b6116da3382613102565b60606000806000611caf85611a52565b905060008167ffffffffffffffff811115611ccc57611ccc613c4e565b604051908082528060200260200182016040528015611cf5578160200160208202803683370190505b5060408051608081018252600080825260208201819052918101829052606081019190915290915060015b838614611d9757611d308161311c565b91508160400151611d8f5781516001600160a01b031615611d5057815194505b876001600160a01b0316856001600160a01b031603611d8f5780838780600101985081518110611d8257611d826142ed565b6020026020010181815250505b600101611d20565b50909695505050505050565b611dab6129d0565b60148190556040517f66d9f38e124cde610194001ebee4f5b3f76dc9c9d3f3d7ed923899e629dc581b90611e1790838152604060208201819052601d908201527f50726573616c6520636f737420736574207375636365737366756c6c79000000606082015260800190565b60405180910390a150565b60128054610c8190614264565b611e376129d0565b6111cc828261319b565b60606003805461107490614264565b6060818310611e8b576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080611e9760005490565b90506001851015611ea757600194505b80841115611eb3578093505b6000611ebe87611a52565b905084861015611edd5785850381811015611ed7578091505b50611ee1565b5060005b60008167ffffffffffffffff811115611efc57611efc613c4e565b604051908082528060200260200182016040528015611f25578160200160208202803683370190505b50905081600003611f3b579350611fea92505050565b6000611f46886125d7565b905060008160400151611f57575080515b885b888114158015611f695750848714155b15611fde57611f778161311c565b92508260400151611fd65782516001600160a01b031615611f9757825191505b8a6001600160a01b0316826001600160a01b031603611fd65780848880600101995081518110611fc957611fc96142ed565b6020026020010181815250505b600101611f59565b50505092835250909150505b9392505050565b611ff96129d0565b6001600160a01b0381166000908152600d602052604090205460ff166120615760405162461bcd60e51b815260206004820181905260248201527f41646472657373206973206e6f7420696e2074686520676f6c64656e6c6973746044820152606401610d90565b6001600160a01b0381166000818152600d602052604090819020805460ff19169055517f61e26cbe0de4ca21ecddd9b0e175a92c14d7b7621484edc52e424baacbed26b990612107906020808252602d908201527f557365722072656d6f7665642066726f6d2074686520676f6c64656e6c69737460408201527f207375636365737366756c6c7900000000000000000000000000000000000000606082015260800190565b60405180910390a250565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191015b60405180910390a35050565b6121876129d0565b6121923383836116dd565b816001600160a01b0316336001600160a01b03167fb8fb28f9efdf92c8ca6c34295174057d14504a6be1f5b600ec542d5d07c8217d83604051612173918152604060208201819052601f908201527f546f6b656e20676976656177617920646f6e65207375636365737366756c6c00606082015260800190565b6122146129d0565b60106111cc8282614349565b6122286129d0565b6001600160a01b0381166000908152600d602052604090205460ff16156122b65760405162461bcd60e51b8152602060048201526024808201527f4164647265737320697320616c726561647920696e2074686520676f6c64656e60448201527f6c697374000000000000000000000000000000000000000000000000000000006064820152608401610d90565b6001600160a01b0381166000818152600d602052604090819020805460ff19166001179055517f2a7d41e2709b48ec7035b7a6e4f04d37058e83e6f2755f5b4b6e6f07aa845ed1906121079060208082526029908201527f5573657220616464656420746f2074686520676f6c64656e6c697374207375636040820152686365737366756c6c7960b81b606082015260800190565b6123536129d0565b600154600054612ee09183910360001901611c3d565b600f8054610c8190614264565b61237e6129d0565b60138190556040517f381589860a2a3c33ce35b04d4f8c89f17dbb61d4cb3e1d13cce0992e46ebe4b190611e1790838152604060208201819052601c908201527f5075626c696320636f737420736574207375636365737366756c6c7900000000606082015260800190565b6123f2612a7d565b60165460ff16156124455760405162461bcd60e51b815260206004820152601d60248201527f436f6e74726163742069732063757272656e746c7920706175736564210000006044820152606401610d90565b6016546301000000900460ff1661249e5760405162461bcd60e51b815260206004820152601460248201527f4d696e74696e67206e6f742073746172746564210000000000000000000000006044820152606401610d90565b600154600054612ee091900360001901106124fb5760405162461bcd60e51b815260206004820152601e60248201527f4d617820737570706c792065786365656465642c20736f6c64206f75742100006044820152606401610d90565b60135434101561254d5760405162461bcd60e51b815260206004820152601360248201527f496e73756666696369656e742066756e647321000000000000000000000000006044820152606401610d90565b6118c261322c565b61255d6129d0565b60116111cc8282614349565b6125748484846112e9565b6001600160a01b0383163b156125ad57612590848484846132a8565b6125ad576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6125bb6129d0565b60168054911515620100000262ff000019909216919091179055565b604080516080810182526000808252602082018190529181018290526060810191909152604080516080810182526000808252602082018190529181018290526060810191909152600183108061263057506000548310155b1561263b5792915050565b6126448361311c565b90508060400151156126565792915050565b611fea83613394565b6126676129d0565b6116da8161340c565b606061267b82612b85565b6126ed5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610d90565b612af882116127fa57601654610100900460ff16151560000361279c576012805461271790614264565b80601f016020809104026020016040519081016040528092919081815260200182805461274390614264565b80156127905780601f1061276557610100808354040283529160200191612790565b820191906000526020600020905b81548152906001019060200180831161277357829003601f168201915b50505050509050919050565b60006127a6613418565b905060008151116127c65760405180602001604052806000815250611fea565b806127d084613427565b60116040516020016127e49392919061441c565b6040516020818303038152906040529392505050565b60165462010000900460ff16151560000361281c576012805461271790614264565b60006127a66134c7565b919050565b6128336129d0565b60005b606481101561293b57600d6000838360648110612855576128556142ed565b602090810291909101516001600160a01b031682528101919091526040016000205460ff16156128a3838360648110612890576128906142ed565b60200201516001600160a01b03166134d6565b6040516020016128b391906144bc565b604051602081830303815290604052906128e05760405162461bcd60e51b8152600401610d909190613bef565b506001600d60008484606481106128f9576128f96142ed565b602090810291909101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061293381614528565b915050612836565b507f83395db7ce9786c991b70828cfe21cd4e4a75a6b4b4014f95e58ed658d183c0581604051611e179190614541565b6129736129d0565b6116da816134ed565b6129846129d0565b6001600160a01b0381166129c7576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401610d90565b6116da816130a3565b600a546001600160a01b03163314611063576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610d90565b60006001600160e01b031982167f2a55205a000000000000000000000000000000000000000000000000000000001480610d0d57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610d0d565b6002600b5403612ab9576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600b55565b336000908152600e60205260408120805460ff191660011790556015805491612ae883614528565b9190505550612af8336003613102565b336001600160a01b03167f44510b6a2c4f1634d8f179d4ab4d54e24d2ff20e8f3531a41230f21b37de42466003604051612b7b9181526040602082018190526029908201527f476f6c64656e206c697374206865726f207061636b206d696e746564207375636060820152686365737366756c6c7960b81b608082015260a00190565b60405180910390a2565b600081600111158015612b99575060005482105b8015610d0d575050600090815260046020526040902054600160e01b161590565b612bc2612a7d565b6016548190640100000000900460ff16158015612bec5750600154600054612af891900360001901105b612c5d5760405162461bcd60e51b8152602060048201526024808201527f43616e6e6f7420696e6974696174652067656e312061697264726f702074797060448201527f65203121000000000000000000000000000000000000000000000000000000006064820152608401610d90565b80600114612cad5760405162461bcd60e51b815260206004820152601560248201527f496e76616c69642061697264726f7020747970652100000000000000000000006044820152606401610d90565b612cb56129d0565b60005b8351811015612cf757612ce5848281518110612cd657612cd66142ed565b60200260200101516001613102565b80612cef81614528565b915050612cb8565b5060017f533b517095bfad269418df1a9adb8ff9a62a142e5ac99ed6177f6942606e003984604051612d29919061461f565b60405180910390a2506111cc6001600b55565b612d44612a7d565b60165481906301000000900460ff16158015612d6e5750600154600054612af89190036000190110155b612ddf5760405162461bcd60e51b8152602060048201526024808201527f43616e6e6f7420696e6974696174652067656e312061697264726f702074797060448201527f65203221000000000000000000000000000000000000000000000000000000006064820152608401610d90565b80600214612e2f5760405162461bcd60e51b815260206004820152601560248201527f496e76616c69642061697264726f7020747970652100000000000000000000006044820152606401610d90565b612e376129d0565b60005b8351811015612e6a57612e58848281518110612cd657612cd66142ed565b80612e6281614528565b915050612e3a565b5060017f533b517095bfad269418df1a9adb8ff9a62a142e5ac99ed6177f6942606e003984604051612d299190614671565b60008180600111612ef257600054811015612ef25760008181526004602052604081205490600160e01b82169003612ef0575b80600003611fea575060001901600081815260046020526040902054612ecf565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612f2f336003613102565b336001600160a01b03167fc1953b591274fa8044c8a14aa2f2d042f4a4ec29cb50ec1b0b40797706d60f566003604051612b7b918152604060208201819052601d908201527f4865726f207061636b206d696e746564207375636365737366756c6c79000000606082015260800190565b6127106bffffffffffffffffffffffff8216811015613009576040517fdfd1fc1b000000000000000000000000000000000000000000000000000000008152600481018590526bffffffffffffffffffffffff8316602482015260448101829052606401610d90565b6001600160a01b038316613053576040517f969f08520000000000000000000000000000000000000000000000000000000081526004810185905260006024820152604401610d90565b506040805180820182526001600160a01b0393841681526bffffffffffffffffffffffff92831660208083019182526000968752600990529190942093519051909116600160a01b029116179055565b600a80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6111cc8282604051806020016040528060008152506135d0565b604080516080810182526000808252602082018190529181018290526060810191909152600082815260046020526040902054610d0d90604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b6131a5828261363d565b604080516001600160a01b03841681526bffffffffffffffffffffffff83166020808301919091526060928201839052918101919091527f44656661756c7420726f79616c747920736574207375636365737366756c6c7960808201527f7480478c32d8c4b807a7bcafb3ffb2eaac087e5abbfb04beec27dedc80ebbcc89060a001611c03565b613237336001613102565b336001600160a01b03167f3106bdf16888d22e9467849f0285221a7a088f57cca491fb82ddfa8e7f207d516001604051612b7b9181526040602082018190526018908201527f4865726f206d696e746564207375636365737366756c6c790000000000000000606082015260800190565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906132dd9033908990889088906004016146c3565b6020604051808303816000875af1925050508015613318575060408051601f3d908101601f19168201909252613315918101906146ff565b60015b613376573d808015613346576040519150601f19603f3d011682016040523d82523d6000602084013e61334b565b606091505b50805160000361336e576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b604080516080810182526000808252602082018190529181018290526060810191909152610d0d6133c483612e9c565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b60126111cc8282614349565b6060600f805461107490614264565b6060600061343483613721565b600101905060008167ffffffffffffffff81111561345457613454613c4e565b6040519080825280601f01601f19166020018201604052801561347e576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461348857509392505050565b60606010805461107490614264565b6060610d0d826134e584613803565b60010161386d565b6001600160a01b0381166135435760405162461bcd60e51b815260206004820152600f60248201527f496e76616c6964206164647265737300000000000000000000000000000000006044820152606401610d90565b600c546001600160a01b03908116908216036135a15760405162461bcd60e51b815260206004820152601860248201527f53616d652061732063757272656e7420726563656976657200000000000000006044820152606401610d90565b600c805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6135da8383613a43565b6001600160a01b0383163b156116f8576000548281035b61360460008683806001019450866132a8565b613621576040516368d2bf6b60e11b815260040160405180910390fd5b8181106135f157816000541461363657600080fd5b5050505050565b6127106bffffffffffffffffffffffff821681101561369f576040517f6f483d090000000000000000000000000000000000000000000000000000000081526bffffffffffffffffffffffff8316600482015260248101829052604401610d90565b6001600160a01b0383166136e2576040517fb6d9900a00000000000000000000000000000000000000000000000000000000815260006004820152602401610d90565b50604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff9091166020909201829052600160a01b90910217600855565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061376a577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310613796576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106137b457662386f26fc10000830492506010015b6305f5e10083106137cc576305f5e100830492506008015b61271083106137e057612710830492506004015b606483106137f2576064830492506002015b600a8310610d0d5760010192915050565b600080608083901c1561381b5760809290921c916010015b604083901c156138305760409290921c916008015b602083901c156138455760209290921c916004015b601083901c1561385a5760109290921c916002015b600883901c15610d0d5760010192915050565b606082600061387d8460026142b4565b613888906002614409565b67ffffffffffffffff8111156138a0576138a0613c4e565b6040519080825280601f01601f1916602001820160405280156138ca576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110613901576139016142ed565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061394c5761394c6142ed565b60200101906001600160f81b031916908160001a90535060006139708560026142b4565b61397b906001614409565b90505b6001811115613a00577f303132333435363738396162636465660000000000000000000000000000000083600f16601081106139bc576139bc6142ed565b1a60f81b8282815181106139d2576139d26142ed565b60200101906001600160f81b031916908160001a90535060049290921c916139f98161471c565b905061397e565b50811561338c576040517fe22e27eb0000000000000000000000000000000000000000000000000000000081526004810186905260248101859052604401610d90565b6000805490829003613a81576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114613b3057808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101613af8565b5081600003613b6b576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005550505050565b8035801515811461282657600080fd5b600060208284031215613b9657600080fd5b611fea82613b74565b60005b83811015613bba578181015183820152602001613ba2565b50506000910152565b60008151808452613bdb816020860160208601613b9f565b601f01601f19169290920160200192915050565b602081526000611fea6020830184613bc3565b6001600160e01b0319811681146116da57600080fd5b600060208284031215613c2a57600080fd5b8135611fea81613c02565b600060208284031215613c4757600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613c8d57613c8d613c4e565b604052919050565b80356001600160a01b038116811461282657600080fd5b60008060408385031215613cbf57600080fd5b823567ffffffffffffffff80821115613cd757600080fd5b818501915085601f830112613ceb57600080fd5b8135602082821115613cff57613cff613c4e565b8160051b9250613d10818401613c64565b8281529284018101928181019089851115613d2a57600080fd5b948201945b84861015613d4f57613d4086613c95565b82529482019490820190613d2f565b9997909101359750505050505050565b60008060408385031215613d7257600080fd5b613d7b83613c95565b946020939093013593505050565b600060208284031215613d9b57600080fd5b611fea82613c95565b600080600060608486031215613db957600080fd5b613dc284613c95565b9250613dd060208501613c95565b9150604084013590509250925092565b60008060408385031215613df357600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b6020810160038310613e3a57634e487b7160e01b600052602160045260246000fd5b91905290565b80356bffffffffffffffffffffffff8116811461282657600080fd5b600080600060608486031215613e7157600080fd5b83359250613e8160208501613c95565b9150613e8f60408501613e40565b90509250925092565b60008060208385031215613eab57600080fd5b823567ffffffffffffffff80821115613ec357600080fd5b818501915085601f830112613ed757600080fd5b813581811115613ee657600080fd5b8660208260051b8501011115613efb57600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b81811015611d9757613f778385516001600160a01b03815116825267ffffffffffffffff602082015116602083015260408101511515604083015262ffffff60608201511660608301525050565b9284019260809290920191600101613f29565b600067ffffffffffffffff831115613fa457613fa4613c4e565b613fb7601f8401601f1916602001613c64565b9050828152838383011115613fcb57600080fd5b828260208301376000602084830101529392505050565b600060208284031215613ff457600080fd5b813567ffffffffffffffff81111561400b57600080fd5b8201601f8101841361401c57600080fd5b61338c84823560208401613f8a565b6020808252825182820181905260009190848201906040850190845b81811015611d9757835183529284019291840191600101614047565b6000806040838503121561407657600080fd5b61407f83613c95565b915061408d60208401613e40565b90509250929050565b6000806000606084860312156140ab57600080fd5b6140b484613c95565b95602085013595506040909401359392505050565b600080604083850312156140dc57600080fd5b6140e583613c95565b915061408d60208401613b74565b6000806000806080858703121561410957600080fd5b61411285613c95565b935061412060208601613c95565b925060408501359150606085013567ffffffffffffffff81111561414357600080fd5b8501601f8101871361415457600080fd5b61416387823560208401613f8a565b91505092959194509250565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608083015162ffffff169082015260808101610d0d565b6000610c808083850312156141c857600080fd5b83601f8401126141d757600080fd5b60405181810181811067ffffffffffffffff821117156141f9576141f9613c4e565b60405290830190808583111561420e57600080fd5b845b8381101561422f5761422181613c95565b825260209182019101614210565b509095945050505050565b6000806040838503121561424d57600080fd5b61425683613c95565b915061408d60208401613c95565b600181811c9082168061427857607f821691505b60208210810361429857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610d0d57610d0d61429e565b6000826142e857634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b601f8211156116f857600081815260208120601f850160051c8101602086101561432a5750805b601f850160051c820191505b818110156114c657828155600101614336565b815167ffffffffffffffff81111561436357614363613c4e565b614377816143718454614264565b84614303565b602080601f8311600181146143ac57600084156143945750858301515b600019600386901b1c1916600185901b1785556114c6565b600085815260208120601f198616915b828110156143db578886015182559484019460019091019084016143bc565b50858210156143f95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115610d0d57610d0d61429e565b60008451602061442f8285838a01613b9f565b8551918401916144428184848a01613b9f565b855492019160009061445381614264565b6001828116801561446b5760018114614480576144ac565b60ff19841687528215158302870194506144ac565b896000528560002060005b848110156144a45781548982015290830190870161448b565b505082870194505b50929a9950505050505050505050565b7f41646472657373200000000000000000000000000000000000000000000000008152600082516144f4816008850160208701613b9f565b7f20697320616c726561647920696e2074686520676f6c64656e6c6973740000006008939091019283015250602501919050565b60006001820161453a5761453a61429e565b5060010190565b6000610ca08284835b60648110156145725781516001600160a01b031683526020928301929091019060010161454a565b505050610c808301819052603390830152507f4d756c7469706c6520757365727320616464656420746f2074686520676f6c64610cc08201527f656e6c697374207375636365737366756c6c7900000000000000000000000000610ce0820152610d0001919050565b600081518084526020808501945080840160005b838110156146145781516001600160a01b0316875295820195908201906001016145ef565b509495945050505050565b60408152600061463260408301846145db565b8281036020840152602081527f41697264726f702074797065203120646f6e65207375636365737366756c6c7960208201526040810191505092915050565b60408152600061468460408301846145db565b8281036020840152602081527f41697264726f702074797065203220646f6e65207375636365737366756c6c7960208201526040810191505092915050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526146f56080830184613bc3565b9695505050505050565b60006020828403121561471157600080fd5b8151611fea81613c02565b60008161472b5761472b61429e565b50600019019056fea2646970667358221220812ca8500c57e45611f397602fec23756fc7203dec038ff666e9aac8df40941264736f6c63430008140033

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

00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000959807b8d94b324a74117956731f09e2893acd72000000000000000000000000731152e33fc5a94b82e6427de7e64700bdf7ee7100000000000000000000000000000000000000000000000000000000000001f40000000000000000000000000000000000000000000000000000000000000017476f6c64656e2054696465732047656e3120536b696e7300000000000000000000000000000000000000000000000000000000000000000000000000000000034754310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004f697066733a2f2f62616679626569636d67777a6b786b7769756c7a75347271356a32673365796669696a65666f6478796166666b7973366f6766676864756c7363652f68696464656e2e6a736f6e2f0000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _tokenName (string): Golden Tides Gen1 Skins
Arg [1] : _tokenSymbol (string): GT1
Arg [2] : _hiddenMetadataUri (string): ipfs://bafybeicmgwzkxkwiulzu4rq5j2g3eyfiijefodxyaffkys6ogfghdulsce/hidden.json/
Arg [3] : initialOwner (address): 0x959807B8D94B324A74117956731F09E2893aCd72
Arg [4] : _fundsReceiver (address): 0x731152e33fc5A94b82E6427de7e64700BdF7ee71
Arg [5] : _royaltyFeesInBips (uint96): 500

-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [3] : 000000000000000000000000959807b8d94b324a74117956731f09e2893acd72
Arg [4] : 000000000000000000000000731152e33fc5a94b82e6427de7e64700bdf7ee71
Arg [5] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000017
Arg [7] : 476f6c64656e2054696465732047656e3120536b696e73000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [9] : 4754310000000000000000000000000000000000000000000000000000000000
Arg [10] : 000000000000000000000000000000000000000000000000000000000000004f
Arg [11] : 697066733a2f2f62616679626569636d67777a6b786b7769756c7a7534727135
Arg [12] : 6a32673365796669696a65666f6478796166666b7973366f6766676864756c73
Arg [13] : 63652f68696464656e2e6a736f6e2f0000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
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.