xrpld
Loading...
Searching...
No Matches
tx/transactors/token/MPTokenIssuanceCreate.h
1#pragma once
2
3#include <xrpl/protocol/UintTypes.h>
4#include <xrpl/tx/Transactor.h>
5
6#include <expected>
7
8namespace xrpl {
9
10// NOLINTBEGIN(readability-redundant-member-init)
12{
23 // Set only by callers that issue an MPT representing a wrapped asset
24 // (e.g. VaultCreate's share token). The keylet must point to an
25 // existing MPToken or RippleState owned by `account`. Surfaces on
26 // the resulting MPTokenIssuance via the optional sfReferenceHolding
27 // field. Used by readers (canTransfer, canTrade, freezing) to
28 // inherit the underlying asset's transferability.
30};
31// NOLINTEND(readability-redundant-member-init)
32
34{
35public:
37
39 {
40 }
41
42 static bool
44
45 static std::uint32_t
47
48 static NotTEC
49 preflight(PreflightContext const& ctx);
50
51 TER
52 doApply() override;
53
54 void
55 visitInvariantEntry(bool isDelete, SLE::const_ref before, SLE::const_ref after) override;
56
57 [[nodiscard]] bool
59 STTx const& tx,
60 TER result,
61 XRPAmount fee,
62 ReadView const& view,
63 beast::Journal const& j) override;
64
65 static std::expected<MPTID, TER>
66 create(ApplyView& view, beast::Journal journal, MPTCreateArgs const& args);
67};
68
69} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:38
State information when applying a tx.
Writeable view to a ledger, for applying a transaction.
Definition ApplyView.h:118
bool finalizeInvariants(STTx const &tx, TER result, XRPAmount fee, ReadView const &view, beast::Journal const &j) override
Check transaction-specific post-conditions after all entries have been visited.
void visitInvariantEntry(bool isDelete, SLE::const_ref before, SLE::const_ref after) override
Inspect a single ledger entry modified by this transaction.
static bool checkExtraFeatures(PreflightContext const &ctx)
static std::uint32_t getFlagsMask(PreflightContext const &ctx)
static NotTEC preflight(PreflightContext const &ctx)
static std::expected< MPTID, TER > create(ApplyView &view, beast::Journal journal, MPTCreateArgs const &args)
A view into a ledger.
Definition ReadView.h:31
std::shared_ptr< STLedgerEntry const > const & const_ref
ApplyView & view()
Definition Transactor.h:136
Transactor(Transactor const &)=delete
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
TERSubset< CanCvtToNotTEC > NotTEC
Definition TER.h:594
bool after(NetClock::time_point now, std::uint32_t mark)
Has the specified time passed?
Definition View.cpp:554
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
Definition AccountID.h:28
TERSubset< CanCvtToTER > TER
Definition TER.h:634
std::optional< std::uint32_t > mutableFlags
std::optional< std::uint16_t > transferFee
State information when preflighting a tx.
Definition Transactor.h:18