|
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 29 of file tx/paths/Offer.h.
|
default |
| xrpl::TOffer< TIn, TOut >::TOffer | ( | SLE::pointer | entry, |
| Quality | quality ) |
Definition at line 180 of file tx/paths/Offer.h.
|
private |
Definition at line 193 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 58 of file tx/paths/Offer.h.
|
nodiscard |
Returns the account id of the offer's owner.
Definition at line 67 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 77 of file tx/paths/Offer.h.
|
nodiscard |
Returns true if no more funds can flow through this offer.
Definition at line 86 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 99 of file tx/paths/Offer.h.
|
nodiscard |
Definition at line 113 of file tx/paths/Offer.h.
|
nodiscard |
Definition at line 119 of file tx/paths/Offer.h.
|
nodiscard |
Definition at line 252 of file tx/paths/Offer.h.
|
nodiscard |
Definition at line 259 of file tx/paths/Offer.h.
|
nodiscard |
Definition at line 216 of file tx/paths/Offer.h.
|
nodiscard |
Definition at line 226 of file tx/paths/Offer.h.
|
static |
Definition at line 244 of file tx/paths/Offer.h.
|
nodiscard |
Definition at line 140 of file tx/paths/Offer.h.
|
static |
Definition at line 147 of file tx/paths/Offer.h.
|
nodiscard |
Check any required invariant.
Limit order book offer always returns true.
Definition at line 158 of file tx/paths/Offer.h.
|
private |
Definition at line 32 of file tx/paths/Offer.h.
|
private |
Definition at line 33 of file tx/paths/Offer.h.
|
private |
Definition at line 34 of file tx/paths/Offer.h.
|
private |
Definition at line 35 of file tx/paths/Offer.h.
|
private |
Definition at line 36 of file tx/paths/Offer.h.
|
private |
Definition at line 38 of file tx/paths/Offer.h.