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

[FEATURE] Randomised Generic Metadata Images #18

Closed
thepeanutgalleryandco opened this issue Feb 2, 2022 · 1 comment · Fixed by #21
Closed

[FEATURE] Randomised Generic Metadata Images #18

thepeanutgalleryandco opened this issue Feb 2, 2022 · 1 comment · Fixed by #21
Assignees
Labels
enhancement New feature or request

Comments

@thepeanutgalleryandco
Copy link
Owner

Summary

Add the ability to provide a list of ipfs urls that can be used in the generation of generic metadata.

Basic example

Provide an array of IPFS URLs in the nft_details.js configuration file.

['https://ipfs.io/ipfs/bafkreigye3xz72jp2eskhrgq4blhh5ec3wwbj4isqejv4a6mdhqzcuvquy', 'https://ipfs.io/ipfs/bafkreigye3xz72jp2eskhrgq4blhh5ec3wwbj4isqejv4a6mdhqzcuvqu2', 'https://ipfs.io/ipfs/bafkreigye3xz72jp2eskhrgq4blhh5ec3wwbj4isqejv4a6mdhqzcuvqu3'] ;

Modify the "update_json_to_generic_meta.js" script to look at this URL list and then randomly choose one of the URLs and assign it to the generic JSON metadata.

Motivation

This will allow users to have different generic metadata images instead of a single generic metadata image before their reveal.

@thepeanutgalleryandco thepeanutgalleryandco added the enhancement New feature or request label Feb 2, 2022
@thepeanutgalleryandco thepeanutgalleryandco self-assigned this Feb 2, 2022
@thepeanutgalleryandco
Copy link
Owner Author

Updated the constants/nft_details.js genericURL field from a single key:value field to a key:array field. The updated field name is now called genericURLs.
"genericURLs: ["GENERIC_URL_#1_HERE", "GENERIC_URL_#2_HERE", "GENERIC_URL_XXX_HERE"]"

Users can now simply add a list of IPFS URLs of the images that they have manually uploaded, to the genericURLs array and when the "update_json_to_generic_meta.js" script is used, it will randomly pick one of the URLs in this array and assign it to the edition. If the user only wants a single generic image, then they can simply put the single url in there.

For example:

  • 1 generic URL - genericURLs: ["https://ipfs.io/ipfs/bafybeifipag6zgekhcczypcsv4qqvoul6yobw22f3ga3hetoaqinn2xova"]

  • 2 generic URLs - genericURLs: ["https://ipfs.io/ipfs/bafybeifipag6zgekhcczypcsv4qqvoul6yobw22f3ga3hetoaqinn2xova", "https://ipfs.io/ipfs/bafkreic7glqatx6lzay2hl2xn5n5p75f4njobiza5ianuryvjhgauckh2m"]

  • 3 generic URLs - genericURLs: ["https://ipfs.io/ipfs/bafybeifipag6zgekhcczypcsv4qqvoul6yobw22f3ga3hetoaqinn2xova", "https://ipfs.io/ipfs/bafkreic7glqatx6lzay2hl2xn5n5p75f4njobiza5ianuryvjhgauckh2m", "https://ipfs.io/ipfs/bafkreihabbil5ueqrn4fvfvoywmzrvk7jgcioza7svulj4vfxphrkuzgfu"]

thepeanutgalleryandco pushed a commit that referenced this issue Feb 4, 2022
Completed and tested work for the below feature.

Users can now make use of a list of generic images that will randomly be assigned to their generic metadata when creating Reveal collections.

#18
@thepeanutgalleryandco thepeanutgalleryandco linked a pull request Feb 4, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

1 participant