rippled
Loading...
Searching...
No Matches
tx/transactors/system/Batch.h
1#pragma once
2
3#include <xrpl/basics/Log.h>
4#include <xrpl/protocol/Indexes.h>
5#include <xrpl/tx/Transactor.h>
6
7namespace xrpl {
8
9class Batch : public Transactor
10{
11public:
13
14 explicit Batch(ApplyContext& ctx) : Transactor(ctx)
15 {
16 }
17
18 static XRPAmount
19 calculateBaseFee(ReadView const& view, STTx const& tx);
20
21 static std::uint32_t
23
24 static NotTEC
25 preflight(PreflightContext const& ctx);
26
27 static NotTEC
29
30 static NotTEC
31 checkSign(PreclaimContext const& ctx);
32
33 TER
34 doApply() override;
35
36 static constexpr auto disabledTxTypes = std::to_array<TxType>({
37 ttVAULT_CREATE,
38 ttVAULT_SET,
39 ttVAULT_DELETE,
40 ttVAULT_DEPOSIT,
41 ttVAULT_WITHDRAW,
42 ttVAULT_CLAWBACK,
43 ttLOAN_BROKER_SET,
44 ttLOAN_BROKER_DELETE,
45 ttLOAN_BROKER_COVER_DEPOSIT,
46 ttLOAN_BROKER_COVER_WITHDRAW,
47 ttLOAN_BROKER_COVER_CLAWBACK,
48 ttLOAN_SET,
49 ttLOAN_DELETE,
50 ttLOAN_MANAGE,
51 ttLOAN_PAY,
52 });
53};
54
55} // 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:35
static NotTEC preflight(PreflightContext const &ctx)
Performs preflight validation checks for a Batch transaction.
Definition Batch.cpp:185
static NotTEC checkSign(PreclaimContext const &ctx)
Checks the validity of signatures for a batch transaction.
Definition Batch.cpp:476
TER doApply() override
Applies the outer batch transaction.
Definition Batch.cpp:498
static constexpr ConsequencesFactoryType ConsequencesFactory
static std::uint32_t getFlagsMask(PreflightContext const &ctx)
Definition Batch.cpp:146
static NotTEC preflightSigValidated(PreflightContext const &ctx)
Definition Batch.cpp:369
A view into a ledger.
Definition ReadView.h:31
ApplyView & view()
Definition Transactor.h:132
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:57
State information when preflighting a tx.
Definition Transactor.h:14