xrpld
Loading...
Searching...
No Matches
ticket.cpp
1#include <test/jtx/ticket.h>
2
3#include <test/jtx/Account.h>
4#include <test/jtx/Env.h>
5#include <test/jtx/JTx.h>
6
7#include <xrpl/json/json_value.h>
8#include <xrpl/protocol/SField.h>
9#include <xrpl/protocol/jss.h>
10
11#include <cstdint>
12
14
16create(Account const& account, std::uint32_t count)
17{
18 json::Value jv;
19 jv[jss::Account] = account.human();
20 jv[jss::TransactionType] = jss::TicketCreate;
21 jv[sfTicketCount.jsonName] = count;
22 return jv;
23}
24
25void
27{
28 jt.fillSeq = false;
29 jt[sfSequence.jsonName] = 0u;
30 jt[sfTicketSequence.jsonName] = ticketSeq_;
31}
32
33} // namespace xrpl::test::jtx::ticket
Represents a JSON value.
Definition json_value.h:130
Immutable cryptographic account descriptor.
Definition jtx/Account.h:17
A transaction testing environment.
Definition Env.h:143
void operator()(Env &, JTx &jt) const
Definition ticket.cpp:26
std::uint32_t ticketSeq_
Definition ticket.h:28
Ticket operations.
Definition ticket.cpp:13
json::Value create(Account const &account, std::uint32_t count)
Create one of more tickets.
Definition ticket.cpp:16
Execution context for applying a JSON transaction.
Definition JTx.h:23