xrpld
Loading...
Searching...
No Matches
tx/transactors/nft/NFTokenAcceptOffer.h
1#pragma once
2
3#include <xrpl/tx/Transactor.h>
4
5namespace xrpl {
6
8{
9private:
10 TER
11 pay(AccountID const& from, AccountID const& to, STAmount const& amount);
12
13 TER
14 acceptOffer(SLE::ref offer);
15
16 TER
18
19 TER
20 transferNFToken(AccountID const& buyer, AccountID const& seller, uint256 const& nfTokenID);
21
22public:
24
26 {
27 }
28
29 static NotTEC
30 preflight(PreflightContext const& ctx);
31
32 static TER
33 preclaim(PreclaimContext const& ctx);
34
35 TER
36 doApply() override;
37
38 void
39 visitInvariantEntry(bool isDelete, SLE::const_ref before, SLE::const_ref after) override;
40
41 [[nodiscard]] bool
43 STTx const& tx,
44 TER result,
45 XRPAmount fee,
46 ReadView const& view,
47 beast::Journal const& j) override;
48};
49
50} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:38
State information when applying a tx.
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.
TER transferNFToken(AccountID const &buyer, AccountID const &seller, uint256 const &nfTokenID)
TER pay(AccountID const &from, AccountID const &to, STAmount const &amount)
static NotTEC preflight(PreflightContext const &ctx)
static TER preclaim(PreclaimContext const &ctx)
void visitInvariantEntry(bool isDelete, SLE::const_ref before, SLE::const_ref after) override
Inspect a single ledger entry modified by this transaction.
TER bridgeOffers(SLE::ref buy, SLE::ref sell)
TER acceptOffer(SLE::ref offer)
A view into a ledger.
Definition ReadView.h:31
std::shared_ptr< STLedgerEntry > const & ref
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
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