Class MemoRules
The limits a node puts on Memos before it will accept a transaction at all.
Inheritance
Namespace: Xrpl.Models.Transactions
Assembly: Xrpl.dll
Syntax
public static class MemoRules
Remarks
These are local checks in rippled's passesLocalChecks → isMemoOkay
(src/libxrpl/protocol/STTx.cpp). A transaction that fails them is not relayed, never
reaches a ledger and costs no fee - but the consumer only finds out after building,
autofilling and signing it, and the refusal does not say which field was at fault. Checking
the same rules before signing turns that into an exception that names the problem.
Two of the five rules the node applies are already enforced by the binary codec, so they are
deliberately not repeated here: a member other than MemoType, MemoData or
MemoFormat inside a Memo is refused when the blob is built, and so is a value
that is not hex. Re-checking them would mean two places to keep in step with one truth.
Fields
| Edit this page View SourceMaxSerializedLength
The largest the serialized Memos array may be, in bytes.
Declaration
public const int MaxSerializedLength = 1024
Field Value
| Type | Description |
|---|---|
| int |
Remarks
The limit is on the array as a whole, so several memos do not raise it. In practice this
leaves 1019 bytes of MemoData in a single memo carrying nothing else.
Methods
| Edit this page View SourceValidate(object)
Checks a transaction's Memos against the rules a node applies locally.
Declaration
public static void Validate(object memos)
Parameters
| Type | Name | Description |
|---|---|---|
| object | memos | The value of the transaction's |
Exceptions
| Type | Condition |
|---|---|
| ValidationException | When the array is too large, an element is not a |