solana: Explorer doesn't display metadata for metaplex NFT's

Problem

The explorer doesn’t support NFT details pages for users and developers to see information about a particular NFT. For example, this NFT just displays that it is an “unknown token”.

https://explorer.solana.com/address/HPMmsBeHdAproBh6iA8p3akjkUM1kdaY2iRiZmZj2Wsz Screen Shot 2021-08-30 at 9 04 30 PM

Proposed Solution

  1. Use the metaplex token-metadata spec to fetch metadata for NFT’s
  2. Use buffer-layout for decoding the fetched metadata and retrieve the manifest URI
  3. Look up the manifest to retrieve NFT display information like its title and arweave image url on the explorer token page

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 8
  • Comments: 25 (18 by maintainers)

Most upvoted comments

This week has been pretty chaotic but I found some free time to make some more progress today. Doing some cleanup and playing with animations (thanks @stegaBOB). Should have a PR out this week.

Would love some ideas/feedback on styling and content.

image

I don’t really think this is the place to have this discussion? Not really relevant to the issue. If you want to know more, I suggest reading this: https://spl.solana.com/token. Solana is a lot different from Ethereum in how data is stored and how contracts/programs are run.

Thanks a bunch for looking into this as I too am having the same challenge.

You got it! I’m almost finished. Should see a PR from me in the coming week.

This week has been pretty chaotic but I found some free time to make some more progress today. Doing some cleanup and playing with animations (thanks @stegaBOB). Should have a PR out this week.

image

Looks great already! Looking forward to seeing what you have baking in the oven 😃. NFT metadata on the explorer has definitely been a much needed feature! Glad to see it being added.

Would this also show the image on the explorer, or just point to where that image can be seen?

Both. It’ll show the NFT asset (animation, video, image, etc) and provide an “original link” to the asset itself.

As of right now, the Metaplex standard doesn’t explicitly name HTML files as supported via the animation_url field. However, they have publicly stated in the past how they would like to implement something like this in the future, and that their animation_url parameter is what would enable this. If an HTML file is provided in the animation_url field, how feasible would it be to display this in an iframe (using proper sandboxing of course). And if this isn’t something that would be implemented, would the explorer fallback to the image field, or just break entirely? I’m currently trying to implement support for HTML files into the Metaplex storefront frontend and I’d be interested in whether or not something like this could be done with the official explorer as well.

I have minted a token in the main net using metaplex and included the data, but the image logo does not appear. I assume the path to the logo is supposed to be in the json as per metadata. Would appreciate any feedback in how to include this logo.

https://explorer.solana.com/address/HjPdTzj7qWeyXrM1sJRGiGRiDPZGMCsbpJsxVF5hZdtF

The metadata uri for that NFT is http: instead of https: and so the explorer will not display it

@stegaBOB , Using Metaplex to create metadata, the metadata info can show up in the Phantom wallet very well, I’m just curious how this wallet fectches these metadata? When the Phantom wallet is opened, it should only know my wallet address, how does this Phantom wallet fetch all the NFTs metadata by taking my wallet address as the starting point?

My guesses: A: It does it all from the chain. B: It is using some off-chain storage.

But, none of them I really figured out, by looking into the contract program or trying on all kinds of relations between addresses

Redirect these questions to the Metaplex Discord channel . Lets keep things on topic, please.

@pcarvalho75 please create a new issue rather than commenting here, thanks!

@jstarry close this guy.

For the standard implementation of NFTs on Solana, there is a program that stores some on chain data, including a URI. In roederw’s code, along with Metaplex’s implementation, it would read that program from the blockchain and decode it into a readable format, and then it would retrieve the data (be it on-chain data or from the URI) to be displayed on the Solana explorer. You can read about the metadata standard here: https://docs.metaplex.com/nft-standard#huge-thanks-to-solflare-for-putting-this-together. As of now, while my HTML animation implementation was merged, it is not yet reflected in those docs.

Awesome, thanks @stegaBOB! I’ll take a look later tonight. Once it gets pulled in I will be sure to leverage it in the Explorer.

As a matter of fact, I just created a new PR that implements what I was referring to with Metaplex. https://github.com/metaplex-foundation/metaplex/pull/395

Feel free to assign over me to @jstarry