20 #include <ripple/protocol/Feature.h>
21 #include <ripple/protocol/jss.h>
40 jv[jss::Account] = account.human();
41 jv[jss::LimitAmount] =
43 jv[jss::TransactionType] = jss::TrustSet;
53 auto const USD = gw[
"USD"];
57 env.
fund(
XRP(100000),
"alice",
"bob", gw);
59 env(
auth(gw,
"alice",
"USD"));
62 env(
trust(
"alice", USD(1000)));
63 env(
trust(
"bob", USD(1000)));
64 env(
pay(gw,
"alice", USD(100)));
65 env(
pay(gw,
"bob", USD(100)),
67 env(
pay(
"alice",
"bob", USD(50)),
bool to_currency(Currency ¤cy, std::string const &code)
Tries to convert a string to a Currency, returns true on success.
const XRP_t XRP
Converts to XRP Issue or STAmount.
Set the expected result code for a JTx The test will fail if the code doesn't match.
Json::Value trust(Account const &account, STAmount const &amount, std::uint32_t flags)
Modify a trust line.
AccountID id() const
Returns the Account ID.
Json::Value fset(Account const &account, std::uint32_t on, std::uint32_t off=0)
Add and/or remove flag.
FeatureBitset supported_amendments()
Keylet line(AccountID const &id0, AccountID const &id1, Currency const ¤cy) noexcept
The index of a trust line for a given currency.
void testAuth(FeatureBitset features)
Json::Value getJson(LedgerFill const &fill)
Return a new Json::Value representing the ledger with given options.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Json::Value pay(Account const &account, Account const &to, AnyAmount amount)
Create a payment.
constexpr std::uint32_t tfSetfAuth
constexpr std::uint32_t asfRequireAuth
void fund(bool setDefaultRipple, STAmount const &amount, Account const &account)
std::shared_ptr< SLE const > le(Account const &account) const
Return an account root.
Immutable cryptographic account descriptor.
const uint256 featureFlowCross
A transaction testing environment.
static Json::Value auth(jtx::Account const &account, jtx::Account const &dest, std::string const ¤cy)
BEAST_DEFINE_TESTSUITE(DeliverMin, app, ripple)