I started to play with Flow and Cadence and need some help understanding the architecture.
I want create NFTs of type NoobieNFT and give it away to my friends, who will in turn give it to their friends etc.
At any given point of time I would like to check whoβs the owner of a specific NoobieNFT. If my understanding is correct, resources (like NoobieNFT) canβt have a unique address so the best I can think of is:
assign a unique ID to each NoobieNFT
emit event whenever someone passes on NoobieNFT
have an external application that tracks the events that were emitted and knows who has which NoobieNFT. Alternatively I could scan entire blockchain for the NoobieNFT transfer event and search for the ID that Iβm interested in each time I want to know, but it sounds like it could be a very slow operation.
Thanks for pointing out that resources already have a unique ID.
Just in case Iβm missing something obviousβ¦ is there a way to find and access a resource by its id, without externally tracking the address of the account that currently owns it?
Your initially proposed approach is the right way to go about it (specifically: tracking the events). If you donβt want to do all the event monitoring yourself, there are also third party event monitoring providers such as Graffle.io that can simplify this