Closed DINGYIOK closed 8 months ago
I think you can scan all tx in a block and check for the contract of every one of them!?
Yes bro, I'm already doing this, getting the latest block and traversing the details of the txID to get it, but it's a waste of resources
I don't think there's another way around that! In theory, you could monitor the balance of the account every minute, and if it changed, go backward a few blocks and scan them one by one!??? I guess that could work?
I don't think there's another way around that! In theory, you could monitor the balance of the account every minute, and if it changed, go backward a few blocks and scan them one by one!??? I guess that could work?
I guess this could work if you don't have to watch too many addresses, or too many contracts.
Yes bro, I'm already doing this, getting the latest block and traversing the details of the txID to get it, but it's a waste of resources
It is not a waste of resources. One block contains at the absolute maximum like 400 transactions. This is not hard to parse. In general you should just use Bitcart to process payments in tron with ease, it's already implemented
For example, like the contract.on method in ethers.js, or like the contract.Transfer().watch method in TronWeb? I hope dear author can reply to me