I was following this tutorial about minting nfts and when I entered this command to build the transaction: cardano-cli transaction build \
--mainnet \
--alonzo-era \
--tx-in 32b522ab6f403cf5032d4aed87673298ef5ef4f4af774b38307d2bf3fa645131#0 \
--tx-out $address+$output+"$tokenamount $policyid.$tokenname" \
--change-address $address \
--mint="$tokenamount $policyid.$tokenname" \
--minting-script-file $script \
--metadata-json-file metadata.json \
--invalid-hereafter $slotnumber \
--witness-override 2 \
--out-file matx.raw
I got this error back: `–tx-out:
unexpected ‘n’
expecting alphanumeric asset name, white space, “+” or end of input
`
Any ideas on how to solve this? You can find the tutorial here->(Minting NFTs | Cardano Developer Portal )
Hi!,
My recomentation is don forget define variables as
tokenname1=“Testtoken”
tokenamount=“10000000”
output=“0”
export CARDANO_NODE_SOCKET_PATH="$HOME/TESTNET_NODE/socket/node.socket"
and add the variables related to libsodium
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
I got this same error.
The character being objected to (first letter of asset name) is alphanumeric so this seems like a bug.
I am using cardano-node version 1.32.1.
I was able to mint with an empty string as the asset name so there isn’t anything wrong with the variable settings or environment.
Did you ever find a workaround for this problem?
I filed a bug report on this.
opened 01:30AM - 23 Dec 21 UTC
bug
**Internal/External**
*External* otherwise.
**Area**
*Native Tokens* R… elated to Native Tokens (Mary).
**Summary**
When building a minting transaction, cardano-cli rejects the letter 'S' as not being alphanumeric.
**Steps to reproduce**
Executing the following minting transaction:
```
cardano-cli transaction build --mainnet --alonzo-era --tx-in 09b4[...]bf0#0 --tx-out addr1v8[...]jv7+1400000+1 a14[...]dd4.ShawnHead1 --change-address addr1v8[...]jv7 --mint=1 a14[...]dd4.ShawnHead1 --minting-script-file policy/policy.script --metadata-json-file metadata.json --invalid-hereafter 48745000 --witness-override 2 --out-file matx.raw
```
gave me this error:
```
option --tx-out:
unexpected 'S'
expecting alphanumeric asset name, white space, "+" or end of input
```
and a usage message.
The character being objected to (first letter of asset name) is alphanumeric so this seems like a bug.
I was able to mint with an empty string as the asset name so there isn't anything wrong with the variable settings or environment.
**Expected behavior**
The command should accept the asset name and create the transaction.
**System info (please complete the following information):**
- OS Name: Ubuntu
- OS Version 20.04
- Node version
```
cardano-node 1.32.1 - linux-x86_64 - ghc-8.10
git rev e9de7a2cf70796f6ff26eac9f9540184ded0e4e6
```
- CLI version
```
cardano-cli 1.32.1 - linux-x86_64 - ghc-8.10
git rev e9de7a2cf70796f6ff26eac9f9540184ded0e4e6
```
FYI from the github issue discussion, you now need to specify asset names in hex.
You can do something like below to convert your asset name.
echo -n "MyAssetName" | xxd -b -ps -c 80 | tr -d '\n'
I submitted a pull request to fix the native asset and NFT minting docs to use hex asset names.
cardano-foundation:staging
← shawnim:hexnames
opened 10:37PM - 26 Dec 21 UTC
---
## Updating documentation
#### Description of the change
cardano-cl… i version 1.32.1 now requires asset names to be specified in hex rather than ascii.
This PR fixes the minting instructions for native assets and NFTs to use hex asset names.
2 Likes