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