ERC721ST extends Solady’s ERC721 by leveraging the 96-bit extra data (via _setExtraData) to map token IDs to tier IDs and sub-tier IDs, enabling tier-based NFT collections (with sub-categories) and efficient on-chain storage.
If you only need tier functionality (without sub-tiers), check out ERC721T.
- Tier-Based Membership NFTs
- Each membership tier (e.g., “VIP”) can have sub-categories (e.g., “VIP A,” “VIP B”).
- Ticketing Systems
- Assign event tiers (e.g., “General,” “Premium”) and sub-tiers (e.g., “General Day 1,” “Premium Day 1”).
- Dynamic Rarity Collections
- Handle main rarity tiers (e.g., “Limited Edition,” “Open Edition”) with sub-tier variations.
- POAPs with Multiple Categories
- Each badge can belong to a higher-level tier (like “Regional Event”) and a sub-tier (like “North Region”).
- Tier ID and its sub-Tier ID are assigned on mint, stored via extra data in Solady’s ERC721.
- Tier ID and Sub-Tier ID cannot be zero, as zero is the default value for non-minted tokens.
- When a token is burned, its tier ID and sub-tier ID resets to zero, ensuring no ambiguity in existence.
- Minting follows a sequential ID model, which is ideal for NFT collections, maintaining a structured token distribution.
- Supports batch minting, allowing multiple tokens to be assigned the same Tier ID in one transaction.
Check out the SampleERC721ST contract as a sample for practical implementation.
This contract is unaudited and provided as is, without warranties. Use at your own risk. Always conduct thorough testing before deploying in production.