ETH Price: $3,362.12 (+0.32%)

Token

Good Minds (GM)
 

Overview

Max Total Supply

6,000 GM

Holders

1,242

Total Transfers

-

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Good Minds is an indie, art-focused NFT collection with multiple characters. There are 6000 randomly generated and lovingly curated outputs that exist together on the Ethereum Blockchain.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
GoodMinds

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 11 : GoodMinds.sol
//SPDX-License-Identifier: MIT

//                                                       *,                                 @@@@@@@@
//                                                   @@@@  *@.     @@@@@@@@     @@@@@@@@@   (@@    @@@@
//                                                 @@@           @@@      @@@ @@@      @@@  %@@      @@@
//                                                @@@    ,@@@&   @@       @@@ @@       %@@  /@@       @@
//                                                @@@    .   @@@ @@.      @@@ @@@      @@@  ,@@      @@@
//                                                 @@@       @@@  @@@. #@@@&   @@@@@@@@@*    @@ *@@@@@
//               &@@         @@@                    .@@@@@@@@@      .@@@#                    @@@@
//               @@@        @@@
//  @@%          @@@      .@@@         (@@@      @@       @@@     @@   @@@      @@&  @@@@@@@      @@@@@@@@%
//  @@@          @@@      @@@        @@@@       @@@@@   @@@@@#    @@   @@@@@    @@   @@   ,@@@   @@/
//   @@@                           @@@@        ,@@ %@@@@@@ @@@    @@&  @@&@@@# @@@   @@     @@@  @@@@@@%
//    @@@                           (          @@@   @@@    @@@   @@@  @@/  @@@@@@   @@*    @@@       *@@@@.
//              @@@@@@@@@@@@@@@                @@&          #@@   @@@  @@.   /@@@    @@&  @@@@           ,@@
//         &@@@@              @@@@             @@            @@@   @@  @@            @@@@@@.     @@@@@@@@@@&
//      .@@@                     @@@@                                                                .(/
//     @@.                         @@@@
//                                   @@@%   @@@@@@@@@@@@@@@@@@@@@@(           @@@@@@@@@@@@@@@@@@@@@@@@@@@@@&
//             .@@@@@@@@@@@@           @@@                      @@#          @@@
//                         @@@@          @@@                   @@@         @@@*
//                           @@@           @@@@                @@&        @@@
//                    @@      @@@           @@@@              @@@       @@@@
//          @@@@*,%@@@(      &@@        @@@@@(               @@@      (@@@
//                         @@@@         @@,                 @@@     @@@@
//                    *@@@@@            @@@@@@@@@@@@      @@@.  *@@@@/
//             @@@@@@@@&                        @@@@     @@@@@@@@@
//       (@@@@@@                             @@@@@/
//     @@@@                                 @@@@&@@@@@@
//    @@@                                           @@@
//    @@%            @@@@@@@@@@@@@@@@           @@@@@%
//    /@@(      @@@@@@             @@@     @@@@@@
//      @@@@%@@@@               @@@@%       @@@
//         %@@@@@@@@@@@@@@@@@@@@@           ,@@
//         @@                                @@@
//        @@@                                (@@
//        /@@                                 @@@
//         #@@@                               @@@
//           @@@@&                           @@@
//              .@@@@@@&                @@@@@@*
//                     @@@@@@@@@@@@@@@@@@(

pragma solidity ^0.8.13;

/// @author: Good Minds
/// @title: Good Minds

// Audited by: @backseats_eth

import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";

error AllowlistClosed();
error BadProof();
error ExceedsMaxMintsAllowlist(uint256 currentBalance, uint256 maxLimit);
error ExceedsMaxMintsPerTx(uint256 maxMintsPerTx);
error ExceedsMaxSupply(uint256 maxSupply);
error ExceedsTeamSupply(uint256 teamSupply);
error NoContracts();
error PublicClosed();
error WrongAmount(uint256 sent, uint256 required);

contract GoodMinds is ERC721A, Ownable, ReentrancyGuard, VRFConsumerBaseV2 {
    using ECDSA for bytes32;
    using Strings for uint256;

    VRFCoordinatorV2Interface COORDINATOR;

    struct ShuffleData {
        uint256 seed;
        uint256 until;
    }

    ShuffleData[] shuffleData;

    enum SaleState {
        CLOSED,
        ALLOWLIST,
        PUBLIC
    }

    SaleState public saleState;

    mapping(address => uint256) public allowlist;

    string private _defaultURI;
    string private _tokenBaseURI;
    string public contractURI;

    bytes32 public merkleRoot;
    bool isShuffled = true;

    uint64 public s_subscriptionId;
    uint256 public s_requestId;
    uint256 public maxSupply = 6000;
    uint256 public constant maxMintPerTx = 10;
    uint256 private constant _teamSupply = 300;
    uint256 private constant _availableForAllowlist = 876;
    uint256 private constant _allowlistWalletLimit = 2;
    uint256 public mintPrice = 30000000000000000; // 0.03 ETH

    address private _withdrawalAddress;

    event SetDefaultURI(string indexed collectionDefaultURI);
    event SetTokenBaseURI(string indexed tokenBaseURI);
    event SetContractURI(string indexed contractURI);

    modifier mintCompliance(uint256 _quantity) {
        if (tx.origin != msg.sender) revert NoContracts();
        if (totalSupply() + _quantity > maxSupply)
            revert ExceedsMaxSupply(maxSupply);
        if (_quantity > maxMintPerTx) revert ExceedsMaxMintsPerTx(maxMintPerTx);
        if (msg.value != _quantity * mintPrice)
            revert WrongAmount(msg.value, _quantity * mintPrice);
        _;
    }

    constructor(
        string memory _name,
        string memory _symbol,
        uint64 _subscriptionId,
        address _vrfCoordinator
    ) payable ERC721A(_name, _symbol) VRFConsumerBaseV2(_vrfCoordinator) {
        COORDINATOR = VRFCoordinatorV2Interface(_vrfCoordinator);
        s_subscriptionId = _subscriptionId;
    }

    function setDefaultURI(string memory defaultURI_) external onlyOwner {
        _defaultURI = defaultURI_;
        emit SetDefaultURI(_defaultURI);
    }

    function setTokenBaseURI(string memory tokenBaseURI_) external onlyOwner {
        _tokenBaseURI = tokenBaseURI_;
        emit SetTokenBaseURI(_tokenBaseURI);
    }

    function setContractURI(string memory _contractURI) external onlyOwner {
        contractURI = _contractURI;
        emit SetContractURI(contractURI);
    }

    function setMintPrice(uint256 _mintPrice) external onlyOwner {
        mintPrice = _mintPrice;
    }

    function setSaleState(uint256 _state) external onlyOwner {
        require(_state <= uint256(SaleState.PUBLIC), "Bad state");
        saleState = SaleState(_state);
    }

    /// @notice Set the maxSupply
    /// @dev maxSupply can only be deflationary
    function setMaxSupply(uint256 _maxSupply) external onlyOwner {
        require(_maxSupply < maxSupply, "Too high");
        maxSupply = _maxSupply;
    }

    function setWithdrawalAddress(address withdrawalAddress_)
        external
        onlyOwner
    {
        require(withdrawalAddress_ != address(0), "Reject zero-account");
        _withdrawalAddress = withdrawalAddress_;
    }

    /// Allows the team to mint the allotted amount
    function teamMint(uint256 _quantity) external onlyOwner {
        if (totalSupply() + _quantity > _teamSupply)
            revert ExceedsTeamSupply(_teamSupply);
        _mint(msg.sender, _quantity);
    }

    /// Mint via the allowlist
    function allowlistMint(bytes32[] calldata _merkleProof, uint256 _quantity)
        external
        payable
        nonReentrant
        mintCompliance(_quantity)
    {
        if (saleState != SaleState.ALLOWLIST) revert AllowlistClosed();
        if (allowlist[msg.sender] + _quantity > _allowlistWalletLimit)
            revert ExceedsMaxMintsAllowlist(
                allowlist[msg.sender],
                _allowlistWalletLimit
            );

        bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
        if (!MerkleProof.verify(_merkleProof, merkleRoot, leaf))
            revert BadProof();

        _mint(msg.sender, _quantity);
        allowlist[msg.sender] += _quantity;
    }

    function publicMint(uint256 _quantity)
        external
        payable
        mintCompliance(_quantity)
    {
        if (saleState != SaleState.PUBLIC) revert PublicClosed();
        _mint(msg.sender, _quantity);
    }

    /// "Unshuffle" the metadata so that the URI matches tokenId
    function unshuffle(string memory tokenBaseURI_) external onlyOwner {
        isShuffled = false;
        _tokenBaseURI = tokenBaseURI_;
        emit SetTokenBaseURI(_tokenBaseURI);
    }

    /// Set the new Merkle Root
    function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
        merkleRoot = _merkleRoot;
    }

    /// Withdraw funds from the contract
    function withdrawFunds() external onlyOwner {
        (bool sent, ) = payable(_withdrawalAddress).call{
            value: address(this).balance
        }("");
        require(sent, "Withdraw failed");
    }

    /// @notice Request random number through Chainlink VRF
    /// @param _keyHash Chainlink-provided Key Hash
    /// @param _requestConfirmations Variable number of confirmations
    /// @param _callbackGasLimit Callback function gas limit
    /// @param _numWords Total number of random numbers to request
    function requestRandomWords(
        bytes32 _keyHash,
        uint16 _requestConfirmations,
        uint32 _callbackGasLimit,
        uint32 _numWords
    ) external onlyOwner {
        require(totalSupply() > 0, "No tokens minted");
        if (shuffleData.length > 0) {
            require(totalSupply() > _getLastRevealed(), "None to reveal");
        }
        s_requestId = COORDINATOR.requestRandomWords(
            _keyHash,
            s_subscriptionId,
            _requestConfirmations,
            _callbackGasLimit,
            _numWords
        );
    }

    function fulfillRandomWords(uint256, uint256[] memory randomWords)
        internal
        override
    {
        /*
         * Instead of setting randomWords to an existing var, we
         * push each call to an array so that we can keep track
         * of the seed for each batch.
         */
        shuffleData.push(ShuffleData(randomWords[0], totalSupply() - 1));
    }

    /// Custom tokenURI that uses a custom _getMetadata function for batch reveals
    function tokenURI(uint256 _tokenId)
        public
        view
        override(ERC721A)
        returns (string memory)
    {
        require(_exists(_tokenId), "Query for nonexistent token");
        require(bytes(_tokenBaseURI).length > 0, "tokenBaseURI not set");

        return _getMetadata(_tokenId);
    }

    /// Generates the metadata for various cases
    function _getMetadata(uint256 _tokenId)
        private
        view
        returns (string memory)
    {
        // If true, the token has not revealed yet
        if (_tokenId > _getLastRevealed() || (shuffleData.length == 0)) {
            return _defaultURI;
        }
        // This will return once the metadata is "unshuffled"
        if (!isShuffled) {
            return string.concat(_tokenBaseURI, _tokenId.toString());
        }

        uint256 lowestToken;
        uint256 metadataForTokenId;

        for (uint256 i; i < shuffleData.length; i++) {
            ShuffleData memory batch = shuffleData[i];

            /*
             * This will keep looping through batches until the tokenId
             * requested is in the current batch
             */
            if (_tokenId > batch.until) {
                continue;
            }

            // Gets the lowest token in the current batch to reveal
            lowestToken = i > 0 ? shuffleData[i - 1].until + 1 : 0;

            uint256 batchSize = batch.until - lowestToken + 1;

            uint256[] memory metadata = new uint256[](batchSize);

            // Initializes the metadata array with the base values
            for (i = lowestToken; i <= batch.until; i++) {
                metadata[i - lowestToken] = i;
            }

            /*
             * Attempts to swap every value in the metadata with another. This
             * method uses Chainlink VRF to generate a random seed to randomly swap
             * the base value with another. Though rare, it is possible for a base
             * value not to be swapped.
             */
            for (i = lowestToken; i < batch.until; i++) {
                uint256 swap = (uint256(keccak256(abi.encode(batch.seed, i))) %
                    (batchSize));
                (metadata[i - lowestToken], metadata[swap]) = (
                    metadata[swap],
                    metadata[i - lowestToken]
                );
            }
            // Updates metadataForTokenId for the following return statement
            metadataForTokenId = metadata[_tokenId - lowestToken];
        }
        return string.concat(_tokenBaseURI, metadataForTokenId.toString());
    }

    /// Gets the last tokenId of the last batch to be revealed
    function _getLastRevealed() private view returns (uint256) {
        return
            shuffleData.length > 0
                ? shuffleData[shuffleData.length - 1].until
                : 0;
    }
}

File 2 of 11 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.0.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

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

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

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

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

    /**
     * @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 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 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 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 returns (uint256) {
        return _burnCounter;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    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: 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.
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view 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 auxillary 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 auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal {
        uint256 packed = _packedAddressData[owner];
        uint256 auxCasted;
        assembly { // Cast aux without masking.
            auxCasted := aux
        }
        packed = (packed & BITMASK_AUX_COMPLEMENT) | (auxCasted << BITPOS_AUX);
        _packedAddressData[owner] = packed;
    }

    /**
     * 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 ownership that has an address and is not burned
                        // before an ownership that does not have an address and is not burned.
                        // Hence, curr will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed is zero.
                        while (packed == 0) {
                            packed = _packedOwnerships[--curr];
                        }
                        return packed;
                    }
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

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

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

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

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

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

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        string memory baseURI = _baseURI();
        return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _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, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

    /**
     * @dev Casts the address to uint256 without masking.
     */
    function _addressToUint256(address value) private pure returns (uint256 result) {
        assembly {
            result := value
        }
    }

    /**
     * @dev Casts the boolean to uint256 without branching.
     */
    function _boolToUint256(bool value) private pure returns (uint256 result) {
        assembly {
            result := value
        }
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public override {
        address owner = address(uint160(_packedOwnershipOf(tokenId)));
        if (to == owner) revert ApprovalToCurrentOwner();

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

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

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

        return _tokenApprovals[tokenId];
    }

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

        _operatorApprovals[_msgSenderERC721A()][operator] = approved;
        emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, '');
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        _transfer(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

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

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

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

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

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the balance and number minted.
            _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] =
                _addressToUint256(to) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED);

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

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

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

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

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the balance and number minted.
            _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] =
                _addressToUint256(to) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED);

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

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

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

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) private {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

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

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

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

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner.
        delete _tokenApprovals[tokenId];

        // 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] =
                _addressToUint256(to) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                BITMASK_NEXT_INITIALIZED;

            // 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 `_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));

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

            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        }

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

        // Clear approvals from the previous owner.
        delete _tokenApprovals[tokenId];

        // 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] =
                _addressToUint256(from) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                BITMASK_BURNED | 
                BITMASK_NEXT_INITIALIZED;

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

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try 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))
                }
            }
        }
    }

    /**
     * @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 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 returns (string memory ptr) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit), 
            // but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged.
            // We will need 1 32-byte word to store the length, 
            // and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128.
            ptr := add(mload(0x40), 128)
            // Update the free memory pointer to allocate.
            mstore(0x40, ptr)

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

            // We write the string from the rightmost digit to the leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            // Costs a bit more than early returning for the zero case,
            // but cheaper in terms of deployment and overall runtime costs.
            for { 
                // Initialize and perform the first pass without check.
                let temp := value
                // Move the pointer 1 byte leftwards to point to an empty character slot.
                ptr := sub(ptr, 1)
                // Write the character to the pointer. 48 is the ASCII index of '0'.
                mstore8(ptr, add(48, mod(temp, 10)))
                temp := div(temp, 10)
            } temp { 
                // Keep dividing `temp` until zero.
                temp := div(temp, 10)
            } { // Body of the for loop.
                ptr := sub(ptr, 1)
                mstore8(ptr, add(48, mod(temp, 10)))
            }
            
            let length := sub(end, ptr)
            // Move the pointer 32 bytes leftwards to make room for the length.
            ptr := sub(ptr, 32)
            // Store the length.
            mstore(ptr, length)
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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

File 4 of 11 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

    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() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

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

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

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

File 6 of 11 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

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

pragma solidity ^0.8.0;

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

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

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

File 8 of 11 : VRFCoordinatorV2Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface VRFCoordinatorV2Interface {
  /**
   * @notice Get configuration relevant for making requests
   * @return minimumRequestConfirmations global min for request confirmations
   * @return maxGasLimit global max for request gas limit
   * @return s_provingKeyHashes list of registered key hashes
   */
  function getRequestConfig()
    external
    view
    returns (
      uint16,
      uint32,
      bytes32[] memory
    );

  /**
   * @notice Request a set of random words.
   * @param keyHash - Corresponds to a particular oracle job which uses
   * that key for generating the VRF proof. Different keyHash's have different gas price
   * ceilings, so you can select a specific one to bound your maximum per request cost.
   * @param subId  - The ID of the VRF subscription. Must be funded
   * with the minimum subscription balance required for the selected keyHash.
   * @param minimumRequestConfirmations - How many blocks you'd like the
   * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS
   * for why you may want to request more. The acceptable range is
   * [minimumRequestBlockConfirmations, 200].
   * @param callbackGasLimit - How much gas you'd like to receive in your
   * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords
   * may be slightly less than this amount because of gas used calling the function
   * (argument decoding etc.), so you may need to request slightly more than you expect
   * to have inside fulfillRandomWords. The acceptable range is
   * [0, maxGasLimit]
   * @param numWords - The number of uint256 random values you'd like to receive
   * in your fulfillRandomWords callback. Note these numbers are expanded in a
   * secure way by the VRFCoordinator from a single random value supplied by the oracle.
   * @return requestId - A unique identifier of the request. Can be used to match
   * a request to a response in fulfillRandomWords.
   */
  function requestRandomWords(
    bytes32 keyHash,
    uint64 subId,
    uint16 minimumRequestConfirmations,
    uint32 callbackGasLimit,
    uint32 numWords
  ) external returns (uint256 requestId);

  /**
   * @notice Create a VRF subscription.
   * @return subId - A unique subscription id.
   * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer.
   * @dev Note to fund the subscription, use transferAndCall. For example
   * @dev  LINKTOKEN.transferAndCall(
   * @dev    address(COORDINATOR),
   * @dev    amount,
   * @dev    abi.encode(subId));
   */
  function createSubscription() external returns (uint64 subId);

  /**
   * @notice Get a VRF subscription.
   * @param subId - ID of the subscription
   * @return balance - LINK balance of the subscription in juels.
   * @return reqCount - number of requests for this subscription, determines fee tier.
   * @return owner - owner of the subscription.
   * @return consumers - list of consumer address which are able to use this subscription.
   */
  function getSubscription(uint64 subId)
    external
    view
    returns (
      uint96 balance,
      uint64 reqCount,
      address owner,
      address[] memory consumers
    );

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @param newOwner - proposed new owner of the subscription
   */
  function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external;

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @dev will revert if original owner of subId has
   * not requested that msg.sender become the new owner.
   */
  function acceptSubscriptionOwnerTransfer(uint64 subId) external;

  /**
   * @notice Add a consumer to a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - New consumer which can use the subscription
   */
  function addConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Remove a consumer from a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - Consumer to remove from the subscription
   */
  function removeConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Cancel a subscription
   * @param subId - ID of the subscription
   * @param to - Where to send the remaining LINK to
   */
  function cancelSubscription(uint64 subId, address to) external;
}

File 9 of 11 : VRFConsumerBaseV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/** ****************************************************************************
 * @notice Interface for contracts using VRF randomness
 * *****************************************************************************
 * @dev PURPOSE
 *
 * @dev Reggie the Random Oracle (not his real job) wants to provide randomness
 * @dev to Vera the verifier in such a way that Vera can be sure he's not
 * @dev making his output up to suit himself. Reggie provides Vera a public key
 * @dev to which he knows the secret key. Each time Vera provides a seed to
 * @dev Reggie, he gives back a value which is computed completely
 * @dev deterministically from the seed and the secret key.
 *
 * @dev Reggie provides a proof by which Vera can verify that the output was
 * @dev correctly computed once Reggie tells it to her, but without that proof,
 * @dev the output is indistinguishable to her from a uniform random sample
 * @dev from the output space.
 *
 * @dev The purpose of this contract is to make it easy for unrelated contracts
 * @dev to talk to Vera the verifier about the work Reggie is doing, to provide
 * @dev simple access to a verifiable source of randomness. It ensures 2 things:
 * @dev 1. The fulfillment came from the VRFCoordinator
 * @dev 2. The consumer contract implements fulfillRandomWords.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFConsumerBase, and can
 * @dev initialize VRFConsumerBase's attributes in their constructor as
 * @dev shown:
 *
 * @dev   contract VRFConsumer {
 * @dev     constructor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator) public {
 * @dev         <initialization with other arguments goes here>
 * @dev       }
 * @dev   }
 *
 * @dev The oracle will have given you an ID for the VRF keypair they have
 * @dev committed to (let's call it keyHash). Create subscription, fund it
 * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface
 * @dev subscription management functions).
 * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations,
 * @dev callbackGasLimit, numWords),
 * @dev see (VRFCoordinatorInterface for a description of the arguments).
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomWords method.
 *
 * @dev The randomness argument to fulfillRandomWords is a set of random words
 * @dev generated from your requestId and the blockHash of the request.
 *
 * @dev If your contract could have concurrent requests open, you can use the
 * @dev requestId returned from requestRandomWords to track which response is associated
 * @dev with which randomness request.
 * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind,
 * @dev if your contract could have multiple requests in flight simultaneously.
 *
 * @dev Colliding `requestId`s are cryptographically impossible as long as seeds
 * @dev differ.
 *
 * *****************************************************************************
 * @dev SECURITY CONSIDERATIONS
 *
 * @dev A method with the ability to call your fulfillRandomness method directly
 * @dev could spoof a VRF response with any random value, so it's critical that
 * @dev it cannot be directly called by anything other than this base contract
 * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
 *
 * @dev For your users to trust that your contract's random behavior is free
 * @dev from malicious interference, it's best if you can write it so that all
 * @dev behaviors implied by a VRF response are executed *during* your
 * @dev fulfillRandomness method. If your contract must store the response (or
 * @dev anything derived from it) and use it later, you must ensure that any
 * @dev user-significant behavior which depends on that stored value cannot be
 * @dev manipulated by a subsequent VRF request.
 *
 * @dev Similarly, both miners and the VRF oracle itself have some influence
 * @dev over the order in which VRF responses appear on the blockchain, so if
 * @dev your contract could have multiple VRF requests in flight simultaneously,
 * @dev you must ensure that the order in which the VRF responses arrive cannot
 * @dev be used to manipulate your contract's user-significant behavior.
 *
 * @dev Since the block hash of the block which contains the requestRandomness
 * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
 * @dev miner could, in principle, fork the blockchain to evict the block
 * @dev containing the request, forcing the request to be included in a
 * @dev different block with a different hash, and therefore a different input
 * @dev to the VRF. However, such an attack would incur a substantial economic
 * @dev cost. This cost scales with the number of blocks the VRF oracle waits
 * @dev until it calls responds to a request. It is for this reason that
 * @dev that you can signal to an oracle you'd like them to wait longer before
 * @dev responding to the request (however this is not enforced in the contract
 * @dev and so remains effective only in the case of unmodified oracle software).
 */
abstract contract VRFConsumerBaseV2 {
  error OnlyCoordinatorCanFulfill(address have, address want);
  address private immutable vrfCoordinator;

  /**
   * @param _vrfCoordinator address of VRFCoordinator contract
   */
  constructor(address _vrfCoordinator) {
    vrfCoordinator = _vrfCoordinator;
  }

  /**
   * @notice fulfillRandomness handles the VRF response. Your contract must
   * @notice implement it. See "SECURITY CONSIDERATIONS" above for important
   * @notice principles to keep in mind when implementing your fulfillRandomness
   * @notice method.
   *
   * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this
   * @dev signature, and will call it once it has verified the proof
   * @dev associated with the randomness. (It is triggered via a call to
   * @dev rawFulfillRandomness, below.)
   *
   * @param requestId The Id initially returned by requestRandomness
   * @param randomWords the VRF output expanded to the requested number of words
   */
  function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual;

  // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
  // proof. rawFulfillRandomness then calls fulfillRandomness, after validating
  // the origin of the call
  function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external {
    if (msg.sender != vrfCoordinator) {
      revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator);
    }
    fulfillRandomWords(requestId, randomWords);
  }
}

File 10 of 11 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.0.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

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

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

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

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

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

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

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

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

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

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

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

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

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

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
    }

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint64","name":"_subscriptionId","type":"uint64"},{"internalType":"address","name":"_vrfCoordinator","type":"address"}],"stateMutability":"payable","type":"constructor"},{"inputs":[],"name":"AllowlistClosed","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BadProof","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[{"internalType":"uint256","name":"currentBalance","type":"uint256"},{"internalType":"uint256","name":"maxLimit","type":"uint256"}],"name":"ExceedsMaxMintsAllowlist","type":"error"},{"inputs":[{"internalType":"uint256","name":"maxMintsPerTx","type":"uint256"}],"name":"ExceedsMaxMintsPerTx","type":"error"},{"inputs":[{"internalType":"uint256","name":"maxSupply","type":"uint256"}],"name":"ExceedsMaxSupply","type":"error"},{"inputs":[{"internalType":"uint256","name":"teamSupply","type":"uint256"}],"name":"ExceedsTeamSupply","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NoContracts","type":"error"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"PublicClosed","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"inputs":[{"internalType":"uint256","name":"sent","type":"uint256"},{"internalType":"uint256","name":"required","type":"uint256"}],"name":"WrongAmount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"contractURI","type":"string"}],"name":"SetContractURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"collectionDefaultURI","type":"string"}],"name":"SetDefaultURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"tokenBaseURI","type":"string"}],"name":"SetTokenBaseURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allowlist","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"allowlistMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","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":"maxMintPerTx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_keyHash","type":"bytes32"},{"internalType":"uint16","name":"_requestConfirmations","type":"uint16"},{"internalType":"uint32","name":"_callbackGasLimit","type":"uint32"},{"internalType":"uint32","name":"_numWords","type":"uint32"}],"name":"requestRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"s_requestId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"s_subscriptionId","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleState","outputs":[{"internalType":"enum GoodMinds.SaleState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_contractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"defaultURI_","type":"string"}],"name":"setDefaultURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintPrice","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_state","type":"uint256"}],"name":"setSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenBaseURI_","type":"string"}],"name":"setTokenBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"withdrawalAddress_","type":"address"}],"name":"setWithdrawalAddress","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":"_quantity","type":"uint256"}],"name":"teamMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenBaseURI_","type":"string"}],"name":"unshuffle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a060408190526012805460ff19166001179055611770601455666a94d74f430000601555620032c9388190039081908339810160408190526200004391620002a7565b80848481600290805190602001906200005e92919062000134565b5080516200007490600390602084019062000134565b505060008055506200008633620000e2565b60016009556001600160a01b03908116608052600a8054929091166001600160a01b0319909216919091179055601280546001600160401b0390921661010002610100600160481b031990921691909117905550620003879050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b82805462000142906200034b565b90600052602060002090601f016020900481019282620001665760008555620001b1565b82601f106200018157805160ff1916838001178555620001b1565b82800160010185558215620001b1579182015b82811115620001b157825182559160200191906001019062000194565b50620001bf929150620001c3565b5090565b5b80821115620001bf5760008155600101620001c4565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200020257600080fd5b81516001600160401b03808211156200021f576200021f620001da565b604051601f8301601f19908116603f011681019082821181831017156200024a576200024a620001da565b816040528381526020925086838588010111156200026757600080fd5b600091505b838210156200028b57858201830151818301840152908201906200026c565b838211156200029d5760008385830101525b9695505050505050565b60008060008060808587031215620002be57600080fd5b84516001600160401b0380821115620002d657600080fd5b620002e488838901620001f0565b95506020870151915080821115620002fb57600080fd5b6200030988838901620001f0565b94506040870151915080821682146200032157600080fd5b5060608601519092506001600160a01b03811681146200034057600080fd5b939692955090935050565b600181811c908216806200036057607f821691505b6020821081036200038157634e487b7160e01b600052602260045260246000fd5b50919050565b608051612f1f620003aa60003960008181610e620152610ebd0152612f1f6000f3fe6080604052600436106102c65760003560e01c8063715018a611610179578063b88d4fde116100d6578063e89e106a1161008a578063f0ecda8a11610064578063f0ecda8a146107a0578063f2fde38b146107c0578063f4a0a528146107e057600080fd5b8063e89e106a1461072c578063e8a3d48514610742578063e985e9c51461075757600080fd5b8063d5abeb01116100bb578063d5abeb01146106e1578063da1b9e08146106f7578063de7fcb1d1461071757600080fd5b8063b88d4fde146106a1578063c87b56dd146106c157600080fd5b806392374f151161012d57806395d89b411161011257806395d89b411461063f578063a22cb46514610654578063a7cd52cb1461067457600080fd5b806392374f15146105ff578063938e3d7b1461061f57600080fd5b80638ac000211161015e5780638ac00021146105825780638da5cb5b146105c15780638ef79e91146105df57600080fd5b8063715018a61461054d5780637cb647591461056257600080fd5b806324600fc311610227578063603f4d52116101db5780636817c76c116101c05780636817c76c146104f75780636f8b44b01461050d57806370a082311461052d57600080fd5b8063603f4d52146104b05780636352211e146104d757600080fd5b80632eb4a7ab1161020c5780632eb4a7ab1461045a5780632fbba1151461047057806342842e0e1461049057600080fd5b806324600fc3146104325780632db115441461044757600080fd5b80631338a83f1161027e5780631fe543e3116102635780631fe543e3146103d257806321b8092e146103f257806323b872dd1461041257600080fd5b80631338a83f1461039c57806318160ddd146103af57600080fd5b8063081812fc116102af578063081812fc14610322578063084c40881461035a578063095ea7b31461037c57600080fd5b806301ffc9a7146102cb57806306fdde0314610300575b600080fd5b3480156102d757600080fd5b506102eb6102e636600461279c565b610800565b60405190151581526020015b60405180910390f35b34801561030c57600080fd5b5061031561089d565b6040516102f79190612811565b34801561032e57600080fd5b5061034261033d366004612824565b61092f565b6040516001600160a01b0390911681526020016102f7565b34801561036657600080fd5b5061037a610375366004612824565b61098c565b005b34801561038857600080fd5b5061037a610397366004612859565b610a60565b61037a6103aa366004612883565b610b71565b3480156103bb57600080fd5b50600154600054035b6040519081526020016102f7565b3480156103de57600080fd5b5061037a6103ed366004612945565b610e57565b3480156103fe57600080fd5b5061037a61040d3660046129f7565b610ef8565b34801561041e57600080fd5b5061037a61042d366004612a12565b610fc5565b34801561043e57600080fd5b5061037a610fd5565b61037a610455366004612824565b6110c3565b34801561046657600080fd5b506103c460115481565b34801561047c57600080fd5b5061037a61048b366004612824565b6111c5565b34801561049c57600080fd5b5061037a6104ab366004612a12565b61126e565b3480156104bc57600080fd5b50600c546104ca9060ff1681565b6040516102f79190612a64565b3480156104e357600080fd5b506103426104f2366004612824565b611289565b34801561050357600080fd5b506103c460155481565b34801561051957600080fd5b5061037a610528366004612824565b611294565b34801561053957600080fd5b506103c46105483660046129f7565b611332565b34801561055957600080fd5b5061037a61139a565b34801561056e57600080fd5b5061037a61057d366004612824565b6113ee565b34801561058e57600080fd5b506012546105a890610100900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016102f7565b3480156105cd57600080fd5b506008546001600160a01b0316610342565b3480156105eb57600080fd5b5061037a6105fa366004612ae4565b61143b565b34801561060b57600080fd5b5061037a61061a366004612b41565b6114d9565b34801561062b57600080fd5b5061037a61063a366004612ae4565b6116a8565b34801561064b57600080fd5b50610315611746565b34801561066057600080fd5b5061037a61066f366004612b97565b611755565b34801561068057600080fd5b506103c461068f3660046129f7565b600d6020526000908152604090205481565b3480156106ad57600080fd5b5061037a6106bc366004612bd3565b611803565b3480156106cd57600080fd5b506103156106dc366004612824565b61184d565b3480156106ed57600080fd5b506103c460145481565b34801561070357600080fd5b5061037a610712366004612ae4565b61190b565b34801561072357600080fd5b506103c4600a81565b34801561073857600080fd5b506103c460135481565b34801561074e57600080fd5b506103156119a9565b34801561076357600080fd5b506102eb610772366004612c4f565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156107ac57600080fd5b5061037a6107bb366004612ae4565b611a37565b3480156107cc57600080fd5b5061037a6107db3660046129f7565b611a9c565b3480156107ec57600080fd5b5061037a6107fb366004612824565b611b69565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316148061086357507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b8061089757507f5b5e139f000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6060600280546108ac90612c82565b80601f01602080910402602001604051908101604052809291908181526020018280546108d890612c82565b80156109255780601f106108fa57610100808354040283529160200191610925565b820191906000526020600020905b81548152906001019060200180831161090857829003601f168201915b5050505050905090565b600061093a82611bb6565b610970576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6008546001600160a01b031633146109d95760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064015b60405180910390fd5b6002811115610a2a5760405162461bcd60e51b815260206004820152600960248201527f426164207374617465000000000000000000000000000000000000000000000060448201526064016109d0565b806002811115610a3c57610a3c612a4e565b600c805460ff19166001836002811115610a5857610a58612a4e565b021790555050565b6000610a6b82611bdd565b9050806001600160a01b0316836001600160a01b031603610ab8576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614610b0857610ad28133610772565b610b08576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600260095403610bc35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109d0565b600260095580323314610be95760405163875fdad760e01b815260040160405180910390fd5b60145481610bfa6001546000540390565b610c049190612cd2565b1115610c2957601454604051633d3dbc8360e01b81526004016109d091815260200190565b600a811115610c4e576040516306a99a1560e51b8152600a60048201526024016109d0565b601554610c5b9082612cea565b3414610cab573460155482610c709190612cea565b6040517f312b0033000000000000000000000000000000000000000000000000000000008152600481019290925260248201526044016109d0565b6001600c5460ff166002811115610cc457610cc4612a4e565b14610cfb576040517f0aa0875700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600d6020526040902054600290610d19908490612cd2565b1115610d6d57336000908152600d6020526040908190205490517f11242bc00000000000000000000000000000000000000000000000000000000081526004810191909152600260248201526044016109d0565b6040516bffffffffffffffffffffffff193360601b166020820152600090603401604051602081830303815290604052805190602001209050610de7858580806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506011549150849050611c64565b610e1d576040517f7ca55c7700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e273384611c7a565b336000908152600d602052604081208054859290610e46908490612cd2565b909155505060016009555050505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610eea576040517f1cf993f40000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660248201526044016109d0565b610ef48282611d8e565b5050565b6008546001600160a01b03163314610f405760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b6001600160a01b038116610f965760405162461bcd60e51b815260206004820152601360248201527f52656a656374207a65726f2d6163636f756e740000000000000000000000000060448201526064016109d0565b6016805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b610fd0838383611e01565b505050565b6008546001600160a01b0316331461101d5760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b6016546040516000916001600160a01b03169047908381818185875af1925050503d806000811461106a576040519150601f19603f3d011682016040523d82523d6000602084013e61106f565b606091505b50509050806110c05760405162461bcd60e51b815260206004820152600f60248201527f5769746864726177206661696c6564000000000000000000000000000000000060448201526064016109d0565b50565b803233146110e45760405163875fdad760e01b815260040160405180910390fd5b601454816110f56001546000540390565b6110ff9190612cd2565b111561112457601454604051633d3dbc8360e01b81526004016109d091815260200190565b600a811115611149576040516306a99a1560e51b8152600a60048201526024016109d0565b6015546111569082612cea565b341461116b573460155482610c709190612cea565b6002600c5460ff16600281111561118457611184612a4e565b146111bb576040517fe23c885800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ef43383611c7a565b6008546001600160a01b0316331461120d5760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b61012c8161121e6001546000540390565b6112289190612cd2565b1115611264576040517f25ad89e400000000000000000000000000000000000000000000000000000000815261012c60048201526024016109d0565b6110c03382611c7a565b610fd083838360405180602001604052806000815250611803565b600061089782611bdd565b6008546001600160a01b031633146112dc5760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b601454811061132d5760405162461bcd60e51b815260206004820152600860248201527f546f6f206869676800000000000000000000000000000000000000000000000060448201526064016109d0565b601455565b60006001600160a01b038216611374576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b031633146113e25760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b6113ec600061201a565b565b6008546001600160a01b031633146114365760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b601155565b6008546001600160a01b031633146114835760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b805161149690600f9060208401906126ed565b50600f6040516114a69190612da2565b604051908190038120907f41fd16a731bf482a8a272a34af55dec6972e006113c34afe53614eb33e521f0090600090a250565b6008546001600160a01b031633146115215760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b60006115306001546000540390565b1161157d5760405162461bcd60e51b815260206004820152601060248201527f4e6f20746f6b656e73206d696e7465640000000000000000000000000000000060448201526064016109d0565b600b54156115e15761158d612079565b60015460005403116115e15760405162461bcd60e51b815260206004820152600e60248201527f4e6f6e6520746f2072657665616c00000000000000000000000000000000000060448201526064016109d0565b600a546012546040517f5d3b1d300000000000000000000000000000000000000000000000000000000081526004810187905261010090910467ffffffffffffffff16602482015261ffff8516604482015263ffffffff8085166064830152831660848201526001600160a01b0390911690635d3b1d309060a4016020604051808303816000875af115801561167b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169f9190612dae565b60135550505050565b6008546001600160a01b031633146116f05760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b80516117039060109060208401906126ed565b5060106040516117139190612da2565b604051908190038120907f5ca9f750836b0b7efdace104f07b5c9f0df0650c0fd24f5163e99044ae36ea5290600090a250565b6060600380546108ac90612c82565b336001600160a01b03831603611797576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61180e848484611e01565b6001600160a01b0383163b156118475761182a848484846120c0565b611847576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b606061185882611bb6565b6118a45760405162461bcd60e51b815260206004820152601b60248201527f517565727920666f72206e6f6e6578697374656e7420746f6b656e000000000060448201526064016109d0565b6000600f80546118b390612c82565b9050116119025760405162461bcd60e51b815260206004820152601460248201527f746f6b656e42617365555249206e6f742073657400000000000000000000000060448201526064016109d0565b610897826121ac565b6008546001600160a01b031633146119535760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b805161196690600e9060208401906126ed565b50600e6040516119769190612da2565b604051908190038120907fb0cb658f6a70918635661157bac90270b4184dff76f6b90dfebdad09e29ce5eb90600090a250565b601080546119b690612c82565b80601f01602080910402602001604051908101604052809291908181526020018280546119e290612c82565b8015611a2f5780601f10611a0457610100808354040283529160200191611a2f565b820191906000526020600020905b815481529060010190602001808311611a1257829003601f168201915b505050505081565b6008546001600160a01b03163314611a7f5760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b6012805460ff19169055805161149690600f9060208401906126ed565b6008546001600160a01b03163314611ae45760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b6001600160a01b038116611b605760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016109d0565b6110c08161201a565b6008546001600160a01b03163314611bb15760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b601555565b6000805482108015610897575050600090815260046020526040902054600160e01b161590565b600081600054811015611c325760008181526004602052604081205490600160e01b82169003611c30575b80600003611c29575060001901600081815260046020526040902054611c08565b9392505050565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082611c718584612544565b14949350505050565b6000546001600160a01b038316611cbd576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600003611cf7576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03831660009081526005602090815260408083208054680100000000000000018702019055838352600490915290204260a01b84176001841460e11b179055808083015b6040516001830192906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210611d425750600055505050565b600b604051806040016040528083600081518110611dae57611dae612dc7565b602002602001015181526020016001611dca6001546000540390565b611dd49190612ddd565b90528154600181810184556000938452602093849020835160029093020191825592909101519101555050565b6000611e0c82611bdd565b9050836001600160a01b0316816001600160a01b031614611e59576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000336001600160a01b0386161480611e775750611e778533610772565b80611e92575033611e878461092f565b6001600160a01b0316145b905080611ecb576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038416611f0b576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600660209081526040808320805473ffffffffffffffffffffffffffffffffffffffff191690556001600160a01b0388811684526005835281842080546000190190558716835280832080546001019055858352600490915281207c02000000000000000000000000000000000000000000000000000000004260a01b8717811790915583169003611fd257600183016000818152600460205260408120549003611fd0576000548114611fd05760008181526004602052604090208390555b505b82846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050505050565b600880546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600b546000906120895750600090565b600b805461209990600190612ddd565b815481106120a9576120a9612dc7565b906000526020600020906002020160010154905090565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906120f5903390899088908890600401612df4565b6020604051808303816000875af1925050508015612130575060408051601f3d908101601f1916820190925261212d91810190612e30565b60015b61218e573d80801561215e576040519150601f19603f3d011682016040523d82523d6000602084013e612163565b606091505b508051600003612186576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60606121b6612079565b8211806121c35750600b54155b1561225a57600e80546121d590612c82565b80601f016020809104026020016040519081016040528092919081815260200182805461220190612c82565b801561224e5780601f106122235761010080835404028352916020019161224e565b820191906000526020600020905b81548152906001019060200180831161223157829003601f168201915b50505050509050919050565b60125460ff1661229657600f61226f836125b8565b604051602001612280929190612e4d565b6040516020818303038152906040529050919050565b60008060005b600b5481101561250f576000600b82815481106122bb576122bb612dc7565b600091825260209182902060408051808201909152600290920201805482526001015491810182905291508611156122f357506124fd565b6000821161230257600061233d565b600b61230f600184612ddd565b8154811061231f5761231f612dc7565b906000526020600020906002020160010154600161233d9190612cd2565b935060008482602001516123519190612ddd565b61235c906001612cd2565b905060008167ffffffffffffffff811115612379576123796128fe565b6040519080825280602002602001820160405280156123a2578160200160208202803683370190505b5090508593505b826020015184116123ed5783816123c08883612ddd565b815181106123d0576123d0612dc7565b6020908102919091010152836123e581612e72565b9450506123a9565b8593505b82602001518410156124d4578251604080516020810192909252810185905260009083906060016040516020818303038152906040528051906020012060001c61243b9190612ea1565b905081818151811061244f5761244f612dc7565b60200260200101518288876124649190612ddd565b8151811061247457612474612dc7565b60200260200101518389886124899190612ddd565b8151811061249957612499612dc7565b602002602001018484815181106124b2576124b2612dc7565b60209081029190910101919091525250836124cc81612e72565b9450506123f1565b806124df878a612ddd565b815181106124ef576124ef612dc7565b602002602001015194505050505b8061250781612e72565b91505061229c565b50600f61251b826125b8565b60405160200161252c929190612e4d565b60405160208183030381529060405292505050919050565b600081815b84518110156125b057600085828151811061256657612566612dc7565b6020026020010151905080831161258c576000838152602082905260409020925061259d565b600081815260208490526040902092505b50806125a881612e72565b915050612549565b509392505050565b6060816000036125fb57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612625578061260f81612e72565b915061261e9050600a83612eb5565b91506125ff565b60008167ffffffffffffffff811115612640576126406128fe565b6040519080825280601f01601f19166020018201604052801561266a576020820181803683370190505b5090505b84156121a45761267f600183612ddd565b915061268c600a86612ea1565b612697906030612cd2565b60f81b8183815181106126ac576126ac612dc7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506126e6600a86612eb5565b945061266e565b8280546126f990612c82565b90600052602060002090601f01602090048101928261271b5760008555612761565b82601f1061273457805160ff1916838001178555612761565b82800160010185558215612761579182015b82811115612761578251825591602001919060010190612746565b5061276d929150612771565b5090565b5b8082111561276d5760008155600101612772565b6001600160e01b0319811681146110c057600080fd5b6000602082840312156127ae57600080fd5b8135611c2981612786565b60005b838110156127d45781810151838201526020016127bc565b838111156118475750506000910152565b600081518084526127fd8160208601602086016127b9565b601f01601f19169290920160200192915050565b602081526000611c2960208301846127e5565b60006020828403121561283657600080fd5b5035919050565b80356001600160a01b038116811461285457600080fd5b919050565b6000806040838503121561286c57600080fd5b6128758361283d565b946020939093013593505050565b60008060006040848603121561289857600080fd5b833567ffffffffffffffff808211156128b057600080fd5b818601915086601f8301126128c457600080fd5b8135818111156128d357600080fd5b8760208260051b85010111156128e857600080fd5b6020928301989097509590910135949350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561293d5761293d6128fe565b604052919050565b6000806040838503121561295857600080fd5b8235915060208084013567ffffffffffffffff8082111561297857600080fd5b818601915086601f83011261298c57600080fd5b81358181111561299e5761299e6128fe565b8060051b91506129af848301612914565b81815291830184019184810190898411156129c957600080fd5b938501935b838510156129e7578435825293850193908501906129ce565b8096505050505050509250929050565b600060208284031215612a0957600080fd5b611c298261283d565b600080600060608486031215612a2757600080fd5b612a308461283d565b9250612a3e6020850161283d565b9150604084013590509250925092565b634e487b7160e01b600052602160045260246000fd5b6020810160038310612a8657634e487b7160e01b600052602160045260246000fd5b91905290565b600067ffffffffffffffff831115612aa657612aa66128fe565b612ab9601f8401601f1916602001612914565b9050828152838383011115612acd57600080fd5b828260208301376000602084830101529392505050565b600060208284031215612af657600080fd5b813567ffffffffffffffff811115612b0d57600080fd5b8201601f81018413612b1e57600080fd5b6121a484823560208401612a8c565b803563ffffffff8116811461285457600080fd5b60008060008060808587031215612b5757600080fd5b84359350602085013561ffff81168114612b7057600080fd5b9250612b7e60408601612b2d565b9150612b8c60608601612b2d565b905092959194509250565b60008060408385031215612baa57600080fd5b612bb38361283d565b915060208301358015158114612bc857600080fd5b809150509250929050565b60008060008060808587031215612be957600080fd5b612bf28561283d565b9350612c006020860161283d565b925060408501359150606085013567ffffffffffffffff811115612c2357600080fd5b8501601f81018713612c3457600080fd5b612c4387823560208401612a8c565b91505092959194509250565b60008060408385031215612c6257600080fd5b612c6b8361283d565b9150612c796020840161283d565b90509250929050565b600181811c90821680612c9657607f821691505b602082108103612cb657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115612ce557612ce5612cbc565b500190565b6000816000190483118215151615612d0457612d04612cbc565b500290565b8054600090600181811c9080831680612d2357607f831692505b60208084108203612d4457634e487b7160e01b600052602260045260246000fd5b818015612d585760018114612d6957612d96565b60ff19861689528489019650612d96565b60008881526020902060005b86811015612d8e5781548b820152908501908301612d75565b505084890196505b50505050505092915050565b6000611c298284612d09565b600060208284031215612dc057600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b600082821015612def57612def612cbc565b500390565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612e2660808301846127e5565b9695505050505050565b600060208284031215612e4257600080fd5b8151611c2981612786565b6000612e598285612d09565b8351612e698183602088016127b9565b01949350505050565b600060018201612e8457612e84612cbc565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082612eb057612eb0612e8b565b500690565b600082612ec457612ec4612e8b565b50049056fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220894113975b184ba53e7c77862ae1fe582b189b632db55c46531dc10be547f77e64736f6c634300080d0033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000d1000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909000000000000000000000000000000000000000000000000000000000000000a476f6f64204d696e6473000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002474d000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106102c65760003560e01c8063715018a611610179578063b88d4fde116100d6578063e89e106a1161008a578063f0ecda8a11610064578063f0ecda8a146107a0578063f2fde38b146107c0578063f4a0a528146107e057600080fd5b8063e89e106a1461072c578063e8a3d48514610742578063e985e9c51461075757600080fd5b8063d5abeb01116100bb578063d5abeb01146106e1578063da1b9e08146106f7578063de7fcb1d1461071757600080fd5b8063b88d4fde146106a1578063c87b56dd146106c157600080fd5b806392374f151161012d57806395d89b411161011257806395d89b411461063f578063a22cb46514610654578063a7cd52cb1461067457600080fd5b806392374f15146105ff578063938e3d7b1461061f57600080fd5b80638ac000211161015e5780638ac00021146105825780638da5cb5b146105c15780638ef79e91146105df57600080fd5b8063715018a61461054d5780637cb647591461056257600080fd5b806324600fc311610227578063603f4d52116101db5780636817c76c116101c05780636817c76c146104f75780636f8b44b01461050d57806370a082311461052d57600080fd5b8063603f4d52146104b05780636352211e146104d757600080fd5b80632eb4a7ab1161020c5780632eb4a7ab1461045a5780632fbba1151461047057806342842e0e1461049057600080fd5b806324600fc3146104325780632db115441461044757600080fd5b80631338a83f1161027e5780631fe543e3116102635780631fe543e3146103d257806321b8092e146103f257806323b872dd1461041257600080fd5b80631338a83f1461039c57806318160ddd146103af57600080fd5b8063081812fc116102af578063081812fc14610322578063084c40881461035a578063095ea7b31461037c57600080fd5b806301ffc9a7146102cb57806306fdde0314610300575b600080fd5b3480156102d757600080fd5b506102eb6102e636600461279c565b610800565b60405190151581526020015b60405180910390f35b34801561030c57600080fd5b5061031561089d565b6040516102f79190612811565b34801561032e57600080fd5b5061034261033d366004612824565b61092f565b6040516001600160a01b0390911681526020016102f7565b34801561036657600080fd5b5061037a610375366004612824565b61098c565b005b34801561038857600080fd5b5061037a610397366004612859565b610a60565b61037a6103aa366004612883565b610b71565b3480156103bb57600080fd5b50600154600054035b6040519081526020016102f7565b3480156103de57600080fd5b5061037a6103ed366004612945565b610e57565b3480156103fe57600080fd5b5061037a61040d3660046129f7565b610ef8565b34801561041e57600080fd5b5061037a61042d366004612a12565b610fc5565b34801561043e57600080fd5b5061037a610fd5565b61037a610455366004612824565b6110c3565b34801561046657600080fd5b506103c460115481565b34801561047c57600080fd5b5061037a61048b366004612824565b6111c5565b34801561049c57600080fd5b5061037a6104ab366004612a12565b61126e565b3480156104bc57600080fd5b50600c546104ca9060ff1681565b6040516102f79190612a64565b3480156104e357600080fd5b506103426104f2366004612824565b611289565b34801561050357600080fd5b506103c460155481565b34801561051957600080fd5b5061037a610528366004612824565b611294565b34801561053957600080fd5b506103c46105483660046129f7565b611332565b34801561055957600080fd5b5061037a61139a565b34801561056e57600080fd5b5061037a61057d366004612824565b6113ee565b34801561058e57600080fd5b506012546105a890610100900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016102f7565b3480156105cd57600080fd5b506008546001600160a01b0316610342565b3480156105eb57600080fd5b5061037a6105fa366004612ae4565b61143b565b34801561060b57600080fd5b5061037a61061a366004612b41565b6114d9565b34801561062b57600080fd5b5061037a61063a366004612ae4565b6116a8565b34801561064b57600080fd5b50610315611746565b34801561066057600080fd5b5061037a61066f366004612b97565b611755565b34801561068057600080fd5b506103c461068f3660046129f7565b600d6020526000908152604090205481565b3480156106ad57600080fd5b5061037a6106bc366004612bd3565b611803565b3480156106cd57600080fd5b506103156106dc366004612824565b61184d565b3480156106ed57600080fd5b506103c460145481565b34801561070357600080fd5b5061037a610712366004612ae4565b61190b565b34801561072357600080fd5b506103c4600a81565b34801561073857600080fd5b506103c460135481565b34801561074e57600080fd5b506103156119a9565b34801561076357600080fd5b506102eb610772366004612c4f565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156107ac57600080fd5b5061037a6107bb366004612ae4565b611a37565b3480156107cc57600080fd5b5061037a6107db3660046129f7565b611a9c565b3480156107ec57600080fd5b5061037a6107fb366004612824565b611b69565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316148061086357507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b8061089757507f5b5e139f000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6060600280546108ac90612c82565b80601f01602080910402602001604051908101604052809291908181526020018280546108d890612c82565b80156109255780601f106108fa57610100808354040283529160200191610925565b820191906000526020600020905b81548152906001019060200180831161090857829003601f168201915b5050505050905090565b600061093a82611bb6565b610970576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6008546001600160a01b031633146109d95760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064015b60405180910390fd5b6002811115610a2a5760405162461bcd60e51b815260206004820152600960248201527f426164207374617465000000000000000000000000000000000000000000000060448201526064016109d0565b806002811115610a3c57610a3c612a4e565b600c805460ff19166001836002811115610a5857610a58612a4e565b021790555050565b6000610a6b82611bdd565b9050806001600160a01b0316836001600160a01b031603610ab8576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614610b0857610ad28133610772565b610b08576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600260095403610bc35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109d0565b600260095580323314610be95760405163875fdad760e01b815260040160405180910390fd5b60145481610bfa6001546000540390565b610c049190612cd2565b1115610c2957601454604051633d3dbc8360e01b81526004016109d091815260200190565b600a811115610c4e576040516306a99a1560e51b8152600a60048201526024016109d0565b601554610c5b9082612cea565b3414610cab573460155482610c709190612cea565b6040517f312b0033000000000000000000000000000000000000000000000000000000008152600481019290925260248201526044016109d0565b6001600c5460ff166002811115610cc457610cc4612a4e565b14610cfb576040517f0aa0875700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600d6020526040902054600290610d19908490612cd2565b1115610d6d57336000908152600d6020526040908190205490517f11242bc00000000000000000000000000000000000000000000000000000000081526004810191909152600260248201526044016109d0565b6040516bffffffffffffffffffffffff193360601b166020820152600090603401604051602081830303815290604052805190602001209050610de7858580806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506011549150849050611c64565b610e1d576040517f7ca55c7700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e273384611c7a565b336000908152600d602052604081208054859290610e46908490612cd2565b909155505060016009555050505050565b336001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699091614610eea576040517f1cf993f40000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699091660248201526044016109d0565b610ef48282611d8e565b5050565b6008546001600160a01b03163314610f405760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b6001600160a01b038116610f965760405162461bcd60e51b815260206004820152601360248201527f52656a656374207a65726f2d6163636f756e740000000000000000000000000060448201526064016109d0565b6016805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b610fd0838383611e01565b505050565b6008546001600160a01b0316331461101d5760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b6016546040516000916001600160a01b03169047908381818185875af1925050503d806000811461106a576040519150601f19603f3d011682016040523d82523d6000602084013e61106f565b606091505b50509050806110c05760405162461bcd60e51b815260206004820152600f60248201527f5769746864726177206661696c6564000000000000000000000000000000000060448201526064016109d0565b50565b803233146110e45760405163875fdad760e01b815260040160405180910390fd5b601454816110f56001546000540390565b6110ff9190612cd2565b111561112457601454604051633d3dbc8360e01b81526004016109d091815260200190565b600a811115611149576040516306a99a1560e51b8152600a60048201526024016109d0565b6015546111569082612cea565b341461116b573460155482610c709190612cea565b6002600c5460ff16600281111561118457611184612a4e565b146111bb576040517fe23c885800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ef43383611c7a565b6008546001600160a01b0316331461120d5760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b61012c8161121e6001546000540390565b6112289190612cd2565b1115611264576040517f25ad89e400000000000000000000000000000000000000000000000000000000815261012c60048201526024016109d0565b6110c03382611c7a565b610fd083838360405180602001604052806000815250611803565b600061089782611bdd565b6008546001600160a01b031633146112dc5760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b601454811061132d5760405162461bcd60e51b815260206004820152600860248201527f546f6f206869676800000000000000000000000000000000000000000000000060448201526064016109d0565b601455565b60006001600160a01b038216611374576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b031633146113e25760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b6113ec600061201a565b565b6008546001600160a01b031633146114365760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b601155565b6008546001600160a01b031633146114835760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b805161149690600f9060208401906126ed565b50600f6040516114a69190612da2565b604051908190038120907f41fd16a731bf482a8a272a34af55dec6972e006113c34afe53614eb33e521f0090600090a250565b6008546001600160a01b031633146115215760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b60006115306001546000540390565b1161157d5760405162461bcd60e51b815260206004820152601060248201527f4e6f20746f6b656e73206d696e7465640000000000000000000000000000000060448201526064016109d0565b600b54156115e15761158d612079565b60015460005403116115e15760405162461bcd60e51b815260206004820152600e60248201527f4e6f6e6520746f2072657665616c00000000000000000000000000000000000060448201526064016109d0565b600a546012546040517f5d3b1d300000000000000000000000000000000000000000000000000000000081526004810187905261010090910467ffffffffffffffff16602482015261ffff8516604482015263ffffffff8085166064830152831660848201526001600160a01b0390911690635d3b1d309060a4016020604051808303816000875af115801561167b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169f9190612dae565b60135550505050565b6008546001600160a01b031633146116f05760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b80516117039060109060208401906126ed565b5060106040516117139190612da2565b604051908190038120907f5ca9f750836b0b7efdace104f07b5c9f0df0650c0fd24f5163e99044ae36ea5290600090a250565b6060600380546108ac90612c82565b336001600160a01b03831603611797576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61180e848484611e01565b6001600160a01b0383163b156118475761182a848484846120c0565b611847576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b606061185882611bb6565b6118a45760405162461bcd60e51b815260206004820152601b60248201527f517565727920666f72206e6f6e6578697374656e7420746f6b656e000000000060448201526064016109d0565b6000600f80546118b390612c82565b9050116119025760405162461bcd60e51b815260206004820152601460248201527f746f6b656e42617365555249206e6f742073657400000000000000000000000060448201526064016109d0565b610897826121ac565b6008546001600160a01b031633146119535760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b805161196690600e9060208401906126ed565b50600e6040516119769190612da2565b604051908190038120907fb0cb658f6a70918635661157bac90270b4184dff76f6b90dfebdad09e29ce5eb90600090a250565b601080546119b690612c82565b80601f01602080910402602001604051908101604052809291908181526020018280546119e290612c82565b8015611a2f5780601f10611a0457610100808354040283529160200191611a2f565b820191906000526020600020905b815481529060010190602001808311611a1257829003601f168201915b505050505081565b6008546001600160a01b03163314611a7f5760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b6012805460ff19169055805161149690600f9060208401906126ed565b6008546001600160a01b03163314611ae45760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b6001600160a01b038116611b605760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016109d0565b6110c08161201a565b6008546001600160a01b03163314611bb15760405162461bcd60e51b81526020600482018190526024820152600080516020612eca83398151915260448201526064016109d0565b601555565b6000805482108015610897575050600090815260046020526040902054600160e01b161590565b600081600054811015611c325760008181526004602052604081205490600160e01b82169003611c30575b80600003611c29575060001901600081815260046020526040902054611c08565b9392505050565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082611c718584612544565b14949350505050565b6000546001600160a01b038316611cbd576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600003611cf7576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03831660009081526005602090815260408083208054680100000000000000018702019055838352600490915290204260a01b84176001841460e11b179055808083015b6040516001830192906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210611d425750600055505050565b600b604051806040016040528083600081518110611dae57611dae612dc7565b602002602001015181526020016001611dca6001546000540390565b611dd49190612ddd565b90528154600181810184556000938452602093849020835160029093020191825592909101519101555050565b6000611e0c82611bdd565b9050836001600160a01b0316816001600160a01b031614611e59576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000336001600160a01b0386161480611e775750611e778533610772565b80611e92575033611e878461092f565b6001600160a01b0316145b905080611ecb576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038416611f0b576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600660209081526040808320805473ffffffffffffffffffffffffffffffffffffffff191690556001600160a01b0388811684526005835281842080546000190190558716835280832080546001019055858352600490915281207c02000000000000000000000000000000000000000000000000000000004260a01b8717811790915583169003611fd257600183016000818152600460205260408120549003611fd0576000548114611fd05760008181526004602052604090208390555b505b82846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050505050565b600880546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600b546000906120895750600090565b600b805461209990600190612ddd565b815481106120a9576120a9612dc7565b906000526020600020906002020160010154905090565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906120f5903390899088908890600401612df4565b6020604051808303816000875af1925050508015612130575060408051601f3d908101601f1916820190925261212d91810190612e30565b60015b61218e573d80801561215e576040519150601f19603f3d011682016040523d82523d6000602084013e612163565b606091505b508051600003612186576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60606121b6612079565b8211806121c35750600b54155b1561225a57600e80546121d590612c82565b80601f016020809104026020016040519081016040528092919081815260200182805461220190612c82565b801561224e5780601f106122235761010080835404028352916020019161224e565b820191906000526020600020905b81548152906001019060200180831161223157829003601f168201915b50505050509050919050565b60125460ff1661229657600f61226f836125b8565b604051602001612280929190612e4d565b6040516020818303038152906040529050919050565b60008060005b600b5481101561250f576000600b82815481106122bb576122bb612dc7565b600091825260209182902060408051808201909152600290920201805482526001015491810182905291508611156122f357506124fd565b6000821161230257600061233d565b600b61230f600184612ddd565b8154811061231f5761231f612dc7565b906000526020600020906002020160010154600161233d9190612cd2565b935060008482602001516123519190612ddd565b61235c906001612cd2565b905060008167ffffffffffffffff811115612379576123796128fe565b6040519080825280602002602001820160405280156123a2578160200160208202803683370190505b5090508593505b826020015184116123ed5783816123c08883612ddd565b815181106123d0576123d0612dc7565b6020908102919091010152836123e581612e72565b9450506123a9565b8593505b82602001518410156124d4578251604080516020810192909252810185905260009083906060016040516020818303038152906040528051906020012060001c61243b9190612ea1565b905081818151811061244f5761244f612dc7565b60200260200101518288876124649190612ddd565b8151811061247457612474612dc7565b60200260200101518389886124899190612ddd565b8151811061249957612499612dc7565b602002602001018484815181106124b2576124b2612dc7565b60209081029190910101919091525250836124cc81612e72565b9450506123f1565b806124df878a612ddd565b815181106124ef576124ef612dc7565b602002602001015194505050505b8061250781612e72565b91505061229c565b50600f61251b826125b8565b60405160200161252c929190612e4d565b60405160208183030381529060405292505050919050565b600081815b84518110156125b057600085828151811061256657612566612dc7565b6020026020010151905080831161258c576000838152602082905260409020925061259d565b600081815260208490526040902092505b50806125a881612e72565b915050612549565b509392505050565b6060816000036125fb57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612625578061260f81612e72565b915061261e9050600a83612eb5565b91506125ff565b60008167ffffffffffffffff811115612640576126406128fe565b6040519080825280601f01601f19166020018201604052801561266a576020820181803683370190505b5090505b84156121a45761267f600183612ddd565b915061268c600a86612ea1565b612697906030612cd2565b60f81b8183815181106126ac576126ac612dc7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506126e6600a86612eb5565b945061266e565b8280546126f990612c82565b90600052602060002090601f01602090048101928261271b5760008555612761565b82601f1061273457805160ff1916838001178555612761565b82800160010185558215612761579182015b82811115612761578251825591602001919060010190612746565b5061276d929150612771565b5090565b5b8082111561276d5760008155600101612772565b6001600160e01b0319811681146110c057600080fd5b6000602082840312156127ae57600080fd5b8135611c2981612786565b60005b838110156127d45781810151838201526020016127bc565b838111156118475750506000910152565b600081518084526127fd8160208601602086016127b9565b601f01601f19169290920160200192915050565b602081526000611c2960208301846127e5565b60006020828403121561283657600080fd5b5035919050565b80356001600160a01b038116811461285457600080fd5b919050565b6000806040838503121561286c57600080fd5b6128758361283d565b946020939093013593505050565b60008060006040848603121561289857600080fd5b833567ffffffffffffffff808211156128b057600080fd5b818601915086601f8301126128c457600080fd5b8135818111156128d357600080fd5b8760208260051b85010111156128e857600080fd5b6020928301989097509590910135949350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561293d5761293d6128fe565b604052919050565b6000806040838503121561295857600080fd5b8235915060208084013567ffffffffffffffff8082111561297857600080fd5b818601915086601f83011261298c57600080fd5b81358181111561299e5761299e6128fe565b8060051b91506129af848301612914565b81815291830184019184810190898411156129c957600080fd5b938501935b838510156129e7578435825293850193908501906129ce565b8096505050505050509250929050565b600060208284031215612a0957600080fd5b611c298261283d565b600080600060608486031215612a2757600080fd5b612a308461283d565b9250612a3e6020850161283d565b9150604084013590509250925092565b634e487b7160e01b600052602160045260246000fd5b6020810160038310612a8657634e487b7160e01b600052602160045260246000fd5b91905290565b600067ffffffffffffffff831115612aa657612aa66128fe565b612ab9601f8401601f1916602001612914565b9050828152838383011115612acd57600080fd5b828260208301376000602084830101529392505050565b600060208284031215612af657600080fd5b813567ffffffffffffffff811115612b0d57600080fd5b8201601f81018413612b1e57600080fd5b6121a484823560208401612a8c565b803563ffffffff8116811461285457600080fd5b60008060008060808587031215612b5757600080fd5b84359350602085013561ffff81168114612b7057600080fd5b9250612b7e60408601612b2d565b9150612b8c60608601612b2d565b905092959194509250565b60008060408385031215612baa57600080fd5b612bb38361283d565b915060208301358015158114612bc857600080fd5b809150509250929050565b60008060008060808587031215612be957600080fd5b612bf28561283d565b9350612c006020860161283d565b925060408501359150606085013567ffffffffffffffff811115612c2357600080fd5b8501601f81018713612c3457600080fd5b612c4387823560208401612a8c565b91505092959194509250565b60008060408385031215612c6257600080fd5b612c6b8361283d565b9150612c796020840161283d565b90509250929050565b600181811c90821680612c9657607f821691505b602082108103612cb657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115612ce557612ce5612cbc565b500190565b6000816000190483118215151615612d0457612d04612cbc565b500290565b8054600090600181811c9080831680612d2357607f831692505b60208084108203612d4457634e487b7160e01b600052602260045260246000fd5b818015612d585760018114612d6957612d96565b60ff19861689528489019650612d96565b60008881526020902060005b86811015612d8e5781548b820152908501908301612d75565b505084890196505b50505050505092915050565b6000611c298284612d09565b600060208284031215612dc057600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b600082821015612def57612def612cbc565b500390565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612e2660808301846127e5565b9695505050505050565b600060208284031215612e4257600080fd5b8151611c2981612786565b6000612e598285612d09565b8351612e698183602088016127b9565b01949350505050565b600060018201612e8457612e84612cbc565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082612eb057612eb0612e8b565b500690565b600082612ec457612ec4612e8b565b50049056fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220894113975b184ba53e7c77862ae1fe582b189b632db55c46531dc10be547f77e64736f6c634300080d0033

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

000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000d1000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909000000000000000000000000000000000000000000000000000000000000000a476f6f64204d696e6473000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002474d000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): Good Minds
Arg [1] : _symbol (string): GM
Arg [2] : _subscriptionId (uint64): 209
Arg [3] : _vrfCoordinator (address): 0x271682DEB8C4E0901D1a1550aD2e64D568E69909

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000d1
Arg [3] : 000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [5] : 476f6f64204d696e647300000000000000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [7] : 474d000000000000000000000000000000000000000000000000000000000000


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

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