xrpld
Loading...
Searching...
No Matches
xrpl::test::jtx::JTx Struct Reference

Execution context for applying a JSON transaction. More...

#include <JTx.h>

Collaboration diagram for xrpl::test::jtx::JTx:

Classes

struct  PropList

Public Member Functions

 JTx ()=default
 JTx (JTx const &)=default
JTxoperator= (JTx const &)=default
 JTx (JTx &&)=default
JTxoperator= (JTx &&)=default
 JTx (json::Value &&jv)
 JTx (json::Value const &jv)
template<class Key>
json::Valueoperator[] (Key const &key)
template<class Prop>
Propget ()
 Return a property if it exists.
template<class Prop>
Prop const * get () const
void set (std::unique_ptr< BasicProp > p)
 Set a property If the property already exists, it is replaced.
template<class Prop, class... Args>
void set (Args &&... args)

Public Attributes

json::Value jv
requires_t require
std::optional< TERter = TER{tesSUCCESS}
std::optional< std::pair< ErrorCodeI, std::string > > rpcCode = std::nullopt
std::optional< std::pair< std::string, std::optional< std::string > > > rpcException = std::nullopt
bool fillFee = true
bool fillSeq = true
bool fillSig = true
bool fillNetid = true
std::shared_ptr< STTx const > stx
std::vector< std::function< void(Env &, JTx &)> > mainSigners
std::vector< std::function< void(Env &, JTx &)> > postSigners

Private Attributes

PropList props_

Detailed Description

Execution context for applying a JSON transaction.

This augments the transaction with various settings.

Definition at line 22 of file JTx.h.

Constructor & Destructor Documentation

◆ JTx() [1/5]

xrpl::test::jtx::JTx::JTx ( )
default

◆ JTx() [2/5]

xrpl::test::jtx::JTx::JTx ( JTx const & )
default

◆ JTx() [3/5]

xrpl::test::jtx::JTx::JTx ( JTx && )
default

◆ JTx() [4/5]

xrpl::test::jtx::JTx::JTx ( json::Value && jv)

Definition at line 48 of file JTx.h.

◆ JTx() [5/5]

xrpl::test::jtx::JTx::JTx ( json::Value const & jv)

Definition at line 52 of file JTx.h.

Member Function Documentation

◆ operator=() [1/2]

JTx & xrpl::test::jtx::JTx::operator= ( JTx const & )
default

◆ operator=() [2/2]

JTx & xrpl::test::jtx::JTx::operator= ( JTx && )
default

◆ operator[]()

template<class Key>
json::Value & xrpl::test::jtx::JTx::operator[] ( Key const & key)

Definition at line 58 of file JTx.h.

◆ get() [1/2]

template<class Prop>
Prop * xrpl::test::jtx::JTx::get ( )

Return a property if it exists.

Returns
nullptr if the Prop does not exist

Definition at line 70 of file JTx.h.

◆ get() [2/2]

template<class Prop>
Prop const * xrpl::test::jtx::JTx::get ( ) const
nodiscard

Definition at line 82 of file JTx.h.

◆ set() [1/2]

void xrpl::test::jtx::JTx::set ( std::unique_ptr< BasicProp > p)

Set a property If the property already exists, it is replaced.

Definition at line 99 of file JTx.h.

◆ set() [2/2]

template<class Prop, class... Args>
void xrpl::test::jtx::JTx::set ( Args &&... args)

Definition at line 114 of file JTx.h.

Member Data Documentation

◆ jv

json::Value xrpl::test::jtx::JTx::jv

Definition at line 24 of file JTx.h.

◆ require

requires_t xrpl::test::jtx::JTx::require

Definition at line 25 of file JTx.h.

◆ ter

std::optional<TER> xrpl::test::jtx::JTx::ter = TER{tesSUCCESS}

Definition at line 26 of file JTx.h.

◆ rpcCode

std::optional<std::pair<ErrorCodeI, std::string> > xrpl::test::jtx::JTx::rpcCode = std::nullopt

Definition at line 27 of file JTx.h.

◆ rpcException

std::optional<std::pair<std::string, std::optional<std::string> > > xrpl::test::jtx::JTx::rpcException = std::nullopt

Definition at line 28 of file JTx.h.

◆ fillFee

bool xrpl::test::jtx::JTx::fillFee = true

Definition at line 29 of file JTx.h.

◆ fillSeq

bool xrpl::test::jtx::JTx::fillSeq = true

Definition at line 30 of file JTx.h.

◆ fillSig

bool xrpl::test::jtx::JTx::fillSig = true

Definition at line 31 of file JTx.h.

◆ fillNetid

bool xrpl::test::jtx::JTx::fillNetid = true

Definition at line 32 of file JTx.h.

◆ stx

std::shared_ptr<STTx const> xrpl::test::jtx::JTx::stx

Definition at line 33 of file JTx.h.

◆ mainSigners

std::vector<std::function<void(Env&, JTx&)> > xrpl::test::jtx::JTx::mainSigners

Definition at line 35 of file JTx.h.

◆ postSigners

std::vector<std::function<void(Env&, JTx&)> > xrpl::test::jtx::JTx::postSigners

Definition at line 38 of file JTx.h.

◆ props_

PropList xrpl::test::jtx::JTx::props_
private

Definition at line 150 of file JTx.h.