Mirror Crafts — A new way of combining NFTs

Hive Digital
6 min readAug 14, 2023

--

Mirror Crafts, what are they exactly? Take the traditional way of crafting NFTs on NFTHive: You select a number of ingredients, decide whether they ought to be burned, returned to the crafter, deposited into a receiver wallet or locked into the newly crafted NFT. The outcome is usually one, or multiple templates that need to be created beforehand.

Mirror Crafts on the other hand, reflect the traits of their ingredients and generate completely new outcome NFTs that are determined by the values of the ingredient traits. Similar to PFP drops, the images are generated from multiple layers. But unlike PFPs, the outcomes aren’t (all) random, they’re (mostly) based on the values of the NFTs that are put in.

Imagine a PFP with different hats and another PFP with different necklaces, what if you combine them together? You’re now able to define a new PFP that wears the hat of the first ingredient and the necklace of the second ingredient. But in order for them to fit onto the new PFP, you don’t simply take the layers of the old drops, you create new layers for each possible attribute. If the ingredient wears a brown hat, give the outcome a brown hat as well, but one that fits the new PFPs head.
You can also take ingredients and create something entirely new. Eg, if the second ingredient has a ruby necklace, give the outcome a red shining aura. Therefore it’s possible to rename input traits into different output traits: Necklace: Ruby → Aura: Red.

Let’s have a detailed look at how to set up a mirror craft:

At first, make sure nfthivecraft has permissions to mint NFTs on behalf of your collection. For this, you will be prompted to grant permission. After this, enter a display name for the recipe and link or upload a preview image.

You can add a crafting animation that will play everytime users craft an NFT.

Similar to PFP drops, the newly created Assets need names. We’re also going by numbering them here. Enter a name pattern here like Astral Ape and the NFTs will be name Astral Ape 001, Astral Ape 002, Astral Ape 003 etc.

The most important part is adding sources to your recipe. Sources can be old PFP drops. In that case, you can enter the Drop IDs and it will initialize the possible attributes automatically. They will be initialized with the original layers, so make sure to replace those with new outcome layers.
Note! This only works when Drops are still live and have not been deleted!

If the drops are live, you can navigate to the drop page and find the Drop ID in the URL:

If drops have been deleted, you can still import old drop data from the createpfp transaction that was signed to create the particular PFP drop. For that, navigate to https://waxblock.io/account/nfthivedrops and filter the transactions for createpfp:

Once filtered, find the correct TX ID of the drop you want to import. Click on the transaction and copy the transaction hash:

After you imported Drop Data, you can choose which traits are going to make it into the crafting recipe:

You also have to enter the new layers which define the order in which they will be rendered into the outcome image. Here you can also give the outcome attributes new names. Enter “None” if you don’t want there to be any outcome attribute name, but still want to render new layers.
At the bottom of each ingredient, you can also choose the crafting type. The type determine what happens to the ingredients. They can be burned, returned to the crafter immediately, sent to a receiver wallet, locked into the new NFT until it’s destroyed, or be locked in the contract for x amount of time.

When you click on Edit Layer Images, you can change the outcome value for each possible input value as well as replace the outcome image. This way you’re able to change the attribute name as well as the value. In this example a Silver Background changes to Traiton Leaves.

You can also a schema source. Here you can pick any collection and any schema from that collection. You can select the attributes that are defined on the schema level and add possible outcome layers. Unlike PFP Drops however, schema sources will not be initialized with values and layers. You will have to enter the attribute values yourself and decide which outcome layers they create. It is important that you enter correct / existing values. Otherwise your recipe will not generate the outcomes you expect. Only equally spelled values can be matched in a craft.

Finally there’s an option to add attributes. These attributes work similarly to PFP attributes. They will be additional layers that are added randomly to a crafting outcome according to the percentages that you define for them.

After you’re done with the setup, you only have to enter common information like a Recipe Description, Start and End Time between which the crafting can take place, a maximum amount of crafts and an account limit, which rules how many times a specific wallet can craft this recipe. Once you’re done and bought RAM for minting NFTs.

Once you’re done, users can find the recipe in the crafting section on NFTHive: https://nfthive.io/crafts
After they navigate to the recipe, they can pick matching ingredients and start crafting:

When they click Craft, the ingredients will be used an a WAX RNG request calculates the random result on chain. The result is written onto the chain and then being picked up by the renderer and minter. This may take a while, depending on how many rendering jobs are currently live. The user will therefore get a preview of their outcome, which is based on the recipe layers:

--

--