Inventory Service - How to read and write dynamic metadata

An example of this can be found in the Emergence Sample Project, check it out here!

The entire dynamic metadata system is subject to significant changes.

Dynamic metadata is a system where you can add additional data to ERC721/1155 tokens which can be read/written to by other Emergence games / experiences.

Reading Dynamic Metadata

Dynamic Metadata can be found in the EmergenceInventoryItemMeta struct. These are usually found from a EmergenceInventoryItem struct, which can be got from InventoryByOwner, for example.

Writing Dynamic Metadata

If you know the blockchain, contract number and token ID you can write dynamic metadata to any ERC721 or ERC1155 using a "WriteDynamicMetadata" node. "Metadata" can be any string.

Currently, the authorization header is always 0iKoO1V2ZG98fPETreioOyEireDTYwby.

Example: setting a NFT's inventory category

Using the "Write Dynamic Metadata" node, set the metadata {"Categories": ["Clothing", "Headwear"]}. Your NFT will now show up as clothing in the inventory categories (and as "headwear" when more categories are implemented)!

Last updated