1

I hope all is well and everyone had a great holiday season. I am having an issue minting NFT's from the CLI they appear to be minting without metadata, even though I am referring to the fully populated metadata.json file used. All variables are correct ($variables are correct) Can anyone toss me a bone at what I'm doing wrong? The NFT does actually mint, just minus all metadata and thus no picture or details about the NFT.

My Minting Command =

cardano-cli transaction build \
--mainnet \
--alonzo-era \
--tx-in $txhash#$txix \
--tx-out $nftwallet+$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

Metadata file -

{
"721": {
"HIDDEN": {
"HIDDEN": {
"name": "NFT NAME HERE",
"image": "ipfs://IPFSLINKHERE",
"mediaType": "image/png",
"description": "DESCRIPTION HERE",
"files": [
{
"name": "PIC NAME HERE",
"mediaType": "image/png",
"src": "ipfs://IPFS LINK HERE"
}
]
}
},
"version": "1.0"
}
}
2

3 Answers 3

1

It's likely because your token name doesnt match between the CLI and the metadata.json file. Hard to say since you've hidden them...

0

It looks like more of a data issue within the metadata json, rather then a problem in the transaction format.

It looks like you're following the https://developers.cardano.org/docs/native-tokens/minting-nfts/

Please note that the --mint="$tokenamount $policyid.$tokenname" \ $policyid and $tokenname, have to match the two HIDDEN fields in the metadata.json

Furthermore, the digital asset (eg. the image/audio/video/whatever) needs to be in a IPFS server. Sometimes some IPFS services are slow at serving/propagating the asset, so a workaround, is to create an account on pinata.cloud and load your asset there. Then you're sure everything is fine.

For further help, can you share a minting transaction hash? This way we can inspect the tx and tell you exactly whats wrong.

If you want to do a test, you can use new policy/image whatever, so you won't share private stuff.

Thanks and good luck

0

Your metadata file is not structured correctly. Please check CIP 25 - NFT Metadata Standard.

{
  "721": {
    "<policy_id>" {
       ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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