0

I can´t find where is the Web3j ethLogObservable method. I can´t find in GitHub repo

2

From its version 4.0, web3j started using RxJava 2.0 FLowable instead of RxJava 2.0 Obsersable to handle events processing, notably because Flowable are much more efficient during high load using a backpressure mechanism.

The new function to catch events is now the following:

EthFilter filter = new EthFilter(
        DefaultBlockParameterName.EARLIEST, 
        DefaultBlockParameterName.LATEST, 
        contractAddress);

web3.ethLogFlowable(filter).subscribe(event -> {
    log.info("event = {}", event);
});

You can find more info here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.