From bc486f21cd6c05e2f131cceca7a9ae054ba961be Mon Sep 17 00:00:00 2001 From: CBROS - Cardano Stake Pool <79896142+Couder82@users.noreply.github.com> Date: Sun, 9 Jan 2022 17:16:57 +0100 Subject: [PATCH] Update minting-nfts.md In metadada.json file the token name should be in utf-8 format, not in hex format, otherwise there is a problem with metadata.json displaying in pool.pm. This pull request tries to solve this problem. Feel free to change it to more understandable way, I just want to draw attention to this problem. Kind regards Martin from CBROS --- docs/native-tokens/minting-nfts.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/native-tokens/minting-nfts.md b/docs/native-tokens/minting-nfts.md index 360c80b651..a0899190b7 100644 --- a/docs/native-tokens/minting-nfts.md +++ b/docs/native-tokens/minting-nfts.md @@ -116,8 +116,11 @@ cd nft/ ### Set variables We will set important values in a more readable variable for better readability and debugging of failed transactions. + +Since cardano-node version 1.31.0 the token name should be in hex format. We will set the variable $realtokenname (real name in utf-8) and then convert it to $tokenname (name in hex format). ```bash -tokenname=$(echo -n "NFT1" | xxd -b -ps -c 80 | tr -d '\n') +realtokenname="NFT1" +tokenname=$(echo -n $realtokenname | xxd -b -ps -c 80 | tr -d '\n') tokenamount="1" fee="0" output="0" @@ -314,7 +317,7 @@ If you want to generate it "on the fly," use the following commands: echo "{" >> metadata.json echo " \"721\": {" >> metadata.json echo " \"$(cat policy/policyID)\": {" >> metadata.json -echo " \"$(echo $tokenname)\": {" >> metadata.json +echo " \"$(echo $realtokenname)\": {" >> metadata.json echo " \"description\": \"This is my first NFT thanks to the Cardano foundation\"," >> metadata.json echo " \"name\": \"Cardano foundation NFT guide token\"," >> metadata.json echo " \"id\": \"1\"," >> metadata.json