Following the Mintin NFTs IOHK tutorial I end up with the following error when crafting the transaction.
Command failed: transaction build Error: The "--mint" flag specifies an asset with a policy Id, but no corresponding monetary policy script has been provided as a witness (via the "--mint-script-file" flag). The policy Id in question is: ..9570b
I don't understand the error because I am giving the script file with the flag mentioned.
cardano-cli transaction build \
--testnet-magic 1 \
--tx-in ...e6f70#0 \
--tx-out addr_test1...s8qjk+2198569+"1 ...9570b.4d7946697273744e4654" \
--change-address addr_test1vrhwzwj5plmracdydsr57k7putcuxfzktffc2v4hgm7kc8gfs8qjk \
--mint="1 ...9570b.4d7946697273744e4654" \
--mint-script-file policy.script \
--metadata-json-file metadata.json \
--witness-override 2 \
--out-file tx.raw
And here is the policy.script
that has the hash of the policy verification key policy.vkey
.
{
"type": "all",
"scripts":
[
{
"type": "before",
"slot": 6378920
},
{
"type": "sig",
"keyHash": "...33060c"
}
]
}
I would like to have a better idea of what can be wrong as the error is not helping in understanding what has gone wrong.