rippled
Classes | Protected Member Functions | Protected Attributes | List of all members
ripple::test::jtx::AMMTest Class Reference
Inheritance diagram for ripple::test::jtx::AMMTest:
Inheritance graph
[legend]
Collaboration diagram for ripple::test::jtx::AMMTest:
Collaboration graph
[legend]

Classes

class  gate
 

Protected Member Functions

XRPAmount reserve (jtx::Env &env, std::uint32_t count) const
 
XRPAmount ammCrtFee (jtx::Env &env) const
 
jtx::Env pathTestEnv ()
 
Json::Value find_paths_request (jtx::Env &env, jtx::Account const &src, jtx::Account const &dst, STAmount const &saDstAmount, std::optional< STAmount > const &saSendMax=std::nullopt, std::optional< Currency > const &saSrcCurrency=std::nullopt)
 
std::tuple< STPathSet, STAmount, STAmountfind_paths (jtx::Env &env, jtx::Account const &src, jtx::Account const &dst, STAmount const &saDstAmount, std::optional< STAmount > const &saSendMax=std::nullopt, std::optional< Currency > const &saSrcCurrency=std::nullopt)
 
void testAMM (std::function< void(jtx::AMM &, jtx::Env &)> &&cb, std::optional< std::pair< STAmount, STAmount >> const &pool=std::nullopt, std::uint16_t tfee=0, std::optional< jtx::ter > const &ter=std::nullopt, std::optional< FeatureBitset > const &features=std::nullopt)
 testAMM() funds 30,000XRP and 30,000IOU for each non-XRP asset to Alice and Carol More...
 

Protected Attributes

const jtx::Account gw
 
const jtx::Account carol
 
const jtx::Account alice
 
const jtx::Account bob
 
const jtx::IOU USD
 
const jtx::IOU EUR
 
const jtx::IOU GBP
 
const jtx::IOU BTC
 
const jtx::IOU BAD
 

Detailed Description

Definition at line 90 of file AMMTest.h.

Member Function Documentation

◆ reserve()

XRPAmount ripple::test::jtx::AMMTest::reserve ( jtx::Env env,
std::uint32_t  count 
) const
protected

Definition at line 147 of file AMMTest.cpp.

◆ ammCrtFee()

XRPAmount ripple::test::jtx::AMMTest::ammCrtFee ( jtx::Env env) const
protected

Definition at line 153 of file AMMTest.cpp.

◆ pathTestEnv()

jtx::Env ripple::test::jtx::AMMTest::pathTestEnv ( )
protected

Definition at line 159 of file AMMTest.cpp.

◆ find_paths_request()

Json::Value ripple::test::jtx::AMMTest::find_paths_request ( jtx::Env env,
jtx::Account const &  src,
jtx::Account const &  dst,
STAmount const &  saDstAmount,
std::optional< STAmount > const &  saSendMax = std::nullopt,
std::optional< Currency > const &  saSrcCurrency = std::nullopt 
)
protected

Definition at line 173 of file AMMTest.cpp.

◆ find_paths()

std::tuple< STPathSet, STAmount, STAmount > ripple::test::jtx::AMMTest::find_paths ( jtx::Env env,
jtx::Account const &  src,
jtx::Account const &  dst,
STAmount const &  saDstAmount,
std::optional< STAmount > const &  saSendMax = std::nullopt,
std::optional< Currency > const &  saSrcCurrency = std::nullopt 
)
protected

Definition at line 232 of file AMMTest.cpp.

◆ testAMM()

void ripple::test::jtx::AMMTestBase::testAMM ( std::function< void(jtx::AMM &, jtx::Env &)> &&  cb,
std::optional< std::pair< STAmount, STAmount >> const &  pool = std::nullopt,
std::uint16_t  tfee = 0,
std::optional< jtx::ter > const &  ter = std::nullopt,
std::optional< FeatureBitset > const &  features = std::nullopt 
)
protectedinherited

testAMM() funds 30,000XRP and 30,000IOU for each non-XRP asset to Alice and Carol

Definition at line 101 of file AMMTest.cpp.

Member Data Documentation

◆ gw

const jtx::Account ripple::test::jtx::AMMTestBase::gw
protectedinherited

Definition at line 64 of file AMMTest.h.

◆ carol

const jtx::Account ripple::test::jtx::AMMTestBase::carol
protectedinherited

Definition at line 65 of file AMMTest.h.

◆ alice

const jtx::Account ripple::test::jtx::AMMTestBase::alice
protectedinherited

Definition at line 66 of file AMMTest.h.

◆ bob

const jtx::Account ripple::test::jtx::AMMTestBase::bob
protectedinherited

Definition at line 67 of file AMMTest.h.

◆ USD

const jtx::IOU ripple::test::jtx::AMMTestBase::USD
protectedinherited

Definition at line 68 of file AMMTest.h.

◆ EUR

const jtx::IOU ripple::test::jtx::AMMTestBase::EUR
protectedinherited

Definition at line 69 of file AMMTest.h.

◆ GBP

const jtx::IOU ripple::test::jtx::AMMTestBase::GBP
protectedinherited

Definition at line 70 of file AMMTest.h.

◆ BTC

const jtx::IOU ripple::test::jtx::AMMTestBase::BTC
protectedinherited

Definition at line 71 of file AMMTest.h.

◆ BAD

const jtx::IOU ripple::test::jtx::AMMTestBase::BAD
protectedinherited

Definition at line 72 of file AMMTest.h.