Skip to content

Commit d8b43c2

Browse files
author
jpcaulfi
committed
PDA mint authority examples
1 parent 54f2543 commit d8b43c2

File tree

1 file changed

+3
-25
lines changed

1 file changed

+3
-25
lines changed

tokens/pda-mint-authority/README.md

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,5 @@
1-
# NFT Minter
1+
# PDA Mint Authority
22

3-
Minting NFTs is exactly the same as [minting any SPL Token on Solana](../spl-token-minter/), except for immediately after the actual minting has occurred.
3+
This example is exactly the same as the `NFT Minter` example, but it changes the `mint authority` account from the payer (System Account) to a PDA.
44

5-
What does this mean? Well, when you mint SPL Tokens, you can attach a fixed supply, but in most cases you can continue to mint new tokens at will - increasing the supply of that token.
6-
7-
With an NFT, you're supposed to only have **one**.
8-
9-
So, how do we ensure only one single token can be minted for any NFT?
10-
11-
---
12-
13-
We have to disable minting by changing the Mint Authority on the Mint.
14-
15-
> The Mint Authority is the account that is permitted to mint new tokens into supply.
16-
17-
If we remove this authority - effectively setting it to `null` - we can disable minting of new tokens for this Mint.
18-
19-
> By design, **this is irreversible**.
20-
21-
---
22-
23-
Although we can set this authority to `null` manually, we can also make use of Metaplex again, this time to mark our NFT as Limited Edition.
24-
25-
When we use an Edition - such as a Master Edition - for our NFT, we get some extra metadata associated with our NFT and we also get our Mint Authority deactivated by delegating this authority to the Master Edition account.
26-
27-
This will effectively disable future minting, but make sure you understand the ramifications of having the Master Edition account be the Mint Authority - rather than setting it permanently to `null`.
5+
💡Notice the use of `invoke_signed` for CPIs.

0 commit comments

Comments
 (0)