IERC721Timestamped

Git Source

Author: Lens Protocol

Extension of ERC-721 including a struct for token data, which contains the owner and the mint timestamp, as well as their associated getters.

Functions

mintTimestampOf

Returns the mint timestamp associated with a given NFT.

function mintTimestampOf(uint256 tokenId) external view returns (uint256);

Parameters

NameTypeDescription
tokenIduint256The token ID of the NFT to query the mint timestamp for.

Returns

NameTypeDescription
<none>uint256uint256 Mint timestamp, this is stored as a uint96 but returned as a uint256 to reduce unnecessary padding.

tokenDataOf

Returns the token data associated with a given NFT. This allows fetching the token owner and mint timestamp in a single call.

function tokenDataOf(uint256 tokenId) external view returns (Types.TokenData memory);

Parameters

NameTypeDescription
tokenIduint256The token ID of the NFT to query the token data for.

Returns

NameTypeDescription
<none>Types.TokenDataTokenData A struct containing both the owner address and the mint timestamp.

exists

Returns whether a token with the given token ID exists.

function exists(uint256 tokenId) external view returns (bool);

Parameters

NameTypeDescription
tokenIduint256The token ID of the NFT to check existence for.

Returns

NameTypeDescription
<none>boolbool True if the token exists.

totalSupply

Returns the amount of tokens in circulation.

function totalSupply() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256uint256 The current total supply of tokens.