20 #include <test/jtx/flags.h>
21 #include <test/jtx/token.h>
23 #include <ripple/app/tx/impl/NFTokenMint.h>
24 #include <ripple/protocol/SField.h>
25 #include <ripple/protocol/jss.h>
101 jv[jss::TransactionType] = jss::NFTokenBurn;
115 jv[jss::TransactionType] = jss::NFTokenCreateOffer;
137 template <
typename T>
143 if (!empty(nftokenOffers))
146 for (
uint256 const& nftokenOffer : nftokenOffers)
149 jv[jss::TransactionType] = jss::NFTokenCancelOffer;
181 jv[jss::TransactionType] = jss::NFTokenAcceptOffer;
191 jv[jss::TransactionType] = jss::NFTokenAcceptOffer;
205 jv[jss::TransactionType] = jss::NFTokenAcceptOffer;
const SF_UINT32 sfFirstNFTokenSequence
static Json::Value cancelOfferImpl(jtx::Account const &account, T const &nftokenOffers)
const SF_UINT256 sfRootIndex
void operator()(Env &, JTx &jtx) const
Json::Value acceptBuyOffer(jtx::Account const &account, uint256 const &offerIndex)
Accept an NFToken buy offer.
const SF_VECTOR256 sfNFTokenOffers
const SF_ACCOUNT sfDestination
const SF_UINT256 sfNFTokenID
@ arrayValue
array value (ordered list)
Json::Value brokerOffers(jtx::Account const &account, uint256 const &buyOfferIndex, uint256 const &sellOfferIndex)
Broker two NFToken offers.
Sets the optional Issuer on an NFTokenMint.
const std::string fieldName
Json::Value getJson(JsonOptions) const override
const SF_UINT32 sfMintedNFTokens
std::string const & human() const
Returns the human readable public key.
Json::Value acceptSellOffer(jtx::Account const &account, uint256 const &offerIndex)
Accept an NFToken sell offer.
Taxon toTaxon(std::uint32_t i)
void operator()(Env &, JTx &jtx) const
uint256 getNextID(jtx::Env const &env, jtx::Account const &issuer, std::uint32_t nfTokenTaxon, std::uint16_t flags, std::uint16_t xferFee)
Get the next NFTokenID that will be issued.
const Json::StaticString jsonName
void operator()(Env &, JTx &jtx) const
const SF_UINT16 sfTransferFee
const uint256 fixNFTokenRemint
const SF_UINT32 sfExpiration
Json::Value cancelOffer(jtx::Account const &account, std::initializer_list< uint256 > const &nftokenOffers)
Cancel NFTokenOffers.
Integers of any length that is a multiple of 32-bits.
const SF_UINT16 sfTransactionType
Sets the optional TransferFee on an NFTokenMint.
Value & append(const Value &value)
Append value to array at the end.
const STAmount brokerFee_
const SF_ACCOUNT sfNFTokenMinter
Json::Value burn(jtx::Account const &account, uint256 const &nftokenID)
Burn an NFToken.
Execution context for applying a JSON transaction.
Json::Value fset(Account const &account, std::uint32_t on, std::uint32_t off=0)
Add and/or remove flag.
static uint256 createNFTokenID(std::uint16_t flags, std::uint16_t fee, AccountID const &issuer, nft::Taxon taxon, std::uint32_t tokenSeq)
void operator()(Env &, JTx &jtx) const
Json::Value mint(jtx::Account const &account, std::uint32_t nfTokenTaxon)
Mint an NFToken.
std::uint32_t seq(Account const &account) const
Returns the next sequence number on account.
Json::Value fclear(Account const &account, std::uint32_t off)
Remove account flag.
void operator()(Env &, JTx &jtx) const
const SF_UINT256 sfNFTokenBuyOffer
Json::Value createOffer(jtx::Account const &account, uint256 const &nftokenID, STAmount const &amount)
Create an NFTokenOffer.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void operator()(Env &, JTx &jtx) const
const SF_ACCOUNT sfIssuer
std::shared_ptr< SLE const > le(Account const &account) const
Return an account root.
std::string to_string(Manifest const &m)
Format the specified manifest to a string for debugging purposes.
const SF_UINT32 sfNFTokenTaxon
Immutable cryptographic account descriptor.
const SF_ACCOUNT sfAccount
void operator()(Env &, JTx &jtx) const
const SF_UINT256 sfNFTokenSellOffer
std::shared_ptr< OpenView const > current() const
Returns the current ledger.
uint256 getID(jtx::Env const &env, jtx::Account const &issuer, std::uint32_t nfTokenTaxon, std::uint32_t nftSeq, std::uint16_t flags, std::uint16_t xferFee)
Get the NFTokenID for a particular nftSequence.
A transaction testing environment.
Json::Value clearMinter(jtx::Account const &account)
Clear any authorized minter from an account root.
const SF_AMOUNT sfNFTokenBrokerFee
Json::Value setMinter(jtx::Account const &account, jtx::Account const &minter)
Set the authorized minter on an account root.
constexpr std::uint32_t asfAuthorizedNFTokenMinter
void operator()(Env &, JTx &jtx) const