NFTData Structure
The NFTData
structure is designed to hold information about a specific Non-Fungible Token (NFT) in the context of the given application. This structure contains the following fields:
plan
: An instance of the previously describedPlan
structure. This indicates which plan or level the NFT is associated with.inviteCode
: A string that presumably represents a unique code associated with this NFT, possibly for referral or invitation purposes.childrenCount
: Represents the number of children or subsets associated with this NFT. This could be used to track how many other NFTs or entities are linked or derived from this particular NFT.parentTokenId
: The ID of the parent NFT. This suggests a hierarchical or tree-like structure where an NFT can be derived or spawned from another NFT.
The nftData Mapping:
nftData
is a mapping that links a unique uint256
token ID to its associated NFTData
structure. This allows for easy retrieval and storage of data for each NFT based on its unique identifier.
In a practical application, when an NFT is minted or transferred, the associated data in the NFTData
structure can be updated or queried using this mapping.
using web3.js
to retrieve the NFTData
for a specific token ID:
Last updated