3#include <xrpl/basics/chrono.h>
4#include <xrpl/beast/hash/uhash.h>
5#include <xrpl/ledger/detail/ReadViewFwdRange.h>
6#include <xrpl/protocol/Fees.h>
7#include <xrpl/protocol/IOUAmount.h>
8#include <xrpl/protocol/Indexes.h>
9#include <xrpl/protocol/LedgerHeader.h>
10#include <xrpl/protocol/Protocol.h>
11#include <xrpl/protocol/Rules.h>
12#include <xrpl/protocol/STAmount.h>
13#include <xrpl/protocol/STLedgerEntry.h>
14#include <xrpl/protocol/STTx.h>
42 [[nodiscard]] Iterator
44 [[nodiscard]] Iterator
46 [[nodiscard]] Iterator
55 [[nodiscard]] Iterator
57 [[nodiscard]] Iterator
85 [[nodiscard]]
virtual bool
103 [[nodiscard]]
virtual Fees const&
107 [[nodiscard]]
virtual Rules const&
117 [[nodiscard]]
virtual bool
157 XRPL_ASSERT(amount.
holds<
Issue>(),
"balanceHookIOU: amount is for Issue");
216 [[nodiscard]]
virtual bool
276#include <xrpl/ledger/detail/ReadViewFwdRange.ipp>
ReadView that associates keys with digests.
DigestAwareReadView(DigestAwareReadView const &)=default
virtual std::optional< digest_type > digest(key_type const &key) const =0
Return the digest associated with the key.
DigestAwareReadView()=default
A currency issued by an account.
std::chrono::time_point< NetClock > time_point
ReadView & operator=(ReadView &&other)=delete
virtual Rules const & rules() const =0
Returns the tx processing rules.
NetClock::time_point parentCloseTime() const
Returns the close time of the previous ledger.
virtual ~ReadView()=default
std::pair< std::shared_ptr< STTx const >, std::shared_ptr< STObject const > > tx_type
virtual std::unique_ptr< TxsType::iter_base > txsBegin() const =0
virtual Fees const & fees() const =0
Returns the fees for the base ledger.
virtual bool exists(Keylet const &k) const =0
Determine if a state item exists.
virtual STAmount balanceHookMPT(AccountID const &account, MPTIssue const &issue, std::int64_t amount) const
virtual tx_type txRead(key_type const &key) const =0
Read a transaction from the tx map.
virtual SLE::const_pointer read(Keylet const &k) const =0
Return the state item associated with a key.
ReadView(ReadView const &other)
ReadView(ReadView &&other)
virtual LedgerHeader const & header() const =0
Returns information about the ledger.
ReadView & operator=(ReadView const &other)=delete
virtual std::unique_ptr< TxsType::iter_base > txsEnd() const =0
virtual bool txExists(key_type const &key) const =0
Returns true if a tx exists in the tx map.
virtual bool open() const =0
Returns true if this reflects an open ledger.
SlesType sles
Iterable range of ledger state items.
LedgerIndex seq() const
Returns the sequence number of the base ledger.
virtual std::uint32_t ownerCountHook(AccountID const &account, std::uint32_t count) const
virtual std::unique_ptr< SlesType::iter_base > slesBegin() const =0
virtual std::unique_ptr< SlesType::iter_base > slesUpperBound(key_type const &key) const =0
virtual std::optional< key_type > succ(key_type const &key, std::optional< key_type > const &last=std::nullopt) const =0
Return the key of the next state item.
virtual STAmount balanceHookSelfIssueMPT(MPTIssue const &issue, std::int64_t amount) const
virtual std::unique_ptr< SlesType::iter_base > slesEnd() const =0
SLE::const_pointer mapped_type
virtual STAmount balanceHookIOU(AccountID const &account, AccountID const &issuer, STAmount const &amount) const
Rules controlling protocol behavior.
constexpr bool holds() const noexcept
std::shared_ptr< STLedgerEntry const > const_pointer
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::uint32_t LedgerIndex
A ledger index.
Rules makeRulesGivenLedger(DigestAwareReadView const &ledger, Rules const ¤t)
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
Reflects the fee settings for a particular ledger.
A pair of SHAMap key and LedgerEntryType.
Iterator upperBound(key_type const &key) const
SlesType(ReadView const &view)
TxsType(ReadView const &view)