How often does Moralis sync MetaData? Is it possible to force a sync? The reason I am asking is because the data is outdated.
There are millions of NFTs across the different blockchains that Moralis supports. The vast majority of NFTs never change metadata, therefore Moralis doesnāt currently re-sync metadata. This is something we may do in the future!
In the near future we will add a way for you to trigger metadata re-sync on a specific token. We know that this feature is important when you develop your NFT and you may be experimenting with different metadata and update it often during the development of your app.
Join our Discord to be updated when this feature is released!
If you really want us to add the auto re-sync feature - add it or upvote it here: https://roadmap.moralis.io/b/feature-requests/
I seeā¦ then this will not support my use case. I need a total resync of a whole collection
Does the CloudFunction have access to any library that can read MetaData directly from the chain, without fetching from the Moralis cache?
Thereās a resync feature now I think, you can try to run the web3 API `/nft/{address}/{tokenId}/metadata/resync
you can read data directly from chain from a cloud function too, you can use runContractFunction or web3 directly
Nice, what are the prospects of getting a sync feature for the entire address, so we donāt need to do one by one?
you mean like for the whole wallet address? I donāt think thatās possible now, just individual NFTs
Ah ok. Then I need to loop thru them all to update themā¦
If the cached metadata of an entire collection is outdated, would it not be beneficial that your API loops them rather than me having to make individual calls for each one to make it right? You know its quite common for projects to ārevealā the metadata at a later stage, so this means that the metadata is often wrong in your cache if retrieved before revealā¦
Yes, but for OpenSea collections this is not true.
For now this is the api endpoint that we have
Gotcha! Thanks for considering
I canāt find information the Cost āx requestsā for using
`/nft/{address}/{tokenId}/metadata/resync
?
Hi! Check the response headers
I am doing
await Moralis.Web3API.token.reSyncMetadata
I donāt see any headers. I must say this is a weakness in the documentation
Did you look in your browser network tab for that specific request?
I think that you can call it twice per minute.
I see, I am running it as a cloud function. 2 per minute? I give up on this use case for resyncing an OpenSea collection. I think I will just have to build up a parallell database and call etherscan API and then IPFS direct.
This isnāt true at all. A non trivial number of projects use reveal mechanics as part of their NFT project. In some cases it may be possible to actually inspect whether the project metadata has been frozen or not. In any event, this is a significant limitation for anyone using API. Adding a contract sync (or wallet) rather than individual NFT would be a good start.
Also, it seems like a re-sync does pickup new metadata but the token_uri remains the same. Is this by design?
Ability to re-sync an entire collection would be a dream come true.