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

Proposed Solution
- Use the metaplex token-metadata spec to fetch metadata for NFT’s
- Use
buffer-layoutfor decoding the fetched metadata and retrieve the manifest URI - 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)
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.
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.
You got it! I’m almost finished. Should see a PR from me in the coming week.
I have a pull request out now: https://github.com/solana-labs/solana/pull/20009
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.
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.
The metadata uri for that NFT is
http:instead ofhttps:and so the explorer will not display itRedirect 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