3#include <xrpl/ledger/RawView.h>
4#include <xrpl/ledger/Sandbox.h>
5#include <xrpl/ledger/detail/ApplyViewBase.h>
6#include <xrpl/protocol/AccountID.h>
88 STAmount const& preCreditSenderBalance);
198 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)
void adjustOwnerCountHook(AccountID const &account, std::uint32_t cur, std::uint32_t next) override
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
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)
std::uint32_t ownerCountHook(AccountID const &account, std::uint32_t 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 apply(DeferredCredits &to)
static KeyIOU makeKeyIOU(AccountID const &a1, AccountID const &a2, Currency const ¤cy)
std::map< AccountID, std::uint32_t > ownerCounts_
void creditIOU(AccountID const &sender, AccountID const &receiver, STAmount const &amount, STAmount const &preCreditSenderBalance)
void ownerCount(AccountID const &id, std::uint32_t cur, std::uint32_t next)
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::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