Skip to content

Authority in solana programs

In Solana programs, authorities are entities or accounts that have the right to perform certain actions or make changes within the program.

For example

Creating and revoking mint authority

  • Create a new token
spl-token create-token
  • Create an ata
spl-token create-account <token_mint_address>
  • Try minting some tokens
spl-token mint <token_mint_address> 10000000000
  • Check if mint authority exists on explorer

    Screenshot 2024-09-13 at 7.51.04 PM.png

  • Revoke mint authority

spl-token authorize <token_id> mint --disable
  • Try to mint again/check the explorer
spl-token mint <token_mint_address> 10000000000

Screenshot 2024-09-13 at 7.49.03 PM.png

Screenshot 2024-09-13 at 7.50.27 PM.png