|
rippled
|
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 15 of file Oracle.cpp.
|
private |
Definition at line 52 of file Oracle.cpp.
| void xrpl::test::jtx::oracle::Oracle::remove | ( | RemoveArg const & | arg | ) |
Definition at line 34 of file Oracle.cpp.
| void xrpl::test::jtx::oracle::Oracle::set | ( | CreateArg const & | arg | ) |
Definition at line 238 of file Oracle.cpp.
| void xrpl::test::jtx::oracle::Oracle::set | ( | UpdateArg const & | arg | ) |
Definition at line 167 of file Oracle.cpp.
|
static |
Definition at line 120 of file Oracle.cpp.
| std::uint32_t xrpl::test::jtx::oracle::Oracle::documentID | ( | ) | const |
|
static |
Definition at line 81 of file Oracle.cpp.
| bool xrpl::test::jtx::oracle::Oracle::expectPrice | ( | DataSeries const & | prices | ) | const |
Definition at line 88 of file Oracle.cpp.
| bool xrpl::test::jtx::oracle::Oracle::expectLastUpdateTime | ( | std::uint32_t | lastUpdateTime | ) | const |
Definition at line 113 of file Oracle.cpp.
|
static |
Definition at line 256 of file Oracle.cpp.
| Json::Value xrpl::test::jtx::oracle::Oracle::ledgerEntry | ( | std::optional< std::string > const & | index = std::nullopt | ) | const |
|
static |
|
friend |
|
staticprivate |
|
private |