Transaction Build Error

Hello Everyone,

I am getting an invalid argument for my metadata.json, here is my transaction:
cardano-cli transaction build --mainnet --tx-in $txhash#$txix --tx-out $(cat nft_address.addr)+$output+"$tokenamount $policyid.$tokenname" --change-address $(cat payment.addr) --mint="$tokenamount $policyid.$tokenname" --minting-script-file $script --metadata-json-file nft.json --invalid-hereafter $slotnumber --witness-override 2 --out-file matx.raw

And it gives me:

Invalid argument `nft.json'

Not sure what I am missing here.

$script was empty.

Problem solved.

1 Like

A trick in the future, if you use variable expansion, is to simply add echo "script = $script" before using them as a sanity check. Saves lots of time debugging if you can see what you got printed out right before the weird seemingly unrelated error from a parsing failure!