1#include <xrpl/basics/Log.h>
2#include <xrpl/basics/safe_cast.h>
3#include <xrpl/beast/utility/instrumentation.h>
4#include <xrpl/json/json_value.h>
5#include <xrpl/protocol/LedgerFormats.h>
6#include <xrpl/protocol/Permissions.h>
7#include <xrpl/protocol/SField.h>
8#include <xrpl/protocol/STBase.h>
9#include <xrpl/protocol/STInteger.h>
10#include <xrpl/protocol/Serializer.h>
11#include <xrpl/protocol/TER.h>
12#include <xrpl/protocol/TxFormats.h>
38 if (
getFName() == sfTransactionResult)
46 JLOG(
debugLog().error()) <<
"Unknown result code in metadata: " <<
value_;
57 if (
getFName() == sfTransactionResult)
65 JLOG(
debugLog().error()) <<
"Unknown result code in metadata: " <<
value_;
95 return item->getName();
103 return item->getName();
113 if (
getFName() == sfLedgerEntryType)
118 return item->getName();
121 if (
getFName() == sfTransactionType)
126 return item->getName();
150 if (
getFName() == sfPermissionValue)
154 return *permissionName;
163 if (
getFName() == sfPermissionValue)
167 return *permissionName;
198 auto convertToString = [](uint64_t
const value,
int const base) {
199 XRPL_ASSERT(base == 10 || base == 16,
"xrpl::STUInt64::getJson : base 10 or 16");
202 XRPL_ASSERT(ret.ec ==
std::errc(),
"xrpl::STUInt64::getJson : to_chars succeeded");
209 return convertToString(
value_, 10);
212 return convertToString(
value_, 16);
std::optional< std::string > getPermissionName(std::uint32_t const value) const
static Permission const & getInstance()
bool shouldMeta(int c) const
SField const & getFName() const
value_type value() const noexcept
std::string getText() const override
SerializedTypeID getSType() const override
Json::Value getJson(JsonOptions) const override
static constexpr TERSubset fromInt(int from)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
beast::Journal debugLog()
Returns a debug journal.
bool transResultInfo(TER code, std::string &token, std::string &text)
Note, should be treated as flags that can be | and &.