xrpld
Loading...
Searching...
No Matches
protocol/Fees.h
1#pragma once
2
3#include <xrpl/protocol/XRPAmount.h>
4
5#include <cstdint>
6
7namespace xrpl {
8
9// Number of micro-drops in one drop.
10inline constexpr std::uint32_t microDropsPerDrop{1'000'000};
11
18inline constexpr std::uint32_t kMaxGasLimit{2'000'000};
19inline constexpr std::uint32_t kMaxBytecodeSizeLimit{200'000};
20inline constexpr std::uint32_t kMinGasPrice{1};
21
22// The following default values of fee settings will seed into FeeSettings
23// and write to the ledger on featureSmartEscrow activation.
24inline constexpr std::uint32_t kDefaultGasLimit{1'000'000};
25inline constexpr std::uint32_t kDefaultBytecodeSizeLimit{100'000};
26inline constexpr std::uint32_t kDefaultGasPrice{1'000'000};
27
107
108} // namespace xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
constexpr std::uint32_t microDropsPerDrop
constexpr std::uint32_t kDefaultGasLimit
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").
constexpr std::uint32_t kMinGasPrice
constexpr std::uint32_t kDefaultGasPrice
constexpr std::uint32_t kDefaultBytecodeSizeLimit
constexpr std::uint32_t kMaxGasLimit
Hard protocol bounds on the Feature Extension fee settings.
constexpr std::uint32_t kMaxBytecodeSizeLimit
Fees(Fees const &)=default
std::uint32_t gasLimit
Gas limit for Feature Extensions (instructions).
XRPAmount reserve
Minimum XRP an account must hold to exist on the ledger.
std::uint32_t bytecodeSizeLimit
Bytecode size limit for Feature Extensions (bytes).
Fees(XRPAmount base, XRPAmount reserve, XRPAmount increment)
Fees()=default
XRPAmount increment
Additional XRP reserve required per owned ledger object.
std::uint32_t gasPrice
Price of WASM gas (micro-drops).
XRPAmount base
Cost of a reference transaction in drops.
XRPAmount accountReserve(std::uint32_t ownerCount, std::uint32_t accountCount) const
Returns the account reserve given the owner count, in drops.
Fees & operator=(Fees const &)=default
Fees(XRPAmount base, XRPAmount reserve, XRPAmount increment, std::uint32_t gasLimit, std::uint32_t bytecodeSizeLimit, std::uint32_t gasPrice)