This extension enables associating an expiry date per token id. It then allows both smart contracts and off-chain entities to query whether tokens with a specific id are expired or not.
The expiry date is stored on chain as a unix timestamp in seconds.
/**
* @dev Returns the expiry date for tokens with a given `id`.
*/
function expiryDate(uint256 id) external view returns (uint256);
/**
* @dev Returns whether tokens are expired by comparing their expiry date with `block.timestamp`.
*/
function isExpired(uint256 id) external view returns (bool);
/**
* @dev Sets the expiry date for the tokens with id `id`.
*/
function _setExpiryDate(uint256 id, uint256 date)
/**
* @dev [Batched] version of {_setExpiryDate}.
*/
function _setBatchExpiryDates(uint256[] memory ids, uint256[] memory dates)