use of org.fisco.bcos.web3j.tx.txdecode.TransactionDecoder in project web3sdk by FISCO-BCOS.
the class Contract method registerEventLogPushFilter.
public void registerEventLogPushFilter(String abi, String bin, String topic0, String fromBlock, String toBlock, List<String> otherTopics, EventLogPushWithDecodeCallback callback) {
EventLogUserParams filter = new EventLogUserParams();
filter.setFromBlock(fromBlock);
filter.setToBlock(toBlock);
List<String> addresses = new ArrayList<String>();
addresses.add(getContractAddress());
filter.setAddresses(addresses);
List<Object> topics = new ArrayList<Object>();
topics.add(topic0);
if (otherTopics != null) {
for (Object obj : otherTopics) {
topics.add(obj);
}
}
filter.setTopics(topics);
TransactionDecoder decoder = new TransactionDecoder(abi, bin);
this.registerEventLogPushFilter(decoder, filter, callback);
}
Aggregations