Getting an error 'option --tx-in: unexpected "\8220" expecting digit'

I’m currently trying to mint native tokens using Developer Portal Native Token minting guide. Once I try to build cardano-cli transaction build-raw with this command:

cardano-cli transaction build-raw \
 --fee $fee \
 --tx-in $txhash#$txix \
 --tx-out $address+$output+"$tokenamount $policyid.$tokenname1 + $tokenamount $policyid.$tokenname2" \
 --mint "$tokenamount $policyid.$tokenname1 + $tokenamount $policyid.$tokenname2" \
 --minting-script-file policy/policy.script \
 --out-file matx.raw

I get:

option --tx-in:
unexpected "\8220"
expecting digit

What seems to be the problem here?

For reference, this is what I have:

txhash="my txhash"
txix=“0”
funds="10000000000"
policyid=$(cat policy/policyID)

Decimal 8220 is the (English) left double quotation mark:
https://www.fileformat.info/info/unicode/char/201c/index.htm

You are not using the simple ASCII quotation marks (") here. Might be copy and paste error from some source that automatically replaces them with the typographic ones (“”).

2 Likes

Thank you!

1 Like

Just checked the content on Minting Native Assets | Cardano Developer Portal to be sure that Docusaurus (the site generator) wasn’t formatting the text on copy-paste (like Wordpress would, with the quote character rewriting, when content is entered). It’s definitely copy-pasting from the ordinary ASCII character set:

$ unum 'txhash="insert your txhash here"'
   Octal  Decimal      Hex        HTML    Character   Unicode
    0164      116     0x74      t    "t"         LATIN SMALL LETTER T
    0170      120     0x78      x    "x"         LATIN SMALL LETTER X
    0150      104     0x68      h    "h"         LATIN SMALL LETTER H
    0141       97     0x61       a    "a"         LATIN SMALL LETTER A
    0163      115     0x73      s    "s"         LATIN SMALL LETTER S
    0150      104     0x68      h    "h"         LATIN SMALL LETTER H
     075       61     0x3D    =    "="         EQUALS SIGN
     042       34     0x22 ","    """         QUOTATION MARK
     ...

So @jljuwa I have to conclude further that you were copying this command text into some intermediate place, like an office document editor or email program, which changed the ASCII quotes into typographic quotes. If you copy to a “dumb” text editor instead, it should work as you expect.

2 Likes