About set a limited native tokens and minting

Hi, I have a doubt about the creation of native tokens:

cardano-cli transaction build-raw
–fee 188865
–tx-in 100e49228b36be2c14e1f92de1326382061815c75ce559ea5a0b4650d6fb1520#0
–tx-out $(cat payment.addr)+4811135+“1000 $(cat policy/tokens/policy.id).SilverCoin”+“1000 $(cat policy/tokens/policy.id).GoldCoin”
–mint=“1000 $(cat policy/tokens/policy.id).SilverCoin”+“1000 $(cat policy/tokens/policy.id).GoldCoin”
–minting-script-file policy/tokens/token_policy.script
–metadata-json-file policy/tokens/token_meta.json
–out-file token_tx.raw

In this example, I can mint unlimited Silvercoins and Goldcoins, but what I have to do if a only want to create a limited number of 10.000 silvercoins and only send to my address 1.000 and the other 9.000 mint when I want it? To mint a limited tokens I have to do something in the policy? If it is, what is the thing I have to put. If someone has a guide that explain exactly this doubt I really appreciate it.

I can tell you in theory because I am not a pro on NFTs (someone else can confirm/infirm) …
you can mint only 1000 coins from the beginning , set the policy to allow minting till epoch X (not lock to early) then you can mint later another amount of coins (before epoch X) using the same policy


Yes, that is right. basically the signature will expire when reach the slot you defined in policy script.

example: after 10000 slots (since the transaction was made) no further minting or burning of the asset allowed

echo "     \"slot\": $(expr $(cardano-cli query tip --mainnet | jq .slot?) + 10000)" >> policy/policy.script
1 Like