5#include <xrpl/basics/Log.h>
6#include <xrpl/ledger/helpers/DirectoryHelpers.h>
7#include <xrpl/protocol/TxFlags.h>
17 Asset const& takerPays,
18 Asset const& takerGets)
22 if (sle->getType() == ltOFFER && sle->getFieldAmount(sfTakerPays).asset() == takerPays &&
23 sle->getFieldAmount(sfTakerGets).asset() == takerGets)
38 if (sle->getType() == ltOFFER && sle->getFieldAmount(sfTakerPays) == takerPays &&
39 sle->getFieldAmount(sfTakerGets) == takerGets)
54 return countOffers(env, account, takerPays, takerGets) > 0;
62 return countOffers(env, account, takerPays, takerGets) > 0;
78 template <
class First,
class... Rest>
79 explicit TestPath(First&& first, Rest&&... rest)
95 template <
class First,
class... Rest>
103 path.emplaceBack(pe);
132 path.emplaceBack(account.id(),
Currency{beast::kZero}, beast::kZero);
136template <
class First,
class... Rest>
141 if constexpr (
sizeof...(rest) > 0)
164 template <
class First,
class... Rest>
165 explicit PathSet(First&& first, Rest&&... rest)
178 template <
class First,
class... Rest>
182 paths.emplaceBack(std::move(first.path));
183 if constexpr (
sizeof...(rest) > 0)
A currency issued by an account.
constexpr MPTID const & getMptID() const
AccountID const & getIssuer() const
std::shared_ptr< STLedgerEntry const > const & const_ref
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
TestPath(TestPath const &)=default
TestPath(TestPath &&)=default
void addHelper(First &&first, Rest &&... rest)
TestPath(First &&first, Rest &&... rest)
TestPath & operator=(TestPath &&)=default
TestPath & operator=(TestPath const &)=default
TestPath & pushBack(Issue const &iss)
Immutable cryptographic account descriptor.
A transaction testing environment.
std::shared_ptr< OpenView const > current() const
Returns the current ledger.
std::size_t countOffers(jtx::Env &env, jtx::Account const &account, Asset const &takerPays, Asset const &takerGets)
Count offer.
bool isOffer(jtx::Env &env, jtx::Account const &account, STAmount const &takerPays, STAmount const &takerGets)
An offer exists.
BaseUInt< 160, detail::CurrencyTag > Currency
Currency is a hash representing a specific currency.
void forEachItem(ReadView const &view, Keylet const &root, std::function< void(SLE::const_ref)> const &f)
Iterate all items in the given directory.