19 #ifndef RIPPLE_TEST_JTX_AMMTEST_H_INCLUDED
20 #define RIPPLE_TEST_JTX_AMMTEST_H_INCLUDED
22 #include <ripple/beast/unit_test/suite.hpp>
23 #include <ripple/protocol/Feature.h>
24 #include <test/jtx/Account.h>
25 #include <test/jtx/amount.h>
26 #include <test/jtx/ter.h>
111 template <
class Rep,
class Period>
156 #endif // RIPPLE_TEST_JTX_AMMTEST_H_INCLUDED
XRPAmount ammCrtFee(jtx::Env &env) const
Set the expected result code for a JTx The test will fail if the code doesn't match.
bool wait_for(std::chrono::duration< Rep, Period > const &rel_time)
Convenience class to test AMM functionality.
std::tuple< STPathSet, STAmount, STAmount > find_paths(jtx::Env &env, jtx::Account const &src, jtx::Account const &dst, STAmount const &saDstAmount, std::optional< STAmount > const &saSendMax=std::nullopt, std::optional< Currency > const &saSrcCurrency=std::nullopt)
XRPAmount reserve(jtx::Env &env, std::uint32_t count) const
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Converts to IOU Issue or STAmount.
void fund(jtx::Env &env, jtx::Account const &gw, std::vector< jtx::Account > const &accounts, std::vector< STAmount > const &amts, Fund how)
std::condition_variable cv_
Immutable cryptographic account descriptor.
Json::Value find_paths_request(jtx::Env &env, jtx::Account const &src, jtx::Account const &dst, STAmount const &saDstAmount, std::optional< STAmount > const &saSendMax=std::nullopt, std::optional< Currency > const &saSrcCurrency=std::nullopt)
void testAMM(std::function< void(jtx::AMM &, jtx::Env &)> &&cb, std::optional< std::pair< STAmount, STAmount >> const &pool=std::nullopt, std::uint16_t tfee=0, std::optional< jtx::ter > const &ter=std::nullopt, std::optional< FeatureBitset > const &features=std::nullopt)
testAMM() funds 30,000XRP and 30,000IOU for each non-XRP asset to Alice and Carol
A transaction testing environment.