I am trying to generate native tokens which can not be minted again. I cannot wait for plutus smart contracts go live on PROD. As a work around, I am looking forward to design a policy which requires single signature (not a multisig) and also time bound (before a slot).
Can anyone help with an example of such policy script and additionally the build, sign and submit steps with it( if they are unique)
Here is an example of a script that requires a single signature and only allows minting before a particular slot number. The command cardano-cli query tip --mainnet
will tell you the current slot number, and you can use that to compute how many slots into the future you want to allow minting. When you run cardano-cli transaction build-raw
, you’ll need to include --invalid-hereafter
followed by the slot number in your script. See Time Locking for details.
If you don’t want to create a separate minting key, as in the “Submitting a Transaction” section of Working with Multi-Asset Tokens, you can simply use the hash of $SPENDING_KEY
in the token minting policy. Then you only have to sign the transaction with that one key.
FYI, I’ve created a simple Haskell command-line program that allows one to mint time-locked tokens and/or post metadata. I’ll be upgrading this soon to mint batches of tokens under a single policy. After there is consensus on a metadata standard for tokens, I’ll add support for that standard to the tool, too.
That is spot on. That resolved my issue.
Thank you so much for the reply.