3#include <xrpl/ledger/ApplyView.h>
4#include <xrpl/ledger/OwnerCounts.h>
5#include <xrpl/ledger/RawView.h>
6#include <xrpl/ledger/ReadView.h>
7#include <xrpl/ledger/detail/ApplyViewBase.h>
8#include <xrpl/protocol/AccountID.h>
9#include <xrpl/protocol/MPTIssue.h>
10#include <xrpl/protocol/STAmount.h>
11#include <xrpl/protocol/UintTypes.h>
12#include <xrpl/protocol/XRPAmount.h>
97 STAmount const& preCreditSenderBalance);
209 STAmount const& preCreditBalance)
override;
Writeable view to a ledger, for applying a transaction.
A wrapper which makes credits unavailable to balances.
PaymentSandbox(ReadView const *base, ApplyFlags flags)
STAmount balanceHookMPT(AccountID const &account, MPTIssue const &issue, std::int64_t amount) const override
PaymentSandbox(PaymentSandbox *base)
void creditHookMPT(AccountID const &from, AccountID const &to, STAmount const &amount, std::uint64_t preCreditBalanceHolder, std::int64_t preCreditBalanceIssuer) override
STAmount balanceHookIOU(AccountID const &account, AccountID const &issuer, STAmount const &amount) const override
void creditHookIOU(AccountID const &from, AccountID const &to, STAmount const &amount, STAmount const &preCreditBalance) override
void adjustOwnerCountHook(AccountID const &account, OwnerCounts const &cur, OwnerCounts const &next) override
PaymentSandbox & operator=(PaymentSandbox &&)=delete
PaymentSandbox const * ps_
PaymentSandbox(PaymentSandbox const &)=delete
void issuerSelfDebitHookMPT(MPTIssue const &issue, std::uint64_t amount, std::int64_t origBalance) override
Facilitate tracking of MPT sold by an issuer owning MPT sell offer.
void apply(RawView &to)
Apply changes to base view.
PaymentSandbox(PaymentSandbox &&)=default
detail::DeferredCredits tab_
PaymentSandbox(ApplyView const *base)
OwnerCounts ownerCountHook(AccountID const &account, OwnerCounts const &count) const override
STAmount balanceHookSelfIssueMPT(MPTIssue const &issue, std::int64_t amount) const override
PaymentSandbox(PaymentSandbox const *base)
Construct on top of existing PaymentSandbox.
XRPAmount xrpDestroyed() const
PaymentSandbox & operator=(PaymentSandbox const &)=delete
Interface for ledger entry changes.
ApplyFlags flags() const override
Returns the tx apply flags.
std::optional< AdjustmentIOU > adjustmentsIOU(AccountID const &main, AccountID const &other, Currency const ¤cy) const
IssuerValueMPT AdjustmentMPT
std::map< MPTID, IssuerValueMPT > creditsMPT_
void ownerCount(AccountID const &id, OwnerCounts const &cur, OwnerCounts const &next)
void apply(DeferredCredits &to)
static KeyIOU makeKeyIOU(AccountID const &a1, AccountID const &a2, Currency const ¤cy)
void creditIOU(AccountID const &sender, AccountID const &receiver, STAmount const &amount, STAmount const &preCreditSenderBalance)
std::map< KeyIOU, ValueIOU > creditsIOU_
void creditMPT(AccountID const &sender, AccountID const &receiver, STAmount const &amount, std::uint64_t preCreditBalanceHolder, std::int64_t preCreditBalanceIssuer)
std::map< AccountID, OwnerCounts > ownerCounts_
std::tuple< AccountID, AccountID, Currency > KeyIOU
std::optional< AdjustmentMPT > adjustmentsMPT(MPTID const &mptID) const
void issuerSelfDebitMPT(MPTIssue const &issue, std::uint64_t amount, std::int64_t origBalance)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
BaseUInt< 160, detail::CurrencyTag > Currency
Currency is a hash representing a specific currency.
BaseUInt< 192 > MPTID
MPTID is a 192-bit value representing MPT Issuance ID, which is a concatenation of a 32-bit sequence ...
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
AdjustmentIOU(STAmount d, STAmount c, STAmount b)
std::uint64_t origBalance
std::map< AccountID, HolderValueMPT > holders
STAmount lowAcctOrigBalance