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

Image uploader #4

Open
the-frey opened this issue Dec 7, 2021 · 10 comments
Open

Image uploader #4

the-frey opened this issue Dec 7, 2021 · 10 comments
Assignees
Labels
help wanted Extra attention is needed priority

Comments

@the-frey
Copy link
Contributor

the-frey commented Dec 7, 2021

For attaching an image to a token on mint (or I think in meta - there may be a field in there)

@the-frey the-frey modified the milestone: MVP Dec 8, 2021
@the-frey
Copy link
Contributor Author

or could just have small svgs and limit size a la https://github.com/CosmWasm/cw-plus/blob/main/packages/cw20/src/logo.rs

@the-frey
Copy link
Contributor Author

@the-frey
Copy link
Contributor Author

Others seem to be using https://slate.host/ for the uploading component of this (cflare just serves)

@the-frey the-frey added the help wanted Extra attention is needed label Dec 15, 2021
@the-frey
Copy link
Contributor Author

Beginning to think quite strongly that we should store on-chain SVGs as is supported by CW20 - could up the size to 10kb though? https://j.mirror.xyz/w8wSN3JLHK1_oNoi2lLF-67w60Wt1WypS_kIbmsYSfE

@the-frey
Copy link
Contributor Author

The reason on-chain SVGs matter is not why most people think. It's not just that they live on-chain with no dependencies, or that they have stronger guarantees of being around for a long time.

On-chain SVGs matter because an on-chain render function makes an NFT dynamic. Not in the sense that the asset itself contains animations, but rather - an on-chain render function can make the same item appear differently over time. The same way javascript turned websites from read-only documents into interactive ones, on-chain SVGs turn NFTs from static assets into living digital objects.

An item whose render function generates an SVG each time it's called doesn't need to return the same thing every time. The NFT itself can read any on-chain data and use it to decide how it should appear to its owner in the moment. It can look up relevant state changes, user actions, and external activity, and then display them either as literal information or as abstract visual characteristics. This allows the NFT to provide much stronger affordances to its holder as to its functional purpose.

This kind of dynamicism is really what makes on-chain SVGs so important. They take seriously the idea that NFTs are not just static media, but living digital objects we can use for all kinds of things online. As more people learn to build digital objects in this way, we'll accelerate towards a world where our understanding of NFTs today looks as outdated as the web before javascript.

@the-frey
Copy link
Contributor Author

Okay, so this needs testing with: envoylabs/whoami#27

@the-frey
Copy link
Contributor Author

Update:

  • SVGs up to 10kb should be sendable as embedded data
  • URis (e.g. IPFS) should be supported (still)

For MVP possibly okay to say that users should pin their own stuff, but no doubt we will get complaints.

Think first pass is probably to get IPFS URIs working

@the-frey
Copy link
Contributor Author

For MVP probably sufficient to literally have a link to something like https://app.pinata.cloud and say to provide the IPFS link

@the-frey the-frey self-assigned this Jan 11, 2022
@the-frey
Copy link
Contributor Author

Screenshot 2022-01-12 at 16 53 29

Got a screen for it with all the right hooks but still a bit borked until we wire up all the IPFS goodness. Pinata likely requires a backend so maybe a Next serverless function running the pinata stuff?

@the-frey
Copy link
Contributor Author

This is working for IPFS running on a desktop. Sadly will likely still have to go to pinata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed priority
Projects
None yet
Development

No branches or pull requests

1 participant