Moralis (Collection Items or EthNFTOwners)

Hi everyone, I’m struggle trying to understand the best way to retrieve minted items.

I have the following tables:

Collection
CollectionItems

EthNFTOwners <- Table generated by Moralis.

When I mint a collection item it is saved on EthNFTOwners but I also save the information about IPFS such as metadata and others on CollectionItems.

My question is: Do I need to call EthNFTOwners or it is fine calling CollectionItems to retrieve the minted tokens? (btw the user has to mint his item when create a collection item on my DApp).

I was wondering because I watched the video below and he retrieves the minted tokens through the table generated by Moralis.

If all your tokens are created only from your application and you save all the data in CollectionItems table then probably you can use that table too. EthNFTOwners can be used to keep information about all the tokens that your users have, not only the tokens that are created in your application.

1 Like

Hey @cryptokid, I was just wondering if I can use the same table CollectionItems to retrieve the tokens owned by the user because the problem of EthNFTOwners is that I don’t have the complete data to list some info I want.

Thank you again for always being helpful.

I don’t know exactly what information you have in CollectionItems, if you keep CollectionItems synced with the tokens that your users have then I don’t see why you could not use it.
You could also query both tables: EthNFTOwners and CollectionItems in the case that CollectionItems doesn’t have information for all the tokens that are present in EthNFTOwners (for example tokens unrelated to your application that users could have).

1 Like