I have set up a native token on the Cardano Testnet and for a simple minting policy, it works correctly, that is, I am able to mint the new token. For example, if I use the following policy script:
{
"type": "sig",
"keyHash": "key_hash_here"
}
It works correctly. However, if I use a more complex script like a time-locked policy like this:
{
"type": "all",
"scripts":
[
{
"type": "before",
"slot": 24026549
},
{
"type": "sig",
"keyHash": "key_hash_here"
}
]
}
It does not work and gives me the following error:
‘Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraMary (ApplyTxError [LedgerFailure (UtxowFailure (ScriptWitnessNotValidatingUTXOW (fromList [ScriptHash “37c55dfc86332c58613f40f43b2d074f22153b0602c4701a1a50e4a5”])))])’
The signing transaction is as follows:
cardano-cli transaction sign \
--signing-key-file pay.skey \
--signing-key-file policy/policy.skey \
--script-file policy/policy.script \
--testnet-magic 1097911063 \
--tx-body-file matx.raw \
--out-file matx.signed
My guess is that I’m missing a signature, but not sure which one.