I'm using web3.js library to subscribe to ERC20 token transfer events on a blockchain:
const logOptions = {
// Filter transfer topics
topics: [
web3.utils.sha3('Transfer(address,address,uint256)')
]
};
let subscription = web3.eth.subscribe('logs', logOptions);
subscription.on('data', async (event: any) => {
// `event` contains the transfer info
});
I get an event emitted for any transfer triggered by a transaction, but I wish I would get an event saying the transaction is done - which means all transfers were made.
Any way to it using web3.js, or maybe another library?