Skip to content

​In short

A mint account defines a token: its supply, its decimals, who may create more (mint authority), and who may freeze holders (freeze authority).

​What Is a Mint Account

A mint account defines and uniquely identifies a token on Solana, and stores the shared state that applies to all token accounts for that mint. The Token Program defines the Mint account type as:
Mint Account Type
Every token has one mint account, and the mint address is the token’s unique identifier across wallets, applications, and explorers. For example, USD Coin (USDC) has the mint address EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v. The mint address uniquely identifies USDC throughout the Solana ecosystem. You can view this mint on Solana Explorer.

​How to Create a Mint Account

Creating a mint requires two instructions:
  1. The System Program’s CreateAccount instruction creates a new rent-exempt account and assigns the Token Program as the program owner of the new account.
  2. The Token Program’s InitializeMint or InitializeMint2 instruction initializes the new account as a mint.
Include the CreateAccount instruction and the mint initialization instruction in the same transaction. During mint initialization, the Token Program checks that the mint account is not already initialized and is rent-exempt. The Token Program then writes the mint authority, freeze authority, decimals, and is_initialized flag into the mint account data.

​Source Reference

ItemDescriptionToken ProgramToken Extension Program
MintThe base mint state stored in every mint account.SourceSource
InitializeMintA mint initialization instruction that expects the rent sysvar account in its accounts list.SourceSource
InitializeMint2A mint initialization instruction that does not require the rent sysvar account in its accounts list.SourceSource
_process_initialize_mintShared processor logic for mint initialization.SourceSource
process_initialize_mintPublic handler for InitializeMint.SourceSource
process_initialize_mint2Public handler for InitializeMint2.SourceSource

​Kit

These examples use @solana/kit.

​Web3.js v3

These examples use the class-based @solana/web3.js v3 API with @solana-program instruction builders.

​Rust

Add these dependencies to Cargo.toml (tested with Rust 1.89 and 1.98):
Cargo.toml
Rust

​Python

This example uses solana (solana-py) 0.41 and solders:
Terminal
Python

​Web3.js (legacy)

These examples use legacy @solana/web3.js 1.x with @solana/spl-token.
@solana/web3.js 1.x is no longer actively maintainedIt receives critical fixes only. Use Kit for new code. To migrate existing code, follow the Kit upgrade guide, or the web3.js v3 migration guide to keep the class-based API.To run this code, install 1.x with npm install @solana/web3.js@1. A plain npm install @solana/web3.js installs v3, which this code doesn’t run on.

​How to Add Metadata

A mint account only stores basic token information (supply, decimals, authorities). To add human-readable metadata like a name, symbol, and image to your token, you have two options: