I am creating a Java Backend using Web3J and subscribing to
replayPastAndFutureBlocksFlowable from block 1 to latest, and then all subsequent new blocks.
From this, I get all the transactions, which I save it in the DB.
The problem is that, there are ERC20 transactions as well. In the tx Object, the toAddress is a smart contract address. What I want is to extract the actual from and toAddress where the token was transferred, amount, symbol, etc and then store that in my Database.
Basically, all transactions : deposits, withdrawal, of all ETH tokens, and all ERC20 tokens in database for analytics.
I am able to work with ETH transactions, which is pretty simple, but there is literally no clue how to extract the ERC20 details from the transaction Object.