ETH Price: $3,234.76 (+2.01%)
Gas: 2 Gwei

EnigmaMiningFactionsThreePointFive (EMF3.5)
 

Overview

TokenID

149

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
EnigmaMiningFactionsThreePointFive

Compiler Version
v0.8.22+commit.4fc1097e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 9 : EnigmaMiningFactionsThreePointFive.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "./ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";

// import "hardhat/console.sol";

contract EnigmaMiningFactionsThreePointFive is Ownable, ERC721A {
    // Interface imports
    AggregatorV3Interface internal priceFeed; // Chainlink Aggregator for USD-ETH conversion

    // Variable Declaration
    uint256 public MAX_NFTS = 500;

    uint256 public MAX_MINT = 25;

    uint256 public presaleMintedCounter = 0;
    uint256 public publicMintedCounter = 0;

    uint256 public presaleReservedCounter = 0;

    uint256 public acceptedChangePercentage = 2;
    uint256 public mintPrice = 500; // 500 USD for each NFT
    uint256 public presaleMintPrice = 0; // 0 USD for each NFT already paid for

    bool public presaleMintActive = false;
    bool public publicMintActive = true;

    uint256 public startTime = 1699761600;

    enum TokenType {
        ETH,
        USDC
    }

    struct Whitelist {
        address addr;
        uint256 count;
    }

    string private _baseTokenURI = "";

    modifier noContracts() {
        require(msg.sender == tx.origin);
        _;
    }
    IERC20 public USDC = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);

    mapping(address => uint256) public presaleReservations;

    // constructor
    constructor() ERC721A("EnigmaMiningFactionsThreePointFive", "EMF3.5") {
        priceFeed = AggregatorV3Interface(
            // Goerli : 0xD4a33860578De61DBAbDc8BFdb98FD742fA7028e
            // Mainnet : 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419
            0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419
        );
    }

    // Public Functions

    /**
     * Returns the latest price based on inputted USD amount.
     */
    function getPriceRate(uint256 _amount) public view returns (uint256) {
        // prettier-ignore
        (, int256 price, , , ) = priceFeed.latestRoundData();
        uint256 adjust_price = uint256(price) * 1e10;
        uint256 usd = _amount * 1e18;
        uint256 rate = (usd * 1e18) / adjust_price;
        return rate;
    }

    /*
     * Returns the reservation amount left for each wallet
     */
    function getReservationCount(address _reservationAddress)
        public
        view
        returns (uint256)
    {
        return presaleReservations[_reservationAddress];
    }

    /**
     * Public Mint function
     * tokenType = 0 (Ethereum), 1 (USDC)
     */
    function publicMint(uint256 _mints, TokenType _tokenType)
        external
        payable
        noContracts
    {
        require(
            startTime != 0 && startTime <= block.timestamp,
            "Sale is not open"
        );
        require(
            publicMintActive == true,
            "Error: Public mint isn't active or has ended"
        );
        require(_mints <= MAX_MINT, "Error: Exceeds Max per TXN");
        require(
            totalSupply() + _mints + presaleReservedCounter <= MAX_NFTS,
            "Error: Exceeds Max Allocation"
        );
        
        uint256 _mintPrice = _mints * mintPrice;
        if (_tokenType == TokenType.ETH) {
            uint256 transactionPrice = getPriceRate(_mintPrice);
            uint256 priceFloor = (transactionPrice *
                (100 - acceptedChangePercentage)) / 100;
            uint256 priceCeil = (transactionPrice *
                (100 + acceptedChangePercentage)) / 100;
            require(
                msg.value >= priceFloor && msg.value <= priceCeil,
                "Error: Insufficient funds"
            );
            _mint(msg.sender, _mints);
            publicMintedCounter += _mints;
        } else {
            IERC20 token;
            if (_tokenType == TokenType.USDC) {
                token = USDC;

                // Would need to provide allowance before the transfer happens. Frontend will have to chain the two calls.
                require(
                    token.allowance(msg.sender, address(this)) >= _mintPrice,
                    "Error: Not enough allowance"
                );
                token.transferFrom(
                    msg.sender,
                    address(this),
                    _mintPrice * (10**6)
                );
                _mint(msg.sender, _mints);
                publicMintedCounter += _mints;
            }
        }
    }

    /**
     * Presale mint function to mint for already paid mints
     */
    function presaleMint(uint256 _mints)
        external
        payable
        noContracts
    {
        require(
            startTime != 0 && startTime <= block.timestamp,
            "Sale is not open"
        );
        uint256 availableMints = presaleReservations[msg.sender];
        require(availableMints > 0, "Error: No reservations found");
        require(availableMints >= _mints, "Error: Not enough reservations");
        require(_mints > 0, "Error: Invalid value");
        require(
            presaleMintActive == true,
            "Error: Presale Mint isn't active or has ended"
        );
        require(_mints <= MAX_MINT, "Error: Exceeds Max per TXN");
        require(
            totalSupply() + _mints <= MAX_NFTS,
            "Error: Exceeds Max Allocation"
        );
        presaleReservations[msg.sender] -= _mints;
        _mint(msg.sender, _mints);
        presaleMintedCounter += _mints;
        presaleReservedCounter -= _mints;
    }

    // Owner/Internal Functions

    /**
     * Whitelist for presale function
     * Adds address and count to whitelist presale
    */
    function whitelistForPresale(Whitelist[] memory users) external onlyOwner {
        for (uint i = 0; i < users.length; i++) {
            if (presaleReservations[users[i].addr] > 0) {
                presaleReservations[users[i].addr] += users[i].count;
            } else {
                presaleReservations[users[i].addr] = users[i].count;
            }
            
            presaleReservedCounter += users[i].count;
        }
    }

    /**
     * Set reserved count for a particular address 
    */
    function setReservedCountForAddress(address _address, uint256 _count) external onlyOwner {
        if (presaleReservations[_address] > 0) {
            if (presaleReservations[_address] > _count) {
                presaleReservedCounter -= (presaleReservations[_address] - _count);
            } else {
                presaleReservedCounter += (_count - presaleReservations[_address]);
            }
        }
        else {
            presaleReservedCounter += _count;
        }
        presaleReservations[_address] = _count;
    }

    /**
     * Set base URI
     */
    function setBaseURI(string calldata baseURI) external onlyOwner {
        _baseTokenURI = baseURI;
    }

    /**
     * Treasury mint
     */
    function treasuryMint(uint256 _quantity, address _address)
        external
        onlyOwner
    {
        require(
            totalSupply() + _quantity <= MAX_NFTS,
            "Error: Cannot mint more than total supply"
        );
        _mint(_address, _quantity);
        publicMintedCounter += _quantity;
    }

    /**
     * Change mint price
     */
    function setSalePrice(uint256 _newMintPrice) external onlyOwner {
        mintPrice = _newMintPrice;
    }

    /**
     * Change pre-salemint price
     */
    function setPresalePrice(uint256 _newMintPrice) external onlyOwner {
        presaleMintPrice = _newMintPrice;
    }

    /**
     * Withdraw contract balances
     */
    function withdrawAll(address _wallet) external onlyOwner {
        uint256 balance = address(this).balance;
        payable(_wallet).transfer(balance);
        if (USDC.balanceOf(address(this)) > 0) {
            USDC.transfer(_wallet, USDC.balanceOf(address(this)));
        }
    }

    /**
     * Change USD-ETH conversion acceptance %
     */
    function setAcceptedChangePercentage(uint256 _newPercentage)
        external
        onlyOwner
    {
        require(_newPercentage > 0, "Error: Can't be 0");
        require(
            _newPercentage != acceptedChangePercentage,
            "Error: Same value as before"
        );
        acceptedChangePercentage = _newPercentage;
    }

    function setPresaleMintStatus(bool _newStatus) external onlyOwner {
        presaleMintActive = _newStatus;
    }

    function setPublicMintStatus(bool _newStatus) external onlyOwner {
        publicMintActive = _newStatus;
    }

    function setMaxNfts(uint256 maxNfts) external onlyOwner {
        MAX_NFTS = maxNfts;
    }

    function setMaxMints(uint256 maxMints) external onlyOwner {
        MAX_MINT = maxMints;
    }

    function setStartTime(uint256 _startTime) external onlyOwner {
        startTime = _startTime;
    }

    function setPresaleMintedCounter(uint256 _presaleMintedCounter)
        external
        onlyOwner
    {
        presaleMintedCounter = _presaleMintedCounter;
    }

    function setPublicMintedCounter(uint256 _publicMintedCounter)
        external
        onlyOwner
    {
        publicMintedCounter = _publicMintedCounter;
    }

    function setPresaleReservedCounter(uint256 _presaleReservedCounter) external onlyOwner {
        presaleReservedCounter = _presaleReservedCounter;
    }

    function _baseURI() internal view virtual override returns (string memory) {
        return _baseTokenURI;
    }
}

File 2 of 9 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

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

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

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

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 4 of 9 : AggregatorV3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorV3Interface {
  function decimals() external view returns (uint8);

  function description() external view returns (string memory);

  function version() external view returns (uint256);

  function getRoundData(uint80 _roundId)
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

File 6 of 9 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // 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);
    }

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

File 7 of 9 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.1.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 bit position of `extraData` in packed ownership.
    uint256 private constant BITPOS_EXTRA_DATA = 232;

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

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

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

    // The 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`
    // - [232..255] `extraData`
    mapping(uint256 => uint256) private _packedOwnerships;

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

    // Mapping from token ID to approved address.
    mapping(uint256 => 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 auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return uint64(_packedAddressData[owner] >> BITPOS_AUX);
    }

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

    /**
     * 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;
        ownership.extraData = uint24(packed >> BITPOS_EXTRA_DATA);
    }

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

    /**
     * @dev 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, it can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

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

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

        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-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 {
        transferFrom(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.
     *
     * See {_mint}.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        _mint(to, quantity);

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

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _mint(address to, uint256 quantity) internal {
        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` and `numberMinted` have a maximum limit of 2**64.
        // `tokenId` has a maximum limit of 2**256.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1);

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

            uint256 tokenId = startTokenId;
            uint256 end = startTokenId + quantity;
            do {
                emit Transfer(address(0), to, tokenId++);
            } while (tokenId < end);

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

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

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

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

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

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

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

    /**
     * @dev Returns the storage slot and value for the approved address of `tokenId`.
     */
    function _getApprovedAddress(uint256 tokenId)
        private
        view
        returns (uint256 approvedAddressSlot, address approvedAddress)
    {
        mapping(uint256 => address) storage tokenApprovalsPtr = _tokenApprovals;
        // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`.
        assembly {
            // Compute the slot.
            mstore(0x00, tokenId)
            mstore(0x20, tokenApprovalsPtr.slot)
            approvedAddressSlot := keccak256(0x00, 0x40)
            // Load the slot's value from storage.
            approvedAddress := sload(approvedAddressSlot)
        }
    }

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

    /**
     * @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 transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

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

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

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

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

        _beforeTokenTransfers(from, to, tokenId, 1);

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

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

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

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

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

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

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

        address from = address(uint160(prevOwnershipPacked));

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

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

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

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

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

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

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

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

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

    /**
     * @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 Directly sets the extra data for the ownership data `index`.
     */
    function _setExtraDataAt(uint256 index, uint24 extraData) internal {
        uint256 packed = _packedOwnerships[index];
        if (packed == 0) revert OwnershipNotInitializedForExtraData();
        uint256 extraDataCasted;
        // Cast `extraData` with assembly to avoid redundant masking.
        assembly {
            extraDataCasted := extraData
        }
        packed = (packed & BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << BITPOS_EXTRA_DATA);
        _packedOwnerships[index] = packed;
    }

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

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

    /**
     * @dev 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 8 of 9 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.1.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();

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

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

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

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

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

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

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

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

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

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

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

    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;
        // Arbitrary data similar to `startTimestamp` that can be set through `_extraData`.
        uint24 extraData;
    }

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

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

    /**
     * @dev Emitted when tokens in `fromTokenId` to `toTokenId` (inclusive) is transferred from `from` to `to`,
     * as defined in the ERC2309 standard. See `_mintERC2309` for more details.
     */
    event ConsecutiveTransfer(
        uint256 indexed fromTokenId,
        uint256 toTokenId,
        address indexed from,
        address indexed to
    );
}

File 9 of 9 : 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": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MAX_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_NFTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptedChangePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"getPriceRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_reservationAddress","type":"address"}],"name":"getReservationCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"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":"_mints","type":"uint256"}],"name":"presaleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"presaleMintActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleMintedCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"presaleReservations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleReservedCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mints","type":"uint256"},{"internalType":"enum EnigmaMiningFactionsThreePointFive.TokenType","name":"_tokenType","type":"uint8"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"publicMintActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicMintedCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"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":[{"internalType":"uint256","name":"_newPercentage","type":"uint256"}],"name":"setAcceptedChangePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxMints","type":"uint256"}],"name":"setMaxMints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxNfts","type":"uint256"}],"name":"setMaxNfts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_newStatus","type":"bool"}],"name":"setPresaleMintStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_presaleMintedCounter","type":"uint256"}],"name":"setPresaleMintedCounter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMintPrice","type":"uint256"}],"name":"setPresalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_presaleReservedCounter","type":"uint256"}],"name":"setPresaleReservedCounter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_newStatus","type":"bool"}],"name":"setPublicMintStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_publicMintedCounter","type":"uint256"}],"name":"setPublicMintedCounter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_count","type":"uint256"}],"name":"setReservedCountForAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMintPrice","type":"uint256"}],"name":"setSalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTime","type":"uint256"}],"name":"setStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"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":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_address","type":"address"}],"name":"treasuryMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"count","type":"uint256"}],"internalType":"struct EnigmaMiningFactionsThreePointFive.Whitelist[]","name":"users","type":"tuple[]"}],"name":"whitelistForPresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101f4600a8190556019600b555f600c819055600d819055600e8190556002600f5560109190915560118190556012805461ffff19166101001790556365504dc060135560a060405260809081526014906200005c90826200020f565b50601580546001600160a01b03191673a0b86991c6218b36c1d19d4a2e9eb0ce3606eb481790553480156200008f575f80fd5b5060405180606001604052806022815260200162002a2660229139604080518082019091526006815265454d46332e3560d01b6020820152620000d23362000122565b6003620000e083826200020f565b506004620000ef82826200020f565b505f6001555050600980546001600160a01b031916735f4ec3df9cbd43714fe2740f5e3616155c5b8419179055620002db565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806200019a57607f821691505b602082108103620001b957634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200020a57805f5260205f20601f840160051c81016020851015620001e65750805b601f840160051c820191505b8181101562000207575f8155600101620001f2565b50505b505050565b81516001600160401b038111156200022b576200022b62000171565b62000243816200023c845462000185565b84620001bf565b602080601f83116001811462000279575f8415620002615750858301515b5f19600386901b1c1916600185901b178555620002d3565b5f85815260208120601f198616915b82811015620002a95788860151825594840194600190910190840162000288565b5085821015620002c757878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b61273d80620002e95f395ff3fe6080604052600436106102bf575f3560e01c8063715018a61161016f578063b67c25a3116100d8578063e531b23011610092578063f2a3013e1161006d578063f2a3013e14610807578063f2fde38b14610826578063fa09e63014610845578063fc5eb69314610864575f80fd5b8063e531b230146107be578063e985e9c5146107d3578063f0292a03146107f2575f80fd5b8063b67c25a31461071b578063b88d4fde14610739578063be9a7cd514610758578063c70e551514610777578063c87b56dd1461078c578063c9b298f1146107ab575f80fd5b80638da5cb5b116101295780638da5cb5b1461066f578063912d19e91461068b57806395d89b41146106aa578063a22cb465146106be578063a7b4058c146106dd578063b61ff93c146106fc575f80fd5b8063715018a6146105ca57806375467c3d146105de57806378e97925146105fd57806379c9cb7b146106125780637eed5dc51461063157806389a3027114610650575f80fd5b80631f73d8d41161022b57806342842e0e116101e55780635be50521116101c05780635be50521146105625780636352211e146105775780636817c76c1461059657806370a08231146105ab575f80fd5b806342842e0e146104f957806355f804b314610518578063564c2c5914610537575f80fd5b80631f73d8d41461044b57806323b872dd1461046a5780633549345e146104895780633a329d95146104a85780633c8eb6f7146104c75780633e0a322d146104da575f80fd5b8063095ea7b31161027c578063095ea7b3146103a857806309ec7ba9146103c75780630e60fd3a146103e057806315cbc962146103f557806318160ddd146104145780631919fed71461042c575f80fd5b8063014670ad146102c357806301ffc9a7146102e457806306fdde0314610318578063081812fc14610339578063093d8c64146103705780630951465314610393575b5f80fd5b3480156102ce575f80fd5b506102e26102dd366004611fb0565b610898565b005b3480156102ef575f80fd5b506103036102fe366004611fdc565b6108a5565b60405190151581526020015b60405180910390f35b348015610323575f80fd5b5061032c6108f6565b60405161030f9190612044565b348015610344575f80fd5b50610358610353366004611fb0565b610986565b6040516001600160a01b03909116815260200161030f565b34801561037b575f80fd5b50610385600a5481565b60405190815260200161030f565b34801561039e575f80fd5b50610385600c5481565b3480156103b3575f80fd5b506102e26103c2366004612071565b6109c8565b3480156103d2575f80fd5b506012546103039060ff1681565b3480156103eb575f80fd5b50610385600d5481565b348015610400575f80fd5b506102e261040f366004611fb0565b610a66565b34801561041f575f80fd5b5060025460015403610385565b348015610437575f80fd5b506102e2610446366004611fb0565b610a73565b348015610456575f80fd5b50610385610465366004611fb0565b610a80565b348015610475575f80fd5b506102e2610484366004612099565b610b4d565b348015610494575f80fd5b506102e26104a3366004611fb0565b610cf7565b3480156104b3575f80fd5b506102e26104c2366004611fb0565b610d04565b6102e26104d53660046120d2565b610d11565b3480156104e5575f80fd5b506102e26104f4366004611fb0565b611150565b348015610504575f80fd5b506102e2610513366004612099565b61115d565b348015610523575f80fd5b506102e2610532366004612103565b611177565b348015610542575f80fd5b5061038561055136600461216f565b60166020525f908152604090205481565b34801561056d575f80fd5b5061038560115481565b348015610582575f80fd5b50610358610591366004611fb0565b61118c565b3480156105a1575f80fd5b5061038560105481565b3480156105b6575f80fd5b506103856105c536600461216f565b611196565b3480156105d5575f80fd5b506102e26111e3565b3480156105e9575f80fd5b506102e26105f8366004611fb0565b6111f6565b348015610608575f80fd5b5061038560135481565b34801561061d575f80fd5b506102e261062c366004611fb0565b611203565b34801561063c575f80fd5b506102e261064b366004611fb0565b611210565b34801561065b575f80fd5b50601554610358906001600160a01b031681565b34801561067a575f80fd5b505f546001600160a01b0316610358565b348015610696575f80fd5b506102e26106a5366004612071565b6112b1565b3480156106b5575f80fd5b5061032c611397565b3480156106c9575f80fd5b506102e26106d8366004612195565b6113a6565b3480156106e8575f80fd5b506102e26106f73660046121bf565b61143a565b348015610707575f80fd5b506102e26107163660046121bf565b611455565b348015610726575f80fd5b5060125461030390610100900460ff1681565b348015610744575f80fd5b506102e2610753366004612248565b611477565b348015610763575f80fd5b506102e2610772366004612301565b6114bb565b348015610782575f80fd5b50610385600e5481565b348015610797575f80fd5b5061032c6107a6366004611fb0565b611622565b6102e26107b9366004611fb0565b6116a3565b3480156107c9575f80fd5b50610385600f5481565b3480156107de575f80fd5b506103036107ed3660046123ce565b61197a565b3480156107fd575f80fd5b50610385600b5481565b348015610812575f80fd5b506102e26108213660046123ff565b6119a7565b348015610831575f80fd5b506102e261084036600461216f565b611a45565b348015610850575f80fd5b506102e261085f36600461216f565b611abe565b34801561086f575f80fd5b5061038561087e36600461216f565b6001600160a01b03165f9081526016602052604090205490565b6108a0611c4c565b600c55565b5f6301ffc9a760e01b6001600160e01b0319831614806108d557506380ac58cd60e01b6001600160e01b03198316145b806108f05750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606003805461090590612420565b80601f016020809104026020016040519081016040528092919081815260200182805461093190612420565b801561097c5780601f106109535761010080835404028352916020019161097c565b820191905f5260205f20905b81548152906001019060200180831161095f57829003601f168201915b5050505050905090565b5f61099082611ca5565b6109ad576040516333d1c03960e21b815260040160405180910390fd5b505f908152600760205260409020546001600160a01b031690565b5f6109d28261118c565b9050336001600160a01b03821614610a0b576109ee813361197a565b610a0b576040516367d9dca160e11b815260040160405180910390fd5b5f8281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610a6e611c4c565b600e55565b610a7b611c4c565b601055565b5f8060095f9054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610ad2573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610af69190612471565b5050509150505f816402540be400610b0e91906124d1565b90505f610b2385670de0b6b3a76400006124d1565b90505f82610b3983670de0b6b3a76400006124d1565b610b4391906124e8565b9695505050505050565b5f610b5782611ccb565b9050836001600160a01b0316816001600160a01b031614610b8a5760405162a1148160e81b815260040160405180910390fd5b5f8281526007602052604090208054338082146001600160a01b03881690911417610bd657610bb9863361197a565b610bd657604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610bfd57604051633a954ecd60e21b815260040160405180910390fd5b610c0a8686866001611149565b8015610c14575f82555b6001600160a01b038681165f9081526006602052604080822080545f19019055918716808252919020805460010190554260a01b17600160e11b175f85815260056020526040812091909155600160e11b84169003610ca157600184015f818152600560205260408120549003610c9f576001548114610c9f575f8181526005602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610cef8686866001611149565b505050505050565b610cff611c4c565b601155565b610d0c611c4c565b600a55565b333214610d1c575f80fd5b60135415801590610d2f57504260135411155b610d735760405162461bcd60e51b815260206004820152601060248201526f29b0b6329034b9903737ba1037b832b760811b60448201526064015b60405180910390fd5b60125460ff610100909104161515600114610de55760405162461bcd60e51b815260206004820152602c60248201527f4572726f723a205075626c6963206d696e742069736e2774206163746976652060448201526b1bdc881a185cc8195b99195960a21b6064820152608401610d6a565b600b54821115610e375760405162461bcd60e51b815260206004820152601a60248201527f4572726f723a2045786365656473204d6178207065722054584e0000000000006044820152606401610d6a565b600a54600e5483610e4b6002546001540390565b610e559190612507565b610e5f9190612507565b1115610ead5760405162461bcd60e51b815260206004820152601d60248201527f4572726f723a2045786365656473204d617820416c6c6f636174696f6e0000006044820152606401610d6a565b5f60105483610ebc91906124d1565b90505f826001811115610ed157610ed161251a565b03610fb7575f610ee082610a80565b90505f6064600f546064610ef4919061252e565b610efe90846124d1565b610f0891906124e8565b90505f6064600f546064610f1c9190612507565b610f2690856124d1565b610f3091906124e8565b9050813410158015610f425750803411155b610f8e5760405162461bcd60e51b815260206004820152601960248201527f4572726f723a20496e73756666696369656e742066756e6473000000000000006044820152606401610d6a565b610f983387611d2d565b85600d5f828254610fa99190612507565b9091555061114b9350505050565b5f6001836001811115610fcc57610fcc61251a565b036111495750601554604051636eb1769f60e11b81523360048201523060248201526001600160a01b03909116908290829063dd62ed3e90604401602060405180830381865afa158015611022573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110469190612541565b10156110945760405162461bcd60e51b815260206004820152601b60248201527f4572726f723a204e6f7420656e6f75676820616c6c6f77616e636500000000006044820152606401610d6a565b6001600160a01b0381166323b872dd33306110b286620f42406124d1565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303815f875af1158015611103573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111279190612558565b506111323385611d2d565b83600d5f8282546111439190612507565b90915550505b505b505050565b611158611c4c565b601355565b61114b83838360405180602001604052805f815250611477565b61117f611c4c565b601461114b8284836125be565b5f6108f082611ccb565b5f6001600160a01b0382166111be576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03165f9081526006602052604090205467ffffffffffffffff1690565b6111eb611c4c565b6111f45f611e1c565b565b6111fe611c4c565b600d55565b61120b611c4c565b600b55565b611218611c4c565b5f811161125b5760405162461bcd60e51b815260206004820152601160248201527004572726f723a2043616e2774206265203607c1b6044820152606401610d6a565b600f5481036112ac5760405162461bcd60e51b815260206004820152601b60248201527f4572726f723a2053616d652076616c7565206173206265666f726500000000006044820152606401610d6a565b600f55565b6112b9611c4c565b6001600160a01b0382165f9081526016602052604090205415611365576001600160a01b0382165f90815260166020526040902054811015611333576001600160a01b0382165f9081526016602052604090205461131890829061252e565b600e5f828254611328919061252e565b9091555061137c9050565b6001600160a01b0382165f90815260166020526040902054611355908261252e565b600e5f8282546113289190612507565b80600e5f8282546113769190612507565b90915550505b6001600160a01b039091165f90815260166020526040902055565b60606004805461090590612420565b336001600160a01b038316036113cf5760405163b06307db60e01b815260040160405180910390fd5b335f8181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611442611c4c565b6012805460ff1916911515919091179055565b61145d611c4c565b601280549115156101000261ff0019909216919091179055565b611482848484610b4d565b6001600160a01b0383163b156111495761149e84848484611e6b565b611149576040516368d2bf6b60e11b815260040160405180910390fd5b6114c3611c4c565b5f5b815181101561161e575f60165f8484815181106114e4576114e4612678565b60200260200101515f01516001600160a01b03166001600160a01b031681526020019081526020015f2054111561158b5781818151811061152757611527612678565b60200260200101516020015160165f84848151811061154857611548612678565b60200260200101515f01516001600160a01b03166001600160a01b031681526020019081526020015f205f8282546115809190612507565b909155506115e39050565b81818151811061159d5761159d612678565b60200260200101516020015160165f8484815181106115be576115be612678565b602090810291909101810151516001600160a01b031682528101919091526040015f20555b8181815181106115f5576115f5612678565b602002602001015160200151600e5f8282546116119190612507565b90915550506001016114c5565b5050565b606061162d82611ca5565b61164a57604051630a14c4b560e41b815260040160405180910390fd5b5f611653611f52565b905080515f036116715760405180602001604052805f81525061169c565b8061167b84611f61565b60405160200161168c92919061268c565b6040516020818303038152906040525b9392505050565b3332146116ae575f80fd5b601354158015906116c157504260135411155b6117005760405162461bcd60e51b815260206004820152601060248201526f29b0b6329034b9903737ba1037b832b760811b6044820152606401610d6a565b335f908152601660205260409020548061175c5760405162461bcd60e51b815260206004820152601c60248201527f4572726f723a204e6f207265736572766174696f6e7320666f756e64000000006044820152606401610d6a565b818110156117ac5760405162461bcd60e51b815260206004820152601e60248201527f4572726f723a204e6f7420656e6f756768207265736572766174696f6e7300006044820152606401610d6a565b5f82116117f25760405162461bcd60e51b81526020600482015260146024820152734572726f723a20496e76616c69642076616c756560601b6044820152606401610d6a565b60125460ff16151560011461185f5760405162461bcd60e51b815260206004820152602d60248201527f4572726f723a2050726573616c65204d696e742069736e27742061637469766560448201526c081bdc881a185cc8195b991959609a1b6064820152608401610d6a565b600b548211156118b15760405162461bcd60e51b815260206004820152601a60248201527f4572726f723a2045786365656473204d6178207065722054584e0000000000006044820152606401610d6a565b600a54826118c26002546001540390565b6118cc9190612507565b111561191a5760405162461bcd60e51b815260206004820152601d60248201527f4572726f723a2045786365656473204d617820416c6c6f636174696f6e0000006044820152606401610d6a565b335f908152601660205260408120805484929061193890849061252e565b9091555061194890503383611d2d565b81600c5f8282546119599190612507565b9250508190555081600e5f828254611971919061252e565b90915550505050565b6001600160a01b039182165f90815260086020908152604080832093909416825291909152205460ff1690565b6119af611c4c565b600a54826119c06002546001540390565b6119ca9190612507565b1115611a2a5760405162461bcd60e51b815260206004820152602960248201527f4572726f723a2043616e6e6f74206d696e74206d6f7265207468616e20746f74604482015268616c20737570706c7960b81b6064820152608401610d6a565b611a348183611d2d565b81600d5f8282546119719190612507565b611a4d611c4c565b6001600160a01b038116611ab25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d6a565b611abb81611e1c565b50565b611ac6611c4c565b60405147906001600160a01b0383169082156108fc029083905f818181858888f19350505050158015611afb573d5f803e3d5ffd5b506015546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611b42573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b669190612541565b111561161e576015546040516370a0823160e01b81523060048201526001600160a01b039091169063a9059cbb90849083906370a0823190602401602060405180830381865afa158015611bbc573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611be09190612541565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015611c28573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061114b9190612558565b5f546001600160a01b031633146111f45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d6a565b5f600154821080156108f05750505f90815260056020526040902054600160e01b161590565b5f81600154811015611d14575f8181526005602052604081205490600160e01b82169003611d12575b805f0361169c57505f19015f81815260056020526040902054611cf4565b505b604051636f96cda160e11b815260040160405180910390fd5b6001546001600160a01b038316611d5657604051622e076360e81b815260040160405180910390fd5b815f03611d765760405163b562e8dd60e01b815260040160405180910390fd5b611d825f848385611149565b6001600160a01b0383165f81815260066020526040902080546801000000000000000185020190554260a01b6001841460e11b17175f82815260056020526040902055808281015b6040516001830192906001600160a01b038716905f907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210611dca576001555061114b5f848385611149565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a0290611e9f9033908990889088906004016126ba565b6020604051808303815f875af1925050508015611ed9575060408051601f3d908101601f19168201909252611ed6918101906126ec565b60015b611f35573d808015611f06576040519150601f19603f3d011682016040523d82523d5f602084013e611f0b565b606091505b5080515f03611f2d576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b60606014805461090590612420565b604080516080810191829052607f0190826030600a8206018353600a90045b8015611f9e57600183039250600a81066030018353600a9004611f80565b50819003601f19909101908152919050565b5f60208284031215611fc0575f80fd5b5035919050565b6001600160e01b031981168114611abb575f80fd5b5f60208284031215611fec575f80fd5b813561169c81611fc7565b5f5b83811015612011578181015183820152602001611ff9565b50505f910152565b5f8151808452612030816020860160208601611ff7565b601f01601f19169290920160200192915050565b602081525f61169c6020830184612019565b80356001600160a01b038116811461206c575f80fd5b919050565b5f8060408385031215612082575f80fd5b61208b83612056565b946020939093013593505050565b5f805f606084860312156120ab575f80fd5b6120b484612056565b92506120c260208501612056565b9150604084013590509250925092565b5f80604083850312156120e3575f80fd5b823591506020830135600281106120f8575f80fd5b809150509250929050565b5f8060208385031215612114575f80fd5b823567ffffffffffffffff8082111561212b575f80fd5b818501915085601f83011261213e575f80fd5b81358181111561214c575f80fd5b86602082850101111561215d575f80fd5b60209290920196919550909350505050565b5f6020828403121561217f575f80fd5b61169c82612056565b8015158114611abb575f80fd5b5f80604083850312156121a6575f80fd5b6121af83612056565b915060208301356120f881612188565b5f602082840312156121cf575f80fd5b813561169c81612188565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715612211576122116121da565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612240576122406121da565b604052919050565b5f805f806080858703121561225b575f80fd5b61226485612056565b93506020612273818701612056565b935060408601359250606086013567ffffffffffffffff80821115612296575f80fd5b818801915088601f8301126122a9575f80fd5b8135818111156122bb576122bb6121da565b6122cd601f8201601f19168501612217565b915080825289848285010111156122e2575f80fd5b80848401858401375f8482840101525080935050505092959194509250565b5f6020808385031215612312575f80fd5b823567ffffffffffffffff80821115612329575f80fd5b818501915085601f83011261233c575f80fd5b81358181111561234e5761234e6121da565b61235c848260051b01612217565b818152848101925060069190911b83018401908782111561237b575f80fd5b928401925b818410156123c35760408489031215612397575f80fd5b61239f6121ee565b6123a885612056565b81528486013586820152835260409093019291840191612380565b979650505050505050565b5f80604083850312156123df575f80fd5b6123e883612056565b91506123f660208401612056565b90509250929050565b5f8060408385031215612410575f80fd5b823591506123f660208401612056565b600181811c9082168061243457607f821691505b60208210810361245257634e487b7160e01b5f52602260045260245ffd5b50919050565b805169ffffffffffffffffffff8116811461206c575f80fd5b5f805f805f60a08688031215612485575f80fd5b61248e86612458565b94506020860151935060408601519250606086015191506124b160808701612458565b90509295509295909350565b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176108f0576108f06124bd565b5f8261250257634e487b7160e01b5f52601260045260245ffd5b500490565b808201808211156108f0576108f06124bd565b634e487b7160e01b5f52602160045260245ffd5b818103818111156108f0576108f06124bd565b5f60208284031215612551575f80fd5b5051919050565b5f60208284031215612568575f80fd5b815161169c81612188565b601f82111561114b57805f5260205f20601f840160051c810160208510156125985750805b601f840160051c820191505b818110156125b7575f81556001016125a4565b5050505050565b67ffffffffffffffff8311156125d6576125d66121da565b6125ea836125e48354612420565b83612573565b5f601f84116001811461261b575f85156126045750838201355b5f19600387901b1c1916600186901b1783556125b7565b5f83815260208120601f198716915b8281101561264a578685013582556020948501946001909201910161262a565b5086821015612666575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b5f52603260045260245ffd5b5f835161269d818460208801611ff7565b8351908301906126b1818360208801611ff7565b01949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f90610b4390830184612019565b5f602082840312156126fc575f80fd5b815161169c81611fc756fea2646970667358221220281cf45a987d25f029fa094fdfba0eb15fd013ba631c045ed4314cd37f8f532264736f6c63430008160033456e69676d614d696e696e6746616374696f6e735468726565506f696e7446697665

Deployed Bytecode

0x6080604052600436106102bf575f3560e01c8063715018a61161016f578063b67c25a3116100d8578063e531b23011610092578063f2a3013e1161006d578063f2a3013e14610807578063f2fde38b14610826578063fa09e63014610845578063fc5eb69314610864575f80fd5b8063e531b230146107be578063e985e9c5146107d3578063f0292a03146107f2575f80fd5b8063b67c25a31461071b578063b88d4fde14610739578063be9a7cd514610758578063c70e551514610777578063c87b56dd1461078c578063c9b298f1146107ab575f80fd5b80638da5cb5b116101295780638da5cb5b1461066f578063912d19e91461068b57806395d89b41146106aa578063a22cb465146106be578063a7b4058c146106dd578063b61ff93c146106fc575f80fd5b8063715018a6146105ca57806375467c3d146105de57806378e97925146105fd57806379c9cb7b146106125780637eed5dc51461063157806389a3027114610650575f80fd5b80631f73d8d41161022b57806342842e0e116101e55780635be50521116101c05780635be50521146105625780636352211e146105775780636817c76c1461059657806370a08231146105ab575f80fd5b806342842e0e146104f957806355f804b314610518578063564c2c5914610537575f80fd5b80631f73d8d41461044b57806323b872dd1461046a5780633549345e146104895780633a329d95146104a85780633c8eb6f7146104c75780633e0a322d146104da575f80fd5b8063095ea7b31161027c578063095ea7b3146103a857806309ec7ba9146103c75780630e60fd3a146103e057806315cbc962146103f557806318160ddd146104145780631919fed71461042c575f80fd5b8063014670ad146102c357806301ffc9a7146102e457806306fdde0314610318578063081812fc14610339578063093d8c64146103705780630951465314610393575b5f80fd5b3480156102ce575f80fd5b506102e26102dd366004611fb0565b610898565b005b3480156102ef575f80fd5b506103036102fe366004611fdc565b6108a5565b60405190151581526020015b60405180910390f35b348015610323575f80fd5b5061032c6108f6565b60405161030f9190612044565b348015610344575f80fd5b50610358610353366004611fb0565b610986565b6040516001600160a01b03909116815260200161030f565b34801561037b575f80fd5b50610385600a5481565b60405190815260200161030f565b34801561039e575f80fd5b50610385600c5481565b3480156103b3575f80fd5b506102e26103c2366004612071565b6109c8565b3480156103d2575f80fd5b506012546103039060ff1681565b3480156103eb575f80fd5b50610385600d5481565b348015610400575f80fd5b506102e261040f366004611fb0565b610a66565b34801561041f575f80fd5b5060025460015403610385565b348015610437575f80fd5b506102e2610446366004611fb0565b610a73565b348015610456575f80fd5b50610385610465366004611fb0565b610a80565b348015610475575f80fd5b506102e2610484366004612099565b610b4d565b348015610494575f80fd5b506102e26104a3366004611fb0565b610cf7565b3480156104b3575f80fd5b506102e26104c2366004611fb0565b610d04565b6102e26104d53660046120d2565b610d11565b3480156104e5575f80fd5b506102e26104f4366004611fb0565b611150565b348015610504575f80fd5b506102e2610513366004612099565b61115d565b348015610523575f80fd5b506102e2610532366004612103565b611177565b348015610542575f80fd5b5061038561055136600461216f565b60166020525f908152604090205481565b34801561056d575f80fd5b5061038560115481565b348015610582575f80fd5b50610358610591366004611fb0565b61118c565b3480156105a1575f80fd5b5061038560105481565b3480156105b6575f80fd5b506103856105c536600461216f565b611196565b3480156105d5575f80fd5b506102e26111e3565b3480156105e9575f80fd5b506102e26105f8366004611fb0565b6111f6565b348015610608575f80fd5b5061038560135481565b34801561061d575f80fd5b506102e261062c366004611fb0565b611203565b34801561063c575f80fd5b506102e261064b366004611fb0565b611210565b34801561065b575f80fd5b50601554610358906001600160a01b031681565b34801561067a575f80fd5b505f546001600160a01b0316610358565b348015610696575f80fd5b506102e26106a5366004612071565b6112b1565b3480156106b5575f80fd5b5061032c611397565b3480156106c9575f80fd5b506102e26106d8366004612195565b6113a6565b3480156106e8575f80fd5b506102e26106f73660046121bf565b61143a565b348015610707575f80fd5b506102e26107163660046121bf565b611455565b348015610726575f80fd5b5060125461030390610100900460ff1681565b348015610744575f80fd5b506102e2610753366004612248565b611477565b348015610763575f80fd5b506102e2610772366004612301565b6114bb565b348015610782575f80fd5b50610385600e5481565b348015610797575f80fd5b5061032c6107a6366004611fb0565b611622565b6102e26107b9366004611fb0565b6116a3565b3480156107c9575f80fd5b50610385600f5481565b3480156107de575f80fd5b506103036107ed3660046123ce565b61197a565b3480156107fd575f80fd5b50610385600b5481565b348015610812575f80fd5b506102e26108213660046123ff565b6119a7565b348015610831575f80fd5b506102e261084036600461216f565b611a45565b348015610850575f80fd5b506102e261085f36600461216f565b611abe565b34801561086f575f80fd5b5061038561087e36600461216f565b6001600160a01b03165f9081526016602052604090205490565b6108a0611c4c565b600c55565b5f6301ffc9a760e01b6001600160e01b0319831614806108d557506380ac58cd60e01b6001600160e01b03198316145b806108f05750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606003805461090590612420565b80601f016020809104026020016040519081016040528092919081815260200182805461093190612420565b801561097c5780601f106109535761010080835404028352916020019161097c565b820191905f5260205f20905b81548152906001019060200180831161095f57829003601f168201915b5050505050905090565b5f61099082611ca5565b6109ad576040516333d1c03960e21b815260040160405180910390fd5b505f908152600760205260409020546001600160a01b031690565b5f6109d28261118c565b9050336001600160a01b03821614610a0b576109ee813361197a565b610a0b576040516367d9dca160e11b815260040160405180910390fd5b5f8281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610a6e611c4c565b600e55565b610a7b611c4c565b601055565b5f8060095f9054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610ad2573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610af69190612471565b5050509150505f816402540be400610b0e91906124d1565b90505f610b2385670de0b6b3a76400006124d1565b90505f82610b3983670de0b6b3a76400006124d1565b610b4391906124e8565b9695505050505050565b5f610b5782611ccb565b9050836001600160a01b0316816001600160a01b031614610b8a5760405162a1148160e81b815260040160405180910390fd5b5f8281526007602052604090208054338082146001600160a01b03881690911417610bd657610bb9863361197a565b610bd657604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610bfd57604051633a954ecd60e21b815260040160405180910390fd5b610c0a8686866001611149565b8015610c14575f82555b6001600160a01b038681165f9081526006602052604080822080545f19019055918716808252919020805460010190554260a01b17600160e11b175f85815260056020526040812091909155600160e11b84169003610ca157600184015f818152600560205260408120549003610c9f576001548114610c9f575f8181526005602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610cef8686866001611149565b505050505050565b610cff611c4c565b601155565b610d0c611c4c565b600a55565b333214610d1c575f80fd5b60135415801590610d2f57504260135411155b610d735760405162461bcd60e51b815260206004820152601060248201526f29b0b6329034b9903737ba1037b832b760811b60448201526064015b60405180910390fd5b60125460ff610100909104161515600114610de55760405162461bcd60e51b815260206004820152602c60248201527f4572726f723a205075626c6963206d696e742069736e2774206163746976652060448201526b1bdc881a185cc8195b99195960a21b6064820152608401610d6a565b600b54821115610e375760405162461bcd60e51b815260206004820152601a60248201527f4572726f723a2045786365656473204d6178207065722054584e0000000000006044820152606401610d6a565b600a54600e5483610e4b6002546001540390565b610e559190612507565b610e5f9190612507565b1115610ead5760405162461bcd60e51b815260206004820152601d60248201527f4572726f723a2045786365656473204d617820416c6c6f636174696f6e0000006044820152606401610d6a565b5f60105483610ebc91906124d1565b90505f826001811115610ed157610ed161251a565b03610fb7575f610ee082610a80565b90505f6064600f546064610ef4919061252e565b610efe90846124d1565b610f0891906124e8565b90505f6064600f546064610f1c9190612507565b610f2690856124d1565b610f3091906124e8565b9050813410158015610f425750803411155b610f8e5760405162461bcd60e51b815260206004820152601960248201527f4572726f723a20496e73756666696369656e742066756e6473000000000000006044820152606401610d6a565b610f983387611d2d565b85600d5f828254610fa99190612507565b9091555061114b9350505050565b5f6001836001811115610fcc57610fcc61251a565b036111495750601554604051636eb1769f60e11b81523360048201523060248201526001600160a01b03909116908290829063dd62ed3e90604401602060405180830381865afa158015611022573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110469190612541565b10156110945760405162461bcd60e51b815260206004820152601b60248201527f4572726f723a204e6f7420656e6f75676820616c6c6f77616e636500000000006044820152606401610d6a565b6001600160a01b0381166323b872dd33306110b286620f42406124d1565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303815f875af1158015611103573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111279190612558565b506111323385611d2d565b83600d5f8282546111439190612507565b90915550505b505b505050565b611158611c4c565b601355565b61114b83838360405180602001604052805f815250611477565b61117f611c4c565b601461114b8284836125be565b5f6108f082611ccb565b5f6001600160a01b0382166111be576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03165f9081526006602052604090205467ffffffffffffffff1690565b6111eb611c4c565b6111f45f611e1c565b565b6111fe611c4c565b600d55565b61120b611c4c565b600b55565b611218611c4c565b5f811161125b5760405162461bcd60e51b815260206004820152601160248201527004572726f723a2043616e2774206265203607c1b6044820152606401610d6a565b600f5481036112ac5760405162461bcd60e51b815260206004820152601b60248201527f4572726f723a2053616d652076616c7565206173206265666f726500000000006044820152606401610d6a565b600f55565b6112b9611c4c565b6001600160a01b0382165f9081526016602052604090205415611365576001600160a01b0382165f90815260166020526040902054811015611333576001600160a01b0382165f9081526016602052604090205461131890829061252e565b600e5f828254611328919061252e565b9091555061137c9050565b6001600160a01b0382165f90815260166020526040902054611355908261252e565b600e5f8282546113289190612507565b80600e5f8282546113769190612507565b90915550505b6001600160a01b039091165f90815260166020526040902055565b60606004805461090590612420565b336001600160a01b038316036113cf5760405163b06307db60e01b815260040160405180910390fd5b335f8181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611442611c4c565b6012805460ff1916911515919091179055565b61145d611c4c565b601280549115156101000261ff0019909216919091179055565b611482848484610b4d565b6001600160a01b0383163b156111495761149e84848484611e6b565b611149576040516368d2bf6b60e11b815260040160405180910390fd5b6114c3611c4c565b5f5b815181101561161e575f60165f8484815181106114e4576114e4612678565b60200260200101515f01516001600160a01b03166001600160a01b031681526020019081526020015f2054111561158b5781818151811061152757611527612678565b60200260200101516020015160165f84848151811061154857611548612678565b60200260200101515f01516001600160a01b03166001600160a01b031681526020019081526020015f205f8282546115809190612507565b909155506115e39050565b81818151811061159d5761159d612678565b60200260200101516020015160165f8484815181106115be576115be612678565b602090810291909101810151516001600160a01b031682528101919091526040015f20555b8181815181106115f5576115f5612678565b602002602001015160200151600e5f8282546116119190612507565b90915550506001016114c5565b5050565b606061162d82611ca5565b61164a57604051630a14c4b560e41b815260040160405180910390fd5b5f611653611f52565b905080515f036116715760405180602001604052805f81525061169c565b8061167b84611f61565b60405160200161168c92919061268c565b6040516020818303038152906040525b9392505050565b3332146116ae575f80fd5b601354158015906116c157504260135411155b6117005760405162461bcd60e51b815260206004820152601060248201526f29b0b6329034b9903737ba1037b832b760811b6044820152606401610d6a565b335f908152601660205260409020548061175c5760405162461bcd60e51b815260206004820152601c60248201527f4572726f723a204e6f207265736572766174696f6e7320666f756e64000000006044820152606401610d6a565b818110156117ac5760405162461bcd60e51b815260206004820152601e60248201527f4572726f723a204e6f7420656e6f756768207265736572766174696f6e7300006044820152606401610d6a565b5f82116117f25760405162461bcd60e51b81526020600482015260146024820152734572726f723a20496e76616c69642076616c756560601b6044820152606401610d6a565b60125460ff16151560011461185f5760405162461bcd60e51b815260206004820152602d60248201527f4572726f723a2050726573616c65204d696e742069736e27742061637469766560448201526c081bdc881a185cc8195b991959609a1b6064820152608401610d6a565b600b548211156118b15760405162461bcd60e51b815260206004820152601a60248201527f4572726f723a2045786365656473204d6178207065722054584e0000000000006044820152606401610d6a565b600a54826118c26002546001540390565b6118cc9190612507565b111561191a5760405162461bcd60e51b815260206004820152601d60248201527f4572726f723a2045786365656473204d617820416c6c6f636174696f6e0000006044820152606401610d6a565b335f908152601660205260408120805484929061193890849061252e565b9091555061194890503383611d2d565b81600c5f8282546119599190612507565b9250508190555081600e5f828254611971919061252e565b90915550505050565b6001600160a01b039182165f90815260086020908152604080832093909416825291909152205460ff1690565b6119af611c4c565b600a54826119c06002546001540390565b6119ca9190612507565b1115611a2a5760405162461bcd60e51b815260206004820152602960248201527f4572726f723a2043616e6e6f74206d696e74206d6f7265207468616e20746f74604482015268616c20737570706c7960b81b6064820152608401610d6a565b611a348183611d2d565b81600d5f8282546119719190612507565b611a4d611c4c565b6001600160a01b038116611ab25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d6a565b611abb81611e1c565b50565b611ac6611c4c565b60405147906001600160a01b0383169082156108fc029083905f818181858888f19350505050158015611afb573d5f803e3d5ffd5b506015546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa158015611b42573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b669190612541565b111561161e576015546040516370a0823160e01b81523060048201526001600160a01b039091169063a9059cbb90849083906370a0823190602401602060405180830381865afa158015611bbc573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611be09190612541565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015611c28573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061114b9190612558565b5f546001600160a01b031633146111f45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d6a565b5f600154821080156108f05750505f90815260056020526040902054600160e01b161590565b5f81600154811015611d14575f8181526005602052604081205490600160e01b82169003611d12575b805f0361169c57505f19015f81815260056020526040902054611cf4565b505b604051636f96cda160e11b815260040160405180910390fd5b6001546001600160a01b038316611d5657604051622e076360e81b815260040160405180910390fd5b815f03611d765760405163b562e8dd60e01b815260040160405180910390fd5b611d825f848385611149565b6001600160a01b0383165f81815260066020526040902080546801000000000000000185020190554260a01b6001841460e11b17175f82815260056020526040902055808281015b6040516001830192906001600160a01b038716905f907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210611dca576001555061114b5f848385611149565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a0290611e9f9033908990889088906004016126ba565b6020604051808303815f875af1925050508015611ed9575060408051601f3d908101601f19168201909252611ed6918101906126ec565b60015b611f35573d808015611f06576040519150601f19603f3d011682016040523d82523d5f602084013e611f0b565b606091505b5080515f03611f2d576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b60606014805461090590612420565b604080516080810191829052607f0190826030600a8206018353600a90045b8015611f9e57600183039250600a81066030018353600a9004611f80565b50819003601f19909101908152919050565b5f60208284031215611fc0575f80fd5b5035919050565b6001600160e01b031981168114611abb575f80fd5b5f60208284031215611fec575f80fd5b813561169c81611fc7565b5f5b83811015612011578181015183820152602001611ff9565b50505f910152565b5f8151808452612030816020860160208601611ff7565b601f01601f19169290920160200192915050565b602081525f61169c6020830184612019565b80356001600160a01b038116811461206c575f80fd5b919050565b5f8060408385031215612082575f80fd5b61208b83612056565b946020939093013593505050565b5f805f606084860312156120ab575f80fd5b6120b484612056565b92506120c260208501612056565b9150604084013590509250925092565b5f80604083850312156120e3575f80fd5b823591506020830135600281106120f8575f80fd5b809150509250929050565b5f8060208385031215612114575f80fd5b823567ffffffffffffffff8082111561212b575f80fd5b818501915085601f83011261213e575f80fd5b81358181111561214c575f80fd5b86602082850101111561215d575f80fd5b60209290920196919550909350505050565b5f6020828403121561217f575f80fd5b61169c82612056565b8015158114611abb575f80fd5b5f80604083850312156121a6575f80fd5b6121af83612056565b915060208301356120f881612188565b5f602082840312156121cf575f80fd5b813561169c81612188565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715612211576122116121da565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612240576122406121da565b604052919050565b5f805f806080858703121561225b575f80fd5b61226485612056565b93506020612273818701612056565b935060408601359250606086013567ffffffffffffffff80821115612296575f80fd5b818801915088601f8301126122a9575f80fd5b8135818111156122bb576122bb6121da565b6122cd601f8201601f19168501612217565b915080825289848285010111156122e2575f80fd5b80848401858401375f8482840101525080935050505092959194509250565b5f6020808385031215612312575f80fd5b823567ffffffffffffffff80821115612329575f80fd5b818501915085601f83011261233c575f80fd5b81358181111561234e5761234e6121da565b61235c848260051b01612217565b818152848101925060069190911b83018401908782111561237b575f80fd5b928401925b818410156123c35760408489031215612397575f80fd5b61239f6121ee565b6123a885612056565b81528486013586820152835260409093019291840191612380565b979650505050505050565b5f80604083850312156123df575f80fd5b6123e883612056565b91506123f660208401612056565b90509250929050565b5f8060408385031215612410575f80fd5b823591506123f660208401612056565b600181811c9082168061243457607f821691505b60208210810361245257634e487b7160e01b5f52602260045260245ffd5b50919050565b805169ffffffffffffffffffff8116811461206c575f80fd5b5f805f805f60a08688031215612485575f80fd5b61248e86612458565b94506020860151935060408601519250606086015191506124b160808701612458565b90509295509295909350565b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176108f0576108f06124bd565b5f8261250257634e487b7160e01b5f52601260045260245ffd5b500490565b808201808211156108f0576108f06124bd565b634e487b7160e01b5f52602160045260245ffd5b818103818111156108f0576108f06124bd565b5f60208284031215612551575f80fd5b5051919050565b5f60208284031215612568575f80fd5b815161169c81612188565b601f82111561114b57805f5260205f20601f840160051c810160208510156125985750805b601f840160051c820191505b818110156125b7575f81556001016125a4565b5050505050565b67ffffffffffffffff8311156125d6576125d66121da565b6125ea836125e48354612420565b83612573565b5f601f84116001811461261b575f85156126045750838201355b5f19600387901b1c1916600186901b1783556125b7565b5f83815260208120601f198716915b8281101561264a578685013582556020948501946001909201910161262a565b5086821015612666575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b5f52603260045260245ffd5b5f835161269d818460208801611ff7565b8351908301906126b1818360208801611ff7565b01949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f90610b4390830184612019565b5f602082840312156126fc575f80fd5b815161169c81611fc756fea2646970667358221220281cf45a987d25f029fa094fdfba0eb15fd013ba631c045ed4314cd37f8f532264736f6c63430008160033

Loading...
Loading
Loading...
Loading
[ 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.