How to display transaction status efficiently?

that functionality is available for every server.

what is the server url?

did you update the server recently and it is a nitro server with coreservices plugin?

https://exboijyxfajc.usemoralis.com:2053/server

Server url above…

Nitro server ???

yes, that is a nitro server, and it seems to be updated

what evms/chains did you enable for that server? you can find that information in admin interface

Poylgon mumbai and avax testnet

try to enable also an eth chain if you want to add to watch an address on eth

That’s okay but the problem is that the cloud functions says watchXxxAddress is invalid
(irrespective of any chains)

you tried with other chains too?

This is what I get :frowning:

you tried with watchEthAddress only here?

:slight_smile:

`Moralis.Cloud.define(“watchAddress”, async(request)=>{
const logger = Moralis.Cloud.getLogger();
logger.info(“watchAddress called from front end”)
const address = request.params.address;

if(!address) throw Error(“no address provided”);
const result = await Moralis.Cloud.run(“watchXxxAddress”,{address: address, sync_historical: false}, {useMasterKey:true});
return result ;
});`

that is not how it should work, you have to replace watchXxxAddress with the chain where you want to add that watch, for example on eth is watchEthAddress

Yes I have done so just for the example I have shown… But while defining in the cloud function I did the way you mentioned… you could have seen in that output.

try to enable an eth chain first, then try to use watchEthAddress, also try to enable bsc chain if you try watchbscaddress, for matic you can try watchPolygonAddress

Oh man. I have been tryin with watchMaticAddress instead of watchPolygonAddress. Please update the same in the docs also. :slight_smile:

So for each new user I need to run the code (add to the watchlist) so that I could monitor their transactions right ?

if the user authenticates with metamask, you don’t need to run that code, unless you also want full history of the user transactions

So you mean that if an user authenticate with metamask then Moralis itself shows the transaction data without explicit invocation of cloud function ? But in my case its not showing the transactions ? Should I enable anything ?

you should not enable anything, it should work automatically, in your server settings you can select for each evm/chain how many transactions to sync historically on every chain for an address

So you’re that the transactions gets updated in the DB in the name of PolygonTransactions, EthTransactions etc class. or you’re telling about the _AddressSyncStatus ?

first option with EthTransactions as example

So according to my understanding the scenario is as follows.

  1. I create a server be it Mainnet or testnet.
  2. In that EVM configurations I select the chains and set max transactions sync.
  3. Develop dapp
  4. Authenticate users with Metamask and transfer assets (tokens) via app.
  5. Now the transactions gets updated on the DB and I can query them for displaying later.

Right ??

If so what if am disconnected my wallet and if someone sends me a token will it be updated on my next login session with my wallet ?

(Pardon me as this is getting longer :slight_smile:. Within 2-3 weeks I need to submit my project and that’s why )