Skip to content

Latest commit

 

History

History
69 lines (51 loc) · 2.14 KB

File metadata and controls

69 lines (51 loc) · 2.14 KB

nft-mplxcore

An NFT program built on Solana using the Anchor framework and the Metaplex Core standard. It handles collection creation, NFT minting, metadata updates, and access control through a whitelisted creator system and freeze/thaw mechanics.


What It Does

  • Creates an NFT collection using the Metaplex Core asset model
  • Mints NFTs into the collection
  • Updates NFT metadata post-mint
  • Freezes and thaws NFTs to control transferability
  • Manages a whitelist of approved creators who can mint into the collection
  • Stores collection authority and whitelist state on-chain

Code Structure

programs/anchor-mplxcore-q4-25/src/
├── lib.rs
├── error.rs
├── instructions/
│   ├── mod.rs
│   ├── create_collection.rs    — creates the Core collection asset
│   ├── mint_nft.rs             — mints a new Core NFT into the collection
│   ├── update_nft.rs           — updates name or URI of an existing NFT
│   ├── freeze_nft.rs           — freezes an NFT, preventing transfers
│   ├── thaw_nft.rs             — thaws a frozen NFT, re-enabling transfers
│   └── whitelist_creator.rs    — adds a creator to the approved whitelist
└── state/
    ├── mod.rs
    ├── collection_authority.rs — stores collection mint and authority bump
    └── whitelisted_creators.rs — stores whitelisted creator pubkeys

Prerequisites


How to Run

This project requires Surfpool as the local validator instead of the default Solana test validator, as it needs mainnet Metaplex programs available locally.

Terminal 1 — Start Surfpool:

surfpool start --watch

Terminal 2 — Build and test:

cd nft-mplxcore
yarn install
anchor build
anchor test --skip-local-validator --skip-deploy

Make sure Surfpool is fully running before executing tests in Terminal 2.