1#include <xrpl/protocol/STInteger.h>
3#include <xrpl/basics/Log.h>
4#include <xrpl/basics/safe_cast.h>
5#include <xrpl/beast/utility/instrumentation.h>
6#include <xrpl/json/json_value.h>
7#include <xrpl/protocol/LedgerFormats.h>
8#include <xrpl/protocol/Permissions.h>
9#include <xrpl/protocol/SField.h>
10#include <xrpl/protocol/STBase.h>
11#include <xrpl/protocol/Serializer.h>
12#include <xrpl/protocol/TER.h>
13#include <xrpl/protocol/TxFormats.h>
40 if (
getFName() == sfTransactionResult)
48 JLOG(
debugLog().error()) <<
"Unknown result code in metadata: " <<
value_;
59 if (
getFName() == sfTransactionResult)
67 JLOG(
debugLog().error()) <<
"Unknown result code in metadata: " <<
value_;
98 return item->getName();
101 if (
getFName() == sfTransactionType)
106 return item->getName();
116 if (
getFName() == sfLedgerEntryType)
121 return item->getName();
124 if (
getFName() == sfTransactionType)
129 return item->getName();
154 if (
getFName() == sfPermissionValue)
158 return *permissionName;
167 if (
getFName() == sfPermissionValue)
171 return *permissionName;
203 auto convertToString = [](
uint64_t const value,
int const base) {
204 XRPL_ASSERT(base == 10 || base == 16,
"xrpl::STUInt64::getJson : base 10 or 16");
207 XRPL_ASSERT(ret.ec ==
std::errc(),
"xrpl::STUInt64::getJson : to_chars succeeded");
214 return convertToString(
value_, 10);
217 return convertToString(
value_, 16);
std::optional< std::string > getPermissionName(std::uint32_t value) const
static Permission const & getInstance()
bool shouldMeta(int c) const
static constexpr auto kSmdBaseTen
SField const & getFName() const
value_type value() const noexcept
SerializedTypeID getSType() const override
json::Value getJson(JsonOptions) const override
operator std::uint64_t() const
std::string getText() 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.
constexpr std::enable_if_t< std::is_integral_v< Dest > &&std::is_integral_v< Src >, Dest > safeCast(Src s) noexcept
bool transResultInfo(TER code, std::string &token, std::string &text)
Note, should be treated as flags that can be | and &.