|
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 110 of file src/test/jtx/Oracle.h.
Definition at line 34 of file Oracle.cpp.
|
private |
Definition at line 77 of file Oracle.cpp.
| void xrpl::test::jtx::oracle::Oracle::remove | ( | RemoveArg const & | arg | ) |
Definition at line 53 of file Oracle.cpp.
| void xrpl::test::jtx::oracle::Oracle::set | ( | CreateArg const & | arg | ) |
Definition at line 303 of file Oracle.cpp.
| void xrpl::test::jtx::oracle::Oracle::set | ( | UpdateArg const & | arg | ) |
Definition at line 213 of file Oracle.cpp.
|
static |
Definition at line 162 of file Oracle.cpp.
|
nodiscard |
Definition at line 148 of file src/test/jtx/Oracle.h.
|
nodiscard |
Definition at line 154 of file src/test/jtx/Oracle.h.
|
staticnodiscard |
Definition at line 122 of file Oracle.cpp.
|
nodiscard |
Definition at line 129 of file Oracle.cpp.
|
nodiscard |
Definition at line 155 of file Oracle.cpp.
|
static |
Definition at line 321 of file Oracle.cpp.
|
nodiscard |
Definition at line 176 of file src/test/jtx/Oracle.h.
|
static |
Definition at line 182 of file src/test/jtx/Oracle.h.
|
friend |
Definition at line 187 of file src/test/jtx/Oracle.h.
|
staticprivate |
Definition at line 114 of file src/test/jtx/Oracle.h.
|
private |
Definition at line 115 of file src/test/jtx/Oracle.h.
|
private |
Definition at line 116 of file src/test/jtx/Oracle.h.
|
private |
Definition at line 117 of file src/test/jtx/Oracle.h.