Skip to content

Commit

Permalink
fix: 🐛 startTime and endTime should revert if id not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
MASDXI committed Feb 26, 2025
1 parent 9ea61e2 commit 998257e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contracts/tokens/ERC721/ERC721EXPBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,15 @@ abstract contract ERC721EXPBase is ERC721, ERC721Enumerable, IERC7858 {
* @dev See {IERC7858-startTime}.
*/
function startTime(uint256 tokenId) public view virtual override returns (uint256) {
if (_ownerOf(tokenId) == address(0)) revert ERC721NonexistentToken(tokenId);
return _tokensTimeStamp[tokenId].start;
}

/**
* @dev See {IERC7858-endTime}.
*/
function endTime(uint256 tokenId) public view virtual override returns (uint256) {
if (_ownerOf(tokenId) == address(0)) revert ERC721NonexistentToken(tokenId);
return _tokensTimeStamp[tokenId].end;
}

Expand Down

0 comments on commit 998257e

Please sign in to comment.