#include #include // IWYU pragma: keep #include #include #include // IWYU pragma: keep #include namespace xrpl { std::vector const& TxFormats::getCommonFields() { static auto const kCommonFields = std::vector{ {sfTransactionType, SoeRequired}, {sfFlags, SoeOptional}, {sfSourceTag, SoeOptional}, {sfAccount, SoeRequired}, {sfSequence, SoeRequired}, {sfPreviousTxnID, SoeOptional}, // emulate027 {sfLastLedgerSequence, SoeOptional}, {sfAccountTxnID, SoeOptional}, {sfFee, SoeRequired}, {sfOperationLimit, SoeOptional}, {sfMemos, SoeOptional}, {sfSigningPubKey, SoeRequired}, {sfTicketSequence, SoeOptional}, {sfTxnSignature, SoeOptional}, {sfSigners, SoeOptional}, // submit_multisigned {sfNetworkID, SoeOptional}, {sfDelegate, SoeOptional}, }; return kCommonFields; } TxFormats::TxFormats() { #pragma push_macro("UNWRAP") #undef UNWRAP #pragma push_macro("TRANSACTION") #undef TRANSACTION #define UNWRAP(...) __VA_ARGS__ #define TRANSACTION(tag, value, name, delegable, amendment, privileges, fields) \ add(jss::name, tag, UNWRAP fields, getCommonFields()); #include #undef TRANSACTION #pragma pop_macro("TRANSACTION") #undef UNWRAP #pragma pop_macro("UNWRAP") } TxFormats const& TxFormats::getInstance() { static TxFormats const kInstance; return kInstance; } } // namespace xrpl