xrpld
Loading...
Searching...
No Matches
tx/transactors/account/AccountSet.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/STTx.h>
7#include <xrpl/protocol/TER.h>
8#include <xrpl/protocol/XRPAmount.h>
9#include <xrpl/tx/ApplyContext.h>
10#include <xrpl/tx/Transactor.h>
11
12#include <cstdint>
13
14namespace xrpl {
15
16class AccountSet : public Transactor
17{
18public:
20
21 explicit AccountSet(ApplyContext& ctx) : Transactor(ctx)
22 {
23 }
24
25 static TxConsequences
27
28 static std::uint32_t
30
31 static NotTEC
32 preflight(PreflightContext const& ctx);
33
34 static TER
35 preclaim(PreclaimContext const& ctx);
36
37 TER
38 doApply() override;
39
40 void
41 visitInvariantEntry(bool isDelete, SLE::const_ref before, SLE::const_ref after) override;
42
43 [[nodiscard]] bool
45 STTx const& tx,
46 TER result,
47 XRPAmount fee,
48 ReadView const& view,
49 beast::Journal const& j) override;
50};
51
52} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:44
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 NotTEC preflight(PreflightContext const &ctx)
static constexpr auto kConsequencesFactory
static std::uint32_t getFlagsMask(PreflightContext const &ctx)
void visitInvariantEntry(bool isDelete, SLE::const_ref before, SLE::const_ref after) override
Inspect a single ledger entry modified by this transaction.
static TER preclaim(PreclaimContext const &ctx)
static TxConsequences makeTxConsequences(PreflightContext const &ctx)
State information when applying a tx.
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
Class describing the consequences to the account of applying a transaction if the transaction consume...
Definition applySteps.h:52
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