xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
tx
transactors
payment_channel
tx/transactors/payment_channel/PaymentChannelCreate.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
namespace
xrpl
{
13
14
class
PaymentChannelCreate
:
public
Transactor
15
{
16
public
:
17
static
constexpr
auto
kConsequencesFactory
=
ConsequencesFactoryType::Custom
;
18
19
explicit
PaymentChannelCreate
(
ApplyContext
& ctx) :
Transactor
(ctx)
20
{
21
}
22
23
static
TxConsequences
24
makeTxConsequences
(
PreflightContext
const
& ctx);
25
26
static
NotTEC
27
preflight
(
PreflightContext
const
& ctx);
28
29
static
TER
30
preclaim
(
PreclaimContext
const
& ctx);
31
32
TER
33
doApply
()
override
;
34
35
void
36
visitInvariantEntry
(
bool
isDelete,
SLE::ConstRef
before,
SLE::ConstRef
after
)
override
;
37
38
[[nodiscard]]
bool
39
finalizeInvariants
(
40
STTx
const
& tx,
41
TER
result,
42
XRPAmount
fee,
43
ReadView
const
&
view
,
44
beast::Journal
const
& j)
override
;
45
};
46
47
}
// 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::PaymentChannelCreate::preclaim
static TER preclaim(PreclaimContext const &ctx)
Definition
PaymentChannelCreate.cpp:73
xrpl::PaymentChannelCreate::PaymentChannelCreate
PaymentChannelCreate(ApplyContext &ctx)
Definition
tx/transactors/payment_channel/PaymentChannelCreate.h:19
xrpl::PaymentChannelCreate::preflight
static NotTEC preflight(PreflightContext const &ctx)
Definition
PaymentChannelCreate.cpp:58
xrpl::PaymentChannelCreate::makeTxConsequences
static TxConsequences makeTxConsequences(PreflightContext const &ctx)
Definition
PaymentChannelCreate.cpp:52
xrpl::PaymentChannelCreate::visitInvariantEntry
void visitInvariantEntry(bool isDelete, SLE::ConstRef before, SLE::ConstRef after) override
Inspect a single ledger entry modified by this transaction.
Definition
PaymentChannelCreate.cpp:221
xrpl::PaymentChannelCreate::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
PaymentChannelCreate.cpp:227
xrpl::PaymentChannelCreate::kConsequencesFactory
static constexpr auto kConsequencesFactory
Definition
tx/transactors/payment_channel/PaymentChannelCreate.h:17
xrpl::PaymentChannelCreate::doApply
TER doApply() override
Definition
PaymentChannelCreate.cpp:122
xrpl::ReadView
A view into a ledger.
Definition
ReadView.h:41
xrpl::STLedgerEntry::ConstRef
std::shared_ptr< STLedgerEntry const > const & ConstRef
Definition
STLedgerEntry.h:37
xrpl::STTx
Definition
STTx.h:43
xrpl::Transactor::ConsequencesFactoryType::Custom
@ Custom
Definition
Transactor.h:175
xrpl::Transactor::view
ApplyView & view()
Definition
Transactor.h:184
xrpl::Transactor::Transactor
Transactor(Transactor const &)=delete
xrpl::TxConsequences
Class describing the consequences to the account of applying a transaction if the transaction consume...
Definition
applySteps.h:53
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::TER
TERSubset< CanCvtToTER > TER
Definition
TER.h:654
xrpl::PreclaimContext
State information when determining if a tx is likely to claim a fee.
Definition
Transactor.h:92
xrpl::PreflightContext
State information when preflighting a tx.
Definition
Transactor.h:39
Generated by
1.17.0