Hey everyone! I’m having a bit of trouble with my NFT collection. I set it up to go from 0 to 9999, but when I start minting, it begins at 1 instead of 0. I’m not sure why this is happening.
Here’s what my JSON file looks like for the first item:
{
"name": "CryptoCreature #0",
"description": "Digital Pets Collection",
"image": "ipfs://ContentHash/0.png",
"attributes": [
{
"trait_type": "Habitat",
"value": "Forest"
},
{
"trait_type": "Body",
"value": "Fuzzy"
},
{
"trait_type": "Personality",
"value": "Playful"
}
],
"dna": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"edition": 0,
"external_url": "https://cryptocreatures.io",
"date": 1682345678901,
"creator": "NFT Generator v2.0"
}
Any ideas on why it’s skipping the first item and starting at 1? Thanks for your help!
hey there ben! that’s an interesting issue you’re having with your nft collection. i’m curious, have you checked your smart contract code? sometimes the problem lies there rather than in the metadata.
could you share a bit more about how you’ve set up the minting process? are you using a specific platform or writing your own smart contract?
also, i wonder if this might be a display issue rather than an actual minting problem. have you tried minting a few and then checking if #0 exists in your collection?
btw, your json structure looks good to me. love the idea of digital pets! what inspired you to create cryptocreatures?
yo ben, i’ve seen this before! it’s prolly ur smart contract, not the metadata. most contracts start counting at 1 cuz it’s easier for peeps to understand. u might wanna tweak ur contract to explicitly start at 0 if that’s what u want. cool idea with the cryptocreatures btw! what kinda traits r u planning?
This issue is likely stemming from your smart contract implementation rather than the metadata. Many programming languages and smart contract frameworks start array indexing at 1 instead of 0, which could explain why your minting begins at 1. I’d recommend reviewing your contract’s minting function, particularly how it’s incrementing the token ID. You might need to adjust it to start from 0 explicitly. Additionally, some marketplaces may display token IDs starting from 1 for user-friendliness, even if the actual IDs start at 0. Double-check your contract on a block explorer to verify the actual token IDs being minted. If you’re using a specific NFT platform or framework, consult their documentation as they might have built-in conventions for token ID assignment.