Explanation of URI (Metadata structure)
A URI (Uniform Resource Identifier) is a unique identifier used for identifying and locating resources on the internet. In the context of blockchain tokens, URI is often employed to access metadata associated with a specific token. For example, the URL for an image, description, owner information, etc.
In this documentation, as an example, we will frequently refer to Meta assets utilized in the game Degen Youki to provide you with the most comprehensive understanding of the situation.
How to Retrieve URI Data?
To retrieve the URI data for a specific token, simply use the uri(uint256 id)
function available in the smart contract that implements the IERC1155MetadataURI interface. This function returns the URI address for a given token identifier.
Our metadata is inspired by the Enji metadata standard. To learn more about the Enji standard, click on the link.
Smart Contract: https://bscscan.com/address/0xa293d68684be29540838dc8a0222de0c43c6b5b4#code
This method on the Contract is Responsible for returning the token URI
You can also check the URI address directly by accessing the token contract. Below are the steps on how you can obtain such data from our platform:
Go to the blockchain explorer: https://bscscan.com/address/0xa293d68684be29540838dc8a0222de0c43c6b5b4#readContract
Scroll down the page to method "17" titled "uri"
Click on it, to expand the section
Enter the token ID in the input and click the 'Query' button. For example, you can enter ID: 1182
As a response, you will receive a link to the URI of the specific token
What is URI Data Used For?
URI data is crucial as it enables access to metadata associated with a specific token, which can be significant for users, trading platforms, exchanges, and applications that want to display information about the token.
How Can Token URI Benefit You?
Resource Preview:
Allows players to preview details of a resource, such as description, preview image, technical data, etc., before purchasing.
Game Integrations:
When creating a game, you can use URI data to integrate NFT resources directly into the game, enabling players to use unique characters, items, etc.
Resale and Trading:
URI data is crucial for NFT resale platforms, providing the necessary information to present the resource on an NFT trading platform.
In-Game Metadata Utilization:
Games can dynamically use resource metadata to customize game mechanics based on unique features owned by players.
Collections and Statistics:
URI data enables the creation of in-game NFT collections, tracking statistics of individual resources, and rewarding players for their collections.
Properties
Properties in our application play a significant role, extending beyond the visual aspect to provide real value in the game. Here's why using properties is essential in the context of real value in the game:
In the case of the discussed game Degen Youki: Properties allow precise specification of functions for each item. For example, a specific item might provide additional life or increase points earned for collecting items during gameplay. This is crucial for users who want to consciously choose items to increase their advantage in the game.
For the discussed asset, properties provide access to a unique map.
Another example of the Properties Parameters used
Check the Asset to see it live: New Era - Green Sword
Using properties not only enhances the visual appeal of items but also introduces a strategic, economic, and functional dimension to the game world, which is crucial for user satisfaction and engagement. The provided example is just one of many possible options.
Last updated