1#include <xrpl/ledger/AcceptedLedgerTx.h>
3#include <xrpl/basics/StringUtilities.h>
4#include <xrpl/basics/strHex.h>
5#include <xrpl/beast/utility/instrumentation.h>
6#include <xrpl/json/json_value.h>
7#include <xrpl/ledger/ReadView.h>
8#include <xrpl/ledger/helpers/TokenHelpers.h>
9#include <xrpl/protocol/AccountID.h>
10#include <xrpl/protocol/SField.h>
11#include <xrpl/protocol/STObject.h>
12#include <xrpl/protocol/STTx.h>
13#include <xrpl/protocol/Serializer.h>
14#include <xrpl/protocol/TER.h>
15#include <xrpl/protocol/TxFormats.h>
16#include <xrpl/protocol/jss.h>
32 XRPL_ASSERT(!ledger->open(),
"xrpl::AcceptedLedgerTx::AcceptedLedgerTx : valid ledger state");
53 if (
txn_->getTxnType() == ttOFFER_CREATE)
55 auto const& account =
txn_->getAccountID(sfAccount);
56 auto const amount =
txn_->getFieldAmount(sfTakerGets);
59 if (account != amount.getIssuer())
68 json_[jss::transaction][jss::owner_funds] = ownerFunds.getText();
76 XRPL_ASSERT(!
rawMeta_.empty(),
"xrpl::AcceptedLedgerTx::getEscMeta : metadata is set");
A generic endpoint for log messages.
static Sink & getNullSink()
Returns a Sink which does nothing.
Value & append(Value const &value)
Append value to array at the end.
std::string getEscMeta() const
TxID getTransactionID() const
boost::container::flat_set< AccountID > affected_
std::shared_ptr< STTx const > txn_
AcceptedLedgerTx(std::shared_ptr< ReadView const > const &ledger, std::shared_ptr< STTx const > const &, std::shared_ptr< STObject const > const &)
@ Array
array value (ordered list)
@ Object
object value (collection of name/value pairs).
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::string strHex(FwdIt begin, FwdIt end)
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.
std::string transHuman(TER code)
STAmount accountFunds(ReadView const &view, AccountID const &id, STAmount const &saDefault, FreezeHandling freezeHandling, beast::Journal j)
std::string sqlBlobLiteral(Blob const &blob)
Format arbitrary binary data as an SQLite "blob literal".