The event parser in web3 provides a nice parsing functionality for events, and I use it for logging all events to a file, but it's very difficult to use for looking at individual events for a particular transaction for automated testing because it induces an unneeded and difficult to manage concurrency aspect when there doesn't need to be one.
When I get a transaction result with web3, I have the transaction receipt in hand and that's the perfect time to synchronously examine the result and apply pass/fail test criteria.
I would like to parse the log section of the receipt but can't find a function in web3 to do so. Does it exist?
Best Answer
Do this: You'll need to pull code from web3, and it works best if your frontend is bundled using something like webpack or browserify:
In this case, we're decoding log data that contains two variables, one a string type and one a uint.
EDIT:
If you have the ABI available, you can detect which event it is related to that ABI: