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",
      "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.

1 Answer 1


This might be too late.

Have you checked that your policyID is the same as "...9570b"?

Assuming you are following the docs and are in the nft folder you can run echo $(cat policy/policyID)

Otherwise, if you are following the docs to a T and you are not missing any step I would recreate what is written on the docs.

First I would add the era => --babbage-era \ Then if you are following the docs, perhaps the script is in a different folder. The docs add --invalid-hereafter $slotnumber \ and witness is a WORD, therefore, needs to be written as a string => --witness-override '2' \

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.