rippled
|
Classes | |
struct | TaxonTag |
struct | TokenAndPage |
Finds the token in the owner's token directory. More... | |
Typedefs | |
using | Taxon = tagged_integer< std::uint32_t, TaxonTag > |
Functions | |
static std::shared_ptr< SLE const > | locatePage (ReadView const &view, AccountID owner, uint256 const &id) |
static std::shared_ptr< SLE > | locatePage (ApplyView &view, AccountID owner, uint256 const &id) |
static std::shared_ptr< SLE > | getPageForToken (ApplyView &view, AccountID const &owner, uint256 const &id, std::function< void(ApplyView &, AccountID const &)> const &createCallback) |
bool | compareTokens (uint256 const &a, uint256 const &b) |
TER | insertToken (ApplyView &view, AccountID owner, STObject &&nft) |
Insert the token in the owner's token directory. More... | |
static bool | mergePages (ApplyView &view, std::shared_ptr< SLE > const &p1, std::shared_ptr< SLE > const &p2) |
TER | removeToken (ApplyView &view, AccountID const &owner, uint256 const &nftokenID) |
Remove the token from the owner's token directory. More... | |
TER | removeToken (ApplyView &view, AccountID const &owner, uint256 const &nftokenID, std::shared_ptr< SLE > &&curr) |
Remove the token from the owner's token directory. More... | |
std::optional< STObject > | findToken (ReadView const &view, AccountID const &owner, uint256 const &nftokenID) |
Finds the specified token in the owner's token directory. More... | |
std::optional< TokenAndPage > | findTokenAndPage (ApplyView &view, AccountID const &owner, uint256 const &nftokenID) |
std::size_t | removeTokenOffersWithLimit (ApplyView &view, Keylet const &directory, std::size_t maxDeletableOffers) |
Delete up to a specified number of offers from the specified token offer directory. More... | |
TER | notTooManyOffers (ReadView const &view, uint256 const &nftokenID) |
Returns tesSUCCESS if NFToken has few enough offers that it can be burned. More... | |
bool | deleteTokenOffer (ApplyView &view, std::shared_ptr< SLE > const &offer) |
Deletes the given token offer. More... | |
Taxon | toTaxon (std::uint32_t i) |
std::uint32_t | toUInt32 (Taxon t) |
std::uint16_t | getFlags (uint256 const &id) |
std::uint16_t | getTransferFee (uint256 const &id) |
std::uint32_t | getSerial (uint256 const &id) |
Taxon | cipheredTaxon (std::uint32_t tokenSeq, Taxon taxon) |
Taxon | getTaxon (uint256 const &id) |
AccountID | getIssuer (uint256 const &id) |
Rate | transferFeeAsRate (std::uint16_t fee) |
Given a transfer fee (in basis points) convert it to a transfer rate. More... | |
constexpr uint256 | pageMask (std::string_view("0000000000000000000000000000000000000000ffffffffffffffffffffffff")) |
Variables | |
constexpr const std::uint16_t | flagBurnable = 0x0001 |
constexpr const std::uint16_t | flagOnlyXRP = 0x0002 |
constexpr const std::uint16_t | flagCreateTrustLines = 0x0004 |
constexpr const std::uint16_t | flagTransferable = 0x0008 |
using ripple::nft::Taxon = typedef tagged_integer<std::uint32_t, TaxonTag> |
Definition at line 37 of file NFTokenUtils.h.
|
static |
Definition at line 37 of file NFTokenUtils.cpp.
|
static |
Definition at line 51 of file NFTokenUtils.cpp.
|
static |
Definition at line 65 of file NFTokenUtils.cpp.
Definition at line 227 of file NFTokenUtils.cpp.
Insert the token in the owner's token directory.
Definition at line 243 of file NFTokenUtils.cpp.
|
static |
Definition at line 283 of file NFTokenUtils.cpp.
TER ripple::nft::removeToken | ( | ApplyView & | view, |
AccountID const & | owner, | ||
uint256 const & | nftokenID | ||
) |
Remove the token from the owner's token directory.
Definition at line 349 of file NFTokenUtils.cpp.
TER ripple::nft::removeToken | ( | ApplyView & | view, |
AccountID const & | owner, | ||
uint256 const & | nftokenID, | ||
std::shared_ptr< SLE > && | curr | ||
) |
Remove the token from the owner's token directory.
Definition at line 362 of file NFTokenUtils.cpp.
std::optional< STObject > ripple::nft::findToken | ( | ReadView const & | view, |
AccountID const & | owner, | ||
uint256 const & | nftokenID | ||
) |
Finds the specified token in the owner's token directory.
Definition at line 483 of file NFTokenUtils.cpp.
std::optional< TokenAndPage > ripple::nft::findTokenAndPage | ( | ApplyView & | view, |
AccountID const & | owner, | ||
uint256 const & | nftokenID | ||
) |
Definition at line 505 of file NFTokenUtils.cpp.
std::size_t ripple::nft::removeTokenOffersWithLimit | ( | ApplyView & | view, |
Keylet const & | directory, | ||
std::size_t | maxDeletableOffers | ||
) |
Delete up to a specified number of offers from the specified token offer directory.
Definition at line 528 of file NFTokenUtils.cpp.
Returns tesSUCCESS if NFToken has few enough offers that it can be burned.
Definition at line 578 of file NFTokenUtils.cpp.
bool ripple::nft::deleteTokenOffer | ( | ApplyView & | view, |
std::shared_ptr< SLE > const & | offer | ||
) |
Deletes the given token offer.
An offer is tracked in two separate places:
The offer also consumes one incremental reserve.
Definition at line 605 of file NFTokenUtils.cpp.
Taxon ripple::nft::toTaxon | ( | std::uint32_t | i | ) |
Definition at line 40 of file NFTokenUtils.h.
std::uint32_t ripple::nft::toUInt32 | ( | Taxon | t | ) |
Definition at line 46 of file NFTokenUtils.h.
std::uint16_t ripple::nft::getFlags | ( | uint256 const & | id | ) |
Definition at line 120 of file NFTokenUtils.h.
std::uint16_t ripple::nft::getTransferFee | ( | uint256 const & | id | ) |
Definition at line 128 of file NFTokenUtils.h.
std::uint32_t ripple::nft::getSerial | ( | uint256 const & | id | ) |
Definition at line 136 of file NFTokenUtils.h.
Taxon ripple::nft::cipheredTaxon | ( | std::uint32_t | tokenSeq, |
Taxon | taxon | ||
) |
Definition at line 144 of file NFTokenUtils.h.
Definition at line 168 of file NFTokenUtils.h.
Definition at line 180 of file NFTokenUtils.h.
Rate ripple::nft::transferFeeAsRate | ( | std::uint16_t | fee | ) |
|
constexpr |
|
constexpr |
Definition at line 51 of file NFTokenUtils.h.
|
constexpr |
Definition at line 52 of file NFTokenUtils.h.
|
constexpr |
Definition at line 53 of file NFTokenUtils.h.
|
constexpr |
Definition at line 54 of file NFTokenUtils.h.