rippled
Loading...
Searching...
No Matches
LoanSet.h
1#ifndef XRPL_TX_LOANSET_H_INCLUDED
2#define XRPL_TX_LOANSET_H_INCLUDED
3
4#include <xrpld/app/misc/LendingHelpers.h>
5#include <xrpld/app/tx/detail/Transactor.h>
6
7namespace xrpl {
8
9class LoanSet : public Transactor
10{
11public:
13
14 explicit LoanSet(ApplyContext& ctx) : Transactor(ctx)
15 {
16 }
17
18 static bool
20
21 static std::uint32_t
23
24 static NotTEC
25 preflight(PreflightContext const& ctx);
26
27 static NotTEC
28 checkSign(PreclaimContext const& ctx);
29
30 static XRPAmount
31 calculateBaseFee(ReadView const& view, STTx const& tx);
32
35
36 static TER
37 preclaim(PreclaimContext const& ctx);
38
39 TER
40 doApply() override;
41
42public:
43 static std::uint32_t constexpr minPaymentTotal = 1;
44 static std::uint32_t constexpr defaultPaymentTotal = 1;
45 static_assert(defaultPaymentTotal >= minPaymentTotal);
46
47 static std::uint32_t constexpr minPaymentInterval = 60;
50
51 static std::uint32_t constexpr defaultGracePeriod = 60;
52 static_assert(defaultGracePeriod >= minPaymentInterval);
53};
54
55//------------------------------------------------------------------------------
56
57} // namespace xrpl
58
59#endif
State information when applying a tx.
static constexpr ConsequencesFactoryType ConsequencesFactory
Definition LoanSet.h:12
static std::uint32_t getFlagsMask(PreflightContext const &ctx)
Definition LoanSet.cpp:16
static TER preclaim(PreclaimContext const &ctx)
Definition LoanSet.cpp:195
static XRPAmount calculateBaseFee(ReadView const &view, STTx const &tx)
Definition LoanSet.cpp:147
static std::uint32_t constexpr minPaymentInterval
Definition LoanSet.h:47
static std::vector< OptionaledField< STNumber > > const & getValueFields()
Definition LoanSet.cpp:174
static std::uint32_t constexpr minPaymentTotal
Definition LoanSet.h:43
static NotTEC preflight(PreflightContext const &ctx)
Definition LoanSet.cpp:22
static std::uint32_t constexpr defaultPaymentInterval
Definition LoanSet.h:48
LoanSet(ApplyContext &ctx)
Definition LoanSet.h:14
static NotTEC checkSign(PreclaimContext const &ctx)
Definition LoanSet.cpp:113
static std::uint32_t constexpr defaultPaymentTotal
Definition LoanSet.h:44
static bool checkExtraFeatures(PreflightContext const &ctx)
Definition LoanSet.cpp:10
TER doApply() override
Definition LoanSet.cpp:347
static std::uint32_t constexpr defaultGracePeriod
Definition LoanSet.h:51
A view into a ledger.
Definition ReadView.h:32
ApplyView & view()
Definition Transactor.h:144
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
State information when determining if a tx is likely to claim a fee.
Definition Transactor.h:61
State information when preflighting a tx.
Definition Transactor.h:16