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

AIP: Canonical Image Templates for Token Collections #431

Closed
wants to merge 14 commits into from

Conversation

SaulDope
Copy link

Our team at mirage protocol is building a web2 server to generate dynamic images for Tokens based on their underlying data. I started thinking on how we could do it purely on-chain and came up with this.

The idea is still new and I'm very open to feedback. Looking forward to discussing this.

@SaulDope SaulDope changed the title AIP Proposal: Canonical Image Templates for Token Collections AIP: Canonical Image Templates for Token Collections May 27, 2024
@SaulDope
Copy link
Author

SaulDope commented Jun 1, 2024

Here's some examples of others who've attempted similar:

OpenSea

They allow users to upload an entire SVG as image_data inside NFT metadata, but they say they don't recommend this. This approach definitely works but quickly brings up storage concerns as there would be one image stored on-chain per NFT.

Fully On-Chain Art

This organization promotes EVM based fully on-chain art. ERC-721 has more flexibility in the on-chain metadata, allowing for inline SVGs. They do a lot more of the SVG building on-chain than I think is needed, but one idea I really appreciated was putting a pure function to render the SVG on-chain. This helps unify client side approaches. Pure functions in EVM don't require knowledge of on-chain state, so they can be fully ported to the browser to avoid reads/view function calls to node operators.

The core idea of the approach in Fully On-Chain has similarities to my proposal above. However the implementation is a lot more work for developers, primarily because they're (to some degree) trying to force it into the standard. Parsing SVGs raw in Move is something I am hesitant about which is why my proposal did not include it. However it should at least be considered, so I'll continue to think on it.

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