nftree
nftree copied to clipboard
Metadata
Thank you for this amazing repository Jude!
My questions are hopefully rather simple -
- When uploading the NFT and metadata to IPFS or wherever they will be stored, how do we ensure that NFTree metadata captures what is stored and how does this get accounted for when constructing the NFTree?
- Is there a way to automate or pre-configure ticket prices with rarity?
Thank you, Jake
When uploading the NFT and metadata to IPFS or wherever they will be stored, how do we ensure that NFTree metadata captures what is stored and how does this get accounted for when constructing the NFTree?
The Merkle root of the NFTree commits to a set of NFT descriptors (https://github.com/jcnelson/nftree#nft-descriptors). The descriptors contain the NFT hash and its size. You'd need to store both the descriptors (these are the *.desc
files) and the NFTs themselves to wherever you're storing them. The sample contract assumes that the NFT data will be available at https://your-server-address/some-prefix/${nft_hash}
, but you're of course free to change that.
The NFT descriptors are made available out-of-band, i.e. as part of the NFT listing. The set of them are committed to by the NFTree Merkle root, and the tool nftree.js
creates a Merkle proof (the *.proof
files) for each one so you can authenticate them. Both the descriptors and proofs are needed in order to call some contract functions.
Is there a way to automate or pre-configure ticket prices with rarity?
The nftree.js
program reads ticket information from a tickets.csv
file in each directory that contains your NFT data. How that file gets generated is out of scope for this project, but presumably you could write a separate program that generates it based on your rarity specifications. You may also want to adjust how many tickets are minted per block, since in the sample code it's just a constant (but it could be a function of the block height or something, if you want tickets to get rarer over time).
Is there a way to automate or pre-configure ticket prices with rarity?
To speak more to this, the reason that nftree.js
takes the ticket information as a CSV file is to make it easy to do something like use Excel or some other spreadsheet program to control NFT rarity without having to learn a new programming language.