xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
protocol
protocol/Fees.h
1
#pragma once
2
3
#include <xrpl/protocol/XRPAmount.h>
4
5
#include <
cstdint
>
6
7
namespace
xrpl
{
8
9
// Deprecated constant for backwards compatibility with pre-XRPFees amendment.
10
// This was the reference fee units used in the old fee calculation.
11
inline
constexpr
std::uint32_t
kFeeUnitsDeprecated
= 10;
12
19
struct
Fees
20
{
24
XRPAmount
base
{0};
25
29
XRPAmount
reserve
{0};
30
34
XRPAmount
increment
{0};
35
36
explicit
Fees
() =
default
;
37
Fees
(
Fees
const
&) =
default
;
38
Fees
&
39
operator=
(
Fees
const
&) =
default
;
40
41
Fees
(
XRPAmount
base
,
XRPAmount
reserve
,
XRPAmount
increment
)
42
:
base
(
base
),
reserve
(
reserve
),
increment
(
increment
)
43
{
44
}
45
52
[[nodiscard]]
XRPAmount
53
accountReserve
(
std::uint32_t
ownerCount
,
std::uint32_t
accountCount)
const
54
{
55
return
(
reserve
* accountCount) + (
increment
*
ownerCount
);
56
}
57
};
58
59
}
// namespace xrpl
xrpl::XRPAmount
Definition
XRPAmount.h:28
cstdint
std::uint32_t
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::ownerCount
std::uint32_t ownerCount(SLE::ConstRef sle, beast::Journal j, std::int32_t ownerCountAdj=0)
Return number of the objects which reserve is covered by the account(sle) (so called "ownercount").
Definition
AccountRootHelpers.cpp:228
xrpl::kFeeUnitsDeprecated
constexpr std::uint32_t kFeeUnitsDeprecated
Definition
protocol/Fees.h:11
xrpl::Fees::Fees
Fees(Fees const &)=default
xrpl::Fees::reserve
XRPAmount reserve
Minimum XRP an account must hold to exist on the ledger.
Definition
protocol/Fees.h:29
xrpl::Fees::Fees
Fees(XRPAmount base, XRPAmount reserve, XRPAmount increment)
Definition
protocol/Fees.h:41
xrpl::Fees::Fees
Fees()=default
xrpl::Fees::increment
XRPAmount increment
Additional XRP reserve required per owned ledger object.
Definition
protocol/Fees.h:34
xrpl::Fees::base
XRPAmount base
Cost of a reference transaction in drops.
Definition
protocol/Fees.h:24
xrpl::Fees::accountReserve
XRPAmount accountReserve(std::uint32_t ownerCount, std::uint32_t accountCount) const
Returns the account reserve given the owner count, in drops.
Definition
protocol/Fees.h:53
xrpl::Fees::operator=
Fees & operator=(Fees const &)=default
Generated by
1.17.0