Filter blockchain events


#1

I can now get the logged events now. But is it also possible to filter specific events from this logging?

In my smart-contract I have 2 different events. In the log-file I can detect these different events by the value of topic1.
But I don’t know how to filter the logging to get all logged events of 1 specific eventtype.

I thougt may be a query like this would work: http:///strato-api/eth/v1.2/log?topic1=
Unfortunately, this does not work.

Using the web3.js module it is possible to filter the events using statements like this:
{reference to smartcontract}.{name of event in Smartcontract}.( null, {fromBlock: 0, toBlock: “latest”});

Is it also possible to filter events when using BlockApps?


#2

Hi @vliste, currently there is not a way to filter the logs with the api.

You can however poll the contract state for changes, https://developers.blockapps.net/advanced/cirrus-guide/


#3

To clarify, cirrus doesn’t support events. But if you want to monitor contract state you could trigger your own event when something changed