xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
tx
transactors
did
tx/transactors/did/DIDDelete.h
1
#pragma once
2
3
#include <xrpl/beast/utility/Journal.h>
4
#include <xrpl/core/ServiceRegistry.h>
5
#include <xrpl/ledger/ApplyView.h>
6
#include <xrpl/ledger/ReadView.h>
7
#include <xrpl/protocol/AccountID.h>
8
#include <xrpl/protocol/Keylet.h>
9
#include <xrpl/protocol/STTx.h>
10
#include <xrpl/protocol/TER.h>
11
#include <xrpl/protocol/XRPAmount.h>
12
#include <xrpl/tx/ApplyContext.h>
13
#include <xrpl/tx/Transactor.h>
14
15
namespace
xrpl
{
16
17
class
DIDDelete
:
public
Transactor
18
{
19
public
:
20
static
constexpr
auto
kConsequencesFactory
=
ConsequencesFactoryType::Normal
;
21
22
explicit
DIDDelete
(
ApplyContext
& ctx) :
Transactor
(ctx)
23
{
24
}
25
26
static
NotTEC
27
preflight
(
PreflightContext
const
& ctx);
28
29
static
TER
30
deleteSLE
(
ApplyContext
& ctx,
Keylet
sleKeylet,
AccountID
const
owner);
31
32
static
TER
33
deleteSLE
(
ApplyView
&
view
,
SLE::pointer
sle,
AccountID
const
owner,
beast::Journal
j);
34
35
TER
36
doApply
()
override
;
37
38
void
39
visitInvariantEntry
(
bool
isDelete,
SLE::ConstRef
before,
SLE::ConstRef
after
)
override
;
40
41
[[nodiscard]]
bool
42
finalizeInvariants
(
43
STTx
const
& tx,
44
TER
result,
45
XRPAmount
fee,
46
ReadView
const
&
view
,
47
beast::Journal
const
& j)
override
;
48
};
49
50
}
// namespace xrpl
beast::Journal
A generic endpoint for log messages.
Definition
Journal.h:44
xrpl::ApplyContext
State information when applying a tx.
Definition
ApplyContext.h:28
xrpl::ApplyView
Writeable view to a ledger, for applying a transaction.
Definition
ApplyView.h:141
xrpl::DIDDelete::preflight
static NotTEC preflight(PreflightContext const &ctx)
Definition
DIDDelete.cpp:22
xrpl::DIDDelete::visitInvariantEntry
void visitInvariantEntry(bool isDelete, SLE::ConstRef before, SLE::ConstRef after) override
Inspect a single ledger entry modified by this transaction.
Definition
DIDDelete.cpp:67
xrpl::DIDDelete::doApply
TER doApply() override
Definition
DIDDelete.cpp:61
xrpl::DIDDelete::finalizeInvariants
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.
Definition
DIDDelete.cpp:73
xrpl::DIDDelete::DIDDelete
DIDDelete(ApplyContext &ctx)
Definition
tx/transactors/did/DIDDelete.h:22
xrpl::DIDDelete::deleteSLE
static TER deleteSLE(ApplyContext &ctx, Keylet sleKeylet, AccountID const owner)
Definition
DIDDelete.cpp:28
xrpl::DIDDelete::kConsequencesFactory
static constexpr auto kConsequencesFactory
Definition
tx/transactors/did/DIDDelete.h:20
xrpl::ReadView
A view into a ledger.
Definition
ReadView.h:41
xrpl::STLedgerEntry::pointer
std::shared_ptr< STLedgerEntry > pointer
Definition
STLedgerEntry.h:34
xrpl::STLedgerEntry::ConstRef
std::shared_ptr< STLedgerEntry const > const & ConstRef
Definition
STLedgerEntry.h:37
xrpl::STTx
Definition
STTx.h:43
xrpl::Transactor::ConsequencesFactoryType::Normal
@ Normal
Definition
Transactor.h:175
xrpl::Transactor::view
ApplyView & view()
Definition
Transactor.h:184
xrpl::Transactor::Transactor
Transactor(Transactor const &)=delete
xrpl::XRPAmount
Definition
XRPAmount.h:28
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::NotTEC
TERSubset< CanCvtToNotTEC > NotTEC
Definition
TER.h:614
xrpl::after
bool after(NetClock::time_point now, std::uint32_t mark)
Has the specified time passed?
Definition
View.cpp:644
xrpl::AccountID
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
Definition
AccountID.h:34
xrpl::TER
TERSubset< CanCvtToTER > TER
Definition
TER.h:654
xrpl::Keylet
A pair of SHAMap key and LedgerEntryType.
Definition
Keylet.h:20
xrpl::PreflightContext
State information when preflighting a tx.
Definition
Transactor.h:39
Generated by
1.17.0