This Move module implements a random NFT claiming mechanism using Aptos randomness. Users can claim a random NFT from a predefined collection, and once all NFTs are claimed, no more can be minted. The module includes admin controls for adding NFTs and event logging for tracking minting events.
- NFT Collection Management: Admins can add NFTs with metadata (name, description, and URI)
- Random NFT Claiming: Users can claim an NFT randomly from the available collection
- Event Logging: Minting events are logged with timestamps
- Global Storage: NFTs are stored in a Collection struct with a total supply cap
- Helper Functions: Query total supply, minted NFTs, and NFT details
- APTOS CLI
Go to Aptos CLI release page
Follow the instructions given to install Aptos CLI
To verify installation,
aptos --version
- Run the command
aptos init
To use default settings, you can provide no input and just press “Enter”.
- Clone the repository
git clone https://github.com/ajaythampispericorn/nft_random_claim
- Navigate to project directory
cd nft_random_claim
aptos move compile
aptos move test