xrpld
Loading...
Searching...
No Matches
tx/transactors/nft/NFTokenMint.h
1#pragma once
2
3#include <xrpl/ledger/helpers/NFTokenHelpers.h>
4#include <xrpl/protocol/nft.h>
5#include <xrpl/tx/Transactor.h>
6
7namespace xrpl {
8
9class NFTokenMint : public Transactor
10{
11public:
13
14 explicit NFTokenMint(ApplyContext& ctx) : Transactor(ctx)
15 {
16 }
17
18 static bool
20
21 static std::uint32_t
23
24 static NotTEC
25 preflight(PreflightContext const& ctx);
26
27 static TER
28 preclaim(PreclaimContext const& ctx);
29
30 TER
31 doApply() override;
32
33 void
34 visitInvariantEntry(bool isDelete, SLE::const_ref before, SLE::const_ref after) override;
35
36 [[nodiscard]] bool
38 STTx const& tx,
39 TER result,
40 XRPAmount fee,
41 ReadView const& view,
42 beast::Journal const& j) override;
43
44 // Public to support unit tests.
45 static uint256
47 std::uint16_t flags,
48 std::uint16_t fee,
49 AccountID const& issuer,
50 nft::Taxon taxon,
51 std::uint32_t tokenSeq);
52};
53
54} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:38
State information when applying a tx.
static uint256 createNFTokenID(std::uint16_t flags, std::uint16_t fee, AccountID const &issuer, nft::Taxon taxon, std::uint32_t tokenSeq)
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.
static NotTEC preflight(PreflightContext const &ctx)
void visitInvariantEntry(bool isDelete, SLE::const_ref before, SLE::const_ref after) override
Inspect a single ledger entry modified by this transaction.
static std::uint32_t getFlagsMask(PreflightContext const &ctx)
static constexpr auto kConsequencesFactory
TER doApply() override
static TER preclaim(PreclaimContext const &ctx)
static bool checkExtraFeatures(PreflightContext const &ctx)
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
TaggedInteger< std::uint32_t, TaxonTag > Taxon
Definition nft.h:18
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
BaseUInt< 256 > uint256
Definition base_uint.h:562
State information when determining if a tx is likely to claim a fee.
Definition Transactor.h:61
State information when preflighting a tx.
Definition Transactor.h:18