Class OfferCrossingResult
What an OfferCreate would do, as OfferCreateCrossing computes it.
Inheritance
Namespace: Xrpl.Amounts
Assembly: Xrpl.dll
Syntax
public sealed class OfferCrossingResult
Properties
| Edit this page View SourceApplied
Whether the transaction reaches a ledger and its fee is charged: tes and tec results.
Declaration
public bool Applied { get; }
Property Value
| Type | Description |
|---|---|
| bool |
BalanceChanges
How every account's balances moved, the transaction's fee included, as the ledger
records them - the same figures BalanceChanges.GetBalanceChanges reads from the
metadata, both sides of each trust line included. Pools are in Pools.
Declaration
public IReadOnlyList<BalanceChange> BalanceChanges { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<BalanceChange> |
EngineResult
The node's result: tesSUCCESS, tecKILLED, tecUNFUNDED_OFFER,
tecINSUF_RESERVE_OFFER, tecEXPIRED, tecFROZEN, tecNO_AUTH,
tecNO_PERMISSION, a tem code for a malformed offer, and so on.
Declaration
public string EngineResult { get; }
Property Value
| Type | Description |
|---|---|
| string |
Fills
The offers and pool slices the engine took, in the order it took them: pass by pass, and within a pass by the position of the book in the strand. Empty when the transaction fails, since nothing it took stays.
Declaration
public IReadOnlyList<OfferFill> Fills { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<OfferFill> |
MpTokens
The MPTokens the transaction created: the taker's for an MPT it buys, an offer owner's for one it is paid.
Declaration
public IReadOnlyList<MpTokenChange> MpTokens { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<MpTokenChange> |
NeedsDeeperBooks
Whether the engine walked past the last offer the snapshot read of a book it holds only in part (PartialBooks): the node may cross offers the snapshot does not have, so the result is exact only once the snapshot is read deeper.
Declaration
public bool NeedsDeeperBooks { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Offers
The snapshot's offers that were crossed or removed.
Declaration
public IReadOnlyList<OfferChange> Offers { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<OfferChange> |
Paid
What the account paid of its TakerGets asset, transfer fees included: the
engine's total, the sum of what each iteration took. The account's balance moves by
the same amount rounded at every iteration, which BalanceChanges reports.
Zero when the transaction fails.
Declaration
public XrplAmount Paid { get; }
Property Value
| Type | Description |
|---|---|
| XrplAmount |
Passes
Every strand the engine tried, pass by pass, and how it fared - including the passes of a transaction that failed, which say why it found no liquidity.
Declaration
public IReadOnlyList<FlowPass> Passes { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<FlowPass> |
PlacedTakerGets
The TakerGets of the offer left in the book; null when none is placed.
Declaration
public XrplAmount? PlacedTakerGets { get; }
Property Value
| Type | Description |
|---|---|
| XrplAmount? |
PlacedTakerPays
The TakerPays of the offer left in the book; null when none is placed.
Declaration
public XrplAmount? PlacedTakerPays { get; }
Property Value
| Type | Description |
|---|---|
| XrplAmount? |
Pools
The AMM pools that were traded against.
Declaration
public IReadOnlyList<AmmPoolChange> Pools { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<AmmPoolChange> |
Received
What the account received of its TakerPays asset: the engine's total, as Paid. Zero when the transaction fails.
Declaration
public XrplAmount Received { get; }
Property Value
| Type | Description |
|---|---|
| XrplAmount |
SnapshotAfter
The snapshot as the offer leaves it, to evaluate the next transaction against: the
balances after the fee and the crossing, the account's Sequence moved on (or its
ticket consumed), owner counts, trust lines created and deleted, offers crossed or
removed, the pools' and MPTs' balances, and the offer placed with what remains, at the
end of its quality in its book. The evaluated snapshot itself when the offer is not
Applied.
Declaration
public DexSnapshot SnapshotAfter { get; }
Property Value
| Type | Description |
|---|---|
| DexSnapshot |
Remarks
Built on first read. Its index is derived from the evaluated snapshot's, so evaluating
against it costs little more than evaluating against the evaluated snapshot again. It
is only as complete as that snapshot: what it does not hold, the offer cannot write
back. The placed offer's ledger index is made from the transaction's TicketSequence,
or else its Sequence, or else the account's in the snapshot.
The transaction's Sequence is taken as given: the engine does not check it
against the account's, as the node does with tefPAST_SEQ and terPRE_SEQ.
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | An offer is placed, and neither the snapshot's account nor the transaction gives a sequence. |
TrustLines
The trust lines the transaction created or deleted.
Declaration
public IReadOnlyList<TrustLineChange> TrustLines { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<TrustLineChange> |