Class AmmOutcome
What an AMMDeposit or AMMWithdraw did to the sending account, read from the
metadata.
Inheritance
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 SourceAmmAccount
The pool's AMM account.
Declaration
public string AmmAccount { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
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 |
Asset
The first pool asset, as the transaction names it.
Declaration
public Common.IssuedCurrency Asset { get; init; }
Property Value
| Type | Description |
|---|---|
| Common.IssuedCurrency |
Asset2
The second pool asset, as the transaction names it.
Declaration
public Common.IssuedCurrency Asset2 { get; init; }
Property Value
| Type | Description |
|---|---|
| Common.IssuedCurrency |
Asset2Change
The change in the account's Asset2, the transaction fee excluded.
Declaration
public decimal Asset2Change { get; init; }
Property Value
| Type | Description |
|---|---|
| decimal |
AssetChange
The change in the account's Asset, the transaction fee excluded.
Declaration
public decimal AssetChange { get; init; }
Property Value
| Type | Description |
|---|---|
| decimal |
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 SourceFromMetadata(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. |
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. |