rippled
Loading...
Searching...
No Matches
libxrpl
protocol
TxFormats.cpp
1
#include <xrpl/protocol/SField.h>
2
#include <xrpl/protocol/SOTemplate.h>
3
#include <xrpl/protocol/TxFormats.h>
4
#include <xrpl/protocol/jss.h>
5
6
#include <
initializer_list
>
7
8
namespace
ripple
{
9
10
TxFormats::TxFormats
()
11
{
12
// Fields shared by all txFormats:
13
static
std::initializer_list<SOElement>
const
commonFields{
14
{sfTransactionType,
soeREQUIRED
},
15
{sfFlags,
soeOPTIONAL
},
16
{sfSourceTag,
soeOPTIONAL
},
17
{sfAccount,
soeREQUIRED
},
18
{sfSequence,
soeREQUIRED
},
19
{sfPreviousTxnID,
soeOPTIONAL
},
// emulate027
20
{sfLastLedgerSequence,
soeOPTIONAL
},
21
{sfAccountTxnID,
soeOPTIONAL
},
22
{sfFee,
soeREQUIRED
},
23
{sfOperationLimit,
soeOPTIONAL
},
24
{sfMemos,
soeOPTIONAL
},
25
{sfSigningPubKey,
soeREQUIRED
},
26
{sfTicketSequence,
soeOPTIONAL
},
27
{sfTxnSignature,
soeOPTIONAL
},
28
{sfSigners,
soeOPTIONAL
},
// submit_multisigned
29
{sfNetworkID,
soeOPTIONAL
},
30
{sfDelegate,
soeOPTIONAL
},
31
};
32
33
#pragma push_macro("UNWRAP")
34
#undef UNWRAP
35
#pragma push_macro("TRANSACTION")
36
#undef TRANSACTION
37
38
#define UNWRAP(...) __VA_ARGS__
39
#define TRANSACTION( \
40
tag, value, name, delegatable, amendment, privileges, fields) \
41
add(jss::name, tag, UNWRAP fields, commonFields);
42
43
#include <xrpl/protocol/detail/transactions.macro>
44
45
#undef TRANSACTION
46
#pragma pop_macro("TRANSACTION")
47
#undef UNWRAP
48
#pragma pop_macro("UNWRAP")
49
}
50
51
TxFormats
const
&
52
TxFormats::getInstance
()
53
{
54
static
TxFormats
const
instance;
55
return
instance;
56
}
57
58
}
// namespace ripple
ripple::TxFormats
Manages the list of known transaction formats.
Definition
TxFormats.h:67
ripple::TxFormats::getInstance
static TxFormats const & getInstance()
Definition
TxFormats.cpp:52
ripple::TxFormats::TxFormats
TxFormats()
Create the object.
Definition
TxFormats.cpp:10
initializer_list
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:6
ripple::soeOPTIONAL
@ soeOPTIONAL
Definition
SOTemplate.h:17
ripple::soeREQUIRED
@ soeREQUIRED
Definition
SOTemplate.h:16
Generated by
1.9.8