This is an improvement over the way events were being parsed in #4, mainly introducing a way to distinguish events by checking their signature on the log topics, so that we can be sure the right ABI is being used when decoding the event, eliminating the unnecessary try/catch blocks in the previous implementation. I also added a few asserts in places that shouldn't be reachable unless there's a wrong assumption in the way events are being parsed.
This is an improvement over the way events were being parsed in #4, mainly introducing a way to distinguish events by checking their signature on the log topics, so that we can be sure the right ABI is being used when decoding the event, eliminating the unnecessary try/catch blocks in the previous implementation. I also added a few asserts in places that shouldn't be reachable unless there's a wrong assumption in the way events are being parsed.