How do I listen for trx events on tron network? (Tronweb) nodejs

2.3k Views Asked by At

I already know that with this method "tronweb.contract().at(contractAddress).Transfer.watch()" I can listen to transfer events of a specific contract, but what I don`t know is that how can I listen for TRX intself?

1

There are 1 best solutions below

0
On

There's no methods for that as mentioned in official docs you can use Kafka or Mongodb plugin and connect that to a node for this purpose, but there's also HTTP API,

event query http

you can create an interval to fetch the result and when the desired output came in hand clear that

TRON network produces new block every ~3 secs