jsonId

MOE NFT distinguishes various types of NFTs using JSON. Each NFT has a different JSON format depending on its form, and the JSON type is hashed to record it as a jsonId for each NFT.

This is similar to how Ethereum converts the function of a transaction into a hash and uses it in the form of a methodId.

The jsonId is of type bytes4, and if the same jsonId is used, it can be considered as the same type of NFT.

MOE provides several jsonId with JSON sets those are commonly used on onnano.co, which is recommended as a reference service. However, developers can create their own JSON structures and align the jsonId to use them in different services.

Of course, we cannot enforce the creation of jsonId in the manner we propose. However, in MOE NFT where various forms of NFT are issued, voluntarily adhering to this convention would be highly beneficial.

jsonId utilizes the first 4 bytes of the keccak256 hash of the JSON structure string, excluding whitespace.

web3.sha3({JSON_STRUCTURE_STRING}).substring(0, 10);

Last updated