ETH Price: $2,670.85 (+0.33%)

Transaction Decoder

Block:
17919094 at Aug-15-2023 08:36:59 AM +UTC
Transaction Fee:
0.00174980289625947 ETH $4.67
Gas Used:
102,741 Gas / 17.03120367 Gwei

Account State Difference:

  Address   Before After State Difference Code
1.799112931338402665 Eth1.799123205438402665 Eth0.0000102741
0x362b87Da...74126ea3a
0x7967b17d...4E761084b
0.002668690734316178 Eth
Nonce: 3
0.000918887838056708 Eth
Nonce: 4
0.00174980289625947

Execution Trace

DELTABIRDS.mint( numberOfTokens=10 )
{"Context.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n}"},"ERC721A.sol":{"content":"// SPDX-License-Identifier: MIT\n// ERC721A Contracts v4.0.0\n// Creator: Chiru Labs\n\npragma solidity ^0.8.4;\n\nimport \"./IERC721A.sol\";\n\n/**\n * @dev ERC721 token receiver interface.\n */\ninterface ERC721A__IERC721Receiver {\n    function onERC721Received(\n        address operator,\n        address from,\n        uint256 tokenId,\n        bytes calldata data\n    ) external returns (bytes4);\n}\n\n/**\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\n * the Metadata extension. Built to optimize for lower gas during batch mints.\n *\n * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).\n *\n * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.\n *\n * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).\n */\ncontract ERC721A is IERC721A {\n    // Mask of an entry in packed address data.\n    uint256 private constant BITMASK_ADDRESS_DATA_ENTRY = (1 \u003c\u003c 64) - 1;\n\n    // The bit position of `numberMinted` in packed address data.\n    uint256 private constant BITPOS_NUMBER_MINTED = 64;\n\n    // The bit position of `numberBurned` in packed address data.\n    uint256 private constant BITPOS_NUMBER_BURNED = 128;\n\n    // The bit position of `aux` in packed address data.\n    uint256 private constant BITPOS_AUX = 192;\n\n    // Mask of all 256 bits in packed address data except the 64 bits for `aux`.\n    uint256 private constant BITMASK_AUX_COMPLEMENT = (1 \u003c\u003c 192) - 1;\n\n    // The bit position of `startTimestamp` in packed ownership.\n    uint256 private constant BITPOS_START_TIMESTAMP = 160;\n\n    // The bit mask of the `burned` bit in packed ownership.\n    uint256 private constant BITMASK_BURNED = 1 \u003c\u003c 224;\n\n    // The bit position of the `nextInitialized` bit in packed ownership.\n    uint256 private constant BITPOS_NEXT_INITIALIZED = 225;\n\n    // The bit mask of the `nextInitialized` bit in packed ownership.\n    uint256 private constant BITMASK_NEXT_INITIALIZED = 1 \u003c\u003c 225;\n\n    // The tokenId of the next token to be minted.\n    uint256 private _currentIndex;\n\n    // The number of tokens burned.\n    uint256 private _burnCounter;\n\n    // Token name\n    string private _name;\n\n    // Token symbol\n    string private _symbol;\n\n    // Mapping from token ID to ownership details\n    // An empty struct value does not necessarily mean the token is unowned.\n    // See `_packedOwnershipOf` implementation for details.\n    //\n    // Bits Layout:\n    // - [0..159]   `addr`\n    // - [160..223] `startTimestamp`\n    // - [224]      `burned`\n    // - [225]      `nextInitialized`\n    mapping(uint256 =\u003e uint256) private _packedOwnerships;\n\n    // Mapping owner address to address data.\n    //\n    // Bits Layout:\n    // - [0..63]    `balance`\n    // - [64..127]  `numberMinted`\n    // - [128..191] `numberBurned`\n    // - [192..255] `aux`\n    mapping(address =\u003e uint256) private _packedAddressData;\n\n    // Mapping from token ID to approved address.\n    mapping(uint256 =\u003e address) private _tokenApprovals;\n\n    // Mapping from owner to operator approvals\n    mapping(address =\u003e mapping(address =\u003e bool)) private _operatorApprovals;\n\n    constructor(string memory name_, string memory symbol_) {\n        _name = name_;\n        _symbol = symbol_;\n        _currentIndex = _startTokenId();\n    }\n\n    /**\n     * @dev Returns the starting token ID.\n     * To change the starting token ID, please override this function.\n     */\n    function _startTokenId() internal view virtual returns (uint256) {\n        return 0;\n    }\n\n    /**\n     * @dev Returns the next token ID to be minted.\n     */\n    function _nextTokenId() internal view returns (uint256) {\n        return _currentIndex;\n    }\n\n    /**\n     * @dev Returns the total number of tokens in existence.\n     * Burned tokens will reduce the count.\n     * To get the total number of tokens minted, please see `_totalMinted`.\n     */\n    function totalSupply() public view override returns (uint256) {\n        // Counter underflow is impossible as _burnCounter cannot be incremented\n        // more than `_currentIndex - _startTokenId()` times.\n        unchecked {\n            return _currentIndex - _burnCounter - _startTokenId();\n        }\n    }\n\n    /**\n     * @dev Returns the total amount of tokens minted in the contract.\n     */\n    function _totalMinted() internal view returns (uint256) {\n        // Counter underflow is impossible as _currentIndex does not decrement,\n        // and it is initialized to `_startTokenId()`\n        unchecked {\n            return _currentIndex - _startTokenId();\n        }\n    }\n\n    /**\n     * @dev Returns the total number of tokens burned.\n     */\n    function _totalBurned() internal view returns (uint256) {\n        return _burnCounter;\n    }\n\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId)\n        public\n        view\n        virtual\n        override\n        returns (bool)\n    {\n        // The interface IDs are constants representing the first 4 bytes of the XOR of\n        // all function selectors in the interface. See: https://eips.ethereum.org/EIPS/eip-165\n        // e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`\n        return\n            interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.\n            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.\n            interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.\n    }\n\n    /**\n     * @dev See {IERC721-balanceOf}.\n     */\n    function balanceOf(address owner) public view override returns (uint256) {\n        if (owner == address(0)) revert BalanceQueryForZeroAddress();\n        return _packedAddressData[owner] \u0026 BITMASK_ADDRESS_DATA_ENTRY;\n    }\n\n    /**\n     * Returns the number of tokens minted by `owner`.\n     */\n    function _numberMinted(address owner) internal view returns (uint256) {\n        return\n            (_packedAddressData[owner] \u003e\u003e BITPOS_NUMBER_MINTED) \u0026\n            BITMASK_ADDRESS_DATA_ENTRY;\n    }\n\n    /**\n     * Returns the number of tokens burned by or on behalf of `owner`.\n     */\n    function _numberBurned(address owner) internal view returns (uint256) {\n        return\n            (_packedAddressData[owner] \u003e\u003e BITPOS_NUMBER_BURNED) \u0026\n            BITMASK_ADDRESS_DATA_ENTRY;\n    }\n\n    /**\n     * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).\n     */\n    function _getAux(address owner) internal view returns (uint64) {\n        return uint64(_packedAddressData[owner] \u003e\u003e BITPOS_AUX);\n    }\n\n    /**\n     * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).\n     * If there are multiple variables, please pack them into a uint64.\n     */\n    function _setAux(address owner, uint64 aux) internal {\n        uint256 packed = _packedAddressData[owner];\n        uint256 auxCasted;\n        assembly {\n            // Cast aux without masking.\n            auxCasted := aux\n        }\n        packed = (packed \u0026 BITMASK_AUX_COMPLEMENT) | (auxCasted \u003c\u003c BITPOS_AUX);\n        _packedAddressData[owner] = packed;\n    }\n\n    /**\n     * Returns the packed ownership data of `tokenId`.\n     */\n    function _packedOwnershipOf(uint256 tokenId)\n        private\n        view\n        returns (uint256)\n    {\n        uint256 curr = tokenId;\n\n        unchecked {\n            if (_startTokenId() \u003c= curr)\n                if (curr \u003c _currentIndex) {\n                    uint256 packed = _packedOwnerships[curr];\n                    // If not burned.\n                    if (packed \u0026 BITMASK_BURNED == 0) {\n                        // Invariant:\n                        // There will always be an ownership that has an address and is not burned\n                        // before an ownership that does not have an address and is not burned.\n                        // Hence, curr will not underflow.\n                        //\n                        // We can directly compare the packed value.\n                        // If the address is zero, packed is zero.\n                        while (packed == 0) {\n                            packed = _packedOwnerships[--curr];\n                        }\n                        return packed;\n                    }\n                }\n        }\n        revert OwnerQueryForNonexistentToken();\n    }\n\n    /**\n     * Returns the unpacked `TokenOwnership` struct from `packed`.\n     */\n    function _unpackedOwnership(uint256 packed)\n        private\n        pure\n        returns (TokenOwnership memory ownership)\n    {\n        ownership.addr = address(uint160(packed));\n        ownership.startTimestamp = uint64(packed \u003e\u003e BITPOS_START_TIMESTAMP);\n        ownership.burned = packed \u0026 BITMASK_BURNED != 0;\n    }\n\n    /**\n     * Returns the unpacked `TokenOwnership` struct at `index`.\n     */\n    function _ownershipAt(uint256 index)\n        internal\n        view\n        returns (TokenOwnership memory)\n    {\n        return _unpackedOwnership(_packedOwnerships[index]);\n    }\n\n    /**\n     * @dev Initializes the ownership slot minted at `index` for efficiency purposes.\n     */\n    function _initializeOwnershipAt(uint256 index) internal {\n        if (_packedOwnerships[index] == 0) {\n            _packedOwnerships[index] = _packedOwnershipOf(index);\n        }\n    }\n\n    /**\n     * Gas spent here starts off proportional to the maximum mint batch size.\n     * It gradually moves to O(1) as tokens get transferred around in the collection over time.\n     */\n    function _ownershipOf(uint256 tokenId)\n        internal\n        view\n        returns (TokenOwnership memory)\n    {\n        return _unpackedOwnership(_packedOwnershipOf(tokenId));\n    }\n\n    /**\n     * @dev See {IERC721-ownerOf}.\n     */\n    function ownerOf(uint256 tokenId) public view override returns (address) {\n        return address(uint160(_packedOwnershipOf(tokenId)));\n    }\n\n    /**\n     * @dev See {IERC721Metadata-name}.\n     */\n    function name() public view virtual override returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev See {IERC721Metadata-symbol}.\n     */\n    function symbol() public view virtual override returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev See {IERC721Metadata-tokenURI}.\n     */\n    function tokenURI(uint256 tokenId)\n        public\n        view\n        virtual\n        override\n        returns (string memory)\n    {\n        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();\n\n        string memory baseURI = _baseURI();\n        return\n            bytes(baseURI).length != 0\n                ? string(abi.encodePacked(baseURI, _toString(tokenId)))\n                : \"\";\n    }\n\n    /**\n     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n     * by default, can be overriden in child contracts.\n     */\n    function _baseURI() internal view virtual returns (string memory) {\n        return \"\";\n    }\n\n    /**\n     * @dev Casts the address to uint256 without masking.\n     */\n    function _addressToUint256(address value)\n        private\n        pure\n        returns (uint256 result)\n    {\n        assembly {\n            result := value\n        }\n    }\n\n    /**\n     * @dev Casts the boolean to uint256 without branching.\n     */\n    function _boolToUint256(bool value) private pure returns (uint256 result) {\n        assembly {\n            result := value\n        }\n    }\n\n    /**\n     * @dev See {IERC721-approve}.\n     */\n    function approve(address to, uint256 tokenId) public override {\n        address owner = address(uint160(_packedOwnershipOf(tokenId)));\n        if (to == owner) revert ApprovalToCurrentOwner();\n\n        if (_msgSenderERC721A() != owner)\n            if (!isApprovedForAll(owner, _msgSenderERC721A())) {\n                revert ApprovalCallerNotOwnerNorApproved();\n            }\n\n        _tokenApprovals[tokenId] = to;\n        emit Approval(owner, to, tokenId);\n    }\n\n    /**\n     * @dev See {IERC721-getApproved}.\n     */\n    function getApproved(uint256 tokenId)\n        public\n        view\n        override\n        returns (address)\n    {\n        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();\n\n        return _tokenApprovals[tokenId];\n    }\n\n    /**\n     * @dev See {IERC721-setApprovalForAll}.\n     */\n    function setApprovalForAll(address operator, bool approved)\n        public\n        virtual\n        override\n    {\n        if (operator == _msgSenderERC721A()) revert ApproveToCaller();\n\n        _operatorApprovals[_msgSenderERC721A()][operator] = approved;\n        emit ApprovalForAll(_msgSenderERC721A(), operator, approved);\n    }\n\n    /**\n     * @dev See {IERC721-isApprovedForAll}.\n     */\n    function isApprovedForAll(address owner, address operator)\n        public\n        view\n        virtual\n        override\n        returns (bool)\n    {\n        return _operatorApprovals[owner][operator];\n    }\n\n    /**\n     * @dev See {IERC721-transferFrom}.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) public virtual override {\n        _transfer(from, to, tokenId);\n    }\n\n    /**\n     * @dev See {IERC721-safeTransferFrom}.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) public virtual override {\n        safeTransferFrom(from, to, tokenId, \"\");\n    }\n\n    /**\n     * @dev See {IERC721-safeTransferFrom}.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) public virtual override {\n        _transfer(from, to, tokenId);\n        if (to.code.length != 0)\n            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {\n                revert TransferToNonERC721ReceiverImplementer();\n            }\n    }\n\n    /**\n     * @dev Returns whether `tokenId` exists.\n     *\n     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\n     *\n     * Tokens start existing when they are minted (`_mint`),\n     */\n    function _exists(uint256 tokenId) internal view returns (bool) {\n        return\n            _startTokenId() \u003c= tokenId \u0026\u0026\n            tokenId \u003c _currentIndex \u0026\u0026 // If within bounds,\n            _packedOwnerships[tokenId] \u0026 BITMASK_BURNED == 0; // and not burned.\n    }\n\n    /**\n     * @dev Equivalent to `_safeMint(to, quantity, \u0027\u0027)`.\n     */\n    function _safeMint(address to, uint256 quantity) internal {\n        _safeMint(to, quantity, \"\");\n    }\n\n    /**\n     * @dev Safely mints `quantity` tokens and transfers them to `to`.\n     *\n     * Requirements:\n     *\n     * - If `to` refers to a smart contract, it must implement\n     *   {IERC721Receiver-onERC721Received}, which is called for each safe transfer.\n     * - `quantity` must be greater than 0.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _safeMint(\n        address to,\n        uint256 quantity,\n        bytes memory _data\n    ) internal {\n        uint256 startTokenId = _currentIndex;\n        if (to == address(0)) revert MintToZeroAddress();\n        if (quantity == 0) revert MintZeroQuantity();\n\n        _beforeTokenTransfers(address(0), to, startTokenId, quantity);\n\n        // Overflows are incredibly unrealistic.\n        // balance or numberMinted overflow if current value of either + quantity \u003e 1.8e19 (2**64) - 1\n        // updatedIndex overflows if _currentIndex + quantity \u003e 1.2e77 (2**256) - 1\n        unchecked {\n            // Updates:\n            // - `balance += quantity`.\n            // - `numberMinted += quantity`.\n            //\n            // We can directly add to the balance and number minted.\n            _packedAddressData[to] +=\n                quantity *\n                ((1 \u003c\u003c BITPOS_NUMBER_MINTED) | 1);\n\n            // Updates:\n            // - `address` to the owner.\n            // - `startTimestamp` to the timestamp of minting.\n            // - `burned` to `false`.\n            // - `nextInitialized` to `quantity == 1`.\n            _packedOwnerships[startTokenId] =\n                _addressToUint256(to) |\n                (block.timestamp \u003c\u003c BITPOS_START_TIMESTAMP) |\n                (_boolToUint256(quantity == 1) \u003c\u003c BITPOS_NEXT_INITIALIZED);\n\n            uint256 updatedIndex = startTokenId;\n            uint256 end = updatedIndex + quantity;\n\n            if (to.code.length != 0) {\n                do {\n                    emit Transfer(address(0), to, updatedIndex);\n                    if (\n                        !_checkContractOnERC721Received(\n                            address(0),\n                            to,\n                            updatedIndex++,\n                            _data\n                        )\n                    ) {\n                        revert TransferToNonERC721ReceiverImplementer();\n                    }\n                } while (updatedIndex \u003c end);\n                // Reentrancy protection\n                if (_currentIndex != startTokenId) revert();\n            } else {\n                do {\n                    emit Transfer(address(0), to, updatedIndex++);\n                } while (updatedIndex \u003c end);\n            }\n            _currentIndex = updatedIndex;\n        }\n        _afterTokenTransfers(address(0), to, startTokenId, quantity);\n    }\n\n    /**\n     * @dev Mints `quantity` tokens and transfers them to `to`.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - `quantity` must be greater than 0.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _mint(address to, uint256 quantity) internal {\n        uint256 startTokenId = _currentIndex;\n        if (to == address(0)) revert MintToZeroAddress();\n        if (quantity == 0) revert MintZeroQuantity();\n\n        _beforeTokenTransfers(address(0), to, startTokenId, quantity);\n\n        // Overflows are incredibly unrealistic.\n        // balance or numberMinted overflow if current value of either + quantity \u003e 1.8e19 (2**64) - 1\n        // updatedIndex overflows if _currentIndex + quantity \u003e 1.2e77 (2**256) - 1\n        unchecked {\n            // Updates:\n            // - `balance += quantity`.\n            // - `numberMinted += quantity`.\n            //\n            // We can directly add to the balance and number minted.\n            _packedAddressData[to] +=\n                quantity *\n                ((1 \u003c\u003c BITPOS_NUMBER_MINTED) | 1);\n\n            // Updates:\n            // - `address` to the owner.\n            // - `startTimestamp` to the timestamp of minting.\n            // - `burned` to `false`.\n            // - `nextInitialized` to `quantity == 1`.\n            _packedOwnerships[startTokenId] =\n                _addressToUint256(to) |\n                (block.timestamp \u003c\u003c BITPOS_START_TIMESTAMP) |\n                (_boolToUint256(quantity == 1) \u003c\u003c BITPOS_NEXT_INITIALIZED);\n\n            uint256 updatedIndex = startTokenId;\n            uint256 end = updatedIndex + quantity;\n\n            do {\n                emit Transfer(address(0), to, updatedIndex++);\n            } while (updatedIndex \u003c end);\n\n            _currentIndex = updatedIndex;\n        }\n        _afterTokenTransfers(address(0), to, startTokenId, quantity);\n    }\n\n    /**\n     * @dev Transfers `tokenId` from `from` to `to`.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must be owned by `from`.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _transfer(\n        address from,\n        address to,\n        uint256 tokenId\n    ) private {\n        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);\n\n        if (address(uint160(prevOwnershipPacked)) != from)\n            revert TransferFromIncorrectOwner();\n\n        bool isApprovedOrOwner = (_msgSenderERC721A() == from ||\n            isApprovedForAll(from, _msgSenderERC721A()) ||\n            getApproved(tokenId) == _msgSenderERC721A());\n\n        if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();\n        if (to == address(0)) revert TransferToZeroAddress();\n\n        _beforeTokenTransfers(from, to, tokenId, 1);\n\n        // Clear approvals from the previous owner.\n        delete _tokenApprovals[tokenId];\n\n        // Underflow of the sender\u0027s balance is impossible because we check for\n        // ownership above and the recipient\u0027s balance can\u0027t realistically overflow.\n        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.\n        unchecked {\n            // We can directly increment and decrement the balances.\n            --_packedAddressData[from]; // Updates: `balance -= 1`.\n            ++_packedAddressData[to]; // Updates: `balance += 1`.\n\n            // Updates:\n            // - `address` to the next owner.\n            // - `startTimestamp` to the timestamp of transfering.\n            // - `burned` to `false`.\n            // - `nextInitialized` to `true`.\n            _packedOwnerships[tokenId] =\n                _addressToUint256(to) |\n                (block.timestamp \u003c\u003c BITPOS_START_TIMESTAMP) |\n                BITMASK_NEXT_INITIALIZED;\n\n            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .\n            if (prevOwnershipPacked \u0026 BITMASK_NEXT_INITIALIZED == 0) {\n                uint256 nextTokenId = tokenId + 1;\n                // If the next slot\u0027s address is zero and not burned (i.e. packed value is zero).\n                if (_packedOwnerships[nextTokenId] == 0) {\n                    // If the next slot is within bounds.\n                    if (nextTokenId != _currentIndex) {\n                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.\n                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;\n                    }\n                }\n            }\n        }\n\n        emit Transfer(from, to, tokenId);\n        _afterTokenTransfers(from, to, tokenId, 1);\n    }\n\n    /**\n     * @dev Equivalent to `_burn(tokenId, false)`.\n     */\n    function _burn(uint256 tokenId) internal virtual {\n        _burn(tokenId, false);\n    }\n\n    /**\n     * @dev Destroys `tokenId`.\n     * The approval is cleared when the token is burned.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _burn(uint256 tokenId, bool approvalCheck) internal virtual {\n        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);\n\n        address from = address(uint160(prevOwnershipPacked));\n\n        if (approvalCheck) {\n            bool isApprovedOrOwner = (_msgSenderERC721A() == from ||\n                isApprovedForAll(from, _msgSenderERC721A()) ||\n                getApproved(tokenId) == _msgSenderERC721A());\n\n            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();\n        }\n\n        _beforeTokenTransfers(from, address(0), tokenId, 1);\n\n        // Clear approvals from the previous owner.\n        delete _tokenApprovals[tokenId];\n\n        // Underflow of the sender\u0027s balance is impossible because we check for\n        // ownership above and the recipient\u0027s balance can\u0027t realistically overflow.\n        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.\n        unchecked {\n            // Updates:\n            // - `balance -= 1`.\n            // - `numberBurned += 1`.\n            //\n            // We can directly decrement the balance, and increment the number burned.\n            // This is equivalent to `packed -= 1; packed += 1 \u003c\u003c BITPOS_NUMBER_BURNED;`.\n            _packedAddressData[from] += (1 \u003c\u003c BITPOS_NUMBER_BURNED) - 1;\n\n            // Updates:\n            // - `address` to the last owner.\n            // - `startTimestamp` to the timestamp of burning.\n            // - `burned` to `true`.\n            // - `nextInitialized` to `true`.\n            _packedOwnerships[tokenId] =\n                _addressToUint256(from) |\n                (block.timestamp \u003c\u003c BITPOS_START_TIMESTAMP) |\n                BITMASK_BURNED |\n                BITMASK_NEXT_INITIALIZED;\n\n            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .\n            if (prevOwnershipPacked \u0026 BITMASK_NEXT_INITIALIZED == 0) {\n                uint256 nextTokenId = tokenId + 1;\n                // If the next slot\u0027s address is zero and not burned (i.e. packed value is zero).\n                if (_packedOwnerships[nextTokenId] == 0) {\n                    // If the next slot is within bounds.\n                    if (nextTokenId != _currentIndex) {\n                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.\n                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;\n                    }\n                }\n            }\n        }\n\n        emit Transfer(from, address(0), tokenId);\n        _afterTokenTransfers(from, address(0), tokenId, 1);\n\n        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.\n        unchecked {\n            _burnCounter++;\n        }\n    }\n\n    /**\n     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract.\n     *\n     * @param from address representing the previous owner of the given token ID\n     * @param to target address that will receive the tokens\n     * @param tokenId uint256 ID of the token to be transferred\n     * @param _data bytes optional data to send along with the call\n     * @return bool whether the call correctly returned the expected magic value\n     */\n    function _checkContractOnERC721Received(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes memory _data\n    ) private returns (bool) {\n        try\n            ERC721A__IERC721Receiver(to).onERC721Received(\n                _msgSenderERC721A(),\n                from,\n                tokenId,\n                _data\n            )\n        returns (bytes4 retval) {\n            return\n                retval ==\n                ERC721A__IERC721Receiver(to).onERC721Received.selector;\n        } catch (bytes memory reason) {\n            if (reason.length == 0) {\n                revert TransferToNonERC721ReceiverImplementer();\n            } else {\n                assembly {\n                    revert(add(32, reason), mload(reason))\n                }\n            }\n        }\n    }\n\n    /**\n     * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.\n     * And also called before burning one token.\n     *\n     * startTokenId - the first token id to be transferred\n     * quantity - the amount to be transferred\n     *\n     * Calling conditions:\n     *\n     * - When `from` and `to` are both non-zero, `from`\u0027s `tokenId` will be\n     * transferred to `to`.\n     * - When `from` is zero, `tokenId` will be minted for `to`.\n     * - When `to` is zero, `tokenId` will be burned by `from`.\n     * - `from` and `to` are never both zero.\n     */\n    function _beforeTokenTransfers(\n        address from,\n        address to,\n        uint256 startTokenId,\n        uint256 quantity\n    ) internal virtual {}\n\n    /**\n     * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes\n     * minting.\n     * And also called after one token has been burned.\n     *\n     * startTokenId - the first token id to be transferred\n     * quantity - the amount to be transferred\n     *\n     * Calling conditions:\n     *\n     * - When `from` and `to` are both non-zero, `from`\u0027s `tokenId` has been\n     * transferred to `to`.\n     * - When `from` is zero, `tokenId` has been minted for `to`.\n     * - When `to` is zero, `tokenId` has been burned by `from`.\n     * - `from` and `to` are never both zero.\n     */\n    function _afterTokenTransfers(\n        address from,\n        address to,\n        uint256 startTokenId,\n        uint256 quantity\n    ) internal virtual {}\n\n    /**\n     * @dev Returns the message sender (defaults to `msg.sender`).\n     *\n     * If you are writing GSN compatible contracts, you need to override this function.\n     */\n    function _msgSenderERC721A() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n     */\n    function _toString(uint256 value)\n        internal\n        pure\n        returns (string memory ptr)\n    {\n        assembly {\n            // The maximum value of a uint256 contains 78 digits (1 byte per digit),\n            // but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged.\n            // We will need 1 32-byte word to store the length,\n            // and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128.\n            ptr := add(mload(0x40), 128)\n            // Update the free memory pointer to allocate.\n            mstore(0x40, ptr)\n\n            // Cache the end of the memory to calculate the length later.\n            let end := ptr\n\n            // We write the string from the rightmost digit to the leftmost digit.\n            // The following is essentially a do-while loop that also handles the zero case.\n            // Costs a bit more than early returning for the zero case,\n            // but cheaper in terms of deployment and overall runtime costs.\n            for {\n                // Initialize and perform the first pass without check.\n                let temp := value\n                // Move the pointer 1 byte leftwards to point to an empty character slot.\n                ptr := sub(ptr, 1)\n                // Write the character to the pointer. 48 is the ASCII index of \u00270\u0027.\n                mstore8(ptr, add(48, mod(temp, 10)))\n                temp := div(temp, 10)\n            } temp {\n                // Keep dividing `temp` until zero.\n                temp := div(temp, 10)\n            } {\n                // Body of the for loop.\n                ptr := sub(ptr, 1)\n                mstore8(ptr, add(48, mod(temp, 10)))\n            }\n\n            let length := sub(end, ptr)\n            // Move the pointer 32 bytes leftwards to make room for the length.\n            ptr := sub(ptr, 32)\n            // Store the length.\n            mstore(ptr, length)\n        }\n    }\n}\n"},"IERC721A.sol":{"content":"// SPDX-License-Identifier: MIT\n// ERC721A Contracts v4.0.0\n// Creator: Chiru Labs\n\npragma solidity ^0.8.4;\n\n/**\n * @dev Interface of an ERC721A compliant contract.\n */\ninterface IERC721A {\n    /**\n     * The caller must own the token or be an approved operator.\n     */\n    error ApprovalCallerNotOwnerNorApproved();\n\n    /**\n     * The token does not exist.\n     */\n    error ApprovalQueryForNonexistentToken();\n\n    /**\n     * The caller cannot approve to their own address.\n     */\n    error ApproveToCaller();\n\n    /**\n     * The caller cannot approve to the current owner.\n     */\n    error ApprovalToCurrentOwner();\n\n    /**\n     * Cannot query the balance for the zero address.\n     */\n    error BalanceQueryForZeroAddress();\n\n    /**\n     * Cannot mint to the zero address.\n     */\n    error MintToZeroAddress();\n\n    /**\n     * The quantity of tokens minted must be more than zero.\n     */\n    error MintZeroQuantity();\n\n    /**\n     * The token does not exist.\n     */\n    error OwnerQueryForNonexistentToken();\n\n    /**\n     * The caller must own the token or be an approved operator.\n     */\n    error TransferCallerNotOwnerNorApproved();\n\n    /**\n     * The token must be owned by `from`.\n     */\n    error TransferFromIncorrectOwner();\n\n    /**\n     * Cannot safely transfer to a contract that does not implement the ERC721Receiver interface.\n     */\n    error TransferToNonERC721ReceiverImplementer();\n\n    /**\n     * Cannot transfer to the zero address.\n     */\n    error TransferToZeroAddress();\n\n    /**\n     * The token does not exist.\n     */\n    error URIQueryForNonexistentToken();\n\n    struct TokenOwnership {\n        // The address of the owner.\n        address addr;\n        // Keeps track of the start time of ownership with minimal overhead for tokenomics.\n        uint64 startTimestamp;\n        // Whether the token has been burned.\n        bool burned;\n    }\n\n    /**\n     * @dev Returns the total amount of tokens stored by the contract.\n     *\n     * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens.\n     */\n    function totalSupply() external view returns (uint256);\n\n    // ==============================\n    //            IERC165\n    // ==============================\n\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n\n    // ==============================\n    //            IERC721\n    // ==============================\n\n    /**\n     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n     */\n    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n    /**\n     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n     */\n    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n    /**\n     * @dev Returns the number of tokens in ``owner``\u0027s account.\n     */\n    function balanceOf(address owner) external view returns (uint256 balance);\n\n    /**\n     * @dev Returns the owner of the `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function ownerOf(uint256 tokenId) external view returns (address owner);\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId,\n        bytes calldata data\n    ) external;\n\n    /**\n     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n     * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must exist and be owned by `from`.\n     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\n     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n     *\n     * Emits a {Transfer} event.\n     */\n    function safeTransferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) external;\n\n    /**\n     * @dev Transfers `tokenId` token from `from` to `to`.\n     *\n     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n     *\n     * Requirements:\n     *\n     * - `from` cannot be the zero address.\n     * - `to` cannot be the zero address.\n     * - `tokenId` token must be owned by `from`.\n     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 tokenId\n    ) external;\n\n    /**\n     * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n     * The approval is cleared when the token is transferred.\n     *\n     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n     *\n     * Requirements:\n     *\n     * - The caller must own the token or be an approved operator.\n     * - `tokenId` must exist.\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address to, uint256 tokenId) external;\n\n    /**\n     * @dev Approve or remove `operator` as an operator for the caller.\n     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n     *\n     * Requirements:\n     *\n     * - The `operator` cannot be the caller.\n     *\n     * Emits an {ApprovalForAll} event.\n     */\n    function setApprovalForAll(address operator, bool _approved) external;\n\n    /**\n     * @dev Returns the account approved for `tokenId` token.\n     *\n     * Requirements:\n     *\n     * - `tokenId` must exist.\n     */\n    function getApproved(uint256 tokenId) external view returns (address operator);\n\n    /**\n     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n     *\n     * See {setApprovalForAll}\n     */\n    function isApprovedForAll(address owner, address operator) external view returns (bool);\n\n    // ==============================\n    //        IERC721Metadata\n    // ==============================\n\n    /**\n     * @dev Returns the token collection name.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the token collection symbol.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n     */\n    function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n"},"MyNFT.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\nimport \"./ERC721A.sol\";\nimport \"./Ownable.sol\";\n\n//██████╗░███████╗██╗░░░░░████████╗░█████╗░  ██████╗░██╗██████╗░██████╗░░██████╗\n//██╔══██╗██╔════╝██║░░░░░╚══██╔══╝██╔══██╗  ██╔══██╗██║██╔══██╗██╔══██╗██╔════╝\n//██║░░██║█████╗░░██║░░░░░░░░██║░░░███████║  ██████╦╝██║██████╔╝██║░░██║╚█████╗░\n//██║░░██║██╔══╝░░██║░░░░░░░░██║░░░██╔══██║  ██╔══██╗██║██╔══██╗██║░░██║░╚═══██╗\n//██████╔╝███████╗███████╗░░░██║░░░██║░░██║  ██████╦╝██║██║░░██║██████╔╝██████╔╝\n//╚═════╝░╚══════╝╚══════╝░░░╚═╝░░░╚═╝░░╚═╝  ╚═════╝░╚═╝╚═╝░░╚═╝╚═════╝░╚═════╝░\n\ncontract DELTABIRDS is ERC721A, Ownable {\n    uint256 public maxSupply = 8888;\n    uint256 public maxPerWallet = 30;\n    uint256 public maxPerTx = 10;\n    uint256 public _price = 0 ether;\n\n    bool public activated;\n    string public unrevealedTokenURI =\n        \"https://gateway.pinata.cloud/ipfs/QmZjkvMQUsAgKsGzN7daP6umL5fSt6sNn1EfzLLzUfLdWS\";\n    string public baseURI = \"\";\n\n    mapping(uint256 =\u003e string) private _tokenURIs;\n\n    address private _ownerWallet = 0x0b05A393E31F186b08ec4C37cdF3E5DC1bb2F50C;\n\n    constructor( ) ERC721A(\"deltabirdswtf\", \"DELTABIRD\") {\n    }\n\n    ////  OVERIDES\n    function tokenURI(uint256 tokenId)\n        public\n        view\n        override\n        returns (string memory)\n    {\n        require(\n            _exists(tokenId),\n            \"ERC721Metadata: URI query for nonexistent token\"\n        );\n        return\n            bytes(baseURI).length != 0\n                ? string(abi.encodePacked(baseURI, _toString(tokenId), \".json\"))\n                : unrevealedTokenURI;\n    }\n\n    function _startTokenId() internal view virtual override returns (uint256) {\n        return 1;\n    }\n\n    ////  MINT\n    function mint(uint256 numberOfTokens) external payable {\n        require(activated, \"Inactive\");\n        require(totalSupply() + numberOfTokens \u003c= maxSupply, \"All minted\");\n        require(numberOfTokens \u003c= maxPerTx, \"Too many for Tx\");\n        require(\n            _numberMinted(msg.sender) + numberOfTokens \u003c= maxPerWallet,\n            \"Too many for address\"\n        );\n        _safeMint(msg.sender, numberOfTokens);\n    }\n\n    ////  SETTERS\n    function setTokenURI(string calldata newURI) external onlyOwner {\n        baseURI = newURI;\n    }\n\n    function setMaxPerTx(uint256 _maxPerTx) external onlyOwner {\n        maxPerTx = _maxPerTx;\n    }\n\n    function setMaxPerWallet(uint256 _maxPerWallet) external onlyOwner {\n        maxPerWallet = _maxPerWallet;\n    }\n\n    function setMaxSupply(uint256 _maxSupply) external onlyOwner {\n        maxSupply = _maxSupply;\n    }\n\n    function setIsActive(bool _isActive) external onlyOwner {\n        activated = _isActive;\n    }\n}\n"},"Ownable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    constructor() {\n        _transferOwnership(_msgSender());\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}"}}