Bubblegum (Compressed NFTs)
Bubblegum Overview
Bubblegum (Compressed NFTs)
These CLI commands are for Bubblegum V2 only. Bubblegum V2 uses Metaplex Core collections and is not compatible with Bubblegum V1 trees or Token Metadata collections.
Bubblegum is Metaplex's compressed NFT (cNFT) program that allows you to create NFTs at a fraction of the cost of traditional NFTs. By using concurrent Merkle trees for state compression, compressed NFTs can be minted just the transaction costs after the initial tree creation cost.
Key Concepts
Merkle Trees
Compressed NFTs are stored in Merkle trees rather than individual on-chain accounts. You must create a tree before minting any compressed NFTs. Tree size determines:
- Maximum number of NFTs that can be stored
- Upfront rent cost (paid once when creating the tree)
- Proof size required for operations
Collections
Bubblegum V2 uses Metaplex Core collections (not Token Metadata collections). Create a Core collection first:
mplx core collection create --wizard
RPC Requirements
Compressed NFT operations require an RPC endpoint that supports the DAS (Digital Asset Standard) API. Standard Solana RPC endpoints do not support DAS and will not work for fetching, updating, transferring, or burning compressed NFTs.
Command Structure
All Bubblegum commands follow this pattern:
mplx bg <resource> <command> [options]
Available Commands
Tree Management
mplx bg tree create- Create a new Merkle treemplx bg tree list- List all saved trees
NFT Operations
mplx bg nft create- Mint a compressed NFTmplx bg nft fetch- Fetch NFT data and merkle proofmplx bg nft update- Update NFT metadatamplx bg nft transfer- Transfer NFT to new ownermplx bg nft burn- Permanently destroy NFT
Quick Start
- Configure a DAS-enabled RPC:
mplx config rpcs add <name> <url>
- Create a Merkle tree:
mplx bg tree create --wizard
- Create a collection (optional but recommended):
mplx core collection create --wizard
- Mint compressed NFTs:
mplx bg nft create my-tree --wizard
Authority Model
| Operation | Required Authority |
|---|---|
| Create NFT | Tree authority (or anyone if tree is public) |
| Update NFT | Tree authority OR Collection update authority |
| Transfer NFT | Current owner OR delegate |
| Burn NFT | Current owner OR delegate |
