-
Notifications
You must be signed in to change notification settings - Fork 512
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-40d + add script to auto-generate models from rippled code #2491
Conversation
) | ||
|
||
newJsTxFile = newJsTxFile.replace( | ||
`import { |
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.
This feels oddly specific to one type.
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.
It's the last type in the list, it was easier to do it this way and have the linter fix the sorting than do some complex regex that sorts alphabetically.
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.
Can you add a comment with that context?
@@ -140,40 +141,40 @@ | |||
[ | |||
"LedgerEntry", | |||
{ | |||
"nth": 1, | |||
"nth": 257, |
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.
Why did these fields change?
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.
Fixing discrepancies between the server_definitions
RPC and the xrpl-codec-gen
script. Tests all pass because these fields aren't used for signing, they only exist for rippled technical reasons.
| AMMVote | ||
| AMMWithdraw | ||
| AccountDelete | ||
| AccountSet |
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.
nit: Alphabetically AccountDelete
and AccountSet
should be before AMM...
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.
(Same nit applies below with the case statement if we want to maintain alphabetical order)
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 was sorting with capitals before lowercase, which makes more sense to me, but if you disagree I'm happy to change that.
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 personally don't consider capitalization when scanning lists, so I'd prefer to ignore it when sorting alphabetically
Flags: 2147483648, | ||
Sequence: 4, | ||
TransactionType: 'DIDDelete', | ||
} as any |
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.
Why is typed as any
instead of DIDDelete
?
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.
So that you can remove required fields without TS complaining (see other model tests)
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.
All my changes are docs updates, logic looks good :)
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.