CryptoLions / SimpleAssets

A simple standard for digital assets (both fungible and NFTs - non-fungible tokens) for EOSIO blockchains

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Storing Metadata off-chain

asghaier76 opened this issue · comments

Currently I see that the standard is storing the metadata as a string which will be a variant in its size from one NFT to another also in many cases that will be a long string if many properties need to be included. Storing the metadata as a JSON document off-chain and only storing the SHA256 digest of the JSON object on-chain (unit8_t data[32]) in addition to adding mdatauri field (string type) to store a string pointing to the actual mdata JSON object stored off-chain. This should be the best way to implement this as it will save on memory needed.

you can use mdata and idata as stringified JSON or sha256 hash string or just leave it empty.