diff --git a/tools/generate_definitions.py b/tools/generate_definitions.py index 8355559cd..1121019dc 100644 --- a/tools/generate_definitions.py +++ b/tools/generate_definitions.py @@ -171,7 +171,9 @@ def _add_line(line: str) -> None: # Example line: # STYPE(STI_UINT32, 2) \ type_hits = re.findall( - r"^ *STYPE\(STI_([^ ]*?) *, *([0-9-]+) *\) *\\?$", sfield_h, re.MULTILINE + r"^ *STYPE\(STI_([^ ]*?)[ \n]*,[ \n]*([0-9-]+)[ \n]*\)[ \n]*\\?$", + sfield_h, + re.MULTILINE, ) # name-to-value map - needed for SField processing type_map = {x[0]: x[1] for x in type_hits} @@ -204,7 +206,7 @@ def _is_signing_field(t: str, not_signing_field: str) -> str: # TYPED_SFIELD(sfFee, AMOUNT, 8) # UNTYPED_SFIELD(sfSigners, ARRAY, 3, SField::sMD_Default, SField::notSigning) sfield_hits = re.findall( - r"^ *[A-Z]*TYPED_SFIELD *\( *sf([^,\n]*),[ \n]*([^, \n]+)[ \n]*,[ \n]*" + r"^ *[A-Z]*TYPED_SFIELD[ \n]*\([ \n]*sf([^,\n]*),[ \n]*([^, \n]+)[ \n]*,[ \n]*" r"([0-9]+)(,.*?(notSigning))?", sfield_macro_file, re.MULTILINE, @@ -252,7 +254,8 @@ def _unhex(x: str) -> str: # Example line: # LEDGER_ENTRY(ltNFTOKEN_OFFER, 0x0037, NFTokenOffer, nft_offer, ({ lt_hits = re.findall( - r"^ *LEDGER_ENTRY[A-Z_]*\(lt[A-Z_]+ *, *([xX0-9a-fA-F]+) *, *([^,]+), *([^,]+), " + r"^ *LEDGER_ENTRY[A-Z_]*\(lt[A-Z_]+[ \n]*,[ \n]*([xX0-9a-fA-F]+)[ \n]*,[ \n]*" + r"([^,]+),[ \n]*([^,]+), " r"\({$", ledger_entries_file, re.MULTILINE, @@ -277,7 +280,8 @@ def _unhex(x: str) -> str: # Parse TER codes ter_code_hits = re.findall( - r"^ *((tel|tem|tef|ter|tes|tec)[A-Z_]+)( *= *([0-9-]+))? *,? *(\/\/[^\n]*)?$", + r"^ *((tel|tem|tef|ter|tes|tec)[A-Z_]+)([ \n]*=[ \n]*([0-9-]+))?[ \n]*,?[ \n]*" + r"(\/\/[^\n]*)?$", ter_h, re.MULTILINE, ) @@ -321,7 +325,7 @@ def _unhex(x: str) -> str: # Example line: # TRANSACTION(ttCHECK_CREATE, 16, CheckCreate, ({ tx_hits = re.findall( - r"^ *TRANSACTION\(tt[A-Z_]+ *,* ([0-9]+) *, *([A-Za-z]+).*$", + r"^ *TRANSACTION\(tt[A-Z_]+[ \n]*,[ \n]*([0-9]+)[ \n]*,[ \n]*([A-Za-z]+).*$", transactions_file, re.MULTILINE, ) diff --git a/xrpl/core/binarycodec/definitions/definitions.json b/xrpl/core/binarycodec/definitions/definitions.json index 9fdd5ff6a..271b0c5a9 100644 --- a/xrpl/core/binarycodec/definitions/definitions.json +++ b/xrpl/core/binarycodec/definitions/definitions.json @@ -680,6 +680,16 @@ "type": "UInt32" } ], + [ + "MutableFlags", + { + "isSerialized": true, + "isSigningField": true, + "isVLEncoded": false, + "nth": 53, + "type": "UInt32" + } + ], [ "IndexNext", { @@ -2130,6 +2140,16 @@ "type": "Number" } ], + [ + "DummyInt32", + { + "isSerialized": true, + "isSigningField": true, + "isVLEncoded": false, + "nth": 1, + "type": "Int32" + } + ], [ "TransactionMetaData", { @@ -3276,7 +3296,6 @@ "terLAST": -91, "terNO_ACCOUNT": -96, "terNO_AMM": -87, - "tedADDRESS_COLLISION": -86, "terNO_AUTH": -95, "terNO_LINE": -94, "terNO_RIPPLE": -90, @@ -3342,10 +3361,10 @@ "TicketCreate": 10, "TrustSet": 20, "UNLModify": 102, - "VaultCreate": 65, "VaultClawback": 70, - "VaultDeposit": 68, + "VaultCreate": 65, "VaultDelete": 67, + "VaultDeposit": 68, "VaultSet": 66, "VaultWithdraw": 69, "XChainAccountCreateCommit": 44, @@ -3367,6 +3386,8 @@ "Hash160": 17, "Hash192": 21, "Hash256": 5, + "Int32": 10, + "Int64": 11, "Issue": 24, "LedgerEntry": 10002, "Metadata": 10004,