The method of utilizing Aptos SDK

In Aptoseco-system, NFTs are not distinguished by mint id, unlike EVMs. This page is intended to help you understand Aptos' NFT structure accordingly.

This page provides an explanation of the structure of the Aptos Chain and how it is implemented within the Yours protocol, including its functionalities.

The concept of Yours Aptos NFT

Aptos introduces the concept of "collections." When identifying tokens within Aptos, they are identified by both the collection and token name. In Aptos, tokens are issued within specific collections, and each collection does not allow duplicate token names.

In Aptos tokens, there exists a concept called "property_version." You can store desired information in the "property" field in key-value format. To modify information in the "property," you use the "mutate_property" function. During this process, the "property_version" increments by 1 and is assigned. If you modify a token with an assigned "property_version," the "property_version" of that token remains unchanged.

NFT Deploy


Before minting an NFT, information about the NFT is obtained, including:

  • NFT Name

  • NFT Description

  • NFT Image

  • Benefit Information

The above NFT information is uploaded to IPFS, and the resulting IPFS hash is used to deploy the token. Each token has specific property keys and values as follows:

  • benefitUri: URI for benefits

  • indexList: An array of benefit numbers granted to the user

  • owner: NFT owner

  • maxPropertyVersion: Maximum property_version of the token

When an NFT is minted and its property_version is 1, it stores NFT metadata. Therefore, functions such as modifying metadata or updating benefit information are performed by modifying tokens with property_version equal to 1.

Regarding the NFT name, NFTs are minted in the format 'NFT Name #id'. This format is used because Aptos does not allow duplicate NFT names within a single collection, ensuring that users do not encounter NFT name duplicates.

NFT Minting


Before minting an NFT, the NFT name and information about the intended user are collected.

For tokens with a property_version of 0, the "mutate_property" function is used to modify the owner and store in the "index_list" how many benefits the respective user has. Additionally, for tokens with a property_version of 1, the "maxPropertyVersion" is incremented by 1. This is done because the token's property_version is utilized for token identification, ensuring that the next minting can take place.

NFT Integration


Before integrating NFTs, we collect the following information:

  • owner: Information about the owner

  • uri: URI of the integrated NFT's image

  • nftNameList: An array of NFT names to be integrated

  • propertyVersionList: An array of property_version values for the NFTs to be integrated

When creating a new token, the corresponding property_key and value are as follows:

  • owner: Information about the owner

  • nameList: An array of NFT names to be integrated

  • propertyVersionList: An array of property_version values for the NFTs to be integrated

In Yours EVM NFT, integrated NFTs need to be locked, but currently, only the "burn" function is available in the Aptos SDK. Therefore, discussions among developers are currently ongoing regarding this matter.

Last updated