Advanced Minting
Advanced Minting Walkthrough
Last updated
Advanced Minting Walkthrough
Last updated
Create a folder on your PC and give it a name.
Within that folder, insert the file you want to mint. Example: Logo.png
Create an account on Pinata or download IPFS Desktop.
Before uploading to IPFS, please be aware there are 2 types of CID: CIDv0 (begins with Qm) and CIDv1 (begins with b).
Currently, Loopring supports CIDv0 (begins with Qm) as will be seen in the examples, as well as certain CIDv1 (begins with b) that can be converted to CIDv0 format. Only CIDv1 that have the following properties can be converted to CIDv0, and thus can be supported in Loopring NFT mint.
multibase = base58btc multicodec = dag-pb multihash-algorithm = sha2-256 multihash-length = 32 (32 bytes, equivalent to 256 bits)
If you want to upload content to IPFS and generate CID for usage in the Advanced Mint flow, please ensure the CID can be supported by Loopring as described above. You can check CID properties using this tool. In case you do not know how to generate a CID that is supported by Loopring, please use Pinata which uses CIDv0 by default. Upload the file you want to mint to Pinata or IPFS Desktop. Do not upload the entire folder.
Create a .json file using a text editor such as Notepad.
Example: metadata.json
Save the .json file.
Create a collection_metadata json file conforming to the specification found in collection implementation on Loopring.
Upload the collection_metadata json file to Pinata or IPFS Desktop in the same manner as above. Note the CID.
Add an additional key/value pair to the NFT metadata json file whose key is "collection_metadata
" and value is the IPFS CID for the collection's metadata file.
Example:
{
"description": "Loopring Logo",
"image": "ipfs://QmZBf3Aq1LGNRLGqad2dxojwTA7ddgrMpsHqJCi6jeK6Vh",
"name": "Logo", "collection_metadata": "ipfs://QmbpBgKipbPbiLr3D2ykfiKv6XNerLSmWtoWECnqkStSs4",
"royalty_percentage": 10
}
JSON Legend: collection_metadata: A text string containing an IPFS CID which points to a collection metadata file.
Similarly, as the NFT file was uploaded above, upload the NFT metadata .json file to Pinata or IPFS Desktop.