Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the ethereum_events.rs (Ethereum event parser). #93

Open
dzmitryhil opened this issue Jul 1, 2022 · 0 comments
Open

Refactor the ethereum_events.rs (Ethereum event parser). #93

dzmitryhil opened this issue Jul 1, 2022 · 0 comments

Comments

@dzmitryhil
Copy link

dzmitryhil commented Jul 1, 2022

Refactor the ethereum_events.rs code. Now, most of the methods have code duplication and parse the events in a weird manner one attribute by one (incrementing the next byte index), which makes the support extremely hard, because the change of the first lines of the code significantly changes the following code.

The refactored code should either use ABI-generated code to parser the events or a number of functions to parse the events attribute by index, like here.
Also, it should validate and return the details errors if case any of the sub-decoding functions return an error.

All methods of the "ethereum_events.rs" must be covered by unit tests. The input data might be taken from the solidity tests.

This issue can be done from the "native-reward" base branch.

Ethereum ABI docs

@dzmitryhil dzmitryhil changed the title Refactor the ethereum_events.rs (ETH event parser). Refactor the ethereum_events.rs (Ethereum event parser). Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant