|
xrpld
|
Oracle class facilitates unit-testing of the Price Oracle feature. More...
#include <Oracle.h>

Public Member Functions | |
| Oracle (Env &env, CreateArg const &arg, bool submit=true) | |
| void | remove (RemoveArg const &arg) |
| void | set (CreateArg const &arg) |
| void | set (UpdateArg const &arg) |
| std::uint32_t | documentID () const |
| bool | exists () const |
| bool | expectPrice (DataSeries const &prices) const |
| bool | expectLastUpdateTime (std::uint32_t lastUpdateTime) const |
| json::Value | ledgerEntry (std::optional< std::string > const &index=std::nullopt) const |
Static Public Member Functions | |
| static json::Value | aggregatePrice (Env &env, std::optional< AnyValue > const &baseAsset, std::optional< AnyValue > const "eAsset, std::optional< OraclesData > const &oracles=std::nullopt, std::optional< AnyValue > const &trim=std::nullopt, std::optional< AnyValue > const &timeThreshold=std::nullopt) |
| static bool | exists (Env &env, AccountID const &account, std::uint32_t documentID) |
| static json::Value | ledgerEntry (Env &env, std::optional< std::variant< AccountID, std::string > > const &account, std::optional< AnyValue > const &documentID, std::optional< std::string > const &index=std::nullopt) |
| static void | setFee (std::uint32_t f) |
Private Member Functions | |
| void | submit (json::Value const &jv, std::optional< jtx::Msig > const &msig, std::optional< jtx::Seq > const &seq, std::optional< Ter > const &err) |
Private Attributes | |
| Env & | env_ |
| AccountID | owner_ |
| std::uint32_t | documentID_ {} |
Static Private Attributes | |
| static std::uint32_t | fee = 0 |
Friends | |
| std::ostream & | operator<< (std::ostream &strm, Oracle const &oracle) |
Oracle class facilitates unit-testing of the Price Oracle feature.
It defines functions to create, update, and delete the Oracle object, to query for various states, and to call APIs.
Definition at line 92 of file src/test/jtx/Oracle.h.
Definition at line 33 of file Oracle.cpp.
|
private |
Definition at line 76 of file Oracle.cpp.
| void xrpl::test::jtx::oracle::Oracle::remove | ( | RemoveArg const & | arg | ) |
Definition at line 52 of file Oracle.cpp.
| void xrpl::test::jtx::oracle::Oracle::set | ( | CreateArg const & | arg | ) |
Definition at line 302 of file Oracle.cpp.
| void xrpl::test::jtx::oracle::Oracle::set | ( | UpdateArg const & | arg | ) |
Definition at line 212 of file Oracle.cpp.
|
static |
Definition at line 161 of file Oracle.cpp.
|
nodiscard |
Definition at line 130 of file src/test/jtx/Oracle.h.
|
nodiscard |
Definition at line 136 of file src/test/jtx/Oracle.h.
|
staticnodiscard |
Definition at line 121 of file Oracle.cpp.
|
nodiscard |
Definition at line 128 of file Oracle.cpp.
|
nodiscard |
Definition at line 154 of file Oracle.cpp.
|
static |
Definition at line 320 of file Oracle.cpp.
|
nodiscard |
Definition at line 158 of file src/test/jtx/Oracle.h.
|
static |
Definition at line 164 of file src/test/jtx/Oracle.h.
|
friend |
Definition at line 169 of file src/test/jtx/Oracle.h.
|
staticprivate |
Definition at line 96 of file src/test/jtx/Oracle.h.
|
private |
Definition at line 97 of file src/test/jtx/Oracle.h.
|
private |
Definition at line 98 of file src/test/jtx/Oracle.h.
|
private |
Definition at line 99 of file src/test/jtx/Oracle.h.