0

The guide for NFT minting is quite outdate and not working at this moment - https://developers.cardano.org/docs/native-tokens/minting-nfts/ because since recent version of cardano-cli all token names must be base16 encoded (I wasn't able to use non-encoded names at least).

So I was following this guide completely and managed to register the NFT on testnet when I base16 encoded the token name in CLI, but I don't seem to be able to verify if it was actually correctly registered. Most of NFT browsers don't work with testnet and when using testnet cardanoscan I only see the name of token, but nothing else - no metadata, no IPFS picture, not even description, just the decrypted base16 name, which makes me feel like the metadata either didn't register, or they mismatch the token name?

How can I verify if testnet token was properly registered? How can I query metadata for a token in certain address? Do I need to base16 encode the token name in metadata.json?

3

1 Answer 1

1

How can I verify if testnet token was properly registered?

When you mint your NFT, you're able to check the Mint transactions tab in cardanoscan/testnet.cardanoscan. For example, the following tokens were minted in one transaction:

Then you can go to the Transaction in the Mint transactions and you will find Metadata tab. There should be your Metadata for 721.

If nothing is displayed there, it's because your minting process has something wrong.

How can I query metadata for a token in certain address?

You can use blockfrost to query an specific asset and get the metadata. For example, to query this token: https://testnet.cardanoscan.io/token/62264a920c007b90d6b950f34245d42c66f6fd23c1547f1662bfa54743617264616e6f726331363239

You can use:

curl --location --request GET 'https://cardano-testnet.blockfrost.io/api/v0/assets/62264a920c007b90d6b950f34245d42c66f6fd23c1547f1662bfa54743617264616e6f726331363239' \
--header 'project_id: <your_project_id>'

And you will get this:

{
    "asset": "62264a920c007b90d6b950f34245d42c66f6fd23c1547f1662bfa54743617264616e6f726331363239",
    "policy_id": "62264a920c007b90d6b950f34245d42c66f6fd23c1547f1662bfa547",
    "asset_name": "43617264616e6f726331363239",
    "fingerprint": "asset1gljzhfsaqvep43gjez0t4hj3fj3jwv455cw0e4",
    "quantity": "1",
    "initial_mint_tx_hash": "9262943a49cc3dca038e907e0e0a9f3ac55ef60a2d3032cab45bfee1ff4d4e37",
    "mint_or_burn_count": 1,
    "onchain_metadata": {
        "name": "Cardanorc1629",
        "image": "ipfs://Qme3iiz4QWXo48xusytQ2u2E7RpnNJdLjGpUStcb6aYWtn",
        "id": 1629,
        "properties": {
            "Eye": "Agate",
            "Head": "No Head Accessory3",
            "Race": "Margog",
            "Mouth": "No Trait",
            "Earring": "No Earring 1",
            "Background": "Brown",
            "Special_Skin": "None",
            "Body_Accessory": "No Armor2",
            "Special_Mouth_Trait": "Gold Side Tooth"
        },
        "description": "Cardanorcs - The Beginning"
    },
    "metadata": null
}

Do I need to base16 encode the token name in metadata.json?

No, you don't need it.


Some additional points to consider:

  • Make sure you're using the right policyId in your metadata and your minting process
  • You can verify your metadata from here: https://pool.pm/test/metadata
3
  • what do I replace your_project_id with? that curl returns {"status_code":403,"error":"Forbidden"
    – Petr
    Dec 12, 2021 at 18:26
  • 1
    ok seems account on blockfrost was needed, there is a free plan, now I can see that the NFT was probably registered properly, although using cardanoscan it's barely visible as it doesn't render IPFS image
    – Petr
    Dec 12, 2021 at 18:30
  • 1
    Yes, you need a blockfrost account. Sure, cardanoscan only works to check the metadata , not to render IPFS. Anyway, you can use the blockfrost gateway to check that.
    – georgeos
    Dec 12, 2021 at 20:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.