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
xrpl
{
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(tag, value, name, delegable, amendment, privileges, fields) \
40
add(jss::name, tag, UNWRAP fields, commonFields);
41
42
#include <xrpl/protocol/detail/transactions.macro>
43
44
#undef TRANSACTION
45
#pragma pop_macro("TRANSACTION")
46
#undef UNWRAP
47
#pragma pop_macro("UNWRAP")
48
}
49
50
TxFormats
const
&
51
TxFormats::getInstance
()
52
{
53
static
TxFormats
const
instance;
54
return
instance;
55
}
56
57
}
// namespace xrpl
xrpl::TxFormats
Manages the list of known transaction formats.
Definition
TxFormats.h:67
xrpl::TxFormats::TxFormats
TxFormats()
Create the object.
Definition
TxFormats.cpp:10
xrpl::TxFormats::getInstance
static TxFormats const & getInstance()
Definition
TxFormats.cpp:51
initializer_list
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:6
xrpl::soeOPTIONAL
@ soeOPTIONAL
Definition
SOTemplate.h:17
xrpl::soeREQUIRED
@ soeREQUIRED
Definition
SOTemplate.h:16
Generated by
1.9.8