Skip to main content
7 votes
Accepted

Are mint address and token address identical?

"mint address" and "token address" are often used interchangeably and refer to the same thing (the blue item). A unique identifier of an SPL-Token is its mint address. USDC is ...
john's user avatar
  • 7,445
6 votes
Accepted

Are new SPL tokens typically transferred from a Mint's token account to a user's Associated Token Account?

To answer your main question: no, that's not per se typical. Technically, you could create an ATA for a Mint account, but that comes with some considerations. How SPL Tokens Work Put simply, a Mint ...
Joe C's user avatar
  • 1,086
6 votes

Change existing token's decimal

Once you create a mint account you will not be able to update the mint's number of decimals. The only solution is to create a new token.
Jacob Creech's user avatar
  • 3,854
4 votes
Accepted

How do I prevent a user from transferring a token in their wallet originating from a token mint I own or have authority on?

Token program allows you to create tokens with --enable-freeze flag and then you use spl-token freeze command to freeze any token account and then spl-token thaw to thaw an account. If you don't care ...
Tufan Barış Yıldırım's user avatar
4 votes
Accepted

Get Solana SPL Address from base 58 string

You can get the correct key by calling new PublicKey(string). The constructor for PublicKey takes a number of different types: number | string | Buffer | Uint8Array | number[] https://solana-labs....
C.OG's user avatar
  • 2,827
4 votes
Accepted

What is the recommended way to provision an instance of solana-test-validator with a set of accounts and mints?

You can load program and account fixtures into the validator using these command line arguments. --bpf-program Use this to load a .so file as the validator starts up. solana-test-validator --bpf-...
steveluscher's user avatar
  • 2,425
4 votes
Accepted

After Minting X amount of NFTs change Price

Change the Sol price once X amount of NFTs is minted or the current sale time ended. You have a global counter of minted NFTs - ctx.accounts.minting_account.cur_num. So to change price once X amount ...
Fedoras's user avatar
  • 310
4 votes

ProgramNotRecognizedError: The provided program name [mplCandyGuard] is not recognized in the [devnet] cluster

Unfortunately I can not see in your code snippet how you initialise umi, but what you basically need to do to register the guard program is: umi.use(mplCandyMachine()) In my personal mint ui ...
Mark Sackerberg's user avatar
3 votes
Accepted

How to get Mint Address of of SPL token using associated token account?

import {getAccount} from "@solana/spl-token" const tokenAccount = await getAccount(connection, tokenAccountAddress) console.log(tokenAccount.mint.toBase58()) https://solana-labs.github.io/...
john's user avatar
  • 7,445
3 votes

Can a PDA be the owner of an associated token account?

To create an ATA for a PDA you can set the allowOwnerOffCurve to true for getAssociatedTokenAddress function once you have the address you can call createAssociatedTokenAccountInstruction you also ...
Pratik.js's user avatar
  • 1,632
3 votes
Accepted

Cloning Existing Mints

Figured it out! (thanks to discord searching) Process: Clone the Mint Account you want to use: solana account EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v --output json-compact --output-file usdc....
Jack's user avatar
  • 91
3 votes

How much sol is required to mint 1000 items using sugar candy machine?

You can use this tool to calculate the cost for creating the Candy Machine: https://www.feecalc.live/
Andres's user avatar
  • 143
3 votes
Accepted

Where does a Account of a TokenMint store the maximum capacity it has at the moment?

The total supply of a token mint is tracked by the amount that have been minted. This meaning, when you initially create a mint it will have a supply of 0, but as soon as you mint 5000 (for example) ...
m_callens's user avatar
  • 889
3 votes

Attach metadata to token with metaplex

Instead of wallet.publicKey, you should be using the mint address of the token you're trying to create a metadata account for. The address of the metadata account is derived using the token mint ...
john's user avatar
  • 7,445
3 votes
Accepted

What is the value of MINT_SIZE, the constant from the Solana spl-token package?

MINT_SIZE = 82, its the size (in bytes) of the account data for a Mint Account. A standard Mint Account has the following layout: pub struct Mint { /// Optional authority used to mint new tokens. ...
john's user avatar
  • 7,445
3 votes
Accepted

Provided seeds do not result in a valid address

Without having much detail on your program goal, I can see some "issues". 1 - let (_, bump) = Pubkey::find_program_address(seeds, &ctx.accounts.mint_account.key()); The ...
ASCorreia's user avatar
  • 263
3 votes
Accepted

Mint Token as a PDA via SPL

It sounds like you're trying to create a mint account using PDA from your program as the address. Try just using anchor constaints to create the mint account. #[derive(Accounts)] pub struct ...
john's user avatar
  • 7,445
3 votes
Accepted

Accept payment, mint specific NFT to user's wallet using Metaplex (but not candymachine)

Backend Code Modifications and Clarifications Original Implementation Issues: Incorrect Usage of asset: Initially, asset was mistakenly used where a mint address should have been specified. The asset ...
Christian Liz-Fonts's user avatar
2 votes

mint multiple NFT at a time

You can't do it anymore because Metaplex implemented an anti-bot fee on the Candy Machine. A better answer is, that you can do it, but your users will pay the antibot fee for mint multiple tokens: ...
Andres's user avatar
  • 143
2 votes

i keep encountering deprecated files form github and useless youtube videos that intend to scam viewers-- can anyone help?

In my opinion, the SolDev web holds a lot of interesting material for beginners. The Tutorials section might be a good place to look for the resources that best suit your needs. https://soldev.app ...
JLx's user avatar
  • 21
2 votes
Accepted

What are the potential pitfalls of making the mint authority and freeze authority the same as the mint address?

I'm not certain, but I think you'll find that once initialised the mint address can't be used to pay fees because it's not owned by the system program (it'll be owned by the token program). That'd ...
Callum M's user avatar
  • 3,085
2 votes

Can a mint's supply or decimals ever change?

If you follow the NFT Standard on Solana then you also have to create a metadata account and a master edition account along with the mint account. The master edition is going to have the mint ...
Pratik.js's user avatar
  • 1,632
2 votes

How much sol is required to mint 1000 items using sugar candy machine?

A NFT in Solana is represented using 4 accounts. Mint account -> the spl account ATA -> A PDA that is the space in ur wallet that your mint account will be stored (Master) Edition Account -> ...
WrathionTBP's user avatar
2 votes

How to check for mint supply on chain?

Nevermind: let mint = Mint::unpack_unchecked(&accounts.mint.data.borrow()).unwrap(); to get the supply, just access mint.supply
Dinaiscoding's user avatar
2 votes
Accepted

How Candy Machine data is stored?

It differs a bit depending on which candy machine version you are talking about. This answer is for the latest version candy machine v3 (which is split into candy core and candy guards. The NFT data ...
Mark Sackerberg's user avatar
2 votes

How to create a mint account on anchor test?

If you are intending to test much of SPL related logic within your smart contract, you can set it up for each test manually. This is (roughly) the script I used at the start of my test file. It is ...
mega_creamery's user avatar
2 votes

GetMultiple for Mints?

Posting the answer with parsed accounts here for reference: let mintInfos = await connection.getMultipleAccountsInfo(mintKeys); for (let i = 0; i < mintInfos.length; i++) { let mint: ...
Whiteseal's user avatar
  • 3,185
2 votes

Error: Signature verification failed while mint NFT

Same issue is for me using this example from Metaplex (https://github.com/metaplex-foundation/js-examples/tree/main/mint-ui-example) The issue is with the WalletIdentity-Provider because when I use ...
Chaudhary's user avatar
2 votes
Accepted

Metaplex `Nft` object has a 'mint address' and a 'mint account'. What is the difference?

Although the TypeScript document describes mint as mint account, mint is an actually an object that gives you the data stored on the mint account such as decimals, supply, etc. /** * This model ...
john's user avatar
  • 7,445
2 votes

Quick Node RPC For Minting

Yes, a paid Quicknode RPC should be fine.
kwelliott's user avatar
  • 514

Only top scored, non community-wiki answers of a minimum length are eligible