xrpld
Loading...
Searching...
No Matches
ticket.h
1#pragma once
2
3#include <test/jtx/Account.h>
4#include <test/jtx/Env.h>
5#include <test/jtx/JTx.h>
6#include <test/jtx/owners.h>
7
8#include <xrpl/json/json_value.h>
9#include <xrpl/protocol/LedgerFormats.h>
10
11#include <cstdint>
12
13namespace xrpl::test::jtx {
14
15/*
16 This shows how the jtx system may be extended to other
17 generators, funclets, conditions, and operations,
18 without changing the base declarations.
19*/
20
24namespace ticket {
25
29json::Value
30create(Account const& account, std::uint32_t count);
31
35class Use
36{
37private:
39
40public:
41 Use(std::uint32_t ticketSeq) : ticketSeq_{ticketSeq}
42 {
43 }
44
45 void
46 operator()(Env&, JTx& jt) const;
47};
48
49} // namespace ticket
50
55
56} // namespace xrpl::test::jtx
A transaction testing environment.
Definition Env.h:161
void operator()(Env &, JTx &jt) const
Definition ticket.cpp:26
std::uint32_t ticketSeq_
Definition ticket.h:38
Use(std::uint32_t ticketSeq)
Definition ticket.h:41
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
OwnerCount< ltTICKET > tickets
Match the number of tickets on the account.
Definition ticket.h:54
Execution context for applying a JSON transaction.
Definition JTx.h:27