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
echo -n $NAME | base16
explaining how you can get the encoded name