|
xrpld
|
#include <Offer.h>

Public Member Functions | |
| TOffer ()=default | |
| TOffer (SLE::pointer entry, Quality quality) | |
| Quality | quality () const noexcept |
| Returns the quality of the offer. | |
| AccountID const & | owner () const |
| Returns the account id of the offer's owner. | |
| TAmounts< TIn, TOut > const & | amount () const |
| Returns the in and out amounts. | |
| bool | fullyConsumed () const |
| Returns true if no more funds can flow through this offer. | |
| void | consume (ApplyView &view, TAmounts< TIn, TOut > const &consumed) |
| Adjusts the offer to indicate that we consumed some (or all) of it. | |
| std::string | id () const |
| std::optional< uint256 > | key () const |
| Asset const & | assetIn () const |
| Asset const & | assetOut () const |
| TAmounts< TIn, TOut > | limitOut (TAmounts< TIn, TOut > const &offerAmount, TOut const &limit, bool roundUp) const |
| TAmounts< TIn, TOut > | limitIn (TAmounts< TIn, TOut > const &offerAmount, TIn const &limit, bool roundUp) const |
| bool | isFunded () const |
| bool | checkInvariant (TAmounts< TIn, TOut > const &consumed, beast::Journal j) const |
| Check any required invariant. | |
Static Public Member Functions | |
| template<typename... Args> | |
| static TER | send (Args &&... args) |
| static std::pair< std::uint32_t, std::uint32_t > | adjustRates (std::uint32_t ofrInRate, std::uint32_t ofrOutRate) |
Private Member Functions | |
| void | setFieldAmounts () |
Private Attributes | |
| SLE::pointer | entry_ |
| Quality | quality_ {} |
| AccountID | accountID_ |
| Asset | assetIn_ |
| Asset | assetOut_ |
| TAmounts< TIn, TOut > | amounts_ {} |
Definition at line 19 of file tx/paths/Offer.h.
|
default |
| xrpl::TOffer< TIn, TOut >::TOffer | ( | SLE::pointer | entry, |
| Quality | quality ) |
Definition at line 161 of file tx/paths/Offer.h.
|
private |
Definition at line 174 of file tx/paths/Offer.h.
|
nodiscardnoexcept |
Returns the quality of the offer.
Conceptually, the quality is the ratio of output to input currency. The implementation calculates it as the ratio of input to output currency (so it sorts ascending). The quality is computed at the time the offer is placed, and never changes for the lifetime of the offer. This is an important business rule that maintains accuracy when an offer is partially filled; Subsequent partial fills will use the original quality.
Definition at line 47 of file tx/paths/Offer.h.
|
nodiscard |
Returns the account id of the offer's owner.
Definition at line 54 of file tx/paths/Offer.h.
|
nodiscard |
Returns the in and out amounts.
Some or all of the out amount may be unfunded.
Definition at line 63 of file tx/paths/Offer.h.
|
nodiscard |
Returns true if no more funds can flow through this offer.
Definition at line 70 of file tx/paths/Offer.h.
| void xrpl::TOffer< TIn, TOut >::consume | ( | ApplyView & | view, |
| TAmounts< TIn, TOut > const & | consumed ) |
Adjusts the offer to indicate that we consumed some (or all) of it.
Definition at line 81 of file tx/paths/Offer.h.
|
nodiscard |
Definition at line 95 of file tx/paths/Offer.h.
|
nodiscard |
Definition at line 101 of file tx/paths/Offer.h.
|
nodiscard |
Definition at line 232 of file tx/paths/Offer.h.
|
nodiscard |
Definition at line 239 of file tx/paths/Offer.h.
|
nodiscard |
Definition at line 197 of file tx/paths/Offer.h.
|
nodiscard |
Definition at line 207 of file tx/paths/Offer.h.
|
static |
Definition at line 225 of file tx/paths/Offer.h.
|
nodiscard |
Definition at line 122 of file tx/paths/Offer.h.
|
static |
Definition at line 129 of file tx/paths/Offer.h.
|
nodiscard |
Check any required invariant.
Limit order book offer always returns true.
Definition at line 139 of file tx/paths/Offer.h.
|
private |
Definition at line 22 of file tx/paths/Offer.h.
|
private |
Definition at line 23 of file tx/paths/Offer.h.
|
private |
Definition at line 24 of file tx/paths/Offer.h.
|
private |
Definition at line 25 of file tx/paths/Offer.h.
|
private |
Definition at line 26 of file tx/paths/Offer.h.
|
private |
Definition at line 28 of file tx/paths/Offer.h.