web3j icon indicating copy to clipboard operation
web3j copied to clipboard

Cannot resolve method 'ethLogObservable' in wrapper class

Open Gojic opened this issue 3 years ago • 2 comments

Bug_title

When my wrapper class is generated with truffle generate command i got error that ethLogObservable can not be resolved.I know that from its version 4.0, web3j started using RxJava 2.0 FLowable instead of RxJava 2.0 Obsersable but then why us not that implemented into my wrapper class?

Steps To Reproduce

In truffle used generate command to generate wrapper class in Java

Actual behavior

Cant even run my project

Environment

I am using android studio artic fox patch 4 Web3j version is org.web3j:core:4.8.7

Additional context

This is method that web3j created in my wrapper class:

public Observable<ApprovalEventResponse> approvalEventObservable(EthFilter filter) { return web3j.ethLogObservable(filter).map(new Func1<Log, ApprovalEventResponse>() { @Override public ApprovalEventResponse call(Log log) { Contract.EventValuesWithLog eventValues = extractEventParametersWithLog(APPROVAL_EVENT, log); ApprovalEventResponse typedResponse = new ApprovalEventResponse(); typedResponse.log = log; typedResponse.owner = (String) eventValues.getIndexedValues().get(0).getValue(); typedResponse.approved = (String) eventValues.getIndexedValues().get(1).getValue(); typedResponse.tokenId = (BigInteger) eventValues.getIndexedValues().get(2).getValue(); return typedResponse; } }); }

Gojic avatar Feb 10 '22 11:02 Gojic

Hi @Gojic, I know it is a long time but is this issue still available. The current version web3j-4.9.7 got some improvements on the log part. Could you let us know if issue persists?

gtebrean avatar Mar 08 '23 13:03 gtebrean

Hi @Gojic ,Had you solved the issue ?

better-github-hub avatar Jul 27 '23 13:07 better-github-hub