xrpld
Loading...
Searching...
No Matches
tx/transactors/lending/LoanBrokerSet.h
1#pragma once
2
3#include <xrpl/beast/utility/Journal.h>
4#include <xrpl/core/ServiceRegistry.h>
5#include <xrpl/ledger/ReadView.h>
6#include <xrpl/protocol/SField.h>
7#include <xrpl/protocol/STTx.h>
8#include <xrpl/protocol/TER.h>
9#include <xrpl/protocol/XRPAmount.h>
10#include <xrpl/tx/ApplyContext.h>
11#include <xrpl/tx/Transactor.h>
12
13#include <vector>
14
15namespace xrpl {
16
18{
19public:
21
23 {
24 }
25
26 static bool
28
29 static NotTEC
30 preflight(PreflightContext const& ctx);
31
34
35 static TER
36 preclaim(PreclaimContext const& ctx);
37
38 TER
39 doApply() override;
40
41 void
42 visitInvariantEntry(bool isDelete, SLE::const_ref before, SLE::const_ref after) override;
43
44 [[nodiscard]] bool
46 STTx const& tx,
47 TER result,
48 XRPAmount fee,
49 ReadView const& view,
50 beast::Journal const& j) override;
51};
52
53//------------------------------------------------------------------------------
54
55} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:44
State information when applying a tx.
void visitInvariantEntry(bool isDelete, SLE::const_ref before, SLE::const_ref after) override
Inspect a single ledger entry modified by this transaction.
static NotTEC preflight(PreflightContext const &ctx)
static TER preclaim(PreclaimContext const &ctx)
bool finalizeInvariants(STTx const &tx, TER result, XRPAmount fee, ReadView const &view, beast::Journal const &j) override
Check transaction-specific post-conditions after all entries have been visited.
static std::vector< OptionaledField< STNumber > > const & getValueFields()
TER doApply() override
static bool checkExtraFeatures(PreflightContext const &ctx)
A view into a ledger.
Definition ReadView.h:41
std::shared_ptr< STLedgerEntry const > const & const_ref
ApplyView & view()
Definition Transactor.h:175
Transactor(Transactor const &)=delete
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
TERSubset< CanCvtToNotTEC > NotTEC
Definition TER.h:607
bool after(NetClock::time_point now, std::uint32_t mark)
Has the specified time passed?
Definition View.cpp:572
TERSubset< CanCvtToTER > TER
Definition TER.h:647
State information when determining if a tx is likely to claim a fee.
Definition Transactor.h:83
State information when preflighting a tx.
Definition Transactor.h:38