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 support for XLS-40 + add script to auto-generate models from rippled code #652

Merged
merged 19 commits into from
Nov 21, 2023

Conversation

mvadari
Copy link
Collaborator

@mvadari mvadari commented Sep 29, 2023

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

  • New feature (non-breaking change which adds functionality)

Did you update CHANGELOG.md?

  • Yes

Test Plan

Added model tests (integration tests will be added later). CI passes.

@mvadari mvadari changed the title feat: add support for XLS-40d + add script to auto-generate models from rippled code feat: add support for XLS-40 + add script to auto-generate models from rippled code Oct 23, 2023
@mvadari mvadari marked this pull request as ready for review October 23, 2023 18:41
@@ -0,0 +1,189 @@
"""Script to generate transaction models from rippled source code."""
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator

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

Copy link
Collaborator Author

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.

Copy link
Collaborator

@JST5000 JST5000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

@mvadari mvadari merged commit 0788b94 into main Nov 21, 2023
18 checks passed
@mvadari mvadari deleted the did branch November 21, 2023 22:19
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.

None yet

3 participants