# I am not sure how to to get the asset name display correctly

**URL:** <https://forum.cardano.org/t/i-am-not-sure-how-to-to-get-the-asset-name-display-correctly/92292>\
**Category:** Native Tokens\
**Tags:** cardano\
**Created:** [16 January 2022 23:02 UTC](https://forum.cardano.org/t/i-am-not-sure-how-to-to-get-the-asset-name-display-correctly/92292 "2022-01-16T23:02:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HT-Moh](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/ht-moh/32/66146_2.png) [@HT-Moh](https://forum.cardano.org/u/HT-Moh)\
**Post date:** [16 January 2022 23:02 UTC](https://forum.cardano.org/t/i-am-not-sure-how-to-to-get-the-asset-name-display-correctly/92292/1 "2022-01-16T23:02:08Z")

</div>

Hello  
I am not sure how to to get the asset name display correctly .  
The problem is when I use the `$POLICY_ID.$ASSET_NAME` without changing ASSET\_NAME to hex I got the following error  
 ![image](https://us1.discourse-cdn.com/flex023/uploads/cardano/original/3X/9/0/90d21a9814d3853ef5f051fada132c796da6db22.png)

then I change the asset name to hex

```auto
export ASSET_ENC=$(echo -n $ASSET_NAME | basenc --base16 | awk '{print tolower($0)}')
export SUBJECT="$POLICY_ID.$ASSET_ENC"
cardano-cli transaction build \
$NETWORK_ID \
--alonzo-era \
--tx-in $TXIN \
--tx-out $(cat $ADDRESS)+$LOVELACE_TXIN_DV3+"$TOKENAMOUNT $SUBJECT" \
--change-address $(cat $ADDRESS) \
--mint="$TOKENAMOUNT $SUBJECT" \
--minting-script-file $SCRIPT \
--metadata-json-file $METAFILE \
--invalid-hereafter $SLOTNUMBER \
--witness-override 2 \
--out-file matx.raw

```

This works, the tx is successful but the name of the asset is incorrect.  
if neither changing to hex or submitting ASCII character works, what is the correct way?

> **[not found - Cardanoscan](https://preprod.cardanoscan.io/token/39df0587057f77075064fcea7c262d16ac50dc0283f2f1f9e82ebdd943727970746f20436174616c797374202d2041444120506f6f6c)**
>
> The Cardano (ADA) Explorer, explore blocks, transactions, metadata, certificates, pools, assets and more.

> cardano-cli version 1.33.0

---

<div class="post-metadata">

**Author:** ![HeptaSean](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/heptasean/32/82306_2.png) [@HeptaSean](https://forum.cardano.org/u/HeptaSean)\
**Post date:** [16 January 2022 23:12 UTC](https://forum.cardano.org/t/i-am-not-sure-how-to-to-get-the-asset-name-display-correctly/92292/2 "2022-01-16T23:12:35Z")

</div>

With 1.33.0 (in fact, all ≥ 1.31.0), it should be hex-encoded, yes.

Does Cardanoscan decode the hex for other tokens?

Perhaps, it doesn’t do it if they contain spaces and/or other characters.

EDIT: Other possibility: Did you, by accident, do the encoding double? Does `$ASSET_NAME` still contain the cleartext “Crypto Catalyst - ADA Pool” and `$ASSET_ENC` the encoding “43727970746f20436174616c797374202d2041444120506f6f6c”?

BTW: In your metadata, you say the tokenname is “CCYT” (the index of the JSON object inside the policy-id-indexed object). This should be the same in both. Otherwise, pool.pm and company won’t find the metadata.

EDIT: BTW2:

> [@HT-Moh](#):
>
> ```auto
> export ASSET_ENC=$(echo -n $ASSET_NAME | basenc --base16 | awk '{print tolower($0)}')
> export SUBJECT="$POLICY_ID.$ASSET_ENC"
> 
> ```

It doesn’t do any harm, but you don’t need to `export` these. You are using them in the same shell instance (to build up the call to `cardano-cli`) and they do not need to be given to processes called by it (which is what `export` does).

---

<div class="post-metadata">

**Author:** ![HT-Moh](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/ht-moh/32/66146_2.png) [@HT-Moh](https://forum.cardano.org/u/HT-Moh)\
**Post date:** [17 January 2022 07:37 UTC](https://forum.cardano.org/t/i-am-not-sure-how-to-to-get-the-asset-name-display-correctly/92292/3 "2022-01-17T07:37:24Z")

</div>

> [@HT-Moh](#):
>
> ```auto
> export ASSET_ENC=$(echo -n $ASSET_NAME | basenc --base16 | awk '{print tolower($0)}')
> 
> ```

Thank you, the problem was the second one the token name should much the json.

here is the tx [not found - Cardanoscan](https://testnet.cardanoscan.io/token/0df225455b90b2305391ea18ebf66025a1a4418ed11619e7fbd337e543435954?tab=transactions)

---

<div class="post-metadata">

**Author:** ![HeptaSean](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/heptasean/32/82306_2.png) [@HeptaSean](https://forum.cardano.org/u/HeptaSean)\
**Post date:** [17 January 2022 07:46 UTC](https://forum.cardano.org/t/i-am-not-sure-how-to-to-get-the-asset-name-display-correctly/92292/4 "2022-01-17T07:46:37Z")

</div>

Glad that you solved it!
