Iโm still using moralis-v1
and I want to run a cloud function to sync ERC721 NFTs of all active users for only specific collection addresses and save data like metadata into the database with each NFT saved.
I am going to write cloud function that I run once to initialize the starting point - Iโm thinking Moralis.Cloud.define is best for a function that will run once?
Then I want another cloud function to watch all user addresses and sync data (add/remove NFTs to database depending on when they are transferred from active wallet addresses).
Am I right to think that itโs best to use the afterSave
trigger to run the function after a transfer occurs?
https://v1docs.moralis.io/moralis-dapp/cloud-code/triggers#aftersave