close
The Wayback Machine - https://web.archive.org/web/20210930112810/https://github.com/solana-labs/solana/issues/19516
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explorer doesn't display metadata for metaplex NFT's #19516

Open
jstarry opened this issue Aug 31, 2021 · 21 comments
Open

Explorer doesn't display metadata for metaplex NFT's #19516

jstarry opened this issue Aug 31, 2021 · 21 comments

Comments

@jstarry
Copy link
Member

@jstarry jstarry commented Aug 31, 2021

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
@jstarry jstarry added this to To do in Explorer Improvements via automation Aug 31, 2021
@roederw
Copy link

@roederw roederw commented Sep 5, 2021

Feel free to assign over me to @jstarry

@Angel-MTCO
Copy link

@Angel-MTCO Angel-MTCO commented Sep 9, 2021

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

@roederw
Copy link

@roederw roederw commented Sep 9, 2021

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.

@stegaBOB
Copy link

@stegaBOB stegaBOB commented Sep 12, 2021

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

@roederw
Copy link

@roederw roederw commented Sep 12, 2021

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 [if we can], video, image, etc) and provide an "original link" to the asset itself.

@stegaBOB
Copy link

@stegaBOB stegaBOB commented Sep 12, 2021

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.

@stegaBOB
Copy link

@stegaBOB stegaBOB commented Sep 14, 2021

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

@roederw
Copy link

@roederw roederw commented Sep 14, 2021

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.

@roederw
Copy link

@roederw roederw commented Sep 16, 2021

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

@stegaBOB
Copy link

@stegaBOB stegaBOB commented Sep 16, 2021

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.

@liudonghao
Copy link

@liudonghao liudonghao commented Sep 16, 2021

How does Phantom fetch NFT's metadata from Solana blockchain?

@liudonghao
Copy link

@liudonghao liudonghao commented Sep 16, 2021

How to make NFT metadata info display on the explorer? like the above.

@liudonghao
Copy link

@liudonghao liudonghao commented Sep 16, 2021

@stegaBOB
Copy link

@stegaBOB stegaBOB commented Sep 16, 2021

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.

@liudonghao
Copy link

@liudonghao liudonghao commented Sep 16, 2021

@stegaBOB , thank you very much, I tried the mint address '7C4cjqUxd38cGsemdxjyNcTxfdFeh1CCMELy4ih5ckYg' in the screenshot on the explorer, but didn't see the metadata info, neither devnet nor mainnet. I guess these two networks are not really updated yet. No matter what I tuned on creating metadata using Metaplex, the metadata just doesn't show up like the screenshot.

You mean Phantom fetch the metadata by talking to the metaplex program 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s', right?

@stegaBOB
Copy link

@stegaBOB stegaBOB commented Sep 16, 2021

Regardless of where you look, you won't see complete metadata. You would have to decode it first. I reccomend looking into the documentation for the metaplex spec. It's listed in the proposed solutions in the initial issue.

@liudonghao
Copy link

@liudonghao liudonghao commented Sep 16, 2021

@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

@stegaBOB
Copy link

@stegaBOB stegaBOB commented Sep 16, 2021

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.

@roederw
Copy link

@roederw roederw commented Sep 16, 2021

@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.

@roederw
Copy link

@roederw roederw commented Sep 19, 2021

I have a pull request out now: #20009

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
@jstarry @roederw @liudonghao @Angel-MTCO @stegaBOB and others