3#include <xrpl/basics/Number.h>
4#include <xrpl/basics/base_uint.h>
5#include <xrpl/beast/utility/Journal.h>
6#include <xrpl/ledger/ReadView.h>
7#include <xrpl/protocol/AccountID.h>
8#include <xrpl/protocol/MPTIssue.h>
9#include <xrpl/protocol/STTx.h>
10#include <xrpl/protocol/TER.h>
11#include <xrpl/protocol/XRPAmount.h>
148 [[nodiscard]]
static bool
A generic endpoint for log messages.
Number is a floating point type that can represent a wide range of values.
Rules controlling protocol behavior.
std::shared_ptr< STLedgerEntry const > const & const_ref
std::unordered_map< uint256, DeltaInfo > deltas_
std::vector< Shares > afterMPTs_
static bool isVaultEmpty(Vault const &vault)
Check whether a vault holds no assets.
std::vector< Vault > afterVault_
std::optional< DeltaInfo > deltaShares(AccountID const &id) const
Return the vault-share balance-change delta for an account.
std::vector< Shares > beforeMPTs_
void visitEntry(bool, SLE::const_ref, SLE::const_ref)
static std::int32_t computeCoarsestScale(std::vector< DeltaInfo > const &numbers)
std::optional< DeltaInfo > deltaAssetsTxAccount(STTx const &tx, XRPAmount fee) const
Return the vault-asset delta for the transaction's sending account, adjusted for the fee.
bool finalize(STTx const &, TER const, XRPAmount const, ReadView const &, beast::Journal const &)
std::vector< Vault > beforeVault_
static constexpr Number kZero
std::optional< DeltaInfo > deltaAssets(AccountID const &id) const
Return the vault-asset balance-change delta for an account.
std::int32_t computeVaultMinScale(DeltaInfo const &vaultDelta, Rules const &rules) const
Compute the minimum STAmount scale for rounding invariant calculations.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
static constexpr Number kNumZero
bool after(NetClock::time_point now, std::uint32_t mark)
Has the specified time passed?
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
TERSubset< CanCvtToTER > TER
static DeltaInfo makeDelta(Number const &before, Number const &after, Asset const &asset)
std::optional< int > scale
std::uint64_t sharesMaximum
static Shares make(SLE const &)
std::uint64_t sharesTotal
static Vault make(SLE const &)