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 tree
  • mplx bg tree list - List all saved trees

NFT Operations

  • mplx bg nft create - Mint a compressed NFT
  • mplx bg nft fetch - Fetch NFT data and merkle proof
  • mplx bg nft update - Update NFT metadata
  • mplx bg nft transfer - Transfer NFT to new owner
  • mplx bg nft burn - Permanently destroy NFT

Quick Start

  1. Configure a DAS-enabled RPC:
mplx config rpcs add <name> <url>
  1. Create a Merkle tree:
mplx bg tree create --wizard
  1. Create a collection (optional but recommended):
mplx core collection create --wizard
  1. Mint compressed NFTs:
mplx bg nft create my-tree --wizard

Authority Model

OperationRequired Authority
Create NFTTree authority (or anyone if tree is public)
Update NFTTree authority OR Collection update authority
Transfer NFTCurrent owner OR delegate
Burn NFTCurrent owner OR delegate

Next Steps

Previous
Withdraw