1

I am creating a spl token using solana CLI as per the following documentation, https://solana.com/developers/guides/getstarted/how-to-create-a-token.

this already include the burn functionality by default.

I want to add a total cap for the entire supply , is there a way to add it for my spl token? In CLI or other methods?

1 Answer 1

1

From the CLI, after you create your token per the documentation, you could mint the total supply to a wallet to be the authority of the supply using spl-token mint (docs).

After the supply has been minted you can use the CLI to revoke minting authority, preventing any tokens from being minted again (docs):

spl-token authorize mint --disable ...

This will set the mint authority to None and prevent any more tokens from ever being minted. You can run spl-token authorize -h to get more help and options on the command.

If you would rather create a "cap" without minting all of the tokens first, you'll probably want to create a program to manage the token minting and programmatically define a cap. Here are examples for how to create a program that manages token minting--you'd need to modify to meet your specific logic.

1
  • Thanks for the help, i will try this. Commented Oct 30 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.