-
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: Update SetFee
with new syntax pending XRPFee amendment
#634
Conversation
Open to other suggestions about how to handle the typing. My other ideas didn't pan out (Overloading constructors isn't done in Python, having a type alias named So, this implementation has the fields set as optional, but has explicit runtime checks and documentation to hopefully guide the user to picking the right fields if they're doing it by hand, and enforce the same "Required" rules the type checker normally would. |
Co-authored-by: Mayukha Vadari <[email protected]>
High Level Overview of Change
With the XRPFee amendment, the
SetFee
Psuedotransaction will have new fields.Context of Change
Ideally, the old fields should still be usable up until the amendment is enabled, and for historical analysis of the ledger it should still be able to interpret older transactions as
SetFee
transactions. But we want to enforce that only one of the new syntaxes is allowed, not any combination of fields. (Meaning it should not be possible to instantiate aSetFee
which has BOTH abase_fee
AND abase_fee_drops
)Useful to see how this was done in xrpl.js: XRPLF/xrpl.js#2357
Type of Change
Test Plan
CI Passes