I am planning to use ethereum logs as a data storage on my private blockchain. I have defined event in my contract like this:

 event logDomainFilter(uint128 indexed _campaignId, uint128 indexed _orderId, string _whiteListDomains, string _blackListDomains);

Now in my java code, I am using following code:

 EthFilter eventFilter = new EthFilter(
                                DefaultBlockParameterName.EARLIEST, DefaultBlockParameterName.LATEST,
eventFilter.addOptionalTopics(campaignId, orderId "", "", "");

how to filter an indexed event parameter? Do I have to use "TypeEncoder.encode" as well?

Also, how can I check if event is empty?

Your Answer

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

Browse other questions tagged or ask your own question.