When we use web3.eth.getPastLogs
it returns topic and data properties together with rest data. Does it possible to retrieve event args parsing just data and topic as filter? Without to make additional request to node like myContract.getPastEvents
?
The reason to use such approach is to avoid additional requests to remote Ethereum node. So the goal to fetch events from multiple contracts by one request.
For example
web3.eth.getPastLogs({
fromBlock: 'latest',
toBlock: 'latest',
address: [
"0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe",
"0xEA13ff054fF3fAb986442A29121A32803f1dAf7D",
... // multiple contract addresses here
],
topics:[
web3.utils.sha3('Transfer(address,address,uint256)') // or uint ?
]
})
So how to parse returned result where data property converts to human readable event args format?