<aside> 🔑 Before reading this article, please make sure you have read the following articles
</aside>
Catalog is a prerequisite for realizing composable NFT. In the following instructions, "Blueprint = Catalog".
Click "Create" in header, and then click "Create CATALOG" on the new page.
In general, you can directly click "Create" to quickly create a Catalog and modify it later:
The above two data can be modified later, so there is no need to worry about filling in mistakes. In the instructions, we directly configure the Metadata of the Catalog (we use the Catalog metadata format recommended by Lightm, which is why the Preview displays LIGHTM_CATALOG is detected to be open
).
After the Catalog is created, copy the Catalog address to the search box, or find the Catalog you created through "My NFT".
Search
My NFT
We will use this Catalog as a Lightm Logo blueprint, first, click "Add Parts”
We will add 3 Part:
Next, we explain each attribute of a single Part:
FIXED
: mediaUri
in Metadata will be the basis for rendering by Lightm rendererSLOT
: Metadata is used to store Slot description, mediaUri
is invalidFIXED
,one is SLOT
SLOT
, the user can configure "Equippable Addresses", which essentially refers to the slot whitelist, indicating which NFTs under the Collection can be equipped to the SLOTClick "Add", wait for a while (you need to wait for the off-chain Squid Indexer to synchronize the latest data), click the refresh button, and you can see the newly added Part
Then we set the 2 SLOTs as Public, allowing any NFT under Collection to be equipped to these 2 slots. (Note: Please configure according to your own needs. In order to simplify the explanation process, a more convenient solution is adopted here)
Enter the Collection detail page where CatalogRelatedAsset needs to be added, click "Add Asset Entry" and check "Is Catalog Related Asset", there will be 4 items to fillin:
The first thing is to instantiate the CatalogRelatedAsset with the blueprint, only the CatalogRelatedAsset instantiated from the blueprint has the ability to equip or become an equipment item. (Note: We can instantiate a CatalogRelatedAsset that has both features, so that we can achieve nested equipment, but this attempt is not made in this example)
First, we instantiate an Asset with equip capabilities. After entering the address of the blueprint, select all Parts in the blueprint.
Then we instantiate 2 equipment item Assets one after another, pointing to 2 slots respectively.
We Mint 3 empty NFTs in advance. Then we add Asset#1 to NFT#1, Asset#2 to NFT#2, and Asset#3 to NFT#3.
Send NFT#2 and NFT#3 to NFT#1, and let NFT#1 accept them.
Then, turn on "Equip Mode". Equip NFT#2 and NFT#3 under the currently selected CatalogRelatedAsset of NFT#1, and we can preview the current equipment effect in real time. When you are sure everything is ready, click "Confirm".
Success.