Show / Hide Table of Contents

Class AmmOutcome

What an AMMDeposit or AMMWithdraw did to the sending account, read from the metadata.

Inheritance
object
AmmOutcome
Namespace: Xrpl.Sugar
Assembly: Xrpl.dll
Syntax
public sealed class AmmOutcome
Remarks

Amounts are in each asset's own unit (drops for XRP) and signed from the account's side: a deposit makes the asset changes negative and LpTokenChange positive.

Properties

| Edit this page View Source

AmmAccount

The pool's AMM account.

Declaration
public string AmmAccount { get; init; }
Property Value
Type Description
string
| Edit this page View Source

AmmAfter

The AMM entry as the transaction left it; null when the pool was deleted.

Declaration
public LOAmm AmmAfter { get; init; }
Property Value
Type Description
LOAmm
| Edit this page View Source

Asset

The first pool asset, as the transaction names it.

Declaration
public Common.IssuedCurrency Asset { get; init; }
Property Value
Type Description
Common.IssuedCurrency
| Edit this page View Source

Asset2

The second pool asset, as the transaction names it.

Declaration
public Common.IssuedCurrency Asset2 { get; init; }
Property Value
Type Description
Common.IssuedCurrency
| Edit this page View Source

Asset2Change

The change in the account's Asset2, the transaction fee excluded.

Declaration
public decimal Asset2Change { get; init; }
Property Value
Type Description
decimal
| Edit this page View Source

AssetChange

The change in the account's Asset, the transaction fee excluded.

Declaration
public decimal AssetChange { get; init; }
Property Value
Type Description
decimal
| Edit this page View Source

LpTokenChange

The change in the account's LP tokens.

Declaration
public decimal LpTokenChange { get; init; }
Property Value
Type Description
decimal

Methods

| Edit this page View Source

FromMetadata(IAMMDeposit, ITransactionMetadata)

Reads the outcome of an AMMDeposit from its metadata.

Declaration
public static AmmOutcome FromMetadata(IAMMDeposit transaction, ITransactionMetadata metadata)
Parameters
Type Name Description
IAMMDeposit transaction
ITransactionMetadata metadata
Returns
Type Description
AmmOutcome
Exceptions
Type Condition
ArgumentException

The metadata does not touch an AMM.

| Edit this page View Source

FromMetadata(IAMMWithdraw, ITransactionMetadata)

Reads the outcome of an AMMWithdraw from its metadata.

Declaration
public static AmmOutcome FromMetadata(IAMMWithdraw transaction, ITransactionMetadata metadata)
Parameters
Type Name Description
IAMMWithdraw transaction
ITransactionMetadata metadata
Returns
Type Description
AmmOutcome
Exceptions
Type Condition
ArgumentException

The metadata does not touch an AMM.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX