web3j
web3j copied to clipboard
Unable to filter event using web3j
Trying filter the event with observable as below. But getting error:Invalid response received: okhttp3.internal.http.RealResponseBody@fcc04d9.
final Event event = new Event("Notify",
Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}, new TypeReference<Bytes32>() {}),
Arrays.<TypeReference<?>>asList(new TypeReference<Bytes32>() {}));
EthFilter filter = new EthFilter(DefaultBlockParameterName.EARLIEST,
DefaultBlockParameterName.LATEST, "1349f3e1b8d71effb47b840594ff27da7e603d17");
filter.addSingleTopic(EventEncoder.encode(event));
Admin web3j = Admin.build(new HttpService("ws://52.91.134.142:22000"));
web3j.ethLogObservable(filter).subscribe(new Action1<Log>() {
@Override
public void call(Log log) {
System.out.println("log.toString(): " + log.toString());
}
})
What is the issue and how can I filter the event. ?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Any updates on this ?