Comments (9)
This isn't going to be straightforward at all it seems, unfortunately. Some odd notes:
- Our Node CID binary and the inspector at https://cid.ipfs.io/ seem to give me identical CIDv0/1 pairs.
- nft.storage gives me a completely different CIDv1 after upload, but the image appears to be unchanged. When I download the image from nft.storage then precalc the CIDv1, it gives me what I got locally which is diff than what nft.storage outputs...
The image I'm calculating was saved from nft.storage. The filename is the CIDv1 from nft.storage:
$ ./docker.sh cid --cid-version=0 bafkreicgzakagjvqmryokf5r7btomn2mq7i7hfqdncrixhjqbpnjzlkave.png
QmZ7c36VW3rzeSnN3gMGuGKZQYKCcMVCMfB6x4kRYS5PKn
$ ./docker.sh cid --cid-version=1 bafkreicgzakagjvqmryokf5r7btomn2mq7i7hfqdncrixhjqbpnjzlkave.png
bafybeifadd55nu2s5yv3ap5uztklzcsl34pfc4xs2qfif2robsyccazjne
This is what https://cid.ipfs.io/ shows for the CIDv0 from above:
I'm trying to find a way to convert the CIDv1 I get from nft.storage to CIDv0 just to see if any IPFS gateways will pull the file from its CIDv0. This post has some IPFS commands, but they don't seem to work for me and possibly others.
For nft.storage, though, we could upload using their API, which would return a CIDv1 to then use in the metadata. Then we generate CIDs as normal from the metadatas. If my test with the CIDv1 > CIDv0 is successful, then we could always upload everything to nft.storage, then convert the metadata CIDv1s to CIDv0s for minting on Loopring.
from loopygen.
Unfortunately the test failed. I don't really know what the deal is with nft.storage giving me a diff CIDv1 than the other tools yet.
from loopygen.
Interestingly, if I use the IPFS CAR maker, my CIDv1s match
CAR as generated from IPFS:
CAR after upload to nft.storage:
Perhaps we need to look into generating the Content Addressable Archives for the user in general.
from loopygen.
Hmmmmm. So I generated a CIDv0 from the CAR file I downloaded, and when I pasted that CIDv0 into my browser at Loopring's gateway, it actually started downloading the CAR file that I had uploaded to nft.storage.
I need to do some more testing from scratch with images that are not already on IPFS and see what happens.
from loopygen.
Got the answer, looks like we'd have to go the CAR file route if we decided to try and do something with this ticket:
https://discord.com/channels/806902334369824788/831502708082081822/972604965778505788
from loopygen.
Started working on some parts of this so we're ready for the future:
Forked the ipfs repo, we will likely need to add some custom options to this in the future for some of the ideas I had. Initial though was to fix the rawLeaves
option so that my output for CIDv1 is now identical to nft.storage.
sk33z3r/ipfs-only-hash@6c08495
Then I added to the dev/react-ui
PR just because this is about to release and these are fairly minor changes so far.
New output from cid --cid-version=1
for the same file I was having issues with before:
$ ./docker.sh cid --cid-version=0 bafkreicgzakagjvqmryokf5r7btomn2mq7i7hfqdncrixhjqbpnjzlkave.png
QmZ7c36VW3rzeSnN3gMGuGKZQYKCcMVCMfB6x4kRYS5PKn
$ ./docker.sh cid --cid-version=1 bafkreicgzakagjvqmryokf5r7btomn2mq7i7hfqdncrixhjqbpnjzlkave.png
bafkreicgzakagjvqmryokf5r7btomn2mq7i7hfqdncrixhjqbpnjzlkave
from loopygen.
Just to document the idea I had. Once a user's images and metadata are generated, we could:
- Ask for the user's nft.storage API key, upload images and thumbnails there
- Ask for the user's Pinata API key, upload metadata there
We'd put the CIDv1 for the images/thumbnails into the meta, and keep meta in Pinata and CIDv0. This way users could upload a ton of metadata using the free plan on Pinata, and never have to pay for nft.storage while enjoying the benefits of 32GB per file max size and filecoin replication.
from loopygen.
One last detail for the day on this: looks CAR files will ultimately be the way for cross-compatibility no matter the CID version used in a smart contract.
The screenshot is from this page: https://nft.storage/docs/how-to/mint-custom-metadata/
The PR link from the screenshot: nftstorage/nft.storage#991
The rawLeaves
option is the thing that is causing murkiness.
I think I will pursue this path instead, because with this we can actually archive all of the user's collection into a CAR, upload that, and then mint with the proper CIDv0 while still using CIDv1 in the metadata.
from loopygen.
Package generated collections into CAR files and upload to nft.storage
from loopygen.
Related Issues (20)
- companion: Add a "Open collections folder" button
- php: simplify maintenance for traits setup/edit pages
- Batch Mint folder of already uploaded metadata
- If a whole layer is skipped, it should still be added to the metadata
- Animated PNG
- generate: choose correct framerate for GIF compositing
- Is minting with hashlips build folder assets possible?
- [UI] Prevent creation of collection with duplicate layer names or variation names
- [transfer][mint] Add "waiting for gas to drop" feature when minting or transferring
- [transfer] Add optional quantity in wallets list for random mode
- [transfer] Optimize transfers by grouping by `to` address and `nftid`
- python: metadata generation fails without thumbnails
- ui: modal stays open when going back HOT 1
- Option to choose nftFactory address HOT 1
- Variation conditionals HOT 5
- Export Stats Button HOT 1
- MintTracker HOT 1
- Rarity Percentage doesn't handle float values
- ui: Fill variation name (if empty) with file name HOT 1
- python/ui: whole layer rarity
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loopygen.