ETH Price: $3,388.38 (+1.26%)

Token

MEGALITH (KEYS)
 

Overview

Max Total Supply

333 KEYS

Holders

218

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
jamescryptonova.eth
Balance
24 KEYS
0x2fb477bf0db48926ca59d9d34c72424524cb9d51
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:
MGLTH

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 5 : MGLTH.sol
//SPDX-License-Identifier: UNLICENSED

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

pragma solidity ^0.8.15;

/// @title Megalith Token
/// @author MYRLN

import "solmate/auth/Owned.sol";
import "ERC721A/ERC721A.sol";
import "openzeppelin-contracts/contracts/utils/Strings.sol";

contract MGLTH is ERC721A, Owned {
    using Strings for uint256;

    string public baseURI;

    bool public broadcastActive;
    bool public prayActive;
    bool public sacrificeActive = true;
    bool public developerSacramentState;

    uint public vandalismFee = 10**16;

    mapping (address => bool) public addressSacrificed;
    mapping (address => uint) public payedAmount;

    event Broadcast(address indexed injector, uint indexed token, string indexed mediaHash);
    event Vandalize(address indexed injector, uint indexed token, string indexed mediaash);

    constructor()ERC721A("MEGALITH", "KEYS")Owned(msg.sender){}

    /// @notice Receive function which calls the sacrifice function
    receive() external payable {
        sacrifice();
    }

    /// @notice Sacrifice function which enables claim of tokens for sender and updates the sender's payed amount
    function sacrifice() public payable {
        require(sacrificeActive, "Sacrificing is not active");
        addressSacrificed[msg.sender] = true;
        payedAmount[msg.sender] += msg.value;
    }

    /// @notice Function callable by sacrificers to claim a single token once the sacrifice period is over
    function pray() external {
        require(prayActive, "Praying is not enabled");
        require(msg.sender == tx.origin, "Praying from contracts is not allowed");
        require(addressSacrificed[msg.sender], "You have not sacrificed for this prayer");
        _mint(msg.sender, 1);
        addressSacrificed[msg.sender] = false;
    }

    /// @notice Function callable by token owners to broadcast content to the megalith stream
    /// @param token The token to utilize for the broadcast
    /// @param mediaHash Location of data to broadcast
    function broadcast(uint token, string calldata mediaHash) external {
        require(broadcastActive, "Broadcast is not active");
        require(ownerOf(token) == msg.sender, "You are not the owner of this token");
        emit Broadcast(msg.sender, token, mediaHash);
    }

    /// @notice Function callable by vandal token owners to vandalize content from the megalith stream
    /// @param token The token to utilize for the broadcast
    /// @param mediaHash Location of data to vandalize
    function vandalize(uint token, string calldata mediaHash) external payable {
        require(msg.value >= vandalismFee, "Insufficient funds");
        require(broadcastActive, "Broadcast is not active");
        require(ownerOf(token) == msg.sender, "You are not the owner of this token");
        require(_isPrime(token), "This token is not prime");
        emit Vandalize(msg.sender, token, mediaHash);
    }

    /// @notice Function called by vandalize function to check if the token being used is prime
    /// @return True if the token is prime, false otherwise
    /// @param n The number to check if it is prime
    function _isPrime(uint n) private pure returns (bool) {
        if (n <= 1) {
            return false;
        }
        for (uint256 i = 2; i < n; i++) {
            if (n % i == 0){
                return false;
            }        
        }
        return true;
    }

    /// @notice Function called by owner to update the baseURI string variable
    /// @param newBaseURI The new base URI for the contract
    function updateBaseURI(string calldata newBaseURI) external onlyOwner {
        baseURI = newBaseURI;
    }

    /// @notice Function called by owner to flip the sacrificeActive boolean variable
    function flipSacrificeActive() external onlyOwner {
        sacrificeActive = !sacrificeActive;
    }

    /// @notice Function called by owner to flip the brodcaseActive boolean variable
    function flipBroadcastActive() external onlyOwner {
        broadcastActive = !broadcastActive;
    }

    /// @notice Function called by owner to flip the prayActive boolean variable
    function flipPrayActive() external onlyOwner {
        require(!sacrificeActive, "Sacrifice is active");
        prayActive = !prayActive;
    }

    /// @notice Function called by owner to update the vandalismFee uint variable
    /// @param newVandalismFee The new value for the vandalismFee uint variable
    function updateVandalismFee(uint newVandalismFee) external onlyOwner {
        vandalismFee = newVandalismFee;
    }

    /// @notice Function called by owner to withdraw all funds from the contract
    function withdraw() external onlyOwner {
        uint balance = address(this).balance;
        payable(msg.sender).transfer(balance);
    }

    function developerSacrament(uint quantity) external onlyOwner {
        require(!developerSacramentState, "Developer sacrament has already been performed");
        require(quantity <= 1111, "You can only mint up to 1,111 tokens");
        _mint(msg.sender, quantity);
        developerSacramentState = true;
    }

    /// @notice Function called by marketplaces to return tokenURI for a given token
    /// @param tokenId The token to get the tokenURI for
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "This token does not exist.");
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

}

File 2 of 5 : Owned.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Simple single owner authorization mixin.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Owned.sol)
abstract contract Owned {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event OwnerUpdated(address indexed user, address indexed newOwner);

    /*//////////////////////////////////////////////////////////////
                            OWNERSHIP STORAGE
    //////////////////////////////////////////////////////////////*/

    address public owner;

    modifier onlyOwner() virtual {
        require(msg.sender == owner, "UNAUTHORIZED");

        _;
    }

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(address _owner) {
        owner = _owner;

        emit OwnerUpdated(address(0), _owner);
    }

    /*//////////////////////////////////////////////////////////////
                             OWNERSHIP LOGIC
    //////////////////////////////////////////////////////////////*/

    function setOwner(address newOwner) public virtual onlyOwner {
        owner = newOwner;

        emit OwnerUpdated(msg.sender, newOwner);
    }
}

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

pragma solidity ^0.8.4;

import './IERC721A.sol';

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

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

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

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

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

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

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

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

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

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

    // The tokenId of the next token to be minted.
    uint256 private _currentIndex;

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        // The interface IDs are constants representing the first 4 bytes of the XOR of
        // all function selectors in the interface. See: https://eips.ethereum.org/EIPS/eip-165
        // e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`
        return
            interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
            interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view override returns (uint256) {
        if (_addressToUint256(owner) == 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;
        assembly {
            // Cast aux without masking.
            auxCasted := aux
        }
        packed = (packed & BITMASK_AUX_COMPLEMENT) | (auxCasted << BITPOS_AUX);
        _packedAddressData[owner] = packed;
    }

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

        unchecked {
            if (_startTokenId() <= curr)
                if (curr < _currentIndex) {
                    uint256 packed = _packedOwnerships[curr];
                    // If not burned.
                    if (packed & BITMASK_BURNED == 0) {
                        // Invariant:
                        // There will always be an ownership that has an address and is not burned
                        // before an ownership that does not have an address and is not burned.
                        // Hence, curr will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed is zero.
                        while (packed == 0) {
                            packed = _packedOwnerships[--curr];
                        }
                        return packed;
                    }
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * Returns the unpacked `TokenOwnership` struct from `packed`.
     */
    function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
        ownership.addr = address(uint160(packed));
        ownership.startTimestamp = uint64(packed >> BITPOS_START_TIMESTAMP);
        ownership.burned = packed & BITMASK_BURNED != 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        return _tokenApprovals[tokenId];
    }

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

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

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

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

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

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

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

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

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement
     *   {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event 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 (_addressToUint256(to) == 0) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

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

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the balance and number minted.
            _packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] =
                _addressToUint256(to) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED);

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

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

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

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

        address approvedAddress = _tokenApprovals[tokenId];

        bool isApprovedOrOwner = (_msgSenderERC721A() == from ||
            isApprovedForAll(from, _msgSenderERC721A()) ||
            approvedAddress == _msgSenderERC721A());

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

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner.
        if (_addressToUint256(approvedAddress) != 0) {
            delete _tokenApprovals[tokenId];
        }

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

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] =
                _addressToUint256(to) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                BITMASK_NEXT_INITIALIZED;

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

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

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

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

        address from = address(uint160(prevOwnershipPacked));
        address approvedAddress = _tokenApprovals[tokenId];

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

            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        }

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

        // Clear approvals from the previous owner.
        if (_addressToUint256(approvedAddress) != 0) {
            delete _tokenApprovals[tokenId];
        }

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

            // Updates:
            // - `address` to the last owner.
            // - `startTimestamp` to the timestamp of burning.
            // - `burned` to `true`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] =
                _addressToUint256(from) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                BITMASK_BURNED |
                BITMASK_NEXT_INITIALIZED;

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

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

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

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

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

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

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function _toString(uint256 value) internal pure returns (string memory ptr) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit),
            // but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged.
            // We will need 1 32-byte word to store the length,
            // and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128.
            ptr := add(mload(0x40), 128)
            // Update the free memory pointer to allocate.
            mstore(0x40, ptr)

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

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

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

File 4 of 5 : 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 5 of 5 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.0.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Settings
{
  "remappings": [
    "ERC721A/=lib/ERC721A/contracts/",
    "ds-test/=lib/solmate/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "solmate/=lib/solmate/src/",
    "src/=src/",
    "test/=test/",
    "script/=script/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

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":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","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":"address","name":"injector","type":"address"},{"indexed":true,"internalType":"uint256","name":"token","type":"uint256"},{"indexed":true,"internalType":"string","name":"mediaHash","type":"string"}],"name":"Broadcast","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerUpdated","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"injector","type":"address"},{"indexed":true,"internalType":"uint256","name":"token","type":"uint256"},{"indexed":true,"internalType":"string","name":"mediaash","type":"string"}],"name":"Vandalize","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"addressSacrificed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"token","type":"uint256"},{"internalType":"string","name":"mediaHash","type":"string"}],"name":"broadcast","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"broadcastActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"developerSacrament","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"developerSacramentState","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flipBroadcastActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipPrayActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipSacrificeActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"payedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pray","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"prayActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sacrifice","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"sacrificeActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"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":"string","name":"newBaseURI","type":"string"}],"name":"updateBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newVandalismFee","type":"uint256"}],"name":"updateVandalismFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vandalismFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"token","type":"uint256"},{"internalType":"string","name":"mediaHash","type":"string"}],"name":"vandalize","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080604052600a805462ff0000191662010000179055662386f26fc10000600b553480156200002d57600080fd5b50336040518060400160405280600881526020016709a8a8e829892a8960c31b815250604051806040016040528060048152602001634b45595360e01b81525081600290816200007e919062000189565b5060036200008d828262000189565b50506000808055600880546001600160a01b0319166001600160a01b0385169081179091556040519092507f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d76908290a35062000255565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200010f57607f821691505b6020821081036200013057634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200018457600081815260208120601f850160051c810160208610156200015f5750805b601f850160051c820191505b8181101562000180578281556001016200016b565b5050505b505050565b81516001600160401b03811115620001a557620001a5620000e4565b620001bd81620001b68454620000fa565b8462000136565b602080601f831160018114620001f55760008415620001dc5750858301515b600019600386901b1c1916600185901b17855562000180565b600085815260208120601f198616915b82811015620002265788860151825594840194600190910190840162000205565b5085821015620002455787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b611ecd80620002656000396000f3fe6080604052600436106102085760003560e01c806370a0823111610118578063ad366908116100a0578063c87b56dd1161006f578063c87b56dd146105b4578063d75e0e07146105d4578063da054493146105f4578063e1fa53f214610614578063e985e9c51461062957600080fd5b8063ad3669081461053e578063b6b49cf914610551578063b88d4fde14610567578063bc271c871461058757600080fd5b8063931688cb116100e7578063931688cb1461049a57806393a31e79146104ba57806395d89b41146104d9578063a22cb465146104ee578063a73aeaeb1461050e57600080fd5b806370a08231146104325780637494f249146104525780638a040df4146104725780638da5cb5b1461047a57600080fd5b806327c671a51161019b57806342842e0e1161016a57806342842e0e146103a25780636352211e146103c2578063649be9d0146103e25780636c0360eb146104035780637017a5f51461041857600080fd5b806327c671a51461034357806330255a3e146103585780633ccfd60b14610378578063419905e51461038d57600080fd5b806313af4035116101d757806313af4035146102cb57806318160ddd146102eb57806322e9f9a01461030e57806323b872dd1461032357600080fd5b806301ffc9a71461021c57806306fdde0314610251578063081812fc14610273578063095ea7b3146102ab57600080fd5b3661021757610215610672565b005b600080fd5b34801561022857600080fd5b5061023c6102373660046117d4565b61070a565b60405190151581526020015b60405180910390f35b34801561025d57600080fd5b5061026661075c565b6040516102489190611849565b34801561027f57600080fd5b5061029361028e36600461185c565b6107ee565b6040516001600160a01b039091168152602001610248565b3480156102b757600080fd5b506102156102c6366004611891565b610832565b3480156102d757600080fd5b506102156102e63660046118bb565b6108d2565b3480156102f757600080fd5b50600154600054035b604051908152602001610248565b34801561031a57600080fd5b50610215610948565b34801561032f57600080fd5b5061021561033e3660046118d6565b6109de565b34801561034f57600080fd5b506102156109ee565b34801561036457600080fd5b5061021561037336600461195b565b610a2c565b34801561038457600080fd5b50610215610af1565b34801561039957600080fd5b50610215610b4e565b3480156103ae57600080fd5b506102156103bd3660046118d6565b610c8e565b3480156103ce57600080fd5b506102936103dd36600461185c565b610ca9565b3480156103ee57600080fd5b50600a5461023c906301000000900460ff1681565b34801561040f57600080fd5b50610266610cb4565b34801561042457600080fd5b50600a5461023c9060ff1681565b34801561043e57600080fd5b5061030061044d3660046118bb565b610d42565b34801561045e57600080fd5b50600a5461023c9062010000900460ff1681565b610215610672565b34801561048657600080fd5b50600854610293906001600160a01b031681565b3480156104a657600080fd5b506102156104b53660046119a7565b610d8b565b3480156104c657600080fd5b50600a5461023c90610100900460ff1681565b3480156104e557600080fd5b50610266610dc2565b3480156104fa57600080fd5b506102156105093660046119e9565b610dd1565b34801561051a57600080fd5b5061023c6105293660046118bb565b600c6020526000908152604090205460ff1681565b61021561054c36600461195b565b610e66565b34801561055d57600080fd5b50610300600b5481565b34801561057357600080fd5b50610215610582366004611a3b565b610fc7565b34801561059357600080fd5b506103006105a23660046118bb565b600d6020526000908152604090205481565b3480156105c057600080fd5b506102666105cf36600461185c565b611011565b3480156105e057600080fd5b506102156105ef36600461185c565b6110c4565b34801561060057600080fd5b5061021561060f36600461185c565b6111dd565b34801561062057600080fd5b5061021561120c565b34801561063557600080fd5b5061023c610644366004611b17565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b600a5462010000900460ff166106cf5760405162461bcd60e51b815260206004820152601960248201527f5361637269666963696e67206973206e6f74206163746976650000000000000060448201526064015b60405180910390fd5b336000908152600c60209081526040808320805460ff19166001179055600d90915281208054349290610703908490611b60565b9091555050565b60006301ffc9a760e01b6001600160e01b03198316148061073b57506380ac58cd60e01b6001600160e01b03198316145b806107565750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606002805461076b90611b78565b80601f016020809104026020016040519081016040528092919081815260200182805461079790611b78565b80156107e45780601f106107b9576101008083540402835291602001916107e4565b820191906000526020600020905b8154815290600101906020018083116107c757829003601f168201915b5050505050905090565b60006107f982611255565b610816576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061083d8261127c565b9050336001600160a01b03821614610876576108598133610644565b610876576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6008546001600160a01b031633146108fc5760405162461bcd60e51b81526004016106c690611bb2565b600880546001600160a01b0319166001600160a01b03831690811790915560405133907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a350565b6008546001600160a01b031633146109725760405162461bcd60e51b81526004016106c690611bb2565b600a5462010000900460ff16156109c15760405162461bcd60e51b81526020600482015260136024820152725361637269666963652069732061637469766560681b60448201526064016106c6565b600a805461ff001981166101009182900460ff1615909102179055565b6109e98383836112ea565b505050565b6008546001600160a01b03163314610a185760405162461bcd60e51b81526004016106c690611bb2565b600a805460ff19811660ff90911615179055565b600a5460ff16610a785760405162461bcd60e51b815260206004820152601760248201527642726f616463617374206973206e6f742061637469766560481b60448201526064016106c6565b33610a8284610ca9565b6001600160a01b031614610aa85760405162461bcd60e51b81526004016106c690611bd8565b8181604051610ab8929190611c1b565b60405190819003812090849033907fd5609c6ad246ea472bde0ce5c102ad7b553d441be78efcc4a9ac8c5b46cfd9a590600090a4505050565b6008546001600160a01b03163314610b1b5760405162461bcd60e51b81526004016106c690611bb2565b6040514790339082156108fc029083906000818181858888f19350505050158015610b4a573d6000803e3d6000fd5b5050565b600a54610100900460ff16610b9e5760405162461bcd60e51b8152602060048201526016602482015275141c985e5a5b99c81a5cc81b9bdd08195b98589b195960521b60448201526064016106c6565b333214610bfb5760405162461bcd60e51b815260206004820152602560248201527f50726179696e672066726f6d20636f6e747261637473206973206e6f7420616c6044820152641b1bddd95960da1b60648201526084016106c6565b336000908152600c602052604090205460ff16610c6a5760405162461bcd60e51b815260206004820152602760248201527f596f752068617665206e6f74207361637269666963656420666f72207468697360448201526610383930bcb2b960c91b60648201526084016106c6565b610c753360016114a4565b336000908152600c60205260409020805460ff19169055565b6109e983838360405180602001604052806000815250610fc7565b60006107568261127c565b60098054610cc190611b78565b80601f0160208091040260200160405190810160405280929190818152602001828054610ced90611b78565b8015610d3a5780601f10610d0f57610100808354040283529160200191610d3a565b820191906000526020600020905b815481529060010190602001808311610d1d57829003601f168201915b505050505081565b600081600003610d65576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b03163314610db55760405162461bcd60e51b81526004016106c690611bb2565b60096109e9828483611c71565b60606003805461076b90611b78565b336001600160a01b03831603610dfa5760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600b54341015610ead5760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b60448201526064016106c6565b600a5460ff16610ef95760405162461bcd60e51b815260206004820152601760248201527642726f616463617374206973206e6f742061637469766560481b60448201526064016106c6565b33610f0384610ca9565b6001600160a01b031614610f295760405162461bcd60e51b81526004016106c690611bd8565b610f328361157c565b610f7e5760405162461bcd60e51b815260206004820152601760248201527f5468697320746f6b656e206973206e6f74207072696d6500000000000000000060448201526064016106c6565b8181604051610f8e929190611c1b565b60405190819003812090849033907ff45d1382844246ae6d0520ca542ac9d30b2149a06ed3f57a59fa17eb368f90fb90600090a4505050565b610fd28484846112ea565b6001600160a01b0383163b1561100b57610fee848484846115ce565b61100b576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b606061101c82611255565b6110685760405162461bcd60e51b815260206004820152601a60248201527f5468697320746f6b656e20646f6573206e6f742065786973742e00000000000060448201526064016106c6565b60006009805461107790611b78565b9050116110935760405180602001604052806000815250610756565b600961109e836116ba565b6040516020016110af929190611d32565b60405160208183030381529060405292915050565b6008546001600160a01b031633146110ee5760405162461bcd60e51b81526004016106c690611bb2565b600a546301000000900460ff161561115f5760405162461bcd60e51b815260206004820152602e60248201527f446576656c6f7065722073616372616d656e742068617320616c72656164792060448201526d1899595b881c195c999bdc9b595960921b60648201526084016106c6565b6104578111156111bd5760405162461bcd60e51b8152602060048201526024808201527f596f752063616e206f6e6c79206d696e7420757020746f20312c31313120746f6044820152636b656e7360e01b60648201526084016106c6565b6111c733826114a4565b50600a805463ff00000019166301000000179055565b6008546001600160a01b031633146112075760405162461bcd60e51b81526004016106c690611bb2565b600b55565b6008546001600160a01b031633146112365760405162461bcd60e51b81526004016106c690611bb2565b600a805462ff0000198116620100009182900460ff1615909102179055565b6000805482108015610756575050600090815260046020526040902054600160e01b161590565b6000816000548110156112d15760008181526004602052604081205490600160e01b821690036112cf575b806000036112c85750600019016000818152600460205260409020546112a7565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b60006112f58261127c565b9050836001600160a01b0316816001600160a01b0316146113285760405162a1148160e81b815260040160405180910390fd5b6000828152600660205260408120546001600160a01b039081169190861633148061135857506113588633610644565b8061136b57506001600160a01b03821633145b90508061138b57604051632ce44b5f60e11b815260040160405180910390fd5b846000036113ac57604051633a954ecd60e21b815260040160405180910390fd5b81156113cf57600084815260066020526040902080546001600160a01b03191690555b6001600160a01b038681166000908152600560209081526040808320805460001901905592881682528282208054600101905586825260049052908120600160e11b4260a01b881781179091558416900361145a576001840160008181526004602052604081205490036114585760005481146114585760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b600054826000036114c757604051622e076360e81b815260040160405180910390fd5b816000036114e85760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660009081526005602090815260408083208054680100000000000000018702019055838352600490915281204260a01b85176001851460e11b1790555b60405160018201918301906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a482811061152f57500160005550565b60006001821161158e57506000919050565b60025b828110156115c5576115a38184611dcf565b6000036115b35750600092915050565b806115bd81611de3565b915050611591565b50600192915050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611603903390899088908890600401611dfc565b6020604051808303816000875af192505050801561163e575060408051601f3d908101601f1916820190925261163b91810190611e39565b60015b61169c573d80801561166c576040519150601f19603f3d011682016040523d82523d6000602084013e611671565b606091505b508051600003611694576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6060816000036116e15750506040805180820190915260018152600360fc1b602082015290565b8160005b811561170b57806116f581611de3565b91506117049050600a83611e56565b91506116e5565b60008167ffffffffffffffff81111561172657611726611a25565b6040519080825280601f01601f191660200182016040528015611750576020820181803683370190505b5090505b84156116b257611765600183611e6a565b9150611772600a86611dcf565b61177d906030611b60565b60f81b81838151811061179257611792611e81565b60200101906001600160f81b031916908160001a9053506117b4600a86611e56565b9450611754565b6001600160e01b0319811681146117d157600080fd5b50565b6000602082840312156117e657600080fd5b81356112c8816117bb565b60005b8381101561180c5781810151838201526020016117f4565b8381111561100b5750506000910152565b600081518084526118358160208601602086016117f1565b601f01601f19169290920160200192915050565b6020815260006112c8602083018461181d565b60006020828403121561186e57600080fd5b5035919050565b80356001600160a01b038116811461188c57600080fd5b919050565b600080604083850312156118a457600080fd5b6118ad83611875565b946020939093013593505050565b6000602082840312156118cd57600080fd5b6112c882611875565b6000806000606084860312156118eb57600080fd5b6118f484611875565b925061190260208501611875565b9150604084013590509250925092565b60008083601f84011261192457600080fd5b50813567ffffffffffffffff81111561193c57600080fd5b60208301915083602082850101111561195457600080fd5b9250929050565b60008060006040848603121561197057600080fd5b83359250602084013567ffffffffffffffff81111561198e57600080fd5b61199a86828701611912565b9497909650939450505050565b600080602083850312156119ba57600080fd5b823567ffffffffffffffff8111156119d157600080fd5b6119dd85828601611912565b90969095509350505050565b600080604083850312156119fc57600080fd5b611a0583611875565b915060208301358015158114611a1a57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215611a5157600080fd5b611a5a85611875565b9350611a6860208601611875565b925060408501359150606085013567ffffffffffffffff80821115611a8c57600080fd5b818701915087601f830112611aa057600080fd5b813581811115611ab257611ab2611a25565b604051601f8201601f19908116603f01168101908382118183101715611ada57611ada611a25565b816040528281528a6020848701011115611af357600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215611b2a57600080fd5b611b3383611875565b9150611b4160208401611875565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611b7357611b73611b4a565b500190565b600181811c90821680611b8c57607f821691505b602082108103611bac57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b60208082526023908201527f596f7520617265206e6f7420746865206f776e6572206f66207468697320746f60408201526235b2b760e91b606082015260800190565b8183823760009101908152919050565b601f8211156109e957600081815260208120601f850160051c81016020861015611c525750805b601f850160051c820191505b8181101561149c57828155600101611c5e565b67ffffffffffffffff831115611c8957611c89611a25565b611c9d83611c978354611b78565b83611c2b565b6000601f841160018114611cd15760008515611cb95750838201355b600019600387901b1c1916600186901b178355611d2b565b600083815260209020601f19861690835b82811015611d025786850135825560209485019460019092019101611ce2565b5086821015611d1f5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b6000808454611d4081611b78565b60018281168015611d585760018114611d6d57611d9c565b60ff1984168752821515830287019450611d9c565b8860005260208060002060005b85811015611d935781548a820152908401908201611d7a565b50505082870194505b505050508351611db08183602088016117f1565b01949350505050565b634e487b7160e01b600052601260045260246000fd5b600082611dde57611dde611db9565b500690565b600060018201611df557611df5611b4a565b5060010190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611e2f9083018461181d565b9695505050505050565b600060208284031215611e4b57600080fd5b81516112c8816117bb565b600082611e6557611e65611db9565b500490565b600082821015611e7c57611e7c611b4a565b500390565b634e487b7160e01b600052603260045260246000fdfea2646970667358221220897bf935abd6287074dd2914bffc8266ff3959adf7d8ac5b2b941169906bc74c64736f6c634300080f0033

Deployed Bytecode

0x6080604052600436106102085760003560e01c806370a0823111610118578063ad366908116100a0578063c87b56dd1161006f578063c87b56dd146105b4578063d75e0e07146105d4578063da054493146105f4578063e1fa53f214610614578063e985e9c51461062957600080fd5b8063ad3669081461053e578063b6b49cf914610551578063b88d4fde14610567578063bc271c871461058757600080fd5b8063931688cb116100e7578063931688cb1461049a57806393a31e79146104ba57806395d89b41146104d9578063a22cb465146104ee578063a73aeaeb1461050e57600080fd5b806370a08231146104325780637494f249146104525780638a040df4146104725780638da5cb5b1461047a57600080fd5b806327c671a51161019b57806342842e0e1161016a57806342842e0e146103a25780636352211e146103c2578063649be9d0146103e25780636c0360eb146104035780637017a5f51461041857600080fd5b806327c671a51461034357806330255a3e146103585780633ccfd60b14610378578063419905e51461038d57600080fd5b806313af4035116101d757806313af4035146102cb57806318160ddd146102eb57806322e9f9a01461030e57806323b872dd1461032357600080fd5b806301ffc9a71461021c57806306fdde0314610251578063081812fc14610273578063095ea7b3146102ab57600080fd5b3661021757610215610672565b005b600080fd5b34801561022857600080fd5b5061023c6102373660046117d4565b61070a565b60405190151581526020015b60405180910390f35b34801561025d57600080fd5b5061026661075c565b6040516102489190611849565b34801561027f57600080fd5b5061029361028e36600461185c565b6107ee565b6040516001600160a01b039091168152602001610248565b3480156102b757600080fd5b506102156102c6366004611891565b610832565b3480156102d757600080fd5b506102156102e63660046118bb565b6108d2565b3480156102f757600080fd5b50600154600054035b604051908152602001610248565b34801561031a57600080fd5b50610215610948565b34801561032f57600080fd5b5061021561033e3660046118d6565b6109de565b34801561034f57600080fd5b506102156109ee565b34801561036457600080fd5b5061021561037336600461195b565b610a2c565b34801561038457600080fd5b50610215610af1565b34801561039957600080fd5b50610215610b4e565b3480156103ae57600080fd5b506102156103bd3660046118d6565b610c8e565b3480156103ce57600080fd5b506102936103dd36600461185c565b610ca9565b3480156103ee57600080fd5b50600a5461023c906301000000900460ff1681565b34801561040f57600080fd5b50610266610cb4565b34801561042457600080fd5b50600a5461023c9060ff1681565b34801561043e57600080fd5b5061030061044d3660046118bb565b610d42565b34801561045e57600080fd5b50600a5461023c9062010000900460ff1681565b610215610672565b34801561048657600080fd5b50600854610293906001600160a01b031681565b3480156104a657600080fd5b506102156104b53660046119a7565b610d8b565b3480156104c657600080fd5b50600a5461023c90610100900460ff1681565b3480156104e557600080fd5b50610266610dc2565b3480156104fa57600080fd5b506102156105093660046119e9565b610dd1565b34801561051a57600080fd5b5061023c6105293660046118bb565b600c6020526000908152604090205460ff1681565b61021561054c36600461195b565b610e66565b34801561055d57600080fd5b50610300600b5481565b34801561057357600080fd5b50610215610582366004611a3b565b610fc7565b34801561059357600080fd5b506103006105a23660046118bb565b600d6020526000908152604090205481565b3480156105c057600080fd5b506102666105cf36600461185c565b611011565b3480156105e057600080fd5b506102156105ef36600461185c565b6110c4565b34801561060057600080fd5b5061021561060f36600461185c565b6111dd565b34801561062057600080fd5b5061021561120c565b34801561063557600080fd5b5061023c610644366004611b17565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b600a5462010000900460ff166106cf5760405162461bcd60e51b815260206004820152601960248201527f5361637269666963696e67206973206e6f74206163746976650000000000000060448201526064015b60405180910390fd5b336000908152600c60209081526040808320805460ff19166001179055600d90915281208054349290610703908490611b60565b9091555050565b60006301ffc9a760e01b6001600160e01b03198316148061073b57506380ac58cd60e01b6001600160e01b03198316145b806107565750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606002805461076b90611b78565b80601f016020809104026020016040519081016040528092919081815260200182805461079790611b78565b80156107e45780601f106107b9576101008083540402835291602001916107e4565b820191906000526020600020905b8154815290600101906020018083116107c757829003601f168201915b5050505050905090565b60006107f982611255565b610816576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061083d8261127c565b9050336001600160a01b03821614610876576108598133610644565b610876576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6008546001600160a01b031633146108fc5760405162461bcd60e51b81526004016106c690611bb2565b600880546001600160a01b0319166001600160a01b03831690811790915560405133907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a350565b6008546001600160a01b031633146109725760405162461bcd60e51b81526004016106c690611bb2565b600a5462010000900460ff16156109c15760405162461bcd60e51b81526020600482015260136024820152725361637269666963652069732061637469766560681b60448201526064016106c6565b600a805461ff001981166101009182900460ff1615909102179055565b6109e98383836112ea565b505050565b6008546001600160a01b03163314610a185760405162461bcd60e51b81526004016106c690611bb2565b600a805460ff19811660ff90911615179055565b600a5460ff16610a785760405162461bcd60e51b815260206004820152601760248201527642726f616463617374206973206e6f742061637469766560481b60448201526064016106c6565b33610a8284610ca9565b6001600160a01b031614610aa85760405162461bcd60e51b81526004016106c690611bd8565b8181604051610ab8929190611c1b565b60405190819003812090849033907fd5609c6ad246ea472bde0ce5c102ad7b553d441be78efcc4a9ac8c5b46cfd9a590600090a4505050565b6008546001600160a01b03163314610b1b5760405162461bcd60e51b81526004016106c690611bb2565b6040514790339082156108fc029083906000818181858888f19350505050158015610b4a573d6000803e3d6000fd5b5050565b600a54610100900460ff16610b9e5760405162461bcd60e51b8152602060048201526016602482015275141c985e5a5b99c81a5cc81b9bdd08195b98589b195960521b60448201526064016106c6565b333214610bfb5760405162461bcd60e51b815260206004820152602560248201527f50726179696e672066726f6d20636f6e747261637473206973206e6f7420616c6044820152641b1bddd95960da1b60648201526084016106c6565b336000908152600c602052604090205460ff16610c6a5760405162461bcd60e51b815260206004820152602760248201527f596f752068617665206e6f74207361637269666963656420666f72207468697360448201526610383930bcb2b960c91b60648201526084016106c6565b610c753360016114a4565b336000908152600c60205260409020805460ff19169055565b6109e983838360405180602001604052806000815250610fc7565b60006107568261127c565b60098054610cc190611b78565b80601f0160208091040260200160405190810160405280929190818152602001828054610ced90611b78565b8015610d3a5780601f10610d0f57610100808354040283529160200191610d3a565b820191906000526020600020905b815481529060010190602001808311610d1d57829003601f168201915b505050505081565b600081600003610d65576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b03163314610db55760405162461bcd60e51b81526004016106c690611bb2565b60096109e9828483611c71565b60606003805461076b90611b78565b336001600160a01b03831603610dfa5760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600b54341015610ead5760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b60448201526064016106c6565b600a5460ff16610ef95760405162461bcd60e51b815260206004820152601760248201527642726f616463617374206973206e6f742061637469766560481b60448201526064016106c6565b33610f0384610ca9565b6001600160a01b031614610f295760405162461bcd60e51b81526004016106c690611bd8565b610f328361157c565b610f7e5760405162461bcd60e51b815260206004820152601760248201527f5468697320746f6b656e206973206e6f74207072696d6500000000000000000060448201526064016106c6565b8181604051610f8e929190611c1b565b60405190819003812090849033907ff45d1382844246ae6d0520ca542ac9d30b2149a06ed3f57a59fa17eb368f90fb90600090a4505050565b610fd28484846112ea565b6001600160a01b0383163b1561100b57610fee848484846115ce565b61100b576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b606061101c82611255565b6110685760405162461bcd60e51b815260206004820152601a60248201527f5468697320746f6b656e20646f6573206e6f742065786973742e00000000000060448201526064016106c6565b60006009805461107790611b78565b9050116110935760405180602001604052806000815250610756565b600961109e836116ba565b6040516020016110af929190611d32565b60405160208183030381529060405292915050565b6008546001600160a01b031633146110ee5760405162461bcd60e51b81526004016106c690611bb2565b600a546301000000900460ff161561115f5760405162461bcd60e51b815260206004820152602e60248201527f446576656c6f7065722073616372616d656e742068617320616c72656164792060448201526d1899595b881c195c999bdc9b595960921b60648201526084016106c6565b6104578111156111bd5760405162461bcd60e51b8152602060048201526024808201527f596f752063616e206f6e6c79206d696e7420757020746f20312c31313120746f6044820152636b656e7360e01b60648201526084016106c6565b6111c733826114a4565b50600a805463ff00000019166301000000179055565b6008546001600160a01b031633146112075760405162461bcd60e51b81526004016106c690611bb2565b600b55565b6008546001600160a01b031633146112365760405162461bcd60e51b81526004016106c690611bb2565b600a805462ff0000198116620100009182900460ff1615909102179055565b6000805482108015610756575050600090815260046020526040902054600160e01b161590565b6000816000548110156112d15760008181526004602052604081205490600160e01b821690036112cf575b806000036112c85750600019016000818152600460205260409020546112a7565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b60006112f58261127c565b9050836001600160a01b0316816001600160a01b0316146113285760405162a1148160e81b815260040160405180910390fd5b6000828152600660205260408120546001600160a01b039081169190861633148061135857506113588633610644565b8061136b57506001600160a01b03821633145b90508061138b57604051632ce44b5f60e11b815260040160405180910390fd5b846000036113ac57604051633a954ecd60e21b815260040160405180910390fd5b81156113cf57600084815260066020526040902080546001600160a01b03191690555b6001600160a01b038681166000908152600560209081526040808320805460001901905592881682528282208054600101905586825260049052908120600160e11b4260a01b881781179091558416900361145a576001840160008181526004602052604081205490036114585760005481146114585760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b600054826000036114c757604051622e076360e81b815260040160405180910390fd5b816000036114e85760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660009081526005602090815260408083208054680100000000000000018702019055838352600490915281204260a01b85176001851460e11b1790555b60405160018201918301906001600160a01b038616906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a482811061152f57500160005550565b60006001821161158e57506000919050565b60025b828110156115c5576115a38184611dcf565b6000036115b35750600092915050565b806115bd81611de3565b915050611591565b50600192915050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611603903390899088908890600401611dfc565b6020604051808303816000875af192505050801561163e575060408051601f3d908101601f1916820190925261163b91810190611e39565b60015b61169c573d80801561166c576040519150601f19603f3d011682016040523d82523d6000602084013e611671565b606091505b508051600003611694576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6060816000036116e15750506040805180820190915260018152600360fc1b602082015290565b8160005b811561170b57806116f581611de3565b91506117049050600a83611e56565b91506116e5565b60008167ffffffffffffffff81111561172657611726611a25565b6040519080825280601f01601f191660200182016040528015611750576020820181803683370190505b5090505b84156116b257611765600183611e6a565b9150611772600a86611dcf565b61177d906030611b60565b60f81b81838151811061179257611792611e81565b60200101906001600160f81b031916908160001a9053506117b4600a86611e56565b9450611754565b6001600160e01b0319811681146117d157600080fd5b50565b6000602082840312156117e657600080fd5b81356112c8816117bb565b60005b8381101561180c5781810151838201526020016117f4565b8381111561100b5750506000910152565b600081518084526118358160208601602086016117f1565b601f01601f19169290920160200192915050565b6020815260006112c8602083018461181d565b60006020828403121561186e57600080fd5b5035919050565b80356001600160a01b038116811461188c57600080fd5b919050565b600080604083850312156118a457600080fd5b6118ad83611875565b946020939093013593505050565b6000602082840312156118cd57600080fd5b6112c882611875565b6000806000606084860312156118eb57600080fd5b6118f484611875565b925061190260208501611875565b9150604084013590509250925092565b60008083601f84011261192457600080fd5b50813567ffffffffffffffff81111561193c57600080fd5b60208301915083602082850101111561195457600080fd5b9250929050565b60008060006040848603121561197057600080fd5b83359250602084013567ffffffffffffffff81111561198e57600080fd5b61199a86828701611912565b9497909650939450505050565b600080602083850312156119ba57600080fd5b823567ffffffffffffffff8111156119d157600080fd5b6119dd85828601611912565b90969095509350505050565b600080604083850312156119fc57600080fd5b611a0583611875565b915060208301358015158114611a1a57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215611a5157600080fd5b611a5a85611875565b9350611a6860208601611875565b925060408501359150606085013567ffffffffffffffff80821115611a8c57600080fd5b818701915087601f830112611aa057600080fd5b813581811115611ab257611ab2611a25565b604051601f8201601f19908116603f01168101908382118183101715611ada57611ada611a25565b816040528281528a6020848701011115611af357600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215611b2a57600080fd5b611b3383611875565b9150611b4160208401611875565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611b7357611b73611b4a565b500190565b600181811c90821680611b8c57607f821691505b602082108103611bac57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600c908201526b15539055551213d49256915160a21b604082015260600190565b60208082526023908201527f596f7520617265206e6f7420746865206f776e6572206f66207468697320746f60408201526235b2b760e91b606082015260800190565b8183823760009101908152919050565b601f8211156109e957600081815260208120601f850160051c81016020861015611c525750805b601f850160051c820191505b8181101561149c57828155600101611c5e565b67ffffffffffffffff831115611c8957611c89611a25565b611c9d83611c978354611b78565b83611c2b565b6000601f841160018114611cd15760008515611cb95750838201355b600019600387901b1c1916600186901b178355611d2b565b600083815260209020601f19861690835b82811015611d025786850135825560209485019460019092019101611ce2565b5086821015611d1f5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b6000808454611d4081611b78565b60018281168015611d585760018114611d6d57611d9c565b60ff1984168752821515830287019450611d9c565b8860005260208060002060005b85811015611d935781548a820152908401908201611d7a565b50505082870194505b505050508351611db08183602088016117f1565b01949350505050565b634e487b7160e01b600052601260045260246000fd5b600082611dde57611dde611db9565b500690565b600060018201611df557611df5611b4a565b5060010190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611e2f9083018461181d565b9695505050505050565b600060208284031215611e4b57600080fd5b81516112c8816117bb565b600082611e6557611e65611db9565b500490565b600082821015611e7c57611e7c611b4a565b500390565b634e487b7160e01b600052603260045260246000fdfea2646970667358221220897bf935abd6287074dd2914bffc8266ff3959adf7d8ac5b2b941169906bc74c64736f6c634300080f0033

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

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