Skip to content

MONISHA2876/MilestoneNFT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ–οΈ MilestoneNFT Smart Contract

MilestoneNFT is an on-chain reward system that issues NFTs for milestone achievements β€” ideal for recognizing contributions, performance, or project progress.
Each NFT represents a verified milestone and carries a unique metadata URI.


πŸ“ Contract Information

  • Network: Testnet
  • Contract Address: 0x573bC0fc396Cf1703C79090728eE27f416034297
  • Standard: Custom ERC-721 (no imports)
  • Compiler Version: ^0.8.19
  • Admin: Hardcoded inside the contract (must be updated before deployment)
  • License: MIT

βš™οΈ Features

βœ… No Imports / No Constructor – Fully self-contained contract
βœ… Admin-Controlled Minting – Only admin can issue milestone NFTs
βœ… ERC721-Compatible – Supports transfer, approvals, and balance tracking
βœ… Metadata Support – Each NFT can have a custom tokenURI
βœ… Milestone Tracking – Each NFT stores an on-chain milestone description
βœ… Base URI Customization – Admin can update base metadata URI
βœ… Burnable Tokens – Admin or owner can revoke NFTs


🧠 Core Functions

Function Description
awardMilestoneNFT(address to, string uri, string milestone) Admin mints a new NFT as a reward for a milestone.
setBaseURI(string newBase) Admin updates the base URI for metadata.
milestoneOf(uint256 tokenId) Returns the milestone text associated with a token.
transferFrom(address from, address to, uint256 tokenId) Transfer ownership of a token.
burn(uint256 tokenId) Burn (revoke) an NFT β€” callable by admin or token owner.
tokensOfOwner(address owner) Returns all token IDs owned by an address.

🏷️ Example Workflow

  1. Admin awards milestone:
    awardMilestoneNFT(0xUserAddress, "ipfs://QmHashOfMetadata", "Completed Phase 1");
    
  2. User checks their NFT:
    tokensOfOwner(0xUserAddress);
     milestoneOf(tokenId);
     tokenURI(tokenId);
    
  3. Transfer NFT (optional):
    transferFrom(0xUserAddress, 0xAnotherUser, tokenId);
    
  4. Admin updates metadata (if needed):
    setBaseURI("https://myproject-metadata.xyz/nft/");
    

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published