xrpld
Loading...
Searching...
No Matches
protocol/Fees.h
1#pragma once
2
3#include <xrpl/protocol/XRPAmount.h>
4
5namespace xrpl {
6
7// Deprecated constant for backwards compatibility with pre-XRPFees amendment.
8// This was the reference fee units used in the old fee calculation.
9inline constexpr std::uint32_t kFeeUnitsDeprecated = 10;
10
16struct Fees
17{
20
23
26
27 explicit Fees() = default;
28 Fees(Fees const&) = default;
29 Fees&
30 operator=(Fees const&) = default;
31
36
42 [[nodiscard]] XRPAmount
43 accountReserve(std::size_t ownerCount) const
44 {
45 return reserve + ownerCount * increment;
46 }
47};
48
49} // namespace xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
constexpr std::uint32_t kFeeUnitsDeprecated
Fees(Fees const &)=default
XRPAmount accountReserve(std::size_t ownerCount) const
Returns the account reserve given the owner count, in drops.
XRPAmount reserve
Minimum XRP an account must hold to exist on the ledger.
Fees(XRPAmount base, XRPAmount reserve, XRPAmount increment)
Fees()=default
XRPAmount increment
Additional XRP reserve required per owned ledger object.
XRPAmount base
Cost of a reference transaction in drops.
Fees & operator=(Fees const &)=default