rippled
Taker_test.cpp
1 //------------------------------------------------------------------------------
2 /*
3  This file is part of rippled: https://github.com/ripple/rippled
4  Copyright (c) 2012, 2013 Ripple Labs Inc.
5 
6  Permission to use, copy, modify, and/or distribute this software for any
7  purpose with or without fee is hereby granted, provided that the above
8  copyright notice and this permission notice appear in all copies.
9 
10  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18 //==============================================================================
19 
20 #include <ripple/app/tx/impl/Taker.h>
21 #include <ripple/beast/unit_test.h>
22 #include <ripple/beast/core/LexicalCast.h>
23 #include <type_traits>
24 
25 namespace ripple {
26 
27 class Taker_test : public beast::unit_test::suite
28 {
29  static bool const Buy = false;
30  static bool const Sell = true;
31 
32  class TestTaker
33  : public BasicTaker
34  {
37 
38  public:
41  Amounts const& amount,
42  Quality const& quality,
43  STAmount const& funds,
44  std::uint32_t flags,
45  Rate const& rate_in,
46  Rate const& rate_out)
47  : BasicTaker (
48  cross_type,
49  AccountID(0x4701),
50  amount,
51  quality,
52  flags,
53  rate_in,
54  rate_out)
55  , funds_ (funds)
56  {
57  }
58 
59  void
60  set_funds (STAmount const& funds)
61  {
62  cross_funds = funds;
63  }
64 
65  STAmount
66  get_funds (AccountID const& owner, STAmount const& funds) const override
67  {
68  if (owner == account ())
69  return funds_;
70 
71  return cross_funds;
72  }
73 
74  Amounts
75  cross (Amounts offer, Quality quality)
76  {
77  if (reject (quality))
78  return Amounts (offer.in.zeroed (), offer.out.zeroed ());
79 
80  // we need to emulate "unfunded offers" behavior
81  if (get_funds (AccountID (0x4702), offer.out) == beast::zero)
82  return Amounts (offer.in.zeroed (), offer.out.zeroed ());
83 
84  if (done ())
85  return Amounts (offer.in.zeroed (), offer.out.zeroed ());
86 
87  auto result = do_cross (offer, quality, AccountID (0x4702));
88 
89  funds_ -= result.order.in;
90 
91  return result.order;
92  }
93 
95  cross (Amounts offer1, Quality quality1, Amounts offer2, Quality quality2)
96  {
97  /* check if composed quality should be rejected */
98  Quality const quality (composed_quality (
99  quality1, quality2));
100 
101  if (reject (quality))
102  return std::make_pair(
103  Amounts { offer1.in.zeroed (), offer1.out.zeroed () },
104  Amounts { offer2.in.zeroed (), offer2.out.zeroed () });
105 
106  if (done ())
107  return std::make_pair(
108  Amounts { offer1.in.zeroed (), offer1.out.zeroed () },
109  Amounts { offer2.in.zeroed (), offer2.out.zeroed () });
110 
111  auto result = do_cross (
112  offer1, quality1, AccountID (0x4703),
113  offer2, quality2, AccountID (0x4704));
114 
115  return std::make_pair (result.first.order, result.second.order);
116  }
117  };
118 
119 private:
120  Issue const& usd () const
121  {
122  static Issue const issue (
123  Currency (0x5553440000000000), AccountID (0x4985601));
124  return issue;
125  }
126 
127  Issue const& eur () const
128  {
129  static Issue const issue (
130  Currency (0x4555520000000000), AccountID (0x4985602));
131  return issue;
132  }
133 
134  Issue const& xrp () const
135  {
136  static Issue const issue (
137  xrpCurrency (), xrpAccount ());
138  return issue;
139  }
140 
141  STAmount parse_amount (std::string const& amount, Issue const& issue)
142  {
143  return amountFromString (issue, amount);
144  }
145 
146  Amounts parse_amounts (
147  std::string const& amount_in, Issue const& issue_in,
148  std::string const& amount_out, Issue const& issue_out)
149  {
150  STAmount const in (parse_amount (amount_in, issue_in));
151  STAmount const out (parse_amount (amount_out, issue_out));
152 
153  return { in, out };
154  }
155 
157  {
159  std::string const &out_)
160  : in (in_)
161  , out (out_)
162  {
163  }
164 
167  };
168 
169 private:
171  format_amount (STAmount const& amount)
172  {
173  std::string txt = amount.getText ();
174  txt += "/";
175  txt += to_string (amount.issue().currency);
176  return txt;
177  }
178 
179  void
181  bool sell,
182  std::string name,
183  Quality taker_quality,
184  cross_attempt_offer const offer,
185  std::string const funds,
186  Quality cross_quality,
187  cross_attempt_offer const cross,
188  std::string const cross_funds,
190  Issue const& issue_in,
191  Issue const& issue_out,
192  Rate rate_in = parityRate,
193  Rate rate_out = parityRate)
194  {
195  Amounts taker_offer (parse_amounts (
196  offer.in, issue_in,
197  offer.out, issue_out));
198 
199  Amounts cross_offer (parse_amounts (
200  cross.in, issue_in,
201  cross.out, issue_out));
202 
203  CrossType cross_type;
204 
205  if (isXRP (issue_out))
206  cross_type = CrossType::IouToXrp;
207  else if (isXRP (issue_in))
208  cross_type = CrossType::XrpToIou;
209  else
210  cross_type = CrossType::IouToIou;
211 
212  // FIXME: We are always invoking the IOU-to-IOU taker. We should select
213  // the correct type dynamically.
214  TestTaker taker (cross_type, taker_offer, taker_quality,
215  parse_amount (funds, issue_in), sell ? tfSell : 0,
216  rate_in, rate_out);
217 
218  taker.set_funds (parse_amount (cross_funds, issue_out));
219 
220  auto result = taker.cross (cross_offer, cross_quality);
221 
222  Amounts const expected (parse_amounts (
223  flow.in, issue_in,
224  flow.out, issue_out));
225 
226  BEAST_EXPECT(expected == result);
227 
228  if (expected != result)
229  {
230  log <<
231  "Expected: " << format_amount (expected.in) <<
232  " : " << format_amount (expected.out) << '\n' <<
233  " Actual: " << format_amount (result.in) <<
234  " : " << format_amount (result.out) << std::endl;
235  }
236  }
237 
239  {
240  return Quality (parse_amounts (in, xrp(), out, xrp ()));
241  }
242 
243 public:
244  // Notation for clamp scenario descriptions:
245  //
246  // IN:OUT (with the last in the list being limiting factor)
247  // N = Nothing
248  // T = Taker Offer Balance
249  // A = Taker Account Balance
250  // B = Owner Account Balance
251  //
252  // (s) = sell semantics: taker wants unlimited output
253  // (b) = buy semantics: taker wants a limited amount out
254 
255  // NIKB TODO: Augment TestTaker so currencies and rates can be specified
256  // once without need for repetition.
257  void
259  {
260  testcase ("XRP Quantization: input");
261 
262  Quality q1 = get_quality ("1", "1");
263 
264  // TAKER OWNER
265  // QUAL OFFER FUNDS QUAL OFFER FUNDS EXPECTED
266  // XRP USD
267  attempt (Sell, "N:N", q1, { "2", "2" }, "2", q1, { "2", "2" }, "2", { "2", "2" }, xrp(), usd());
268  attempt (Sell, "N:B", q1, { "2", "2" }, "2", q1, { "2", "2" }, "1.8", { "1", "1.8" }, xrp(), usd());
269  attempt (Buy, "N:T", q1, { "1", "1" }, "2", q1, { "2", "2" }, "2", { "1", "1" }, xrp(), usd());
270  attempt (Buy, "N:BT", q1, { "1", "1" }, "2", q1, { "2", "2" }, "1.8", { "1", "1" }, xrp(), usd());
271  attempt (Buy, "N:TB", q1, { "1", "1" }, "2", q1, { "2", "2" }, "0.8", { "0", "0.8" }, xrp(), usd());
272 
273  attempt (Sell, "T:N", q1, { "1", "1" }, "2", q1, { "2", "2" }, "2", { "1", "1" }, xrp(), usd());
274  attempt (Sell, "T:B", q1, { "1", "1" }, "2", q1, { "2", "2" }, "1.8", { "1", "1.8" }, xrp(), usd());
275  attempt (Buy, "T:T", q1, { "1", "1" }, "2", q1, { "2", "2" }, "2", { "1", "1" }, xrp(), usd());
276  attempt (Buy, "T:BT", q1, { "1", "1" }, "2", q1, { "2", "2" }, "1.8", { "1", "1" }, xrp(), usd());
277  attempt (Buy, "T:TB", q1, { "1", "1" }, "2", q1, { "2", "2" }, "0.8", { "0", "0.8" }, xrp(), usd());
278 
279  attempt (Sell, "A:N", q1, { "2", "2" }, "1", q1, { "2", "2" }, "2", { "1", "1" }, xrp(), usd());
280  attempt (Sell, "A:B", q1, { "2", "2" }, "1", q1, { "2", "2" }, "1.8", { "1", "1.8" }, xrp(), usd());
281  attempt (Buy, "A:T", q1, { "2", "2" }, "1", q1, { "3", "3" }, "3", { "1", "1" }, xrp(), usd());
282  attempt (Buy, "A:BT", q1, { "2", "2" }, "1", q1, { "3", "3" }, "2.4", { "1", "1" }, xrp(), usd());
283  attempt (Buy, "A:TB", q1, { "2", "2" }, "1", q1, { "3", "3" }, "0.8", { "0", "0.8" }, xrp(), usd());
284 
285  attempt (Sell, "TA:N", q1, { "2", "2" }, "1", q1, { "2", "2" }, "2", { "1", "1" }, xrp(), usd());
286  attempt (Sell, "TA:B", q1, { "2", "2" }, "1", q1, { "3", "3" }, "1.8", { "1", "1.8" }, xrp(), usd());
287  attempt (Buy, "TA:T", q1, { "2", "2" }, "1", q1, { "3", "3" }, "3", { "1", "1" }, xrp(), usd());
288  attempt (Buy, "TA:BT", q1, { "2", "2" }, "1", q1, { "3", "3" }, "1.8", { "1", "1.8" }, xrp(), usd());
289  attempt (Buy, "TA:TB", q1, { "2", "2" }, "1", q1, { "3", "3" }, "1.8", { "1", "1.8" }, xrp(), usd());
290 
291  attempt (Sell, "AT:N", q1, { "2", "2" }, "1", q1, { "3", "3" }, "3", { "1", "1" }, xrp(), usd());
292  attempt (Sell, "AT:B", q1, { "2", "2" }, "1", q1, { "3", "3" }, "1.8", { "1", "1.8" }, xrp(), usd());
293  attempt (Buy, "AT:T", q1, { "2", "2" }, "1", q1, { "3", "3" }, "3", { "1", "1" }, xrp(), usd());
294  attempt (Buy, "AT:BT", q1, { "2", "2" }, "1", q1, { "3", "3" }, "1.8", { "1", "1.8" }, xrp(), usd());
295  attempt (Buy, "AT:TB", q1, { "2", "2" }, "1", q1, { "3", "3" }, "0.8", { "0", "0.8" }, xrp(), usd());
296  }
297 
298  void
300  {
301  testcase ("XRP Quantization: output");
302 
303  Quality q1 = get_quality ("1", "1");
304 
305  // TAKER OWNER
306  // QUAL OFFER FUNDS QUAL OFFER FUNDS EXPECTED
307  // USD XRP
308  attempt (Sell, "N:N", q1, { "3", "3" }, "3", q1, { "3", "3" }, "3", { "3", "3" }, usd(), xrp());
309  attempt (Sell, "N:B", q1, { "3", "3" }, "3", q1, { "3", "3" }, "2", { "2", "2" }, usd(), xrp());
310  attempt (Buy, "N:T", q1, { "3", "3" }, "2.5", q1, { "5", "5" }, "5", { "2.5", "2" }, usd(), xrp());
311  attempt (Buy, "N:BT", q1, { "3", "3" }, "1.5", q1, { "5", "5" }, "4", { "1.5", "1" }, usd(), xrp());
312  attempt (Buy, "N:TB", q1, { "3", "3" }, "2.2", q1, { "5", "5" }, "1", { "1", "1" }, usd(), xrp());
313 
314  attempt (Sell, "T:N", q1, { "1", "1" }, "2", q1, { "2", "2" }, "2", { "1", "1" }, usd(), xrp());
315  attempt (Sell, "T:B", q1, { "2", "2" }, "2", q1, { "3", "3" }, "1", { "1", "1" }, usd(), xrp());
316  attempt (Buy, "T:T", q1, { "1", "1" }, "2", q1, { "2", "2" }, "2", { "1", "1" }, usd(), xrp());
317  attempt (Buy, "T:BT", q1, { "1", "1" }, "2", q1, { "3", "3" }, "2", { "1", "1" }, usd(), xrp());
318  attempt (Buy, "T:TB", q1, { "2", "2" }, "2", q1, { "3", "3" }, "1", { "1", "1" }, usd(), xrp());
319 
320  attempt (Sell, "A:N", q1, { "2", "2" }, "1.5", q1, { "2", "2" }, "2", { "1.5", "1" }, usd(), xrp());
321  attempt (Sell, "A:B", q1, { "2", "2" }, "1.8", q1, { "3", "3" }, "2", { "1.8", "1" }, usd(), xrp());
322  attempt (Buy, "A:T", q1, { "2", "2" }, "1.2", q1, { "3", "3" }, "3", { "1.2", "1" }, usd(), xrp());
323  attempt (Buy, "A:BT", q1, { "2", "2" }, "1.5", q1, { "4", "4" }, "3", { "1.5", "1" }, usd(), xrp());
324  attempt (Buy, "A:TB", q1, { "2", "2" }, "1.5", q1, { "4", "4" }, "1", { "1", "1" }, usd(), xrp());
325 
326  attempt (Sell, "TA:N", q1, { "2", "2" }, "1.5", q1, { "2", "2" }, "2", { "1.5", "1" }, usd(), xrp());
327  attempt (Sell, "TA:B", q1, { "2", "2" }, "1.5", q1, { "3", "3" }, "1", { "1", "1" }, usd(), xrp());
328  attempt (Buy, "TA:T", q1, { "2", "2" }, "1.5", q1, { "3", "3" }, "3", { "1.5", "1" }, usd(), xrp());
329  attempt (Buy, "TA:BT", q1, { "2", "2" }, "1.8", q1, { "4", "4" }, "3", { "1.8", "1" }, usd(), xrp());
330  attempt (Buy, "TA:TB", q1, { "2", "2" }, "1.2", q1, { "3", "3" }, "1", { "1", "1" }, usd(), xrp());
331 
332  attempt (Sell, "AT:N", q1, { "2", "2" }, "2.5", q1, { "4", "4" }, "4", { "2", "2" }, usd(), xrp());
333  attempt (Sell, "AT:B", q1, { "2", "2" }, "2.5", q1, { "3", "3" }, "1", { "1", "1" }, usd(), xrp());
334  attempt (Buy, "AT:T", q1, { "2", "2" }, "2.5", q1, { "3", "3" }, "3", { "2", "2" }, usd(), xrp());
335  attempt (Buy, "AT:BT", q1, { "2", "2" }, "2.5", q1, { "4", "4" }, "3", { "2", "2" }, usd(), xrp());
336  attempt (Buy, "AT:TB", q1, { "2", "2" }, "2.5", q1, { "3", "3" }, "1", { "1", "1" }, usd(), xrp());
337  }
338 
339  void
341  {
342  testcase ("IOU to IOU");
343 
344  Quality q1 = get_quality ("1", "1");
345 
346  // Highly exaggerated 50% transfer rate for the input and output:
347  Rate const rate { parityRate.value + (parityRate.value / 2) };
348 
349  // TAKER OWNER
350  // QUAL OFFER FUNDS QUAL OFFER FUNDS EXPECTED
351  // EUR USD
352  attempt (Sell, "N:N", q1, { "2", "2" }, "10", q1, { "2", "2" }, "10", { "2", "2" }, eur(), usd(), rate, rate);
353  attempt (Sell, "N:B", q1, { "4", "4" }, "10", q1, { "4", "4" }, "4", { "2.666666666666666", "2.666666666666666" }, eur(), usd(), rate, rate);
354  attempt (Buy, "N:T", q1, { "1", "1" }, "10", q1, { "2", "2" }, "10", { "1", "1" }, eur(), usd(), rate, rate);
355  attempt (Buy, "N:BT", q1, { "2", "2" }, "10", q1, { "6", "6" }, "5", { "2", "2" }, eur(), usd(), rate, rate);
356  attempt (Buy, "N:TB", q1, { "2", "2" }, "2", q1, { "6", "6" }, "1", { "0.6666666666666667", "0.6666666666666667" }, eur(), usd(), rate, rate);
357  attempt (Sell, "A:N", q1, { "2", "2" }, "2.5", q1, { "2", "2" }, "10", { "1.666666666666666", "1.666666666666666" }, eur(), usd(), rate, rate);
358  }
359 
360  void
361  run() override
362  {
363  test_xrp_to_iou ();
364  test_iou_to_xrp ();
365  test_iou_to_iou ();
366  }
367 };
368 
370 
371 }
ripple::Taker_test::TestTaker::set_funds
void set_funds(STAmount const &funds)
Definition: Taker_test.cpp:60
ripple::Issue
A currency issued by an account.
Definition: Issue.h:34
std::string
STL class.
ripple::BEAST_DEFINE_TESTSUITE
BEAST_DEFINE_TESTSUITE(AccountTxPaging, app, ripple)
ripple::Rate
Represents a transfer rate.
Definition: Rate.h:37
ripple::composed_quality
Quality composed_quality(Quality const &lhs, Quality const &rhs)
Definition: Quality.cpp:103
ripple::Taker_test::xrp
Issue const & xrp() const
Definition: Taker_test.cpp:134
std::pair
ripple::Taker_test::attempt
void attempt(bool sell, std::string name, Quality taker_quality, cross_attempt_offer const offer, std::string const funds, Quality cross_quality, cross_attempt_offer const cross, std::string const cross_funds, cross_attempt_offer const flow, Issue const &issue_in, Issue const &issue_out, Rate rate_in=parityRate, Rate rate_out=parityRate)
Definition: Taker_test.cpp:180
ripple::Taker_test::Sell
static const bool Sell
Definition: Taker_test.cpp:30
ripple::BasicTaker::do_cross
BasicTaker::Flow do_cross(Amounts offer, Quality quality, AccountID const &owner)
Perform direct crossing through given offer.
Definition: Taker.cpp:372
ripple::Taker_test::TestTaker::funds_
STAmount funds_
Definition: Taker_test.cpp:35
ripple::BasicTaker::reject
bool reject(Quality const &quality) const noexcept
Returns true if the quality does not meet the taker's requirements.
Definition: Taker.h:169
ripple::STAmount::getText
std::string getText() const override
Definition: STAmount.cpp:492
ripple::CrossType::XrpToIou
@ XrpToIou
ripple::Issue::currency
Currency currency
Definition: Issue.h:37
ripple::CrossType::IouToXrp
@ IouToXrp
ripple::QualityDirection::in
@ in
ripple::BasicTaker
State for the active party during order book or payment operations.
Definition: Taker.h:44
ripple::Taker_test
Definition: Taker_test.cpp:27
ripple::Taker_test::eur
Issue const & eur() const
Definition: Taker_test.cpp:127
ripple::to_string
std::string to_string(ListDisposition disposition)
Definition: ValidatorList.cpp:41
ripple::Taker_test::TestTaker::cross
Amounts cross(Amounts offer, Quality quality)
Definition: Taker_test.cpp:75
ripple::Taker_test::cross_attempt_offer::out
std::string out
Definition: Taker_test.cpp:166
ripple::BasicTaker::cross_type
CrossType cross_type() const
Returns the type of crossing that is being performed.
Definition: Taker.h:176
ripple::parityRate
const Rate parityRate(QUALITY_ONE)
A transfer rate signifying a 1:1 exchange.
Definition: Rate.h:110
ripple::Taker_test::parse_amounts
Amounts parse_amounts(std::string const &amount_in, Issue const &issue_in, std::string const &amount_out, Issue const &issue_out)
Definition: Taker_test.cpp:146
ripple::Taker_test::format_amount
std::string format_amount(STAmount const &amount)
Definition: Taker_test.cpp:171
ripple::Taker_test::TestTaker
Definition: Taker_test.cpp:32
ripple::base_uint< 160, detail::AccountIDTag >
ripple::CrossType
CrossType
The flavor of an offer crossing.
Definition: Taker.h:36
ripple::CrossType::IouToIou
@ IouToIou
ripple::QualityDirection::out
@ out
ripple::Taker_test::test_xrp_to_iou
void test_xrp_to_iou()
Definition: Taker_test.cpp:258
ripple::Taker_test::cross_attempt_offer::in
std::string in
Definition: Taker_test.cpp:165
ripple::Taker_test::TestTaker::get_funds
STAmount get_funds(AccountID const &owner, STAmount const &funds) const override
Definition: Taker_test.cpp:66
ripple::STAmount
Definition: STAmount.h:42
ripple::xrpAccount
AccountID const & xrpAccount()
Compute AccountID from public key.
Definition: AccountID.cpp:149
ripple::isXRP
bool isXRP(AccountID const &c)
Definition: AccountID.h:121
ripple::Taker_test::test_iou_to_iou
void test_iou_to_iou()
Definition: Taker_test.cpp:340
ripple::Taker_test::cross_attempt_offer::cross_attempt_offer
cross_attempt_offer(std::string const &in_, std::string const &out_)
Definition: Taker_test.cpp:158
std::uint32_t
ripple::Taker_test::test_iou_to_xrp
void test_iou_to_xrp()
Definition: Taker_test.cpp:299
ripple::Taker_test::TestTaker::TestTaker
TestTaker(CrossType cross_type, Amounts const &amount, Quality const &quality, STAmount const &funds, std::uint32_t flags, Rate const &rate_in, Rate const &rate_out)
Definition: Taker_test.cpp:39
ripple::Taker_test::usd
Issue const & usd() const
Definition: Taker_test.cpp:120
ripple::Taker_test::parse_amount
STAmount parse_amount(std::string const &amount, Issue const &issue)
Definition: Taker_test.cpp:141
ripple::BasicTaker::done
bool done() const
Returns true if order crossing should not continue.
Definition: Taker.cpp:106
ripple::Rate::value
std::uint32_t value
Definition: Rate.h:40
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
ripple::amountFromString
STAmount amountFromString(Issue const &issue, std::string const &amount)
Definition: STAmount.cpp:741
ripple::tfSell
const std::uint32_t tfSell
Definition: TxFlags.h:79
std::endl
T endl(T... args)
ripple::Taker_test::cross_attempt_offer
Definition: Taker_test.cpp:156
ripple::STAmount::issue
Issue const & issue() const
Definition: STAmount.h:156
ripple::Taker_test::Buy
static const bool Buy
Definition: Taker_test.cpp:29
ripple::Taker_test::TestTaker::cross_funds
STAmount cross_funds
Definition: Taker_test.cpp:36
ripple::flow
path::RippleCalc::Output flow(PaymentSandbox &view, STAmount const &deliver, AccountID const &src, AccountID const &dst, STPathSet const &paths, bool defaultPaths, bool partialPayment, bool ownerPaysTransferFee, bool offerCrossing, boost::optional< Quality > const &limitQuality, boost::optional< STAmount > const &sendMax, beast::Journal j, path::detail::FlowDebugInfo *flowDebugInfo=nullptr)
Make a payment from the src account to the dst account.
ripple::Taker_test::TestTaker::cross
std::pair< Amounts, Amounts > cross(Amounts offer1, Quality quality1, Amounts offer2, Quality quality2)
Definition: Taker_test.cpp:95
std::make_pair
T make_pair(T... args)
ripple::Taker_test::get_quality
Quality get_quality(std::string in, std::string out)
Definition: Taker_test.cpp:238
ripple::BasicTaker::account
AccountID const & account() const noexcept
Returns the account identifier of the taker.
Definition: Taker.h:162
type_traits
ripple::xrpCurrency
Currency const & xrpCurrency()
XRP currency.
Definition: UintTypes.cpp:111
ripple::Taker_test::run
void run() override
Definition: Taker_test.cpp:361