Watch address sync eth value

In the past eth balances of synced addresses got synced but it seems they are not anymore. Is there a way to get that back? I want to have the realtime eth values of the addresses I am watching from my nitro server.

I don’t know of a simple way to get that back, you can use web3api to get that data and sync it in a db table from time to time.

Should that be done via beforeSave or afterSave trigger? Like is the afterSave triggered internaly only once per addresses after the sync has been completed or is it called multiple times for each address while syncing? I dont want to run into rate limit errors.

you can adapt based on your needs, afteSave for example doesn’t work for User class.

you can also add a timestamp for each address to know when it is last time you did that web3api call for that address

Does the aferSave trigger gets fired whenever a syncjob from internal moralis plug ins is done? For exampe, I have a watched address, that gets synced in realtime by moralis. Sometimes its status is “syncing:true”. When “syncing” gets set to false, is the afterSave trigger “triggered”? If so, one could use the afterSave(_AddressSyncStatus) trigger to populate the eth balance and update it for the specific address.

yes, afterSave will be triggered for real time updates in the database

1 Like