xrpld
Loading...
Searching...
No Matches
xrpl::Fees Struct Reference

Reflects the fee settings for a particular ledger. More...

#include <Fees.h>

Collaboration diagram for xrpl::Fees:

Public Member Functions

 Fees ()=default
 Fees (Fees const &)=default
Fees & operator= (Fees const &)=default
 Fees (XRPAmount base, XRPAmount reserve, XRPAmount increment)
 Fees (XRPAmount base, XRPAmount reserve, XRPAmount increment, std::uint32_t gasLimit, std::uint32_t bytecodeSizeLimit, std::uint32_t gasPrice)
XRPAmount accountReserve (std::uint32_t ownerCount, std::uint32_t accountCount) const
 Returns the account reserve given the owner count, in drops.

Public Attributes

XRPAmount base {0}
 Cost of a reference transaction in drops.
XRPAmount reserve {0}
 Minimum XRP an account must hold to exist on the ledger.
XRPAmount increment {0}
 Additional XRP reserve required per owned ledger object.
std::uint32_t gasLimit {kDefaultGasLimit}
 Gas limit for Feature Extensions (instructions).
std::uint32_t bytecodeSizeLimit {kDefaultBytecodeSizeLimit}
 Bytecode size limit for Feature Extensions (bytes).
std::uint32_t gasPrice {kDefaultGasPrice}
 Price of WASM gas (micro-drops).

Detailed Description

Reflects the fee settings for a particular ledger.

The fees are always the same for any transactions applied to a ledger. Changes to fees occur in between ledgers.

Definition at line 34 of file protocol/Fees.h.

Constructor & Destructor Documentation

◆ Fees() [1/4]

xrpl::Fees::Fees ( )
explicitdefault

◆ Fees() [2/4]

xrpl::Fees::Fees ( Fees const & )
default

◆ Fees() [3/4]

xrpl::Fees::Fees ( XRPAmount base,
XRPAmount reserve,
XRPAmount increment )

Definition at line 74 of file protocol/Fees.h.

◆ Fees() [4/4]

xrpl::Fees::Fees ( XRPAmount base,
XRPAmount reserve,
XRPAmount increment,
std::uint32_t gasLimit,
std::uint32_t bytecodeSizeLimit,
std::uint32_t gasPrice )

Definition at line 79 of file protocol/Fees.h.

Member Function Documentation

◆ operator=()

Fees & xrpl::Fees::operator= ( Fees const & )
default

◆ accountReserve()

XRPAmount xrpl::Fees::accountReserve ( std::uint32_t ownerCount,
std::uint32_t accountCount ) const
nodiscard

Returns the account reserve given the owner count, in drops.

The reserve is calculated as the reserve base times the number of accounts plus the reserve increment times the number of increments.

Definition at line 102 of file protocol/Fees.h.

Member Data Documentation

◆ base

XRPAmount xrpl::Fees::base {0}

Cost of a reference transaction in drops.

Definition at line 39 of file protocol/Fees.h.

◆ reserve

XRPAmount xrpl::Fees::reserve {0}

Minimum XRP an account must hold to exist on the ledger.

Definition at line 44 of file protocol/Fees.h.

◆ increment

XRPAmount xrpl::Fees::increment {0}

Additional XRP reserve required per owned ledger object.

Definition at line 49 of file protocol/Fees.h.

◆ gasLimit

std::uint32_t xrpl::Fees::gasLimit {kDefaultGasLimit}

Gas limit for Feature Extensions (instructions).

This and the one below default to the protocol values rather than 0, because an explicit 0 is the voted kill switch.

Definition at line 57 of file protocol/Fees.h.

◆ bytecodeSizeLimit

std::uint32_t xrpl::Fees::bytecodeSizeLimit {kDefaultBytecodeSizeLimit}

Bytecode size limit for Feature Extensions (bytes).

Definition at line 62 of file protocol/Fees.h.

◆ gasPrice

std::uint32_t xrpl::Fees::gasPrice {kDefaultGasPrice}

Price of WASM gas (micro-drops).

Definition at line 67 of file protocol/Fees.h.