Skip to main content

Mint a 1-of-1 SPL token and meet your first NFT

Create the simplest possible NFT on Solana: one indivisible token, one owner, and no way to mint another.
Mint a 1-of-1 SPL token and meet your first NFT background
Challenge

Mint a 1-of-1 SPL token and meet your first NFT

Arc theme: NFTs and Digital Assets

Web2 bridge: NFTs are like unique database records with ownership history and provenance

The Scenario

For the past few weeks you have lived inside the SPL Token world. You minted fungible tokens, attached transfer fees, frozen accounts by default, and stamped metadata directly onto mints with token extensions. You can read a mint configuration like a database schema. Today the curtain pulls back on a small secret: the NFTs everyone talks about, the kind that show up in marketplaces and profile pictures, are built on the very same plumbing you have been using.

In Web2 you might think of an NFT as a unique row in a database with an immutable history of who owned it and when. On Solana, the simplest possible version of that idea is a token mint where the supply is exactly one and the smallest unit cannot be subdivided. No fractional shares. No second copy. One token, one owner, forever. That is the seed of every NFT you have ever seen, and today you are going to plant it yourself using only the tools you already have installed.

The Challenge

You are going to create a brand new mint on devnet, configure it so only a single indivisible unit can ever exist, mint that one unit to your wallet, and then permanently disable the ability to ever create another. Then you will look it up on Solana Explorer and see it labeled as a Non-Fungible Token. No JSON metadata yet. No Metaplex. Just the raw on-chain reality of what makes a token “non-fungible” in the first place.

What you’ll need

  • A terminal with the Solana CLI installed and configured for devnet
  • The spl-token CLI, which you have already used in earlier arcs
  • A funded devnet keypair (run solana airdrop 2 if your balance is low)
  • A web browser open to Solana Explorer (Devnet)

Steps

  1. Confirm your CLI is pointed at devnet and that you have some SOL to pay rent and fees. If anything looks off, airdrop yourself a little more SOL before continuing.
  2. Create a new token mint with zero decimals. Zero decimals means the token has no fractional units, which is the first half of “non-fungible.” Save the mint address that the command prints; you will need it in every step that follows.
  3. Create an associated token account for that mint under your wallet. This is the box that will hold your single token.
  4. Mint exactly one token into that account. After this command runs, the total supply of this mint on the entire Solana network will be one.
  5. Disable the mint authority. This is the second half of “non-fungible.” With no mint authority, nobody, not even you, can ever create a second copy. The supply is locked at one for all time.
  6. Open Solana Explorer, paste in your mint address, and look at how the page describes it. Take a screenshot of the explorer page showing your new NFT.

Run it

solana config set --url https://api.devnet.solana.com
solana balance
spl-token create-token --decimals 0
spl-token create-account [YOUR_MINT_ADDRESS]
spl-token mint [YOUR_MINT_ADDRESS] 1
spl-token authorize [YOUR_MINT_ADDRESS] mint --disable
spl-token supply [YOUR_MINT_ADDRESS]

What Just Happened

You created a token, but because you set decimals to zero and minted exactly one unit, that token can never be split and it can never be duplicated. When you ran the final authorize ... --disable command, you threw away the only key that could have created another. The mint is sealed. On the explorer page you should see the network describe this mint as a Non-Fungible Token, and the supply line should read one with no decimal point in sight.

If you have ever stored a unique record in a relational database, you know the feeling: a primary key that points at one and only one row. The mint address you just created is exactly that, except the database is the entire Solana network and the row cannot be edited or deleted by anyone. What is missing, of course, is the interesting stuff: a name, an image, a description, a creator, a collection. Right now your NFT is anonymous. That is on purpose. Over the next several days you will layer those things on top, first using token extensions to attach metadata directly, then meeting Metaplex and the broader NFT toolchain. Today you saw the foundation. The rest of the arc is decoration and convention built on top of it.

Resources

Submission

Submit a screenshot of your mint’s page on Solana Explorer (Devnet) showing it labeled as a Non-Fungible Token with a supply of 1.

Submit your project