Question regarding Web3j library. How can I replay all the logs from the blockchain using web3j ? I know there is a method to replay all the logs from a particular contract:
EthFilter filter = new EthFilter(DefaultBlockParameterName.EARLIEST,
DefaultBlockParameterName.LATEST, "0xafc785653c...")
web3j.ethLogObservable(filter).subscribe(
event => {
println(event.toString)
}
)
And it works fine, however when filter
is created without parameters -new EthFilter()
, it doesn't capture any logs at all.
What if I have 1000 contracts to listen to events from ? What is the best way to go about this ?