How to show the id of the nft in an ERC721 contract after the name when sending custom metadata function tokenURI

Ahh, I think I see more clearly now. If they will all be the same, you might really want ERC20. You would be able to use a single uri (which you could also do in the 721) and your contract would be much simpler. Also, I don't suggest you go off on the '721 tangent' at this juncture, it's really quite the same interface so won't help here.

Is there a strong reason you want the off-chain metadata to have different 'names' for each token? To do this in 721 you'll have to generate those 1000 .jsons; obviously, you'd build/use a tool to do so programmatically. However, you could add the name functionality you desire.

pseudo code

mapping(uint => string) nameMap;

function getNFTName(tokenId) returns (string) {
    return nameMap[tokenId];
}

As for your URI use-case I had exactly the same idea here.

(near the bottom "URI OPERATIONS")

1 Like

Is there some important reason why you want the off-chain metadata to have different "names" for each token?

No, the truth is that I would not have liked to add the id number behind the name for any reason.

I've chosen to forget about that for now and have already implemented the contract with equal names and the ability to change the metadata to each id or all ids or even a range of ids.

thank you very much for your help