Skip to content

Commit

Permalink
Add comment explaining metadata IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmichalis committed Feb 14, 2024
1 parent 3858314 commit 35c32db
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/DynamicTokenURI.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ contract DynamicTokenURI is
// Mapping from creator contracts to amount of tokens currently
// minted with this extension
mapping(address => uint256) public creatorsToMinted;
// Mapping from creator contracts to token ID to metadata ID
// Mapping from creator contracts to token ID to metadata ID.
// The metadata ID keeps track of the metadata file to use for
// a given token ID. Tokens that have never been transferred
// start with a metadata ID of 1, then every time a token is
// transferred, the metadata ID is incremented by 1, all the
// way up to maxSupply.
mapping(address => mapping(uint256 => uint256)) private _creatorsToTokenIdToMetadataId;
// Mapping from creator contracts to metadata ID to metadata string
// Can be used to avoid the assumption that every metadata file is
Expand Down

0 comments on commit 35c32db

Please sign in to comment.