Moralis get token names and metadaten in the "EthTokenTransfers" table

Is there any easy way to populate the token informations into the EthTokenTransfers table? By default its just displaying the contract (token addresses), I am looking for a way of retrieving the token information like symbol and decimals along with it.

What is the best way of doing this? If I sync like 1K wallets, it would be a lot of requests to filter the contract addresses and use the web3 API to merge the information.

Any tips are appreciated

I think if you want to you can use afterSave for EthTokenTransfers table and basically use the token address to get the metadata from web3 API and store them to the class. That way, each transaction recorded will have the metadata entry as well like symbols and decimals and name that you want :raised_hands:

that sounds pretty nice. But where would I have to set that up? In some kind of cloud function? Like where do I have to make the call for afterSave as syncing happens on the back end automatically

afterSave is a cloud hook that is similar to a cloud function. But it will be called only for real-time sync, not also for what it is synced from the past as historical.

1 Like

thank you, sounds like the best solution for me. Gonna try this!

1 Like