Cyfrin / foundry-nft-cu

22 stars 25 forks source link

NFT Image Not Displayed on Etherscan and MetaMask #40

Closed meitedaf closed 3 months ago

meitedaf commented 3 months ago

Course Section: Section 2: Develop an NFTs Collection

Problem Description: I successfully deployed my NFT contract and minted an NFT. Here is the contract address on Sepolia: Contract Address

Using the readContract function, I queried the tokenURI and received the following IPFS link: ipfs://QmUGveXhXxrNUn28Le3aKygYsFq3zkF9WvwasjaynYawWm.

When I open the link, it correctly displays the JSON metadata file:

{
    "name": "SHIBA",
    "description": "An adorable SHIBA pup!",
    "image": "ipfs://QmYx6GsYAKnNzZ9A6NvEKV9nf1VaDzJrqDR23Y8YSkebLU",
    "attributes": [
        {
            "trait_type": "cuteness",
            "value": "100"
        }
    ]
}

The image link in the JSON file also correctly shows the picture of the SHIBA pup.

However, the image does not display on Sepolia Etherscan or in MetaMask. Both platforms fail to show the SHIBA image associated with the NFT.

Additional Information:

•  Contract Address: [0x4d6d1dFA0E882f03bDAFB3DB12F6BAf1d2FBe00F](https://sepolia.etherscan.io/token/0x4d6d1dfa0e882f03bdafb3db12f6baf1d2fbe00f#readContract)
•  Metadata URI: ipfs://QmUGveXhXxrNUn28Le3aKygYsFq3zkF9WvwasjaynYawWm
•  Image URI: ipfs://QmYx6GsYAKnNzZ9A6NvEKV9nf1VaDzJrqDR23Y8YSkebLU

I've looked at other similar issues, but the solution doesn't work for me.

Please provide guidance on how to resolve this issue so that the NFT image is correctly displayed on Etherscan and MetaMask.

Thank you.

meitedaf commented 3 months ago

Another Issue:

I minted the same NFT file twice in the same contract using the metadata URI: ipfs://QmUGveXhXxrNUn28Le3aKygYsFq3zkF9WvwasjaynYawWm Both mint operations were successful, resulting in two tokenId 0 and 1, respectively. However, they essentially represent the same NFT. Is this a bug?

cromewar commented 3 months ago

Hello @meitedaf, can you please post this question on: https://github.com/Cyfrin/foundry-full-course-cu/discussions

In the discussion section, we can provide more support from both community managers and the community.