Hi all,
Iโm trying to achieve a quite specific database setup and I wanted to get some advice on how to use the many Moralis functions the best way possible.
Currently I am retrieving all the NFTs that a logged in user owns using the getNFTs()
function which by itself works great. However, I want the user to be able to add extra data to the NFTs and save them in the database. I already found a different forum post talking about how it is not recommended to modify the EthNFTOwners
table since it is a system table, which brings me to my question:
What would be the recommend way to track all the NFTs a user owns, allow them to add extra information (e.g. custom description) and keep the table updated when a new NFT is acquired automatically. So if we take the getNFTs()
output, it would look something like:
[
{
"token_address": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e",
"token_id": "15",
"contract_type": "ERC721",
"owner_of": "0x057Ec652A4F150f7FF94f089A38008f49a0DF88e",
"block_number": "88256",
"block_number_minted": "88256",
"token_uri": "string",
"metadata": "string",
"synced_at": "string",
"amount": "1",
"name": "CryptoKitties",
"symbol": "RARI",
"custom_description": "User defined custom text here"
"custom_price_data": "User defined custom price data text here"
}
]
Thanks!