esaulpaugh / headlong

High-performance Contract ABI and RLP for Ethereum
Apache License 2.0
76 stars 20 forks source link

`Event` decoding API #32

Closed devictr closed 2 years ago

devictr commented 2 years ago

Hi @esaulpaugh,

I initially asked on gitter, but thought I'd create an issue here directly. Is there a way to decode events, like there is Function.decodeCall() ? If not, I'd be happy to help implement that.

I really appreciate all the work you've done for this lib, it saved me so much time and the API is very well designed.

esaulpaugh commented 2 years ago

Thanks!

I've been confused about how exactly to interpret the abi-spec with regards to events (and to some extent, packed encoding). Ideally headlong would be a full and faithful implementation of https://docs.soliditylang.org/en/latest/abi-spec.html and I haven't had much time to test against other frameworks or solidity (or other EVM languages like vyper for that matter). I actually don't really have solidity experience.

I'm not looking to create a whole event-handling framework, but if you could write some low-level methods which would facilitate the building of such frameworks on top of headlong, that would be very helpful.

devictr commented 2 years ago

Sounds good. I think I will implement something that looks like what ethereumj does here, but using your types and helper functions of course

devictr commented 2 years ago

PR here: https://github.com/esaulpaugh/headlong/pull/33

esaulpaugh commented 2 years ago

new release v6.0.0 coming soon