-
Notifications
You must be signed in to change notification settings - Fork 94
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 support for XLS-40 + add script to auto-generate models from rippled code #652
Conversation
@@ -0,0 +1,189 @@ | |||
"""Script to generate transaction models from rippled source code.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mvadari Can you write a test for this that includes a sample file that is parsed and sample output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about that but it's pretty difficult to do, since you're editing source code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mvadari I don't follow. I think you could write it using this: https://docs.python.org/3/library/ast.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way this script works is that it basically edits the xrpl-py source code to inject the transaction models and details. Writing a test with AST would be more difficult than it's worth IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
High Level Overview of Change
This PR adds support for XLS-40 and adds a script to automatically generate transaction models from rippled source code.
Context of Change
XRPLF/XRPL-Standards#136
XRPLF/rippled#4636
Type of Change
Did you update CHANGELOG.md?
Test Plan
Added model tests (integration tests will be added later). CI passes.