rippled
Loading...
Searching...
No Matches
src/xrpld/app/tx/detail/Batch.h
1#pragma once
2
3#include <xrpld/app/tx/detail/Transactor.h>
4
5#include <xrpl/basics/Log.h>
6#include <xrpl/protocol/Indexes.h>
7
8namespace xrpl {
9
10class Batch : public Transactor
11{
12public:
14
15 explicit Batch(ApplyContext& ctx) : Transactor(ctx)
16 {
17 }
18
19 static XRPAmount
20 calculateBaseFee(ReadView const& view, STTx const& tx);
21
22 static std::uint32_t
24
25 static NotTEC
26 preflight(PreflightContext const& ctx);
27
28 static NotTEC
30
31 static NotTEC
32 checkSign(PreclaimContext const& ctx);
33
34 TER
35 doApply() override;
36
37 static constexpr auto disabledTxTypes = std::to_array<TxType>({
38 ttVAULT_CREATE,
39 ttVAULT_SET,
40 ttVAULT_DELETE,
41 ttVAULT_DEPOSIT,
42 ttVAULT_WITHDRAW,
43 ttVAULT_CLAWBACK,
44 ttLOAN_BROKER_SET,
45 ttLOAN_BROKER_DELETE,
46 ttLOAN_BROKER_COVER_DEPOSIT,
47 ttLOAN_BROKER_COVER_WITHDRAW,
48 ttLOAN_BROKER_COVER_CLAWBACK,
49 ttLOAN_SET,
50 ttLOAN_DELETE,
51 ttLOAN_MANAGE,
52 ttLOAN_PAY,
53 });
54};
55
56} // namespace xrpl
State information when applying a tx.
Batch(ApplyContext &ctx)
static constexpr auto disabledTxTypes
static XRPAmount calculateBaseFee(ReadView const &view, STTx const &tx)
Calculates the total base fee for a batch transaction.
Definition Batch.cpp:36
static NotTEC preflight(PreflightContext const &ctx)
Performs preflight validation checks for a Batch transaction.
Definition Batch.cpp:181
static NotTEC checkSign(PreclaimContext const &ctx)
Checks the validity of signatures for a batch transaction.
Definition Batch.cpp:466
TER doApply() override
Applies the outer batch transaction.
Definition Batch.cpp:488
static constexpr ConsequencesFactoryType ConsequencesFactory
static std::uint32_t getFlagsMask(PreflightContext const &ctx)
Definition Batch.cpp:142
static NotTEC preflightSigValidated(PreflightContext const &ctx)
Definition Batch.cpp:360
A view into a ledger.
Definition ReadView.h:31
ApplyView & view()
Definition Transactor.h:128
T is_same_v
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
State information when determining if a tx is likely to claim a fee.
Definition Transactor.h:53
State information when preflighting a tx.
Definition Transactor.h:15