I am writing a script to automate minting native assets. Everything works well, up until this point:

echo "Building transaction..."
cardano-cli transaction build \
            --babbage-era \
            $NETWORK \
            --tx-in $txhash#$txix \
            --tx-out $address+$output+"$tokenamount $policyid.$tokenhash" \
            --mint "$tokenamount $policyid.$tokenhash" \
            --minting-script-file "$tokenname"/policy/policy.script \
            --change-address $address \
            --out-file "$tokenname"/tx.build;

but every time I run the script, I get this error for "--tx-out":

Building transaction...
option --tx-out: 
unexpected '.'
expecting space, letter or digit, white space, "+" or end of input

I followed the official Cardano documentation for how to format the command, but for some reason the 'dot' between $policyid and $tokenhash is giving issues.

Is there something I'm missing? I know the documentation can be notoriously out of date, but nothing I've found online and elsewhere has helped so far.

  • 2
    have you tried substituting the variables with actual values? Could possibly be caused by empty value in one of the variables on tx-out line
    – RdLrT
    Commented Nov 4, 2022 at 6:05
  • Try echoing all those evnvironment variables to make sure none of the have a . character. Commented Nov 4, 2022 at 6:09
  • Okay, tried the suggestions, now the error I'm getting "Command failed: transaction build Error: The script language SimpleScriptLanguage SimpleScriptV1 is not supported in the Babbage era."
    – ota
    Commented Nov 4, 2022 at 17:39


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.