3#include <xrpl/beast/utility/Journal.h>
4#include <xrpl/ledger/ReadView.h>
5#include <xrpl/protocol/STLedgerEntry.h>
6#include <xrpl/protocol/STTx.h>
7#include <xrpl/protocol/TER.h>
A generic endpoint for log messages.
std::shared_ptr< STLedgerEntry const > const & const_ref
std::shared_ptr< STLedgerEntry const > const_pointer
Invariants: Confidential MPToken consistency.
std::map< uint192, Changes > changes_
void visitEntry(bool isDelete, std::shared_ptr< SLE const > const &before, std::shared_ptr< SLE const > const &after)
Track confidential MPT balance, issuance, and version changes.
bool finalize(STTx const &tx, TER const result, XRPAmount const fee, ReadView const &view, beast::Journal const &j)
Verify confidential MPT accounting and encrypted-field invariants.
std::uint32_t mptokensCreated_
bool referenceHoldingSetOnCreate_
sfReferenceHolding is intended to be set exactly once at vault creation and immutable thereafter; tru...
std::uint32_t mptokensDeleted_
bool finalize(STTx const &tx, TER const result, XRPAmount const fee, ReadView const &view, beast::Journal const &j) const
Verify MPT issuance invariants after transaction application.
bool referenceHoldingMutated_
True when sfReferenceHolding was mutated on an existing MPTokenIssuance.
std::uint32_t mptIssuancesCreated_
void visitEntry(bool isDelete, SLE::const_ref before, SLE::const_ref after)
Track MPT issuance and holding creations, deletions, and mutations.
std::vector< std::shared_ptr< SLE const > > deletedHoldings_
MPTokens and RippleStates deleted during apply.
std::uint32_t mptIssuancesDeleted_
Verify public MPT amount and outstanding amount accounting.
hash_map< uint192, MPTData > data_
bool finalize(STTx const &tx, TER const result, XRPAmount const fee, ReadView const &view, beast::Journal const &j)
Verify public MPT payment accounting invariants.
void visitEntry(bool isDelete, SLE::const_ref before, SLE::const_ref after)
Track MPT amount and outstanding amount changes.
hash_map< uint256, bool > deletedAuthorized_
bool isAuthorized(ReadView const &view, MPTID const &mptid, AccountID const &holder, bool requireAuth) const
Check whether a holder is authorized to send or receive an MPToken.
hash_map< uint192, hash_map< AccountID, Value > > amount_
void visitEntry(bool isDelete, std::shared_ptr< SLE const > const &before, std::shared_ptr< SLE const > const &after)
Track MPT balance changes and deleted authorization state.
bool finalize(STTx const &tx, TER const result, XRPAmount const fee, ReadView const &view, beast::Journal const &j)
Verify MPT transfer authorization invariants.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
BaseUInt< 192 > MPTID
MPTID is a 192-bit value representing MPT Issuance ID, which is a concatenation of a 32-bit sequence ...
bool after(NetClock::time_point now, std::uint32_t mark)
Has the specified time passed?
std::unordered_map< Key, Value, Hash, Pred, Allocator > hash_map
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
TERSubset< CanCvtToTER > TER
TER requireAuth(ReadView const &view, MPTIssue const &mptIssue, AccountID const &account, AuthType authType=AuthType::Legacy, std::uint8_t depth=0)
Check if the account lacks required authorization for MPT.
std::int64_t outstandingDelta
bool deletedWithEncrypted
std::int64_t mptAmountDelta
SLE::const_pointer issuance
bool changesConfidentialFields
std::array< std::int64_t, 2 > outstanding
std::optional< std::uint64_t > amtAfter
std::optional< std::uint64_t > amtBefore