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

support on-chain metadata as strong instead of erroring #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

remnynt
Copy link

@remnynt remnynt commented Oct 28, 2021

Some smart contracts use base64 encoded JSON metadata to protect against external dependencies.

We should support NFT projects that aim to provide value through immutable on-chain art and NFTs.

Using the vibes.art contract, located at:
0x6c7C97CaFf156473F6C9836522AE6e1d6448Abe7

And looking up token 1, the result is now:
Screen Shot 2021-10-27 at 10 27 45 PM

@vercel
Copy link

vercel bot commented Oct 28, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/theweaver19/checkmynft/6L6iyfqsuPAt2fCBgP3YvMA3nrJr
✅ Preview: Failed

@remnynt
Copy link
Author

remnynt commented Oct 28, 2021

This fixes the issue I posted earlier today:
#13

@niccolopetti
Copy link

Hi @remnynt I know it's an old PR but I was thinking of making another PR where #17 and #14 could be merged together to have something more complete, about this PR I'm not sure if cases like vibes.art should be classified as Strong, because even though metadata are stored onchain, in this case a part of it is still stored in a centralized way:

if we take a look at the metadata for id 1 we have:

{"name": "vibe #1", "description": "vibes is a generative art collection, randomly created and stored on chain. each token is an interactive html page that allows you to render your vibe at any size. vibes make their color palette available on chain, so feel free to carry your colors with you on your adventures.", "image": "https://vibes.art/vibes/jpg/1.jpg", "attributes": [{ "trait_type": "element", "value": "light" }, { "trait_type": "palette", "value": "sylvan" }, { "trait_type": "colors", "value": "5" }, { "trait_type": "style", "value": "smooth" }, { "trait_type": "gravity", "value": "low" }, { "trait_type": "grain", "value": "medium" }, { "trait_type": "display", "value": "mirroredUpsideDown" }]}

and so we can see how the image field is still stored in a centralized way on https://vibes.art/vibes/jpg/1.jpg . I think there should be a distinction between a fully decentralized solution and a partially decentralized one.

@remnynt
Copy link
Author

remnynt commented Jun 20, 2022

hi @niccolopetti - thank you so much for the response!

it's a challenging problem to automate solving for on-chain-ness, since there are so many creators working around the current implementations of centralized marketplaces.

i've recently been following https://www.0xchain.art/

their solution has been a sort of curation of projects. this is not ideal since it's not automated, but i do appreciate the lens of what constitutes a decentralized ERC-721 project.

Screen Shot 2022-06-19 at 8 16 07 PM

using vibes as an example:

the vibes output is on-chain HTML, combining a blockhash captured at time of mint with a rendering script (written in raw JavaScript, no dependencies) and stored in a constant within the contract (SSTORE).

in other words, the artwork is a generative computer program that outputs art "jpegs" at any size. since that program is stored 100% on Ethereum, and can be retrieved via tokenScript and run in any web browser to reproduce visual representations of itself, it is both decentralized and resilient to decay or loss.

Screen Shot 2022-06-19 at 8 20 22 PM

if someone produces outputs from the program, and caches them somewhere else on the internet, that does not make the on-chain artwork less decentralized.

this approach is common amongst developers seeking to create with HTML / JS on-chain, since marketplaces like OpenSea do not support direct from on-chain HTML (though i've been told it's on their roadmap). the only solution for now to offer the optimal UX is to cache outputs off-chain, but we do include on-chain toggles for when marketplaces better support direct from on-chain HTML.

another example, one of my personal favorites, is Terraforms by Mathcastles. they also cache their on-chain outputs on their private web servers for the time being, and point to them from the contract tokenURI, but what they've done on-chain is truly remarkable, and has no vector or risk for centralization in my review.

with regards to the PR, i appreciate your time in reading it along with my thoughts here - please feel free to close or merge; it's my hope that the our interaction is useful in some small way. cheers!

@niccolopetti
Copy link

Hi @remnynt, thank you so much for your response!
I didn't know Terraforms AND 0xchain.art and was fascinated by the examples of onchain art they provide!

I admit I didn't read carefully through the code of vibes.art but just focused more on what was returned by the tokenURI.
Focusing only on that I think checkmynft should treat that cases like that (onchain metadata with links to offchain resources on centralized servers) as a special case (currently ending up in a false negative for vibes.art, but if we want to treat NFTs as a blackbox I can't think of a way to handle cases like vibes.art unless a new EIP is proposed, which might not be a bad idea though).

If we prefer to accept false positives over false negatives then also the current implementation is fine.
I recognize that given current limitations of various marketplaces the solution you found is probably the best and is surely decentralized and is ready to be fully decentralized without touching offchain servers once there will be support from 3rd parties.

Thank you again for the response which brought me to discover useful resources, and with regards to the PR I am just a contributor like you not a mantainer so I have no power to merge or close the PR, I merged it on my fork niccolopetti#1 (comment) though because I needed it together with support for other evm chains, and through vercel I now have that hosted without needing to set up a server for it through #17 (comment)
If it can be useful to others they can use the result of both PRs through that until they eventually get merged by the mantainer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants