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

feat: add human-readable ABI parser #310

Closed
wants to merge 3 commits into from

Conversation

alessandromazza98
Copy link
Contributor

@alessandromazza98 alessandromazza98 commented Sep 27, 2023

Closes #291

This is a draft just to let you know how I'm trying to solve it @DaniPopes.

Right now I implemented a parse method only for Error but the code is easily re-usable.
Also now all my code is inside item.rs but I can move most of the real parser logic inside alloy-sol-type-parser as you suggest in the issue description (maybe in a new file inside of that?)

I also add some tests so that you can see how it works. Also these tests are in the item.rs file but I can move them somewhere else.

PS: of course the CI gives error because I used println! in the tests just to have a quick view of how the parsing work. Later I can delete them or change them with the use of assert

@DaniPopes
Copy link
Member

DaniPopes commented Sep 27, 2023

BTW we recently started using winnow for parsing, see #292. All this should be doing is calling into sol_type_parser::{RootType,TupleSpecifier}::parse

@alessandromazza98
Copy link
Contributor Author

BTW we recently started using winnow for parsing, see #292. All this should be doing is calling into sol_type_parser::{RootType,TupleSpecifier}::parse

Oh ok thanks for the information. I'll edit it

@gakonst
Copy link
Member

gakonst commented Oct 4, 2023

Superseded by #329! Thank you for taking this on @alessandromazza98

@gakonst gakonst closed this Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Implement human-readable ABI parser
3 participants