Advanced Minting

Advanced Minting Walkthrough

Initial setup and upload

1. Organize file and select IPFS provider

  • 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.

2. Upload file to IPFS provider

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.

Using Piñata

Using IPFS Desktop

3. Create NFT Metadata file

  • Create a .json file using a text editor such as Notepad.

    Example: metadata.json

metadata.json

Within this metadata.json file, copy the following – note that it is case sensitive:

{

"description": "Description of your NFT goes here",

"image": "ipfs://CID of the file goes here",

"name": "Name of the NFT",

"royalty_percentage": integer between 0 and 10

}

Example:

{

"description": "Loopring Logo",

"image": "ipfs://QmZBf3Aq1LGNRLGqad2dxojwTA7ddgrMpsHqJCi6jeK6Vh",

"name": "Logo",

"royalty_percentage": 10

}

JSON Legend:

description: A text string containing a description of your NFT

image: A text string containing an image to display for your NFT.

name: A text string containing the name or title of your NFT.

royalty_percentage: An integer from 0 - 10 describing the amount of royalty to be collected by the creator each time the NFT is sold.

For example, if a creator mints an NFT with a royalty percentage of 10, the creator will receive 10% of the proceeds of every sale. Royalties are distributed to creators at the end of each month. If an NFT is minted with a royalty percentage of 0, no royalties will be collected.

Save the .json file.

If you wish to manually specify an IPFS CID of the NFT's collection_metadata file, proceed to 4.

If you will select a collection in the mint GUI, skip to 5.

4. Manual collection_metadata specification

  • 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.

5. Upload NFT Metadata file

  • Similarly, as the NFT file was uploaded above, upload the NFT metadata .json file to Pinata or IPFS Desktop.

If NFT's metadata does not contain a "collection_metadata" key/value pair, proceed to Method A.

If NFT's metadata does contain a "collection_metadata" key/value pair, proceed to Method B. If an NFT is not a member of any collection, proceed to Method C.

Last updated