5#include <xrpl/basics/Log.h>
6#include <xrpl/ledger/helpers/DirectoryHelpers.h>
7#include <xrpl/protocol/TxFlags.h>
18 Issue const& takerPays,
19 Issue const& takerGets)
23 if (sle->getType() == ltOFFER && sle->getFieldAmount(sfTakerPays).issue() == takerPays &&
24 sle->getFieldAmount(sfTakerGets).issue() == takerGets)
39 if (sle->getType() == ltOFFER && sle->getFieldAmount(sfTakerPays) == takerPays &&
40 sle->getFieldAmount(sfTakerGets) == takerGets)
55 return countOffers(env, account, takerPays, takerGets) > 0;
63 return countOffers(env, account, takerPays, takerGets) > 0;
79 template <
class First,
class... Rest>
80 explicit Path(First&& first, Rest&&... rest)
94 template <
class First,
class... Rest>
102 path.emplace_back(pe);
120 path.emplace_back(account.id(), beast::zero, beast::zero);
124template <
class First,
class... Rest>
129 if constexpr (
sizeof...(rest) > 0)
152 template <
class First,
class... Rest>
153 explicit PathSet(First&& first, Rest&&... rest)
166 template <
class First,
class... Rest>
170 paths.emplace_back(std::move(first.path));
171 if constexpr (
sizeof...(rest) > 0)
A currency issued by an account.
void addHelper(First first, Rest... rest)
PathSet(First &&first, Rest &&... rest)
PathSet(PathSet const &)=default
PathSet & operator=(PathSet &&)=default
PathSet(PathSet &&)=default
PathSet & operator=(PathSet const &)=default
Path(First &&first, Rest &&... rest)
Path & push_back(Issue const &iss)
Path & operator=(Path &&)=default
Path(Path const &)=default
void addHelper(First &&first, Rest &&... rest)
Path & operator=(Path const &)=default
Immutable cryptographic account descriptor.
A transaction testing environment.
std::shared_ptr< OpenView const > current() const
Returns the current ledger.
Set Paths, SendMax on a JTx.
std::size_t countOffers(jtx::Env &env, jtx::Account const &account, Issue const &takerPays, Issue const &takerGets)
Count offer.
bool isOffer(jtx::Env &env, jtx::Account const &account, STAmount const &takerPays, STAmount const &takerGets)
An offer exists.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void forEachItem(ReadView const &view, Keylet const &root, std::function< void(std::shared_ptr< SLE const > const &)> const &f)
Iterate all items in the given directory.