@@ -380,17 +380,15 @@ contract ERC721A is IERC721A {
380
380
*/
381
381
function _packedOwnershipOf (uint256 tokenId ) private view returns (uint256 packed ) {
382
382
if (_startTokenId () <= tokenId) {
383
- // Workflow if spot-minting is enabled.
383
+ packed = _packedOwnerships[tokenId];
384
+
384
385
if (_sequentialUpTo () != type (uint256 ).max) {
385
- // If the `tokenId` is above the sequential range.
386
386
if (tokenId > _sequentialUpTo ()) {
387
- packed = _packedOwnerships[tokenId];
388
- if (packed & _BITMASK_BURNED == 0 ) _revert (OwnerQueryForNonexistentToken.selector );
389
- return packed;
387
+ if (_packedOwnershipExists (packed)) return packed;
388
+ _revert (OwnerQueryForNonexistentToken.selector );
390
389
}
391
390
}
392
391
393
- packed = _packedOwnerships[tokenId];
394
392
// If the data at the starting slot does not exist, start the scan.
395
393
if (packed == 0 ) {
396
394
if (tokenId >= _currentIndex) _revert (OwnerQueryForNonexistentToken.selector );
@@ -519,9 +517,8 @@ contract ERC721A is IERC721A {
519
517
*/
520
518
function _exists (uint256 tokenId ) internal view virtual returns (bool result ) {
521
519
if (_startTokenId () <= tokenId) {
522
- // Workflow if spot-minting is enabled.
520
+
523
521
if (_sequentialUpTo () != type (uint256 ).max) {
524
- // If the `tokenId` is above the sequential range.
525
522
if (tokenId > _sequentialUpTo ())
526
523
return _packedOwnershipExists (_packedOwnerships[tokenId]);
527
524
}
0 commit comments