xrpld
Loading...
Searching...
No Matches
xrpl::ledger_entries::FeeSettings Class Reference

Ledger Entry: FeeSettings. More...

#include <FeeSettings.h>

Inheritance diagram for xrpl::ledger_entries::FeeSettings:
Collaboration diagram for xrpl::ledger_entries::FeeSettings:

Public Member Functions

 FeeSettings (SLE::const_pointer sle)
 Construct a FeeSettings ledger entry wrapper from an existing SLE object.
protocol_autogen::Optional< SF_UINT64::type::value_type > getBaseFee () const
 Get sfBaseFee (SoeOptional).
bool hasBaseFee () const
 Check if sfBaseFee is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getReferenceFeeUnits () const
 Get sfReferenceFeeUnits (SoeOptional).
bool hasReferenceFeeUnits () const
 Check if sfReferenceFeeUnits is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getReserveBase () const
 Get sfReserveBase (SoeOptional).
bool hasReserveBase () const
 Check if sfReserveBase is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getReserveIncrement () const
 Get sfReserveIncrement (SoeOptional).
bool hasReserveIncrement () const
 Check if sfReserveIncrement is present.
protocol_autogen::Optional< SF_AMOUNT::type::value_type > getBaseFeeDrops () const
 Get sfBaseFeeDrops (SoeOptional).
bool hasBaseFeeDrops () const
 Check if sfBaseFeeDrops is present.
protocol_autogen::Optional< SF_AMOUNT::type::value_type > getReserveBaseDrops () const
 Get sfReserveBaseDrops (SoeOptional).
bool hasReserveBaseDrops () const
 Check if sfReserveBaseDrops is present.
protocol_autogen::Optional< SF_AMOUNT::type::value_type > getReserveIncrementDrops () const
 Get sfReserveIncrementDrops (SoeOptional).
bool hasReserveIncrementDrops () const
 Check if sfReserveIncrementDrops is present.
protocol_autogen::Optional< SF_UINT256::type::value_type > getPreviousTxnID () const
 Get sfPreviousTxnID (SoeOptional).
bool hasPreviousTxnID () const
 Check if sfPreviousTxnID is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getPreviousTxnLgrSeq () const
 Get sfPreviousTxnLgrSeq (SoeOptional).
bool hasPreviousTxnLgrSeq () const
 Check if sfPreviousTxnLgrSeq is present.
bool validate () const
 Validate the ledger entry.
LedgerEntryType getType () const
 Get the ledger entry type.
uint256 const & getKey () const
 Get the key (index) of this ledger entry.
std::optional< uint256getLedgerIndex () const
 Get the ledger index (sfLedgerIndex).
bool hasLedgerIndex () const
 Check if the ledger entry has a ledger index.
uint16_t getLedgerEntryType () const
 Get the ledger entry type field (sfLedgerEntryType).
std::uint32_t getFlags () const
 Get the flags field (sfFlags).
bool isFlag (std::uint32_t f) const
 Check if a specific flag is set.
SLE::const_pointer getSle () const
 Get the underlying SLE object.

Static Public Attributes

static constexpr LedgerEntryType entryType = ltFEE_SETTINGS

Protected Attributes

SLE::const_pointer sle_
 The underlying serialized ledger entry being wrapped.

Detailed Description

Ledger Entry: FeeSettings.

Type: ltFEE_SETTINGS (0x0073) RPC Name: fee

Immutable wrapper around SLE providing type-safe field access. Use FeeSettingsBuilder to construct new ledger entries.

Definition at line 27 of file FeeSettings.h.

Constructor & Destructor Documentation

◆ FeeSettings()

xrpl::ledger_entries::FeeSettings::FeeSettings ( SLE::const_pointer sle)
explicit

Construct a FeeSettings ledger entry wrapper from an existing SLE object.

Exceptions
std::runtime_errorif the ledger entry type doesn't match.

Definition at line 36 of file FeeSettings.h.

Member Function Documentation

◆ getBaseFee()

protocol_autogen::Optional< SF_UINT64::type::value_type > xrpl::ledger_entries::FeeSettings::getBaseFee ( ) const
nodiscard

Get sfBaseFee (SoeOptional).

Returns
The field value, or std::nullopt if not present.

Definition at line 54 of file FeeSettings.h.

◆ hasBaseFee()

bool xrpl::ledger_entries::FeeSettings::hasBaseFee ( ) const
nodiscard

Check if sfBaseFee is present.

Returns
True if the field is present, false otherwise.

Definition at line 67 of file FeeSettings.h.

◆ getReferenceFeeUnits()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::FeeSettings::getReferenceFeeUnits ( ) const
nodiscard

Get sfReferenceFeeUnits (SoeOptional).

Returns
The field value, or std::nullopt if not present.

Definition at line 78 of file FeeSettings.h.

◆ hasReferenceFeeUnits()

bool xrpl::ledger_entries::FeeSettings::hasReferenceFeeUnits ( ) const
nodiscard

Check if sfReferenceFeeUnits is present.

Returns
True if the field is present, false otherwise.

Definition at line 91 of file FeeSettings.h.

◆ getReserveBase()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::FeeSettings::getReserveBase ( ) const
nodiscard

Get sfReserveBase (SoeOptional).

Returns
The field value, or std::nullopt if not present.

Definition at line 102 of file FeeSettings.h.

◆ hasReserveBase()

bool xrpl::ledger_entries::FeeSettings::hasReserveBase ( ) const
nodiscard

Check if sfReserveBase is present.

Returns
True if the field is present, false otherwise.

Definition at line 115 of file FeeSettings.h.

◆ getReserveIncrement()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::FeeSettings::getReserveIncrement ( ) const
nodiscard

Get sfReserveIncrement (SoeOptional).

Returns
The field value, or std::nullopt if not present.

Definition at line 126 of file FeeSettings.h.

◆ hasReserveIncrement()

bool xrpl::ledger_entries::FeeSettings::hasReserveIncrement ( ) const
nodiscard

Check if sfReserveIncrement is present.

Returns
True if the field is present, false otherwise.

Definition at line 139 of file FeeSettings.h.

◆ getBaseFeeDrops()

protocol_autogen::Optional< SF_AMOUNT::type::value_type > xrpl::ledger_entries::FeeSettings::getBaseFeeDrops ( ) const
nodiscard

Get sfBaseFeeDrops (SoeOptional).

Returns
The field value, or std::nullopt if not present.

Definition at line 150 of file FeeSettings.h.

◆ hasBaseFeeDrops()

bool xrpl::ledger_entries::FeeSettings::hasBaseFeeDrops ( ) const
nodiscard

Check if sfBaseFeeDrops is present.

Returns
True if the field is present, false otherwise.

Definition at line 163 of file FeeSettings.h.

◆ getReserveBaseDrops()

protocol_autogen::Optional< SF_AMOUNT::type::value_type > xrpl::ledger_entries::FeeSettings::getReserveBaseDrops ( ) const
nodiscard

Get sfReserveBaseDrops (SoeOptional).

Returns
The field value, or std::nullopt if not present.

Definition at line 174 of file FeeSettings.h.

◆ hasReserveBaseDrops()

bool xrpl::ledger_entries::FeeSettings::hasReserveBaseDrops ( ) const
nodiscard

Check if sfReserveBaseDrops is present.

Returns
True if the field is present, false otherwise.

Definition at line 187 of file FeeSettings.h.

◆ getReserveIncrementDrops()

protocol_autogen::Optional< SF_AMOUNT::type::value_type > xrpl::ledger_entries::FeeSettings::getReserveIncrementDrops ( ) const
nodiscard

Get sfReserveIncrementDrops (SoeOptional).

Returns
The field value, or std::nullopt if not present.

Definition at line 198 of file FeeSettings.h.

◆ hasReserveIncrementDrops()

bool xrpl::ledger_entries::FeeSettings::hasReserveIncrementDrops ( ) const
nodiscard

Check if sfReserveIncrementDrops is present.

Returns
True if the field is present, false otherwise.

Definition at line 211 of file FeeSettings.h.

◆ getPreviousTxnID()

protocol_autogen::Optional< SF_UINT256::type::value_type > xrpl::ledger_entries::FeeSettings::getPreviousTxnID ( ) const
nodiscard

Get sfPreviousTxnID (SoeOptional).

Returns
The field value, or std::nullopt if not present.

Definition at line 222 of file FeeSettings.h.

◆ hasPreviousTxnID()

bool xrpl::ledger_entries::FeeSettings::hasPreviousTxnID ( ) const
nodiscard

Check if sfPreviousTxnID is present.

Returns
True if the field is present, false otherwise.

Definition at line 235 of file FeeSettings.h.

◆ getPreviousTxnLgrSeq()

protocol_autogen::Optional< SF_UINT32::type::value_type > xrpl::ledger_entries::FeeSettings::getPreviousTxnLgrSeq ( ) const
nodiscard

Get sfPreviousTxnLgrSeq (SoeOptional).

Returns
The field value, or std::nullopt if not present.

Definition at line 246 of file FeeSettings.h.

◆ hasPreviousTxnLgrSeq()

bool xrpl::ledger_entries::FeeSettings::hasPreviousTxnLgrSeq ( ) const
nodiscard

Check if sfPreviousTxnLgrSeq is present.

Returns
True if the field is present, false otherwise.

Definition at line 259 of file FeeSettings.h.

◆ validate()

bool xrpl::ledger_entries::LedgerEntryBase::validate ( ) const
nodiscardinherited

Validate the ledger entry.

Returns
true if validation passes, false otherwise

Definition at line 40 of file LedgerEntryBase.h.

◆ getType()

LedgerEntryType xrpl::ledger_entries::LedgerEntryBase::getType ( ) const
nodiscardinherited

Get the ledger entry type.

Returns
The type of this ledger entry

Definition at line 57 of file LedgerEntryBase.h.

◆ getKey()

uint256 const & xrpl::ledger_entries::LedgerEntryBase::getKey ( ) const
nodiscardinherited

Get the key (index) of this ledger entry.

The key uniquely identifies this ledger entry in the ledger state.

Returns
A constant reference to the 256-bit key

Definition at line 70 of file LedgerEntryBase.h.

◆ getLedgerIndex()

std::optional< uint256 > xrpl::ledger_entries::LedgerEntryBase::getLedgerIndex ( ) const
nodiscardinherited

Get the ledger index (sfLedgerIndex).

This field is OPTIONAL and represents the index of the ledger entry.

Returns
The ledger index if present, std::nullopt otherwise

Definition at line 85 of file LedgerEntryBase.h.

◆ hasLedgerIndex()

bool xrpl::ledger_entries::LedgerEntryBase::hasLedgerIndex ( ) const
nodiscardinherited

Check if the ledger entry has a ledger index.

Returns
true if sfLedgerIndex is present, false otherwise

Definition at line 100 of file LedgerEntryBase.h.

◆ getLedgerEntryType()

uint16_t xrpl::ledger_entries::LedgerEntryBase::getLedgerEntryType ( ) const
nodiscardinherited

Get the ledger entry type field (sfLedgerEntryType).

This field is REQUIRED for all ledger entries and indicates the type of the ledger entry (e.g., AccountRoot, RippleState, Offer, etc.).

Returns
The ledger entry type as a 16-bit unsigned integer

Definition at line 114 of file LedgerEntryBase.h.

◆ getFlags()

std::uint32_t xrpl::ledger_entries::LedgerEntryBase::getFlags ( ) const
nodiscardinherited

Get the flags field (sfFlags).

This field is REQUIRED for all ledger entries and contains type-specific flags that modify the behavior of the ledger entry.

Returns
The flags value as a 32-bit unsigned integer

Definition at line 128 of file LedgerEntryBase.h.

◆ isFlag()

bool xrpl::ledger_entries::LedgerEntryBase::isFlag ( std::uint32_t f) const
nodiscardinherited

Check if a specific flag is set.

Parameters
fThe flag bitmask to check
Returns
true if all bits in f are set in the flags field

Definition at line 141 of file LedgerEntryBase.h.

◆ getSle()

SLE::const_pointer xrpl::ledger_entries::LedgerEntryBase::getSle ( ) const
nodiscardinherited

Get the underlying SLE object.

Provides direct access to the wrapped serialized ledger entry object for cases where the type-safe accessors are insufficient.

Returns
A constant reference to the underlying SLE object

Definition at line 155 of file LedgerEntryBase.h.

Member Data Documentation

◆ entryType

LedgerEntryType xrpl::ledger_entries::FeeSettings::entryType = ltFEE_SETTINGS
staticconstexpr

Definition at line 30 of file FeeSettings.h.

◆ sle_

SLE::const_pointer xrpl::ledger_entries::LedgerEntryBase::sle_
protectedinherited

The underlying serialized ledger entry being wrapped.

Definition at line 162 of file LedgerEntryBase.h.