Sync balance in mongoDB

Hi,
I have a question, I wanna create a dApp which following steps below:

  1. We have a Token contract named “ABC” on bsc
  2. We have a address migration on bsc named “MigrationAddress”
  3. We have a dApp on Moralis
  4. Users buy token “ABC” on poocoin, pancake, …
  5. Users login on our dApp and send their token, which buying on step 4, to “MigrationAddress”
  6. when step 5 done => data on field balance in mongoDB ( in Moralis server ) automatic Top-up

So can Moralis do that? If yes, could you tell me how/ or give me link/documents for teaching do that. Thanks

there are too many questions there, Moralis will help you

general documentation: https://docs.moralis.io/introduction/readme
demo apps: https://github.com/MoralisWeb3/demo-apps
ethereum boilerplate: https://github.com/ethereum-boilerplate

1 Like

but I just wanna know does Moralis can trigger and automatic topup a field ( named balance in class user in mongoDB ) when clients send token to a specific address ? Thanks for replying

yes, you can watch all the transfers/transactions for a specific address, and then run a job every minute to process those transactions, or you can also try to process them as they come with beforeSave or afterSave hooks

1 Like

thank you so much. all clear.