3#include <xrpl/protocol/Feature.h> 
    4#include <xrpl/protocol/jss.h> 
   22        jv[jss::Account] = account.human();
 
   25        jv[jss::TransactionType] = jss::TrustSet;
 
 
   35        auto const USD = gw[
"USD"];
 
   39        env.
fund(
XRP(100000), 
"alice", 
"bob", gw);
 
   42        env(
auth(gw, 
"alice", 
"USD"));
 
   45        env(
trust(
"alice", USD(1000)));
 
   46        env(
trust(
"bob", USD(1000)));
 
   47        env(
pay(gw, 
"alice", USD(100)));
 
   48        env(
pay(gw, 
"bob", USD(100)),
 
   50        env(
pay(
"alice", 
"bob", USD(50)),
 
 
   59        testAuth(sa - featurePermissionedDEX);
 
 
 
   64BEAST_DEFINE_TESTSUITE(SetAuth, app, 
ripple);
 
A currency issued by an account.
 
Immutable cryptographic account descriptor.
 
AccountID id() const
Returns the Account ID.
 
A transaction testing environment.
 
bool close(NetClock::time_point closeTime, std::optional< std::chrono::milliseconds > consensusDelay=std::nullopt)
Close and advance the ledger.
 
void fund(bool setDefaultRipple, STAmount const &amount, Account const &account)
 
std::shared_ptr< SLE const > le(Account const &account) const
Return an account root.
 
Set the expected result code for a JTx The test will fail if the code doesn't match.
 
Keylet line(AccountID const &id0, AccountID const &id1, Currency const ¤cy) noexcept
The index of a trust line for a given currency.
 
Json::Value trust(Account const &account, STAmount const &amount, std::uint32_t flags)
Modify a trust line.
 
Json::Value fset(Account const &account, std::uint32_t on, std::uint32_t off=0)
Add and/or remove flag.
 
Json::Value pay(AccountID const &account, AccountID const &to, AnyAmount amount)
Create a payment.
 
FeatureBitset testable_amendments()
 
XRP_t const XRP
Converts to XRP Issue or STAmount.
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
 
constexpr std::uint32_t tfSetfAuth
 
Json::Value getJson(LedgerFill const &fill)
Return a new Json::Value representing the ledger with given options.
 
constexpr std::uint32_t asfRequireAuth
 
bool to_currency(Currency &, std::string const &)
Tries to convert a string to a Currency, returns true on success.
 
void run() override
Runs the suite.
 
void testAuth(FeatureBitset features)
 
static Json::Value auth(jtx::Account const &account, jtx::Account const &dest, std::string const ¤cy)